Experimental requirements
VLAN 10 Network Segment 192.168.10.0
PC0 192.168.10.2
VLAN 20 Network Segment 192.168.20.0
PC1 192.168.20.2
Experiment 1 using routers to achieve one-arm routing
Topology
s switch Configuration
Switch (config) #vlan 10
Switch (Config-vlan) #int F0/1
Switch (config-if) #switchport mode access
Switch (config-if) #switchport Access VLAN 10
Switch (config-if) #no shutdown
Switch (config) #vlan 20
Switch (Config-vlan) #int F0/2
Switch (config-if) #switchport mode access
Switch (config-if) #switchport Access VLAN 20
Switch (config-if) #no shutdown
Switch (config) #int f0/24
Switch (config-if) #switchport mode trunk
Switch (config-if) #no shutdown
R router Configuration
Router (config) #int f0/0
Router (config-if) #no shutdown
Router (config-if) #int f0/0.1
Router (config-subif) #encapsulation dot1q 10
Router (config-subif) #ip address 192.168.10.1 255.255.255.0
Router (config-subif) #no shutdown
Router (config-subif) #int f0/0.2
Router (config-subif) #encapsulation dot1q 20
Router (config-subif) #ip address 192.168.20.1 255.255.255.0
Router (config-subif) #no shutdown
Test
Set the PC0 IP to 192.168.10.2
Gateway: 192.168.10.1
PC1 IP is set to 192.168.20.2
Gateway: 192.168.20.1
Use PC1 ping pc0
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Network/lyjs/