华为静态默认浮动路由技术

优质老薛主机推荐:15%终身付款折扣:xwseo15 25%首次付款折扣 : xwseo115 点击下图进入购买

华为静态默认浮动路由技术拓扑图如下:

华为静态默认浮动路由技术

路由器型号是华为3260

路由器工作原理:是路由器通过连接不同的接口去连接不同的网段然后让多个网段进行通信。

路由器决定数据是否转发是根据路由表项去转发,如果有路由表项,就转发,如果没有路由表就丢了 。

静态路由是管理员手工为路由器增加的路由表项。

默认路由是一种特殊的静态路由

浮动路由通常用于路由备份,只有当优先级高的路由失效了,浮动路由才会生效。

为路由器增加静态路由的心法口诀:

缺少哪个网段,加哪个网段。

查看路由器信息:display version

项目要求:多个路由器之间实现全网互通。

给路由器的口配ip地址:int g0/0/0 ip add 12.0.0.1  24

环回口:int loopback0

环回口:ip add 1.1.1.1  32

1.1.1.1和4.4.4.4都是环回口

查看拓扑图我们发现AR1已知的直连网段有1.1.1.1和12.0.0.0这两个网段,那么AR1缺网段23.0.0.0和34.0.0.0 和4.4.4.4这三个网段。

那么根据口诀,缺缺少哪个网段,加哪个网段。

AR2添加网段

ip route-static 1.1.1.1 32 12.0.0.1(到达1.1.1。1这个网段需要经过12.0.0.1)

dis ip routing-table 查看路由表命令

direct 直连路由

static 静态路由

边缘路由器:路由器只有一根接入互联网。边缘路由器我们使用默认路由。其中AR1和AR4都是边缘路由器,所以需要加相同的默认路由。

ip route-static 0.0.0.0  0.0.0.0 12.0.0.2   其中第一个。0.0.0.0是代表所有网段,第二个0.0.0.0代表的是所有子网掩码。到达AR2 12.0.0.2

AR1配置

The device is running!

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
[Huawei]dis current-configuration
[V200R003C00]
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 12.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ip route-static 0.0.0.0 0.0.0.0 12.0.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Huawei]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

AR2配置

The device is running!

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
[Huawei]dis current-configuration
[V200R003C00]
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 12.0.0.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 23.0.0.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 25.0.0.2 255.255.255.0
#
interface NULL0
#
ip route-static 1.1.1.1 255.255.255.255 12.0.0.1
ip route-static 4.4.4.4 255.255.255.255 23.0.0.3
ip route-static 4.4.4.4 255.255.255.255 25.0.0.5 preference 70
ip route-static 34.0.0.0 255.255.255.0 23.0.0.3
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Huawei]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

AR3配置

The device is running!

SY
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
[Huawei]dis current-configuration
[V200R003C00]
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 23.0.0.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 34.0.0.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 35.0.0.3 255.255.255.0
#
interface NULL0
#
ip route-static 1.1.1.1 255.255.255.255 23.0.0.2
ip route-static 4.4.4.4 255.255.255.255 34.0.0.4
ip route-static 12.0.0.0 255.255.255.0 23.0.0.2
ip route-static 25.0.0.0 255.255.255.0 35.0.0.5
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Huawei]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

AR4配置

The device is running!

sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
[Huawei]dis current-configuration
[V200R003C00]
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 34.0.0.4 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
ip route-static 0.0.0.0 0.0.0.0 34.0.0.3
ip route-static 25.0.0.0 255.255.255.0 34.0.0.3
ip route-static 35.0.0.0 255.255.255.0 34.0.0.3
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Huawei]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

AR5配置

The device is running!

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
[Huawei]dis current-configuration
[V200R003C00]
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
ip address 35.0.0.5 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 25.0.0.5 255.255.255.0
#
interface NULL0
#
ip route-static 4.4.4.4 255.255.255.255 35.0.0.3
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[Huawei]

Please check whether system data has been changed, and save data in time

Configuration console time out, please press any key to log on

赞 (0)
分享到:更多 ()