赞
踩
交换机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通测试
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。