分别ip地点配置交换机每个接口配置
交换机LSW1
[LSW1]vlan 2
[LSW1]vlan 3
[LSW1]interface g 0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[LSW1]interface g 0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type access
[LSW1-GigabitEthernet0/0/2]port default vlan 2
[LSW1]interface g 0/0/3
[LSW1-GigabitEthernet0/0/3]port link-type access
[LSW1-GigabitEthernet0/0/3]port default vlan 3
[LSW1]interface g 0/0/4
[LSW1-GigabitEthernet0/0/4]port link-type trunk
[LSW1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
交换机LSW2
[LSW2]vlan 2
[LSW2]vlan 3
[LSW2]interface g 0/0/1
[LSW2-GigabitEthernet0/0/1]port link-type trunk
[LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[LSW2]interface g 0/0/2
[LSW2-GigabitEthernet0/0/2]port link-type access
[LSW2-GigabitEthernet0/0/2]port default vlan 2
[LSW2]interface g 0/0/3
[LSW2-GigabitEthernet0/0/3]port link-type access
[LSW2-GigabitEthernet0/0/3]port default vlan 3
路由器
[AR1]interface g 0/0/0.1
[AR1-GigabitEthernet0/0/0.1]ip address 192.168.1.1 24
[AR1-GigabitEthernet0/0/0.1]arp broadcast enable
[AR1]interface g 0/0/0.2
[AR1-GigabitEthernet0/0/0.2]ip address 192.168.2.1 24
[AR1-GigabitEthernet0/0/0.2]dot1q termination vid 3
[AR1-GigabitEthernet0/0/0.2]arp broadcast enable
[AR1]dhcp enable
[AR1]ip pool 1
Info: It's successful to create an IP address pool.
[AR1-ip-pool-1]network 192.168.1.0 mask 24
[AR1-ip-pool-1]gateway-list 192.168.1.1
[AR1-ip-pool-1]q
[AR1]interface g 0/0/0.1
[AR1-GigabitEthernet0/0/0.1]dhcp select global
[AR1]ip pool 2
Info: It's successful to create an IP address pool.
[[AR1-ip-pool-2]network 192.168.2.0 mask 24
[AR1-ip-pool-2]gateway-list 192.168.2.1
[AR1-ip-pool-2]q
[AR1]int
[AR1]interface g 0/0/0.2
[AR1-GigabitEthernet0/0/0.2]dhcp select global
测试
PC1
PC2
PC3
PC4
PING通测试
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |