概述
要求如图,那么先分配一下vlan
接下来,配置交换机
首先需要在sw1-3上创建vlan2到vlan6 (略)
先配置sw1:
[sw1]interface Ethernet0/0/1
[sw1-Ethernet0/0/1]p l a
[sw1-Ethernet0/0/1]port default vlan 2
[sw1-Ethernet0/0/1]int e 0/0/2
[sw1-Ethernet0/0/2]p l h
[sw1-Ethernet0/0/2]port hybrid pvid vlan 3
[sw1-Ethernet0/0/2]port hybrid untagged vlan 2 to 6
[sw1-Ethernet0/0/2]int
[sw1-Ethernet0/0/2]int g 0/0/2
[sw1-GigabitEthernet0/0/2]p l t
[sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
sw2:
[sw2]int g 0/0/1
[sw2-GigabitEthernet0/0/1]p l t
[sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/1]int e 0/0/1
[sw2-Ethernet0/0/1]p l a
[sw2-Ethernet0/0/1]port default vlan 2
[sw2-Ethernet0/0/1]int e 0/0/2
[sw2-Ethernet0/0/2]p l h
[sw2-Ethernet0/0/2]port hybrid untagged vlan 2 to 5
[sw2-Ethernet0/0/2]int g 0/0/2
[sw2-GigabitEthernet0/0/2]p l t
[sw2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/2]
sw3:
[sw3]interface g 0/0/2
[sw3-GigabitEthernet0/0/2]p l t
[sw3-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[sw3-GigabitEthernet0/0/2]int e 0/0/1
[sw3-Ethernet0/0/1]p l h
[sw3-Ethernet0/0/1]port hybrid pvid vlan 5
[sw3-Ethernet0/0/1]port hybrid untagged vlan 2 to 5
[sw3-Ethernet0/0/1]int e 0/0/2
[sw3-Ethernet0/0/2]p l h
[sw3-Ethernet0/0/2]port hybrid pvid vlan 6
接着在配置一下sw1上的 g0/0/1:
[sw1]int g 0/0/1
[sw1-GigabitEthernet0/0/1]p l h
[sw1-GigabitEthernet0/0/1]port hybrid untagged vlan 3 to 6
[sw1-GigabitEthernet0/0/1]port hybrid tagged vlan 2
然后配置DHCP:
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool xbox
Info: It’s successful to create an IP address pool.
[r1-ip-pool-xbox]network 192.168.1.0 mask 255.255.255.0
[r1-ip-pool-xbox]gateway-list 192.168.1.254
[r1-ip-pool-xbox]dns-list 114.114.114.114 8.8.8.8
[r1-ip-pool-xbox]q
[r1]ip pool playstation
Info: It’s successful to create an IP address pool.
[r1-ip-pool-playstation]network 192.168.2.0 mask 255.255.255.0
[r1-ip-pool-playstation]gateway-list 192.168.2.254
[r1-ip-pool-playstation]dns-list 114.114.114.114 8.8.8.8
[r1-ip-pool-playstation]q
[r1]interface GigabitEthernet 0/0/0.1
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]ip add 192.168.1.254 24
[r1-GigabitEthernet0/0/0.1]dhcp select global
r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1-GigabitEthernet0/0/0.1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.2.254 24
[r1-GigabitEthernet0/0/0]dhcp select global
设置电脑自动获取ip:
ping一下
大概…做完了吧
最后
以上就是动人机器猫为你收集整理的hcip课的VLAN 实验的全部内容,希望文章能够帮你解决hcip课的VLAN 实验所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复