首页 > 其他分享 >IP路由基础配置

IP路由基础配置

时间:2022-11-12 13:34:14浏览次数:29  
标签:0.0 24 配置 IP Ethernet1 192.168 DeviceT 路由

一、配置公网的IPv4 FRR功能示例

通过配置公网IPv4 FRR,主链路故障时,流量可以快速切换到备份链路。

组网需求

如下图所示,要求在DeviceT上备份出接口和备份下一跳,使得链路B为链路A的备份,当链路A出现故障时,流量可以快速切换至链路B上。

配置公网IPv4 FRR功能组网图

配置思路

1、在DeviceT、DeviceA和DeviceC上使能OSPF基本功能

2、在DeviceT、DeviceB和DeviceC上使能ISIS基本功能

3、在DeviceT上使能公网IPv4 FRR功能,查看备份出接口和备份下一跳的信息。

4、IPv4 Frr去使能后,查看备份出接口和备份下一跳的信息。

操作步骤

1、配置各个接口的IP地址

设备名称 接口 IP地址
DeviceT Ethernet1/0/1 172.16.1.1/24
Ethernet1/0/2 192.168.10.1/24
Ethernet1/0/3 192.168.20.1/24
DeviceA

Ethernet1/0/1

192.168.10.2/24
Ethernet1/0/2 192.168.11.2/24
DeviceB Ethernet1/0/1 192.168.20.2/24
Ethernet1/0/2 192.168.21.2/24
DeviceC

Ethernet1/0/1

172.17.1.1/24
Ethernet1/0/2 192.168.11.1/24
Ethernet1/0/3 192.168.21.1/24

 2、在DeviceT、DeviceA和DeviceC上配置OSPF

DeviceT

ospf 1
 area 0.0.0.0
  network 192.168.10.0 0.0.0.255
 area 0.0.0.1
  network 172.16.1.0 0.0.0.255

DeviceA

ospf 1
 area 0.0.0.0
  network 192.168.10.0 0.0.0.255
  network 192.168.11.0 0.0.0.255

DeviceC

ospf 1
 area 0.0.0.0
  network 192.168.11.0 0.0.0.255
  network 192.168.21.0 0.0.0.255
 area 0.0.0.2
  network 172.17.1.0 0.0.0.255

3、在DeviceT、DeviceB和DeviceC上配置IS-IS

DeviceT

#
isis 1
 network-entity 10.0000.0000.0001.00
#
interface GigabitEthernet1/0/3
 undo shutdown
 ip address 192.168.20.1 255.255.255.0
 isis enable 1
#

DeviceB

#
isis 1
 network-entity 10.0000.0000.0002.00 
#
interface Ethernet1/0/1
 undo shutdown
 ip address 192.168.20.2 255.255.255.0
 isis enable 1
#
interface GigabitEthernet1/0/2
 undo shutdown
 ip address 192.168.21.2 255.255.255.0
 isis enable 1
#

DeviceC

#
isis 1
 network-entity 10.0000.0000.0003.00 
#
interface Ethernet1/0/1
 undo shutdown
 ip address 172.17.1.1 255.255.255.0
 isis enable 1
#
interface Ethernet1/0/3
 undo shutdown
 ip address 192.168.21.1 255.255.255.0
 isis enable 1
#

4、查看路由信息

 从路由表中可以看到:到达目的地址172.17.1.0/24有两条路由,其下一跳为192.168.10.2的路由是最优路由(因为OSPF路由的优先级比IS-IS路由的优先级高一些)。

5、使能公网IPv4 FRR功能

#在DeviceT上使能FRR功能

#
ip frr
#

 

从路由表中可以看到:到达目的地址172.17.1.0/24的路由有备份出接口和备份下一跳(IS-IS路由成为了备份路由)。

6、检查配置结果

在DeviceT上模拟链路故障

[~DeviceT]interface Ethernet 1/0/2
[~DeviceT-Ethernet1/0/2]shutdown
[*DeviceT-Ethernet1/0/2]commit
[~DeviceT-Ethernet1/0/2]quit

 在DeviceT上查看到172.17.1.0/24路由的路由信息

 可以看到当链路A发生故障时,转发路径会快速切换到链路B上去。

 

  

 

标签:0.0,24,配置,IP,Ethernet1,192.168,DeviceT,路由
From: https://www.cnblogs.com/longlyseul/p/16883557.html

相关文章