拓扑
文章图片
配置 1.配置底层信息
AR1
[Huawei]sysname AR1
[AR1]int GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[AR1-GigabitEthernet0/0/1]qu
[AR1]int GigabitEthernet 0/0/2
[AR1-GigabitEthernet0/0/2]ip add 13.1.1.1 24
[AR1-GigabitEthernet0/0/2]qu
[AR1]int LoopBack 0
[AR1-LoopBack0]ip add 1.1.1.1 32
[AR1-LoopBack0]qu
AR2
[Huawei]sysname AR2
[AR2]int GigabitEthernet 0/0/1
[AR2-GigabitEthernet0/0/1]ip add 12.1.1.2 24
[AR2-GigabitEthernet0/0/1]qu
[AR2]int GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip add 192.168.1.2 24
AR3
system-view
[Huawei]sysname AR3
[AR3]int GigabitEthernet 0/0/2
[AR3-GigabitEthernet0/0/2]ip add 13.1.1.3 24
[AR3-GigabitEthernet0/0/2]qu
[AR3]int GigabitEthernet 0/0/0
[AR3-GigabitEthernet0/0/0]ip add 192.168.1.3 24
配置Easy ip
AR2
[AR2]acl 2000
[AR2-acl-basic-2000]rule 1 permit source 192.168.1.0 0.0.0.255
[AR2]int GigabitEthernet 0/0/1
[AR2-GigabitEthernet0/0/1]nat outbound 2000
[AR2]ip route-static 0.0.0.0 0.0.0.0 12.1.1.1
AR3
[AR3]acl 2000
[AR3-acl-basic-2000]rule 1 permit source 192.168.1.0 0.0.0.255
[AR3-acl-basic-2000]qu
[AR3]int GigabitEthernet 0/0/2
[AR3-GigabitEthernet0/0/2]nat outbound 2000
[AR3-GigabitEthernet0/0/2]qu
[AR3]ip route-static 0.0.0.0 0.0.0.0 13.1.1.1
搭建DHCP服务
AR2
[AR2]ip pool pc1
[AR2-ip-pool-pc1]network 192.168.1.0 mask 24
[AR2-ip-pool-pc1]gateway-list 192.168.1.2 192.168.1.3
[AR2-ip-pool-pc1]lease day 0 hour 3 minute 30
[AR2-ip-pool-pc1]dns-list 114.114.114.114
[AR2-ip-pool-pc1]excluded-ip-address 192.168.1.1------排除地址
[AR2-ip-pool-pc1]static-bind ip-address 192.168.1.100 mac-address 5489-9893-2B5C ------给MAC绑定指定IP
[AR2]int GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]dhcp select global
AR3
[AR3]ip pool pc2
[AR3-ip-pool-pc2]network 192.168.1.0 mask 24
[AR3-ip-pool-pc2]gateway-list 192.168.1.3
[AR3-ip-pool-pc2]dns-list 114.114.114.114
[AR3-ip-pool-pc2]lease day 0 hour 3 minute 30
[AR3]dhcp enable
[AR3]int GigabitEthernet 0/0/0
[AR3-GigabitEthernet0/0/0]dhcp select global
配置VRRP
AR2
[AR2]int GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.1
[AR2-GigabitEthernet0/0/0]vrrp vrid 1 priority 150
[AR2-GigabitEthernet0/0/0]vrrp vrid 1 preempt-mode timer delay 20------抢占延迟时间为20S
[AR2-GigabitEthernet0/0/0]vrrp vrid 1 track interface GigabitEthernet 0/0/1 reduced 30------检测上行链路,故障时优先级减少30
AR3
[AR3-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.1
[AR3-GigabitEthernet0/0/0]vrrp vrid 1 preempt-mode timer delay 20
[AR3-GigabitEthernet0/0/0]vrrp vrid 1 track int GigabitEthernet 0/0/2 reduced 30
链路聚合
LSW1
[Huawei]sysname LSW1
[LSW1]int GigabitEthernet 0/0/3
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[LSW1]int Eth-Trunk 1
[LSW1-Eth-Trunk1]mode lacp-static
[LSW1-Eth-Trunk1]least active-linknumber 4------聚合成员最低阀值数量4,低于4个活动成员此接口会自动down(默认情况阀值数量为1)
[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1
[LSW1-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
[LSW1]interface Eth-Trunk 1
[LSW1-Eth-Trunk1]port link-type trunk
[LSW1-Eth-Trunk1]port trunk allow-pass vlan all
【21.HCIA综合实验】LSW2
[Huawei]sysname LSW2
[LSW2]int GigabitEthernet 0/0/3
[LSW2-GigabitEthernet0/0/3]port link-type trunk
[LSW2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[LSW2]int Eth-Trunk 1
[LSW2-Eth-Trunk1]mode lacp-static
[LSW2-Eth-Trunk1]least active-linknumber 4
[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1
[LSW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
[LSW2]interface Eth-Trunk 1
[LSW2-Eth-Trunk1]port link-type trunk
[LSW2-Eth-Trunk1]port trunk allow-pass vlan all