目录
R1配置:
SY AR1
#
interface GigabitEthernet0/0/0
ip address 11.1.11.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 11.1.12.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 11.1.11.1 0.0.0.0
network 11.1.12.1 0.0.0.0
R2配置:
SY AR2
dhcp enable
#
ip pool vlan2
gateway-list 192.168.2.1
network 192.168.2.0 mask 255.255.255.0
excluded-ip-address 192.168.2.253 192.168.2.254
dns-list 10.1.12.1
#
ip pool vlan3
gateway-list 192.168.3.1
network 192.168.3.0 mask 255.255.255.0
excluded-ip-address 192.168.3.253 192.168.3.254
dns-list 10.1.22.1
#
interface GigabitEthernet0/0/0
ip address 10.1.22.1 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/1
ip address 10.1.12.1 255.255.255.0
dhcp select global
rip 1
undo summary
version 2
network 10.0.0.0
S1配置:
sysname S1
#
vlan batch 2 to 8
stp instance 2 root primary
stp instance 3 root secondary
dhcp enable
stp region-configuration
region-name EXAM
revision-level 1
instance 2 vlan 2
instance 3 vlan 3
active region-configuration
dhcp server group dhcp
dhcp-server 10.1.12.1 0
interface Vlanif2
ip address 192.168.2.254 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.1
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 55
dhcp select relay
dhcp relay server-select dhcp
#
interface Vlanif3
ip address 192.168.3.254 255.255.255.0
vrrp vrid 3 virtual-ip 192.168.3.1
#
interface Vlanif5
ip address 11.1.11.254 255.255.255.0
#
interface Vlanif7
ip address 10.1.12.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type access
port default vlan 7
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 3
port trunk allow-pass vlan 3 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 5
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 5
#
ospf 1
import-route rip 1
area 0.0.0.0
network 11.1.11.254 0.0.0.0
#
rip 1
undo summary
version 2
network 10.0.0.0
network 192.168.2.0
import-route ospf 1
S2配置:
sysname S2
#
vlan batch 2 to 8
#
stp instance 2 root secondary
stp instance 3 root primary
dhcp enable
stp region-configuration
region-name EXAM
revision-level 1
instance 2 vlan 2
instance 3 vlan 3
active region-configuration
dhcp server group dhcp
dhcp-server 10.1.22.1 0
interface Vlanif2
ip address 192.168.2.253 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.2.1
#
interface Vlanif3
ip address 192.168.3.253 255.255.255.0
vrrp vrid 3 virtual-ip 192.168.3.1
vrrp vrid 3 priority 120
vrrp vrid 3 preempt-mode timer delay 55
dhcp select relay
dhcp relay server-select dhcp
#
interface Vlanif6
ip address 11.1.12.254 255.255.255.0
#
interface Vlanif8
ip address 10.1.22.254 255.255.255.0
interface GigabitEthernet0/0/1
port link-type access
port default vlan 6
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 5
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk pvid vlan 3
port trunk allow-pass vlan 3 5
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 8
#
ospf 1
import-route rip 1
area 0.0.0.0
network 11.1.12.254 0.0.0.0
#
rip 1
undo summary
version 2
network 10.0.0.0
network 192.168.3.0
import-route ospf 1
S3配置:
sysname S3
#
vlan batch 2 to 8
stp region-configuration
region-name EXAM
revision-level 1
instance 2 vlan 2
instance 3 vlan 3
active region-configuration
interface Ethernet0/0/1
port link-type access
port default vlan 2
#
interface Ethernet0/0/2
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 5
#
interface Ethernet0/0/3
port link-type trunk
port trunk pvid vlan 2
port trunk allow-pass vlan 2 5
#
S4配置:
sysname S4
#
vlan batch 2 to 8
stp region-configuration
region-name EXAM
revision-level 1
instance 2 vlan 2
instance 3 vlan 3
active region-configuration
interface Ethernet0/0/1
port link-type access
port default vlan 3
#
interface Ethernet0/0/2
port link-type trunk
port trunk pvid vlan 3
port trunk allow-pass vlan 3 5
#
interface Ethernet0/0/3
port link-type trunk
port trunk pvid vlan 3
port trunk allow-pass vlan 3 5
#