一·拓扑结构
5a5fe2b2dedfff9ffeaab10b84b27207.png

二.实验要求
a0470b54674b1c58c2f664d1e4f73625.png

三.实验思路(配置命令)
(一)vlan划分与接口的配置
ACC-1
system-view
sysname ACC-1
vlan batch 10 20
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
stp edged-port enable
stp bpdu-filter enable
interface GigabitEthernet0/0/4
port link-type access
port default vlan 10
stp edged-port enable
stp bpdu filter enable
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
stp bpdu-protection
ACC-2
system-view
sysname ACC-2
vlan batch 10 20
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
stp edged-port enable
stp bpdu-filter enable
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
stp bpdu-protection
HJ-1
system-view
sysname HJ-1
vlan batch 10 20 100
链路聚合
interface Eth-Trunk 0
mode lacp-static
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/1
eth-trunk 0
interface GigabitEthernet0/0/2
eth-trunk 0
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 100
interface Vlanif 10
ip address 192.168.10.1 255.255.255.0
interface Vlanif 100
ip address 192.168.100.1 255.255.255.0
HJ-2
vlan batch 10 20 200
interface Eth-Trunk 0
mode lacp-static
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/1
eth-trunk 0
interface GigabitEthernet0/0/2
eth-trunk 0
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 200
interface Vlanif 20
ip address 192.168.20.1 255.255.255.0
interface Vlanif 200
ip address 192.168.200.1 255.255.255.0
CORE
system-view
sysname CORE
vlan batch 100 200 110
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 200
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 110
interface Vlanif 100
ip address 192.168.100.2 255.255.255.0
interface Vlanif 200
ip address 192.168.200.2 255.255.255.0
interface Vlanif 110
ip address 192.168.110.1 255.255.255.0
边界路由器
system-view
sysname 边界路由器
interface GigabitEthernet0/0/0
ip address 192.168.110.2 255.255.255.0
interface LoopBack 0
ip address 1.1.1.1 255.255.255.255
(二)生成树的配置
HJ-1
stp mode mstp
stp region-configuration
region-name cy
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
stp instance 1 root primary
stp instance 2 root secondary
interface GigabitEthernet0/0/3
stp edged-port enable
stp bpdu-protection enable
interface GigabitEthernet0/0/4
stp edged-port enable
stp bpdu-protection enable
interface Eth-Trunk 0
stp bpdu-filter enable
HJ-2
stp mode mstp
stp region-configuration
region-name cy
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
stp instance 2 root primary
stp instance 1 root secondary
interface GigabitEthernet0/0/3
stp edged-port enable
stp bpdu-protection enable
interface GigabitEthernet0/0/4
stp edged-port enable
stp bpdu-protection enable
interface Eth-Trunk 0
stp bpdu-filter enable
(三)VRRP
HJ-1
interface Vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 120
vrrp vrid 10 track interface GigabitEthernet0/0/5
vrrp vrid 10 preempt-mode timer delay 15
interface Vlanif 20
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 80
vrrp vrid 20 track interface GigabitEthernet0/0/5
vrrp vrid 20 preempt-mode timer delay 15
HJ-2
interface Vlanif 10
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 80
vrrp vrid 10 track interface GigabitEthernet0/0/5
vrrp vrid 10 preempt-mode timer delay 15
interface Vlanif 20
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 120
vrrp vrid 20 track interface GigabitEthernet0/0/5
vrrp vrid 20 preempt-mode timer delay 15
(四)OSPF
1.HJ-1
ospf 1 router-id 1.1.1.1
area 0
network 192.168.10.0 0.0.0.255
network 192.168.100.0 0.0.0.255
2.HJ-2
ospf 1 router-id 2.2.2.2
area 0
network 192.168.20.0 0.0.0.255
network 192.168.200.0 0.0.0.255
3.CORE
ospf 1 router-id 3.3.3.3
area 0
network 192.168.100.0 0.0.0.255
network 192.168.200.0 0.0.0.255
network 192.168.110.0 0.0.0.255
4.边界路由器
ospf 1 router-id 4.4.4.4
area 0
network 192.168.110.0 0.0.0.255
network 1.1.1.1 0.0.0.0
(五)DHCP地址池
1.HJ-1
dhcp enable
ip pool VLAN10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
dns-list 8.8.8.8
interface Vlanif 10
dhcp select global
2.HJ-2
dhcp enable
ip pool VLAN20
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
dns-list 8.8.8.8
interface Vlanif 20
dhcp select global
四.实验反思
1.对于配置命令不够熟悉,配置速度慢
2.对于VRRP OSPF不熟,需继续加强学习
3.对最小VLAN透传原则有疑惑,加强学习