ip route 192.168.12.0 255.255.255.0 172.16.4.22
ip route 192.168.13.0 255.255.255.0 172.16.4.22
ip route 192.168.14.0 255.255.255.0 172.16.4.22
ip http server
line con 0
line vty 0 4
password 看不到吧
login
line vty 5 15
login
end
switch-B 的配置
hostname switch-B
enable password 看不到吧
ip subnet-zero
ip routing
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
interface GigabitEthernet1/0/1
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/2
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/3
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/4
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/5
switchport access vlan 102
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/6
switchport access vlan 102
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/7
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/8
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/9
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/10
switchport access vlan 101
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/11
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/12
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/13
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/14
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/15
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/16
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/17
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/18
switchport access vlan 100
switchport mode access
no ip address
no mdix auto
interface GigabitEthernet1/0/19
switchport access vlan 600
switchport mode access
no ip address
no mdix auto
spanning-tree portfast
interface GigabitEthernet1/0/20
switchport access vlan 126
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
no mdix auto