1.18网络小实验

小实验

在这里插入图片描述

1、R1

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 1.1.1.1 32
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 10.0.0.1 24
[Huawei-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 11.0.0.1 24
[Huawei-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 12.0.0.1 24
[Huawei-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[Huawei-GigabitEthernet0/0/2]q
[Huawei]rip
[Huawei-rip-1]un summary
[Huawei-rip-1]version 2
[Huawei-rip-1]net 12.0.0.0
[Huawei-rip-1]net 11.0.0.0
[Huawei-rip-1]net 10.0.0.0
[Huawei-rip-1]net 1.0.0.0
[Huawei-rip-1]q
[Huawei]bgp 100
[Huawei-bgp]peer 2.2.2.2 as-number 100
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[Huawei-bgp]peer 7.7.7.7 as-number 100
[Huawei-bgp]peer 7.7.7.7 connect-interface LoopBack 0
[Huawei-bgp]peer 8.8.8.8 as-number 100
[Huawei-bgp]peer 8.8.8.8 connect-interface LoopBack 0
[Huawei-bgp]net 1.1.1.1 32
[Huawei-bgp]net 2.2.2.2 32
[Huawei-bgp]net 8.8.8.8 32
[Huawei-bgp]net 7.7.7.7 32
[Huawei-bgp]q
[Huawei]acl 2000
[Huawei-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
[Huawei-acl-basic-2000]int g0/0/2
[Huawei-GigabitEthernet0/0/2]nat outbound 2000
[Huawei-GigabitEthernet0/0/2]q

2、R2

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 2.2.2.2 32
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[Huawei-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 23.0.0.2 24
[Huawei-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 24.0.0.2 24
[Huawei-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[Huawei-GigabitEthernet0/0/2]q
[Huawei]rip
[Huawei-rip-1]un summary
[Huawei-rip-1]version 2
[Huawei-rip-1]net 12.0.0.0
[Huawei-rip-1]net 2.0.0.0
[Huawei-rip-1]q
[Huawei]ip route-static 3.3.3.3 32 23.0.0.3
[Huawei]ip route-static 4.4.4.4 32 24.0.0.3
[Huawei]bgp 100
[Huawei-bgp]peer 1.1.1.1 as-number 100
[Huawei-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[Huawei-bgp]peer 1.1.1.1 next-hop-local
[Huawei-bgp]peer 7.7.7.7 as-number 100
[Huawei-bgp]peer 7.7.7.7 connect-interface LoopBack 0
[Huawei-bgp]peer 7.7.7.7 next-hop-local
[Huawei-bgp]peer 3.3.3.3 as-number 200
[Huawei-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[Huawei-bgp]peer 3.3.3.3 ebgp-max-hop 2
[Huawei-bgp]peer 4.4.4.4 as-number 200
[Huawei-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[Huawei-bgp]peer 4.4.4.4 ebgp-max-hop 2
[Huawei-bgp]q
[Huawei]bgp 100
[Huawei-bgp]net 1.1.1.1 32
[Huawei-bgp]net 2.2.2.2 32
[Huawei-bgp]net 3.3.3.3 32
[Huawei-bgp]net 4.4.4.4 32
[Huawei-bgp]net 7.7.7.7 32
[Huawei-bgp]net 8.8.8.8 32
Info: The network does not exist.
[Huawei-bgp]net 192.168.1.0 24
[Huawei-bgp]net 192.168.2.0 24
[Huawei-bgp]net 192.168.3.0 24
[Huawei-bgp]net 192.168.4.0 24
[Huawei-bgp]peer 8.8.8.8 as-number 100
[Huawei-bgp]peer 8.8.8.8 connect-interface LoopBack 0
[Huawei-bgp]peer 8.8.8.8 next-hop-local
[Huawei]bgp 100
[Huawei-bgp]net 12.0.0.0 24
[Huawei]route-policy lop permit node 10
Info: New Sequence of this List.
[Huawei-route-policy]apply local-preference 200
[Huawei-route-policy]q
[Huawei]bgp 100
[Huawei-bgp]peer 4.4.4.41 route-policy lop import
[Huawei-bgp]q

3、R3

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 3.3.3.3 32
[Huawei-LoopBack0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 23.0.0.3 24
[Huawei-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 35.0.0.3 24
[Huawei-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ospf
[Huawei-ospf-1]a 0
[Huawei-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]net 35.0.0.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]ip route-static 2.2.2.2 32 23.0.0.2
[Huawei]bgp 200
[Huawei-bgp]peer 2.2.2.2 as-number 100
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[Huawei-bgp]peer 2.2.2.2 ebgp-max-hop 2
[Huawei-bgp]peer 4.4.4.4 as-number 200
[Huawei-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[Huawei-bgp]peer 5.5.5.5 as-number 200
[Huawei-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[Huawei-bgp]peer 5.5.5.5 next-hop-local
[Huawei-bgp]peer 6.6.6.6 as-number 200
[Huawei-bgp]peer 6.6.6.6 connect-interface LoopBack 0
[Huawei-bgp]peer 6.6.6.6 next-hop-local
[Huawei-bgp]net 2.2.2.2 32
[Huawei-bgp]net 3.3.3.3 32
[Huawei-bgp]net 4.4.4.4 32
[Huawei-bgp]net 5.5.5.5 32
[Huawei-bgp]net 6.6.6.6 32
[Huawei-bgp]net 56.0.0.0 24
[Huawei-bgp]q

4、R4

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 4.4.4.4 32
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 45.0.0.4 24
[Huawei-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 24.0.0.4 24
[Huawei-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[Huawei-GigabitEthernet0/0/2]q
[Huawei]ospf
[Huawei-ospf-1]a 0
[Huawei-ospf-1-area-0.0.0.0]net 4.4.4.4 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]net 45.0.0.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]ip route-static 2.2.2.2 32 24.0.0.2
[Huawei]bgp 200
[Huawei-bgp]peer 2.2.2.2 as-number 100
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[Huawei-bgp]peer 2.2.2.2 ebgp-max-hop 2
[Huawei-bgp]peer 3.3.3.3 as-number 200
[Huawei-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[Huawei-bgp]peer 5.5.5.5 as-number 200
[Huawei-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[Huawei-bgp]peer 5.5.5.5 next-hop-local
[Huawei-bgp]peer 6.6.6.6 as-number 200
[Huawei-bgp]peer 6.6.6.6 connect-interface LoopBack 0
[Huawei-bgp]peer 6.6.6.6 next-hop-local
[Huawei-bgp]net 2.2.2.2 32
[Huawei-bgp]net 3.3.3.3 32
[Huawei-bgp]net 4.4.4.4 32
[Huawei-bgp]net 5.5.5.5 32
[Huawei-bgp]net 6.6.6.6 32
[Huawei-bgp]net 56.0.0.0 24
[Huawei-bgp]q

5、R5

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 5.5.5.5 32
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 35.0.0.5 24
[Huawei-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 56.0.0.5 24
[Huawei-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 45.0.0.5 24
[Huawei-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[Huawei-GigabitEthernet0/0/2]q
[Huawei]ospf
[Huawei-ospf-1]a 0
[Huawei-ospf-1-area-0.0.0.0]net 5.5.5.5 0.0.0.0
[Huawei-ospf-1-area-0.0.0.0]net 35.0.0.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]net 45.0.0.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]q
[Huawei]ip route-static 6.6.6.6 32 56.0.0.6
[Huawei]ip route-static 192.168.5.0 24 56.0.0.6
[Huawei]ip route-static 192.168.6.0 24 56.0.0.6
[Huawei]bgp 200
[Huawei-bgp]peer 3.3.3.3 as-number 200
[Huawei-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[Huawei-bgp]peer 3.3.3.3 next-hop-local
[Huawei-bgp]peer 4.4.4.4 as-number 200
[Huawei-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[Huawei-bgp]peer 4.4.4.4 next-hop-local
[Huawei-bgp]peer 6.6.6.6 as-number 200
[Huawei-bgp]peer 6.6.6.6 connect-interface LoopBack 0
[Huawei-bgp]peer 6.6.6.6 next-hop-local
[Huawei-bgp]net 3.3.3.3 32
[Huawei-bgp]net 4.4.4.4 32
[Huawei-bgp]net 5.5.5.5 32
[Huawei-bgp]net 6.6.6.6 32
[Huawei-bgp]net 56.0.0.0 24
[Huawei-bgp]net 192.168.5.0 24
[Huawei-bgp]net 192.168.6.0 24
[Huawei-bgp]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool 1
Info: It’s successful to create an IP address pool.
[Huawei-ip-pool-1]gateway-list 192.168.6.6
[Huawei-ip-pool-1]network 192.168.6.0 mask 24
[Huawei-ip-pool-1]dns-list 8.8.8.8
[Huawei-ip-pool-1]int g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-GigabitEthernet0/0/1]q
[Huawei]route-policy lop permit node 10
Info: New Sequence of this List.
[Huawei-route-policy]apply local-preference 200
[Huawei-route-policy]q
[Huawei]bgp 200
[Huawei-bgp]peer 3.3.3.3 route-policy lop import
[Huawei-bgp]q

6、R6

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 6.6.6.6 32
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.6.6 24
[Huawei-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 192.168.5.6 24
[Huawei-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 56.0.0.6 24
[Huawei-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[Huawei-GigabitEthernet0/0/1]q
[Huawei]ip route-static 5.5.5.5 32 56.0.0.5
[Huawei]bgp 200
[Huawei-bgp]peer 3.3.3.3 as-number 200
[Huawei-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[Huawei-bgp]peer 3.3.3.3 next-hop-local
[Huawei-bgp]peer 4.4.4.4 as-number 200
[Huawei-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[Huawei-bgp]peer 4.4.4.4 next-hop-local
[Huawei-bgp]peer 5.5.5.5 as-number 200
[Huawei-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[Huawei-bgp]peer 5.5.5.5 next-hop-local
[Huawei-bgp]net 5.5.5.5 32
[Huawei-bgp]net 6.6.6.6 32
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select relay
[Huawei-GigabitEthernet0/0/0]dhcp relay server-ip 56.0.0.5
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 80
80 inside 192.168.5.1 80

7、LSW1

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 10 20 30 40 100
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei]lacp priority 1000
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]bpdu enable
[Huawei-Eth-Trunk1]mode lacp-static
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei-Eth-Trunk1]max active-linknumber 2
[Huawei-Eth-Trunk1]p l t
[Huawei-Eth-Trunk1]p t a v a
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]p l t
[Huawei-GigabitEthernet0/0/1]p t a v a
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]p l t
[Huawei-GigabitEthernet0/0/2]p t a v a
[Huawei-GigabitEthernet0/0/2]int g0/0/6
[Huawei-GigabitEthernet0/0/6]p l a
[Huawei-GigabitEthernet0/0/6]p d v 100
[Huawei-GigabitEthernet0/0/6]q
[Huawei]s m m
[Huawei]stp region-configuration
[Huawei-mst-region]region-name huawei
[Huawei-mst-region]revision-level 1
[Huawei-mst-region]instance 1 vlan 10 20
[Huawei-mst-region]instance 2 vlan 30 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei-mst-region]q
[Huawei]stp instance 1 root primary
[Huawei]stp instance 2 root secondary
[Huawei-Vlanif100]q
[Huawei]int loop0
[Huawei-LoopBack0]ip add 7.7.7.7 32
[Huawei-LoopBack0]q
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.1.10 24
[Huawei-Vlanif10]vrrp vrid 10 virtual-ip 192.168.1.1
[Huawei-Vlanif10]vrrp vrid 10 priority 130
[Huawei-Vlanif10]int vlan 20
[Huawei-Vlanif20]ip add 192.168.2.10 24
[Huawei-Vlanif20]vrrp vrid 20 virtual-ip 192.168.2.1
[Huawei-Vlanif20]vrrp vrid 20 priority 130
[Huawei-Vlanif20]int vlan 30
[Huawei-Vlanif30]ip add 192.168.3.10 24
[Huawei-Vlanif30]vrrp vrid 30 virtual-ip 192.168.3.1
[Huawei-Vlanif30]int vlan 40
[Huawei-Vlanif40]ip add 192.168.4.10 24
[Huawei-Vlanif40]vrrp vrid 40 virtual-ip 192.168.4.1
[Huawei-Vlanif40]int vlan 100
[Huawei-Vlanif100]ip add 10.0.0.10 24
[Huawei]rip
[Huawei-rip-1]un summary
[Huawei-rip-1]version 2
[Huawei-rip-1]net 10.0.0.0
[Huawei-rip-1]net 192.168.1.0
[Huawei-rip-1]net 192.168.2.0
[Huawei-rip-1]net 7.0.0.0
[Huawei-rip-1]q
[Huawei]bgp 100
[Huawei-bgp]peer 1.1.1.1 as-number 100
[Huawei-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[Huawei-bgp]peer 8.8.8.8 as-number 100
[Huawei-bgp]peer 8.8.8.8 connect-interface LoopBack 0
[Huawei-bgp]peer 2.2.2.2 as-number 100
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[Huawei-bgp]net 1.1.1.1 32
[Huawei-bgp]net 2.2.2.2 32
[Huawei-bgp]net 7.7.7.7 32
[Huawei-bgp]net 8.8.8.8 32
[Huawei-bgp]q

8、LSW2

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 10 20 30 40 100
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei]int Eth-Trunk 1
[Huawei-Eth-Trunk1]bpdu enable
[Huawei-Eth-Trunk1]mode lacp-static
[Huawei-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei-Eth-Trunk1]max active-linknumber 2
[Huawei-Eth-Trunk1]p l t
[Huawei-Eth-Trunk1]p t a v a
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]p l t
[Huawei-GigabitEthernet0/0/1]p t a v a
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]p l t
[Huawei-GigabitEthernet0/0/2]p t a v a
[Huawei-GigabitEthernet0/0/2]int g0/0/6
[Huawei-GigabitEthernet0/0/6]p l a
[Huawei-GigabitEthernet0/0/6]p d v 100
[Huawei-GigabitEthernet0/0/6]q
[Huawei]s m m
[Huawei]stp region-configuration
[Huawei-mst-region]region-name huawei
[Huawei-mst-region]revision-level 1
[Huawei-mst-region]instance 1 vlan 10 20
[Huawei-mst-region]instance 2 vlan 30 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei-mst-region]q
[Huawei]stp instance 2 root primary
[Huawei]stp instance 1 root secondary
[Huawei]int loop0
[Huawei-LoopBack0]ip add 8.8.8.8 32
[Huawei-LoopBack0]q
[Huawei]int vlan 10
[Huawei-Vlanif10]ip add 192.168.1.20 24
[Huawei-Vlanif10]vrrp vrid 10 virtual-ip 192.168.1.1
[Huawei-Vlanif10]int vlan 20
[Huawei-Vlanif20]ip add 192.168.2.20 24
[Huawei-Vlanif20]vrrp vrid 20 virtual-ip 192.168.2.1
[Huawei-Vlanif20]int vlan 30
[Huawei-Vlanif30]ip add 192.168.3.20 24
[Huawei-Vlanif30]vrrp vrid 30 virtual-ip 192.168.3.1
[Huawei-Vlanif30]vrrp vrid 30 priority 120
[Huawei-Vlanif30]int vlan 40
[Huawei-Vlanif40]ip add 192.168.4.20 24
[Huawei-Vlanif40]vrrp vrid 40 virtual-ip 192.168.4.1
[Huawei-Vlanif40]vrrp vrid 40 priority 120
[Huawei-Vlanif40]q
[Huawei]rip
[Huawei-rip-1]un summary
[Huawei-rip-1]version 2
[Huawei-rip-1]net 11.0.0.0
[Huawei-rip-1]net 192.168.3.0
[Huawei-rip-1]net 192.168.4.0
[Huawei-rip-1]net 8.0.0.0
[Huawei-rip-1]q
[Huawei]bgp 100
[Huawei-bgp]peer 1.1.1.1 as-number 100
[Huawei-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[Huawei-bgp]peer 7.7.7.7 as-number 100
[Huawei-bgp]peer 7.7.7.7 connect-interface LoopBack 0
[Huawei-bgp]peer 2.2.2.2 as-number 100
[Huawei-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[Huawei-bgp]net 1.1.1.1 32
[Huawei-bgp]net 2.2.2.2 32
[Huawei-bgp]net 7.7.7.7 32
[Huawei-bgp]net 8.8.8.8 32
[Huawei-bgp]q

9、LSW3

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 10 20 30 40 100
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]p l a
[Huawei-Ethernet0/0/1]p d v 10
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]p l a
[Huawei-Ethernet0/0/2]p d v 20
[Huawei-Ethernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]p l t
[Huawei-GigabitEthernet0/0/1]p t a v a
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]p l t
[Huawei-GigabitEthernet0/0/2]p t a v a
[Huawei-GigabitEthernet0/0/2]q
[Huawei]s m m
[Huawei]stp region-configuration
[Huawei-mst-region]region-name huawei
[Huawei-mst-region]revision-level 1
[Huawei-mst-region]instance 1 vlan 10 20
[Huawei-mst-region]instance 2 vlan 30 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei-mst-region]q

10、LSW4

u t m
Info: Current terminal monitor is off.
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0
[Huawei-ui-console0]id
[Huawei-ui-console0]idle-timeout 0 0
[Huawei-ui-console0]q
[Huawei]vlan bat 10 20 30 40 100
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]p l a
[Huawei-Ethernet0/0/1]p d v 30
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]p l a
[Huawei-Ethernet0/0/2]p d v 40
[Huawei-Ethernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]p l t
[Huawei-GigabitEthernet0/0/1]p t a v a
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]p l t
[Huawei-GigabitEthernet0/0/2]p t a v a
[Huawei-GigabitEthernet0/0/2]q
[Huawei]s m m
[Huawei]stp re
[Huawei]stp region-configuration
[Huawei-mst-region]region-name huawei
[Huawei-mst-region]revision-level 1
[Huawei-mst-region]instance 1 vlan 10 20
[Huawei-mst-region]instance 2 vlan 30 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment…done.
[Huawei-mst-region]q

11、实验结果

根据拓扑图按照以下要求完成实验。
1、链路聚合:SW1和SW2之间使用链路聚合互连,要求2条活跃,1条备用。
使用dis trunkmembership eth-trunk 1 验证结果。
在这里插入图片描述
2、MSTP:正常情况下各VLAN流量路径要求如下:
VLAN10:SW3->SW1->R1;VLAN20:SW3->SW1->R1;VLAN30:SW4->SW2->R1;VLAN40:SW4->SW2->R1。
使用dis stp brief 验证结果。
在这里插入图片描述
3、VRRP:正常情况下要求VLAN10、VLAN20的Master为SW1;VLAN30、VLAN40的Master为SW2。
使用dis vrrp 验证结果。
在这里插入图片描述
4、DHCP:R5为DHCP服务器,R6为DHCP中继代理,要求R5和R6之间使用静态路由为PC5、PC6提供动态分配IP服务。
在PC5、PC6使用ipconfig 验证结果。
在这里插入图片描述
5、路由重分发:R5和R6同在AS 200中,R5为OSPF的ASBR,而R6为外部路由,要求使用路由重分发使得AS 200全网段互通。
在R5使用dis cu ,在R3 使用dis ip routing-table 验证结果。
在这里插入图片描述
6、BGP互通:通过BGP实现1.1.1.1可以访问5.5.5.5
在R1 使用dis bgp routing-table 和 ping -a 1.1.1.1 5.5.5.5 验证结果。
在这里插入图片描述
7、BGP路径属性选路:通过BGP路径属性实现数据传输路径为 R1->R2->R4->R5->R6->R5->R3->R2->R1
在R2和R5 使用dis bgp routing-table 验证结果。
在这里插入图片描述
在这里插入图片描述
8、NAT:使用EasyIp进行转换使得Client1能够使用R1的g0/0/2接口的IP访问外网; 使用NAT-Server使得Client1访问Server1的web服务时能够使用R6的g0/0/1接口的IP和8080端口进行访问
在R1 使用display nat session all ,客户端访问http://56.0.0.6:8080 验证结果。
在这里插入图片描述
9、所有终端能够网络互通
要求PC2能够ping 通PC3和PC4;PC4能够ping 通PC5和Server1
使用ping 验证结果。
在这里插入图片描述
在这里插入图片描述
附加题:在R1使用BGP手动路由聚合,对192.168.1.0/24、192.168.2.0/24、192.168.3.0/24、192.168.4.0/24 进行地址汇总,实现其它路由器只接收到R1的聚合路由,而没有明细路由,从而防止其中某条明细路由出现丢失或震荡的情况,网络中的其它路由器也会删除或震荡。
使用dis bgp routing-table 验证结果。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/s15212790607/article/details/112971827