首页 > 代码库 > 2017.5.2上午

2017.5.2上午

PC1

IP: 192.168.1.2

Submark: 255.255.255.0

Gateway: 192.168.1.1

PC2

IP: 192.168.1.3

Submark: 255.255.255.0

Gateway: 192.168.1.1

PC3

IP: 192.168.1.4

Submark: 255.255.255.0

Gateway: 192.168.1.1

PC4

IP: 192.168.1.5

Submark: 255.255.255.0

Gateway: 192.168.1.1

 

Switch1

Switch>en

Switch#conf t

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#vlan 3

Switch(config-vlan)#exit

Switch(config)#inter fa 0/1

Switch(config-if)#switch access vlan 2

Switch(config-if)#exit

Switch(config)#inter fa 0/2

Switch(config-if)#switch access vlan 3

Switch(config-if)#exit

Switch(config)#inter fa 0/24

Switch(config-if)#switch mode trunk

Switch(config-if)#end

Switch#show vlan

 

Switch2

Switch>en

Switch#conf t

Switch(config)#vlan 2

Switch(config-vlan)#exit

Switch(config)#vlan 3

Switch(config-vlan)#exit

Switch(config)#int fa 0/1

Switch(config-if)#switch access vlan 2

Switch(config-if)#exit

Switch(config)#int fa 0/2

Switch(config-if)#switch access vlan 3

Switch(config-if)#exit

Switch(config)#int fa 0/24

Switch(config-if)#switch mode trunk

Switch(config-if)#end

Switch#show vlan

 

PC1 ping PC2 timeout

PC1 ping PC3 Reply

2017.5.2上午