本文主要是介绍华为dhcp stp vrrp nat acl 各种路由协议,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
本次实验的所有的前提是将IP地址配置好,其次是stp生成树,热备
然后向上配置,各种动态路由协议以及不同路由协议之间的重分发
其次是左上角area1的搭建虚链路以及右边的DHCP部署
最后就是服务器的部署和主机IP地址的配置
[Huawei]vl b 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type ac
[Huawei-Ethernet0/0/1]port default vl 10
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type ac
[Huawei-Ethernet0/0/2]port de vl 20
[Huawei]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type tr
[Huawei-Ethernet0/0/3]port tr all vl all
[Huawei-Ethernet0/0/3]int e0/0/4
[Huawei-Ethernet0/0/4]port link-type tr
[Huawei-Ethernet0/0/4]port tr all vl all
[Huawei-Ethernet0/0/4]q
[Huawei]stp region-configuration
[Huawei-mst-region]region-name 1
[Huawei-mst-region]instance 1 vl 10 to 20
[Huawei-mst-region]instance 2 vl 30 to 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-mst-region]stp enable
[Huawei]stp pathcost-standard legacy
Warning: The path cost of the current process will be set to the default value b
ecause the path cost standard is changed.
[Huawei]int e0/0/4
[Huawei-Ethernet0/0/4]stp instance 2 cost 20000
[Huawei-Ethernet0/0/4]int e0/0/1
[Huawei-Ethernet0/0/1]stp dis
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]stp dis
[Huawei]vl b 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int vl 10
[Huawei-Vlanif10]q
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port link-type ac
[Huawei-Ethernet0/0/1]port de vl 30
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]port link-type ac
[Huawei-Ethernet0/0/2]port de vl 40
[Huawei-Ethernet0/0/2]int e0/0/3
[Huawei-Ethernet0/0/3]port link-type tr
[Huawei-Ethernet0/0/3]port tr all vl all
[Huawei]int e0/0/4
[Huawei-Ethernet0/0/4]port link-type tr
[Huawei-Ethernet0/0/4]port tr all vl all
[Huawei-Ethernet0/0/4]q
[Huawei]stp region-configuration
[Huawei-mst-region]region-name 1
[Huawei-mst-region]instance 1 vl 10 to 20
[Huawei-mst-region]instance 2 vl 30 to 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-mst-region]stp en
[Huawei]stp pathcost-standard legacy
Warning: The path cost of the current process will be set to the default value b
ecause the path cost standard is changed.
[Huawei]int e0/0/4
[Huawei-Ethernet0/0/4]stp instance 1 cost 2000
[Huawei-Ethernet0/0/4]int e0/0/1
[Huawei-Ethernet0/0/1]stp dis
[Huawei-Ethernet0/0/1]int e0/0/2
[Huawei-Ethernet0/0/2]stp dis
[Huawei]vl b 10 20 30 40
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int vl 10
[Huawei-Vlanif10]ip add 1.1.1.1 24
[Huawei-Vlanif10]un sh
Info: Interface Vlanif10 is not shutdown.
[Huawei-Vlanif10]q
[Huawei]int vl 20
[Huawei-Vlanif20]ip add 1.1.2.1 24
[Huawei-Vlanif20]un sh
Info: Interface Vlanif20 is not shutdown.
[Huawei-Vlanif20]q
[Huawei]int vl 30
[Huawei-Vlanif30]ip add 1.1.3.1 24
[Huawei-Vlanif30]un sh
Info: Interface Vlanif30 is not shutdown.
[Huawei-Vlanif30]q
[Huawei]int vl 40
[Huawei-Vlanif40]ip add 1.1.4.1 24
[Huawei-Vlanif40]un sh
Info: Interface Vlanif40 is not shutdown.
[Huawei-Vlanif40]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type tr
[Huawei-GigabitEthernet0/0/1]port tr all vl all
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type tr
[Huawei-GigabitEthernet0/0/2]port tr all vl all
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type tr
[Huawei-GigabitEthernet0/0/3]port tr all vl all
[Huawei-GigabitEthernet0/0/3]un sh
Info: Interface GigabitEthernet0/0/3 is not shutdown.
[Huawei-GigabitEthernet0/0/3]q
[Huawei]stp region-configuration
[Huawei-mst-region]region-name 1
[Huawei-mst-region]instance 1 vl 10 to 20
[Huawei-mst-region]instance 2 vl 30 to 40
[Huawei-mst-region]active region-configuration
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-mst-region]stp en
[Huawei]stp pathcost-standard legacy
[Huawei]stp instance 1 root primary
[Huawei]stp instance 2 root se
[Huawei]int vl 10
[Huawei-Vlanif10]vrrp vrid 10 virtual-ip 1.1.1.100
[Huawei-Vlanif10]vrrp vrid 10 priority 120
[Huawei-Vlanif10]vrrp vrid 10 preempt-mode timer delay 10
[Huawei-Vlanif10]int vl 20
[Huawei-Vlanif20]vrrp vrid 20 virtual-ip 1.1.2.100
[Huawei-Vlanif20]vrrp vrid 20 priority 120
[Huawei-Vlanif20]vrrp vrid 20 preempt-mode timer delay 0
[Huawei-Vlanif20]int vl 30
[Huawei-Vlanif30]vrrp vrid 30 virtual-ip 1.1.3.100
[Huawei-Vlanif30]int vl 40
[Huawei-Vlanif40]vrrp vrid 40 virtual-ip 1.1.4.100
[Huawei-Vlanif40]q
[Huawei]ospf router-id 8.8.8.8
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]net 192.168.13.0 0.0.0.255
[Huawei]ospf
[Huawei-ospf-1]import-route static
[Huawei-ospf-1]q
[Huawei]ip route-static 1.1.0.0 255.255.128.0 1.1.5.1 preference 2
[Huawei]ip route-static 1.1.0.0 255.255.128.0 1.1.6.1 preference 3
bgp 1
router-id 1.1.1.1
peer 192.168.9.2 as-number 2
import-route ospf 1
import-route rip 1
#
ospf 1 router-id 2.2.2.2
import-route rip 1
import-route bgp cost 10
area 0.0.0.0
network 192.168.5.0 0.0.0.255
network 192.168.8.0 0.0.0.255
area 0.0.0.3
network 192.168.13.0 0.0.0.255
#
rip 1
network 192.168.11.0
import-route ospf 1
import-route bgp cost 10
[Huawei]bgp 2
[Huawei-bgp]router-id 5.5.5.5
[Huawei-bgp]peer 192.168.9.1 as-number 1
[Huawei-bgp]ipv4-family unicast
[Huawei-bgp-af-ipv4]network 192.168.10.0 24
[Huawei-bgp]import-route ospf 1
[Huawei-bgp]
[Huawei]rip
[Huawei-rip-1]net 192.168.11.0
[Huawei-rip-1]net 192.168.12.0
[Huawei-rip-1]
[Huawei]acl 2000
[Huawei-acl-basic-2000]rule 1 permit source 192.168.12.0 0.0.0.255
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]nat server protocol tcp global 192.168.11.111 8080
inside 192.168.12.2 80
[Huawei]rip
[Huawei-rip-1]import-route ospf 1
[Huawei]ospf router-id 3.3.3.3
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 192.168.8.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]q
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]net 192.168.3.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]q
[Huawei-ospf-1]q
[Huawei]ip route-static 192.168.7.0 24 192.168.6.2
[Huawei]isis 1
[Huawei-isis-1]is-level level-2
[Huawei-isis-1]network-entity 10.0000.0000.0001.00
[Huawei-isis-1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]isis enable 1
[Huawei]ospf
[Huawei-ospf-1]import-route isis cost 10
[Huawei-ospf-1]import-route static
[Huawei-ospf-1]q
[Huawei]isis 1
[Huawei-isis-1]import-route ospf 1
[Huawei-isis-1]q
[Huawei]ospf
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]v
[Huawei-ospf-1-area-0.0.0.1]vlink-peer 4.4.4.4
[Huawei]ospf r
[Huawei]ospf router-id 4.4.4.4
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]net 192.168.3.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]q
[Huawei-ospf-1]area 2
[Huawei-ospf-1-area-0.0.0.2]net 192.168.2.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.2]
[Huawei]ospf r
[Huawei]ospf router-id 6.6.6.6
[Huawei-ospf-1]area 2
[Huawei-ospf-1-area-0.0.0.2]net 192.168.2.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.2]net 192.168.1.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.2]
[Huawei]isis 1
[Huawei-isis-1]is-level level-2
[Huawei-isis-1]network-entity 10.0000.0000.0002.00
[Huawei-isis-1]q
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]isis en 1
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]isis en 1
[Huawei-GigabitEthernet0/0/1]
[Huawei]ip route-static 0.0.0.0 0 192.168.6.1
[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 global
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip pool 1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-1]network 192.168.7.0 mask 24
[Huawei-ip-pool-1]gateway-list 192.168.7.1
[Huawei-ip-pool-1]static-bind ip-address 192.168.7.100 mac-address 5489-9820-756
4
最后实现主机与主机之间都能ping通,而服务器则是访问转换后的网页IP地址加虚假端口号
这篇关于华为dhcp stp vrrp nat acl 各种路由协议的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!