R2
local-user r1 service-type ppp
interface Serial0/0/0
ppp authentication-mode chap
ppp chap user R2
ppp chap password simple 123456
ip address 172.16.0.2 255.255.255.0
interface GigabitEthernet0/0/0
ip address 10.16.26.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 10.16.27.2 255.255.255.0
interface GigabitEthernet0/0/2
ip address 10.16.23.2 255.255.255.0
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
ospf 10 router-id 2.2.2.2
area 0.0.0.0
network 10.16.26.0 0.0.0.255
network 10.16.27.0 0.0.0.255
network 10.16.23.0 0.0.0.255
network 172.16.0.0 0.0.0.255
network 2.2.2.2 0.0.0.0
SW1
vlan batch 10 20 30 40 50
stp instance 0 root primary
stp instance 1 root primary
stp instance 2 root secondary
dhcp enable
stp region-configuration
region-name netlab
revision-level 1
instance 1 vlan 10 30
instance 2 vlan 20 40
active region-configuration
ip pool vlan40
gateway-list 192.168.40.254
network 192.168.40.0 mask 255.255.255.0
ip pool vlan10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
ip pool vlan20
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
ip pool vlan30
gateway-list 192.168.30.254
network 192.168.30.0 mask 255.255.255.0
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.254
vrrp vrid 1 priority 253
vrrp vrid 1 preempt-mode timer delay 300
vrrp vrid 1 track interface GigabitEthernet0/0/24 reduced 160
dhcp select global
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.254
vrrp vrid 2 priority 253
vrrp vrid 2 preempt-mode timer delay 300
vrrp vrid 2 track interface GigabitEthernet0/0/24 reduced 160
dhcp select global
interface Vlanif30
ip address 192.168.30.252 255.255.255.0
vrrp vrid 3 virtual-ip 192.168.30.254
dhcp select global
interface Vlanif40
ip address 192.168.40.252 255.255.255.0
vrrp vrid 4 virtual-ip 192.168.40.254
dhcp select global
interface Vlanif50
ip address 192.168.50.1 255.255.255.0
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 50 60
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/22
eth-trunk 1
interface GigabitEthernet0/0/23
eth-trunk 1
interface GigabitEthernet0/0/24
port link-type access
port default vlan 50
interface LoopBack0
ip address 11.11.11.11 255.255.255.255
ospf 10 router-id 11.11.11.11
area 0.0.0.0
network 11.11.11.11 0.0.0.0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.30.0 0.0.0.255
network 192.168.40.0 0.0.0.255
network 192.168.50.0 0.0.0.255
R1
local-user r2 service-type ppp
interface Serial0/0/0
ppp authentication-mode chap
ppp chap user R1
ppp chap password simple 123456
ip address 172.16.0.1 255.255.255.0
interface GigabitEthernet0/0/0
ip address 192.168.50.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.60.2 255.255.255.0
interface GigabitEthernet0/0/2
ip address 192.168.13.1 255.255.255.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ospf 10 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 172.16.0.0 0.0.0.255
network 192.168.13.0 0.0.0.255
network 192.168.50.0 0.0.0.255
network 192.168.60.0 0.0.0.255
R3
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
rule 15 deny
interface GigabitEthernet0/0/0
ip address 192.168.13.3 255.255.255.0
interface GigabitEthernet0/0/1
ip address 10.16.23.3 255.255.255.0
interface GigabitEthernet0/0/2
ip address 202.20.20.220 255.255.255.0
nat outbound 2000
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
ospf 10 router-id 3.3.3.3
default-route-advertise
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 192.168.13.0 0.0.0.255
network 10.16.23.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 202.20.20.221
SW2
vlan batch 10 20 30 40 60
stp instance 0 root secondary
stp instance 1 root secondary
stp instance 2 root primary
dhcp enable
stp region-configuration
region-name netlab
revision-level 1
instance 1 vlan 10 30
instance 2 vlan 20 40
active region-configuration
ip pool vlan10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
ip pool vlan20
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
ip pool vlan30
gateway-list 192.168.30.254
network 192.168.30.0 mask 255.255.255.0
ip pool vlan40
gateway-list 192.168.40.254
network 192.168.40.0 mask 255.255.255.0
interface Vlanif10
ip address 192.168.10.253 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.254
dhcp select global
interface Vlanif20
ip address 192.168.20.253 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.254
dhcp select global
interface Vlanif30
ip address 192.168.30.253 255.255.255.0
vrrp vrid 3 virtual-ip 192.168.30.254
vrrp vrid 3 priority 253
vrrp vrid 3 preempt-mode timer delay 300
vrrp vrid 3 track interface GigabitEthernet0/0/24
dhcp select global
interface Vlanif40
ip address 192.168.40.253 255.255.255.0
vrrp vrid 4 virtual-ip 192.168.40.254
vrrp vrid 4 priority 253
vrrp vrid 4 preempt-mode timer delay 300
vrrp vrid 4 track interface GigabitEthernet0/0/24
dhcp select global
interface Vlanif60
ip address 192.168.60.1 255.255.255.0
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 50 60
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/22
eth-trunk 1
interface GigabitEthernet0/0/23
eth-trunk 1
interface GigabitEthernet0/0/24
port link-type access
port default vlan 60
interface LoopBack0
ip address 22.22.22.22 255.255.255.255
ospf 10 router-id 22.22.22.22
area 0.0.0.0
network 22.22.22.22 0.0.0.0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.30.0 0.0.0.255
network 192.168.40.0 0.0.0.255
network 192.168.60.0 0.0.0.255
SW3
vlan batch 10 20 30 40
stp bpdu-protection
stp region-configuration
region-name netlab
revision-level 1
instance 1 vlan 10 30
instance 2 vlan 20 40
active region-configuration
interface Ethernet0/0/1
stp edged-port enable
interface Ethernet0/0/2
port link-type access
port default vlan 20
stp edged-port enable
interface Ethernet0/0/21
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface Ethernet0/0/22
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
SW4
vlan batch 10 20 30 40
stp bpdu-protection
stp region-configuration
region-name netlab
revision-level 1
instance 1 vlan 10 30
instance 2 vlan 20 40
active region-configuration
interface Ethernet0/0/1
port link-type access
port default vlan 30
stp edged-port enable
interface Ethernet0/0/2
port link-type access
port default vlan 40
stp edged-port enable
interface Ethernet0/0/21
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface Ethernet0/0/22
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
SW6
vlan batch 60 70
interface Vlanif60
ip address 10.16.26.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
smart-link flush receive control-vlan 60
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
smart-link flush receive control-vlan 60
interface GigabitEthernet0/0/24
port link-type access
port default vlan 60
stp disable
monitor-link group 1
port GigabitEthernet0/0/24 uplink
port GigabitEthernet0/0/1 downlink 1
port GigabitEthernet0/0/2 downlink 2
interface LoopBack0
ip address 66.66.66.66 255.255.255.255
ospf 10 router-id 66.66.66.66
area 0.0.0.0
network 10.16.26.0 0.0.0.255
network 66.66.66.66 0.0.0.0
SW7
vlan batch 60 70
interface Vlanif70
ip address 10.16.27.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
smart-link flush receive control-vlan 60
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
smart-link flush receive control-vlan 60
interface GigabitEthernet0/0/24
port link-type access
port default vlan 70
stp disable
interface LoopBack0
ip address 77.77.77.77 255.255.255.255
ospf 10 router-id 77.77.77.77
area 0.0.0.0
network 77.77.77.77 0.0.0.0
network 10.16.27.0 0.0.0.255
SW8
vlan batch 60 70
interface Ethernet0/0/20
port link-type access
port default vlan 60
stp edged-port enable
interface Ethernet0/0/21
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
interface Ethernet0/0/22
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
smart-link group 1
smart-link enable
port Ethernet0/0/22 master
port Ethernet0/0/21 slave
flush send control-vlan 60
SW9
vlan batch 60 70
int g0/0/20
port link-type access
port default vlan 70
stp edged-port enable
interface Ethernet0/0/21
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
interface Ethernet0/0/22
port link-type trunk
port trunk allow-pass vlan 60 70
stp disable
smart-link group 1
smart-link enable
port Ethernet0/0/22 master
port Ethernet0/0/21 slave
flush send control-vlan 60
MSTP
vlan batch 10 20 30 40 50
stp instance 0 root primary
stp instance 1 root primary
stp instance 2 root secondary
stp region-configuration
region-name netlab
revision-level 1
instance 1 vlan 10 30
instance 2 vlan 20 40
active region-configuration
VRRP,实例
vlan batch 10 20 30 40 60
stp instance 0 root secondary
stp instance 1 root secondary
stp instance 2 root primary
interface Vlanif10
ip address 192.168.10.253 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.254
vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 160
interface Vlanif20
ip address 192.168.20.253 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.254
vrrp vrid 2 track interface GigabitEthernet0/0/1 reduced 160
interface Vlanif30
ip address 192.168.30.253 255.255.255.0
vrrp vrid 3 virtual-ip 192.168.30.254
vrrp vrid 3 priority 253
vrrp vrid 3 preempt-mode timer delay 300
vrrp vrid 3 track interface GigabitEthernet0/0/1 reduced 160
interface Vlanif40
ip address 192.168.40.253 255.255.255.0
vrrp vrid 4 virtual-ip 192.168.40.254
vrrp vrid 4 priority 253
vrrp vrid 4 preempt-mode timer delay 300
vrrp vrid 4 track interface GigabitEthernet0/0/1 reduced 160
stp region-configuration
region-name netlab
revision-level 1
instance 1 vlan 10 30
instance 2 vlan 20 40
active region-configuration