Cat-God-007

导航

华为网络-ensp(HCIA期末实验)

一:网络拓扑图

在这里插入图片描述

二:相关问题及解决方案

(1)把每部分网络都打通
想法:先把两台接入交换机的相应端口打开,在把两台汇聚交换机(CORE)的端口打开,并连接到下面的接入交换机。其次,配置路由器与两台汇聚交换机的链路,最后配置路由器到云。

ACC1:
#undo terminal monitor
[Huawei]vlan 10
[Huawei]int  e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 10
[Huawei-Ethernet0/0/1]display this
[Huawei]int  g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]display this
[Huawei]int  g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/2]display this


ACC2:
#undo terminal monitor
[Huawei]vlan 20
[Huawei]int  e0/0/1
[Huawei-Ethernet0/0/1]port link-type access
[Huawei-Ethernet0/0/1]port default vlan 20
[Huawei-Ethernet0/0/1]display this
[Huawei]int  g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]display this
[Huawei]int  g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/2]display this

CORE1:
#undo terminal monitor
[Huawei]vlan batch 10 20 100 300
[Huawei]int  g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/2]display this
[Huawei]int  g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type trunk
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/3]display this
[Huawei]int  g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 100
[Huawei-GigabitEthernet0/0/1]display this
[Huawei]int  g0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vlan 300
[Huawei-GigabitEthernet0/0/4]display this
[Huawei]int V10
[Huawei-Vlanif10]ip address 192.168.10.1 255.255.255.0
[Huawei-Vlanif10]display this
[Huawei]int V20
[Huawei-Vlanif20]ip ad 192.168.20.1 255.255.255.0
[Huawei-Vlanif20]display this
[Huawei]int V100
[Huawei-Vlanif100]ip ad 172.16.1.1 255.255.255.0
[Huawei-Vlanif100]display this
[Huawei]int V300
[Huawei-Vlanif300]ip ad 172.16.3.1 255.255.255.0
[Huawei-Vlanif300]display this

CORE2:
#undo terminal monitor
[Huawei]vlan batch 10 20 200 300
[Huawei]int  g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/2]display this
[Huawei]int  g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type trunk
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/3]display this
[Huawei]int  g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 200
[Huawei-GigabitEthernet0/0/1]display this
[Huawei]int  g0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vlan 300
[Huawei-GigabitEthernet0/0/4]display this
[Huawei]int  V10
[Huawei-Vlanif10]ip address 192.168.10.1 255.255.255.0
[Huawei-Vlanif10]display this
[Huawei]int  V20
[Huawei-Vlanif20]ip ad 192.168.20.1 255.255.255.0
[Huawei-Vlanif20]display this
[Huawei]int  V200
[Huawei-Vlanif100]ip ad 172.16.2.1 255.255.255.0
[Huawei-Vlanif100]display this
[Huawei]int V300
[Huawei-Vlanif300]ip ad 172.16.3.2 255.255.255.0
[Huawei-Vlanif300]display this

AR1:
#undo terminal monitor
[Huawei]int  g0/0/1
[Huawei-GigabitEthernet0/0/1]ip ad 172.16.1.2 255.255.255.0
[Huawei-GigabitEthernet0/0/1]display this
[Huawei]interface GigabitEthernetg0/0/2
[Huawei-GigabitEthernet0/0/2]ip ad 172.16.2.2 255.255.255.0
[Huawei-GigabitEthernet0/0/2]display this
[Huawei]int  g0/0/0
#这里是输入自己的网址
[Huawei-GigabitEthernet0/0/0]ip ad 192.168.30.2 255.255.255.0  #192.168.x.2 255.255.255.0
[Huawei-GigabitEthernet0/0/0]display this
[Router] ip route-static 0.0.0.0 0.0.0.0 1.1.1.1                           
[Router] ip route-static 192.168.10.0 255.255.255.0 172.16.1.1
[Router] ip route-static 192.168.10.0 255.255.255.0 172.16.2.1 preference 70    
[Router] ip route-static 192.168.20.0 255.255.255.0 172.16.1.1
[Router] ip route-static 192.168.20.0 255.255.255.0 172.16.2.1 preference 70   
[Router]display this

CORE1:
#undo terminal monitor
[CORE1] ip route-static 0.0.0.0 0.0.0.0 172.16.1.2   
[CORE1] ip route-static 0.0.0.0 0.0.0.0 172.16.3.2  preference 70   
[CORE1]display this

CORE2:
#undo terminal monitor
[CORE2] ip route-static 0.0.0.0 0.0.0.0 172.16.2.2
[CORE2] ip route-static 0.0.0.0 0.0.0.0 172.16.3.1 preference 70
[CORE2]display this
//网关配置192.168.10.3就可以ping
//192.168.x.2
//172.16.1.1,172.16.2.1,172.16.3.1
//192.168.20.1
//192.168.10.1

(2)配置VRRP主备备份,配置出口路由器实现内网共享上网
想法:在两台汇聚交换机上配置VRRP的主备,并在路由器上配置NAT进行内网共享上网

CORE1:
#undo terminal monitor
[CORE1] int  V10
[CORE1-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.3       
[CORE1-Vlanif10] vrrp vrid 1 priority 120                       
[CORE1-Vlanif10] vrrp vrid 1 preempt-mode timer delay 20
[CORE1-Vlanif10]display this
[CORE1-Vlanif10] quit
[CORE1] int  V20
[CORE1-Vlanif20] vrrp vrid 2 virtual-ip 192.168.20.3   
[CORE1-Vlanif20] vrrp vrid 2 priority 120
[CORE1-Vlanif20] vrrp vrid 2 preempt-mode timer delay 20
[CORE1-Vlanif20]display this
[CORE1-Vlanif20] quit

CORE2:
#undo terminal monitor
[CORE2] interface Vlanif 10
[CORE2-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.3
[CORE1-Vlanif10]display this
[CORE2-Vlanif10] quit
[CORE2] int  V20
[CORE2-Vlanif20] vrrp vrid 2 virtual-ip 192.168.20.3
[CORE1-Vlanif20]display this
[CORE2-Vlanif20] quit

AR1:
#undo terminal monitor
[Huawei] acl 2000
[Router-acl-basic-2000] rule permit source 192.168.10.0 0.0.0.255    
[Router-acl-basic-2000] rule permit source 192.168.20.0 0.0.0.255   
[Router-acl-basic-2000] rule permit source 172.16.1.0 0.0.0.255
[Router-acl-basic-2000] rule permit source 172.16.2.0 0.0.0.255
[Router-acl-basic-2000]display this
[Router] int  g0/0/0
[Router-GigabitEthernet0/0/0] nat outbound 2000
[Router-GigabitEthernet0/0/0] quit
[Router] dns resolve
[Router] dns server 8.8.8.8
[Router] dns proxy enable
#将网关设置为192.168.10.3即可以实现上网

(3)配置VRRP联动接口检测链路。

CORE1:
#undo terminal monitor
[CORE1] int V10
[CORE1-Vlanif10] vrrp vrid 1 track interface GigabitEthernet 0/0/1 reduced 100 
[CORE1-Vlanif10]dispaly this
[CORE1-Vlanif10] quit
[CORE1] int  V20
[CORE1-Vlanif20] vrrp vrid 2 track interface GigabitEthernet 0/0/1 reduced 100
[CORE1-Vlanif20]dispaly this
[CORE1-Vlanif20] quit

(4)把VRRP主备备份配置为负载分担

CORE1:
#undo terminal monitor
[CORE1] int  V20
[CORE1-Vlanif20] undo vrrp vrid 2 preempt-mode timer delay
[CORE1-Vlanif20] undo vrrp vrid 2 priority
[CORE1-Vlanif20] dispaly this
[CORE1-Vlanif20] quit

CORE2:
#undo terminal monitor
[CORE2] int  V20
[CORE2-Vlanif20] vrrp vrid 2 priority 120
[CORE2-Vlanif20] vrrp vrid 2 preempt-mode timer delay 20
[CORE2-Vlanif20] vrrp vrid 2 track interface GigabitEthernet 0/0/1 reduced 100
[CORE2-Vlanif20] display this
[CORE2-Vlanif20] quit

(5)多条物理链路捆绑为一条逻辑链路,配置LACP模式的链路聚合来增加带宽和提高可靠性。
想法:把中间的两条物理联络合成一条逻辑链路(聚合链路)

CORE1:
#undo terminal monitor
[CORE1] clear configuration int g0/0/4
Warning: All configurations of the interface will be cleared, and its state will be shutdown. Continue? [Y/N] :y                                               
Info: Total 2 command(s) executed, 2 successful, 0 failed.  
[CORE1]int g0/0/4
[CORE1-GigabitEthernet0/0/4] undo shutdown
[CORE1-GigabitEthernet0/0/4]dispaly this
[CORE1-GigabitEthernet0/0/4] quit
[CORE1] interface Eth-Trunk 1
[CORE1-Eth-Trunk1] mode lacp
[CORE1-Eth-Trunk1] trunkport GigabitEthernet 0/0/4 to 0/0/5
[CORE1-Eth-Trunk1] port link-type access
[CORE1-Eth-Trunk1] port default vlan 300
[CORE1-Eth-Trunk1]dispaly this
[CORE1-Eth-Trunk1] quit
[CORE1] lacp priority 100
[CORE1] interface Eth-Trunk 1
[CORE1-Eth-Trunk1] max active-linknumber 2
[CORE1-Eth-Trunk1]dispaly this
[CORE1-Eth-Trunk1] quit
[CORE1] int  g0/0/5
[CORE1-GigabitEthernet0/0/5] lacp priority 100
[CORE1-GigabitEthernet0/0/5]dispaly this
[CORE1-GigabitEthernet0/0/5] quit
[CORE1] int  g0/0/4
[CORE1-GigabitEthernet0/0/4] lacp priority 100
[CORE1-GigabitEthernet0/0/4]dispaly this
[CORE1-GigabitEthernet0/0/4] quit

CORE2:
#undo terminal monitor
[CORE2]clear configuration int g0/0/4
Warning: All configurations of the interface will be cleared, and its state will
 be shutdown. Continue? [Y/N] :y
Info: Total execute 2 command(s), 2 successful, 0 failed.
[CORE2]int g0/0/4
[CORE2-GigabitEthernet0/0/4]undo shutdown
[CORE1-GigabitEthernet0/0/4]dispaly this
[CORE2-GigabitEthernet0/0/4]q
[CORE2]interface Eth-Trunk 1
[CORE2-Eth-Trunk1]mode lacp
[CORE2-Eth-Trunk1]trunkport GigabitEthernet 0/0/4 to 0/0/5
[CORE2-Eth-Trunk1] port link-type access
[CORE2-Eth-Trunk1]port default vlan 300
[CORE2-Eth-Trunk1]dispaly this
[CORE2-Eth-Trunk1]q
[CORE2]interface Eth-Trunk 1
[CORE2-Eth-Trunk1]max active-linknumber 2
[CORE2-Eth-Trunk1]dispaly this
[CORE2-Eth-Trunk1]q

在这里插入图片描述

感谢大家,点赞,收藏,关注,评论!

posted on 2021-10-10 20:59  成果和地方  阅读(98)  评论(0编辑  收藏  举报  来源