华为路由器下实现浮动路由、备份接口和虚拟模板链路

浮动路由实现

R1配置

[R1]dis cu

Now create configuration...

Current configuration

!

version 1.74

sysname R1

firewall enable

aaa-enable

aaa accounting-scheme optional

!

interface Aux0 

async mode flow

link-protocol ppp

!

interface Ethernet0 

ip address 192.168.1.1 255.255.255.0

!

interface Ethernet1 

!

interface Serial0 

link-protocol ppp

ip address 192.168.2.1 255.255.255.0

!

interface Serial1 

link-protocol ppp

ip address 192.168.3.1 255.255.255.0

!

voice-setup

!

subscriber-line 0

!

subscriber-line 1

!

quit

!

quit

ip route-static 192.168.4.0 255.255.255.0 192.168.2.2 preference 30 

ip route-static 192.168.4.0 255.255.255.0 192.168.3.2 preference 60 

!

return

R1路由:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R2配置:

[R2]dis cu

Now create configuration...

Current configuration

!

version 1.74

sysname R2

firewall enable

aaa-enable

aaa accounting-scheme optional

!

interface Aux0 

async mode flow

link-protocol ppp

!

interface Ethernet0 

ip address 192.168.4.1 255.255.255.0

!

interface Serial0 

clock DTECLK1

link-protocol ppp

ip address 192.168.2.2 255.255.255.0

!

interface Serial1 

clock DTECLK1

link-protocol ppp

ip address 192.168.3.2 255.255.255.0

!

quit

ip route-static 192.168.1.0 255.255.255.0 192.168.2.1 preference 30 

ip route-static 192.168.1.0 255.255.255.0 192.168.3.1 preference 60 

!

return

R2路由:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

从PC1上追踪路由到PC2

华为路由器下实现浮动路由、备份接口和虚拟模板链路

断掉2.0网段之后查看R1的路由表

华为路由器下实现浮动路由、备份接口和虚拟模板链路

再次从PC1上追踪路由到PC2

华为路由器下实现浮动路由、备份接口和虚拟模板链路

备份接口实现

华为路由器下实现浮动路由、备份接口和虚拟模板链路

未配置备份端口的R1配置:

[R1]dis cu

Now create configuration...

Current configuration

!

version 1.74

sysname R1

firewall enable

aaa-enable

aaa accounting-scheme optional

!

interface Aux0 

async mode flow

link-protocol ppp

!

interface Ethernet0 

ip address 192.168.1.1 255.255.255.0

ospf enable area 0.0.0.0

!

interface Ethernet1 

!

interface Serial0 

link-protocol ppp

standby interface Serial 1

ip address 192.168.2.1 255.255.255.0

ospf enable area 0.0.0.0

!

interface Serial1 

link-protocol ppp

ip address 192.168.3.1 255.255.255.0

ospf enable area 0.0.0.0

!

voice-setup

!

subscriber-line 0

!

subscriber-line 1

!

quit

!

quit

ospf enable

!

quit

!

Return

R1路由表:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R1端口状态:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R2的配置

[R2]dis cu

Now create configuration...

Current configuration

!

version 1.74

sysname R2

firewall enable

aaa-enable

aaa accounting-scheme optional

!

interface Aux0 

async mode flow

link-protocol ppp

!

interface Ethernet0 

ip address 192.168.4.1 255.255.255.0

ospf enable area 0.0.0.0

!

interface Serial0 

clock DTECLK1

link-protocol ppp

standby interface Serial 1

ip address 192.168.2.2 255.255.255.0

ospf enable area 0.0.0.0

!

interface Serial1 

clock DTECLK1

link-protocol ppp

ip address 192.168.3.2 255.255.255.0

ospf enable area 0.0.0.0

!

quit

ospf enable

!

quit

!

return

R2路由表:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R2端口状态:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

从PC1上追踪路由到主机PC2

华为路由器下实现浮动路由、备份接口和虚拟模板链路

当掉R1上的s0端口

端口信息切换过程

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R1路由表:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R2路由表:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

再次从PC1上追踪路由到主机PC2

华为路由器下实现浮动路由、备份接口和虚拟模板链路

虚拟模板链路实现

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R1配置:

[R1]dis cu

Now create configuration...

Current configuration

!

version 1.74

sysname R1

firewall enable

aaa-enable

aaa accounting-scheme optional

!

interface Aux0 

async mode flow

link-protocol ppp

!

interface Ethernet0 

ip address 192.168.1.1 255.255.255.0

!

interface Ethernet1 

!

interface Serial0 

link-protocol ppp

ppp mp

ppp mp interface Virtual-Template1

shutdown

!

interface Serial1 

link-protocol ppp

ppp mp

ppp mp interface Virtual-Template1

!

interface Virtual-Template1 

link-protocol ppp

ip address 192.168.2.1 255.255.255.0

!

voice-setup

!

subscriber-line 0

!

subscriber-line 1

!

quit

!

quit

ip route-static 0.0.0.0 0.0.0.0 192.168.2.2 preference 60 

!

return

R1路由:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

R2配置:

[R2]dis cu

Now create configuration...

Current configuration

!

version 1.74

sysname R2

firewall enable

aaa-enable

aaa accounting-scheme optional

!

interface Aux0 

async mode flow

link-protocol ppp

!

interface Ethernet0 

ip address 192.168.4.1 255.255.255.0

!

interface Serial0 

clock DTECLK1

link-protocol ppp

ppp mp

ppp mp interface Virtual-Template1

!

interface Serial1 

clock DTECLK1

link-protocol ppp

ppp mp

ppp mp interface Virtual-Template1

!

interface Virtual-Template1 

link-protocol ppp

ip address 192.168.2.2 255.255.255.0

!

quit

ip route-static 0.0.0.0 0.0.0.0 192.168.2.1 preference 60 

!

return

R2路由:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

测试:为断开R1上s0端口

从PC1上ping主机PC2

华为路由器下实现浮动路由、备份接口和虚拟模板链路

断开R2上s0或者s1之间的端口测试从PC2上ping主机PC1:

华为路由器下实现浮动路由、备份接口和虚拟模板链路

转载于:https://blog.51cto.com/wnqcmq/1197601

相关文章:

  • 2022-02-19
  • 2021-06-15
  • 2021-12-19
  • 2021-07-06
  • 2021-05-29
  • 2021-11-02
  • 2022-01-11
猜你喜欢
  • 2021-06-03
  • 2021-12-29
  • 2021-12-18
  • 2021-11-27
  • 2021-12-16
  • 2021-08-25
  • 2021-06-26
相关资源
相似解决方案