、    

 

锐捷网管交换机伪链路功能配置举例

一、组网需求
如下图:两个不同站点通过MPLS骨干网交互VPN路由,同时这两个站点间又假设了一条“后门链路”,其目的为了确保在MPLS骨干网发生故障时,两个站点的信息交互仍然可以通过这条备份链路正常交互。

二、 组网图
伪链路配置组网图

三、配置要点
●  在SITEA上配置和PE1、SITEB站点相连的接口运行OSPF协议,其中和SITEB站点是通过后门链路运行OSPF协议,配置接口OSPF Cost值。
● 在SITEB上配置和PE2、SITEA站点相连的接口运行OSPF协议,其中和SITEA站点是通过备份链路运行OSPF协议,配置接口的OSPF的Cost值。
●  在PE1上配置Loopback接口,创建一个VRF:VPN A,定义RD值和RT值,并把VRF和对应的接口关联,连接CE的接口关联VRF;配置VRF的环回口,用来建立伪链路,配置BGP协议,和PE2建立MP-IBGP会话,通过OSPF协议和CE交互路由,和PE2上的OSPF实例建立伪链路,配置骨干网MPLS信令,打开公网口的MPLS能力,配置骨干网路由协议。
●  在PE2上配置Loopback接口,创建一个VRF:VPN A,定义RD值和RT值,并把VRF和对应的接口关联,连接CE的接口关联VRF,配置VRF的环回口,用来建立伪链路;配置BGP协议,和PE1建立MP-IBGP会话,通过OSPF协议和CE交互VPN路由,配置和PE1建立伪链路;配置骨干网MPLS信令,打开公网口的MPLS能力,配置骨干网路由协议。
●  在P1上配置骨干网MPLS信令,打开接口MPLS能力,配置骨干网路由协议。

四、 配置步骤
(1) SITEA上的配置。
# 配置接口IP地址。
SITEA> enable
SITEA# configure terminal
SITEA(config)# interface gigabitethernet 1/0
SITEA(config-GigabitEthernet 1/0)# ip address 192.168.10.2 255.255.255.0
SITEA(config-GigabitEthernet 1/0)# ip ospf cost 1
SITEA(config-GigabitEthernet 1/0)# exit
SITEA(config)# interface gigabitethernet 1/1
SITEA(config-GigabitEthernet 1/1)# ip address 192.168.20.1 255.255.255.0
SITEA(config-GigabitEthernet 1/1)# ip ospf cost 200
SITEA(config-GigabitEthernet 1/1)# exit

# OSPF通告接口网络。
SITEA(config)# router ospf 10
SITEA(config-router)# network 192.168.10.0 255.255.255.0 area 0
SITEA(config-router)# network 192.168.20.0 255.255.255.0 area 0

(2) SITEB上的配置。
# 配置接口IP地址。
SITEB> enable
SITEB# configure terminal
SITEB(config)# interface gigabitethernet 1/0
SITEB(config-GigabitEthernet 1/0)# ip address 192.168.30.2 255.255.255.0
SITEB(config-GigabitEthernet 1/0)# ip ospf cost 1
SITEB(config-GigabitEthernet 1/0)# exit
SITEB(config)# interface gigabitethernet 1/1
SITEB(config-GigabitEthernet 1/1)# ip address 192.168.20.2 255.255.255.0
SITEB(config-GigabitEthernet 1/1)# ip ospf cost 200
SITEB(config-GigabitEthernet 1/1)# exit

# OSPF通告接口网络。
SITEB(config)# router ospf 10
SITEB(config-router)# network 192.168.30.0 255.255.255.0 area 0
SITEB(config-router)# network 192.168.20.0 255.255.255.0 area 0

(3) PE1上的配置。
# 配置环回口0。
PE1> enable
PE1# configure terminal
PE1(config)# interface loopback 0
PE1(config-Loopback 0)# ip address 172.168.0.1 255.255.255.255
PE1(config-Loopback 0)# exit

# 创建VRF VPNA,并定义其RD和RT属性值。
PE1(config)# ip vrf VPNA
PE1(config-vrf)# rd 1:100
PE1(config-vrf)# route-target both 1:100
PE1(config-vrf)# exit

# 配置接口IP,并将VRF和对应接口关联。
PE1(config)# interface gigabitethernet 1/2
PE1(config-GigabitEthernet 1/2)# ip vrf forwarding VPNA
PE1(config-GigabitEthernet 1/2)# ip address 192.168.10.1 255.255.255.0
PE1(config-GigabitEthernet 1/2)# exit
PE1(config)# interface loopback 10
PE1(config-Loopback 10)# ip vrf forwarding VPNA
PE1(config-Loopback 10)# ip address 192.168.0.1 255.255.255.255
PE1(config-Loopback 10)# exit

# 配置BGP协议,和PE2建立MP-IBGP会话。
PE1(config)# router bgp 1
PE1(config-router)# neighbor 172.168.0.2 remote-as 1
PE1(config-router)# neighbor 172.168.0.2 update-source loopback 0
PE1(config-router)# address-family vpnv4
PE1(config-router-af)# neighbor 172.168.0.2 activate
PE1(config-router-af)# exit
PE1(config-router)# exit

# 配置和PE2上的OSPF实例建立伪链路。
PE1(config)# router ospf 10 vrf VPNA
PE1(config-router)# network 192.168.10.0 255.255.255.0 area 0
PE1(config-router)# redistribute bgp subnets
PE1(config-router)# area 0 sham-link 192.168.0.1 192.168.0.2
PE1(config-router)# exit

# 配置BGP重分发OSPF、直连路由。
PE1(config)# router bgp 1
PE1(config-router)# address-family ipv4 vrf VPNA
PE1(config-router-af)# redistribute ospf 10
PE1(config-router-af)# redistribute connected
PE1(config-router-af)# exit
PE1(config-router)# exit

# 配置骨干网MPLS信令,打开公网口的MPLS能力。
PE1(config)# mpls ip
PE1(config)# mpls router ldp
PE1(config-mpls-router)# ldp router-id interface loopback 0 force
PE1(config-mpls-router)# exit
PE1(config)# interface gigabitethernet 1/1
PE1(config-GigabitEthernet 1/1)# ip address 172.168.10.1 255.255.255.0
PE1(config-GigabitEthernet 1/1)# label-switching
PE1(config-GigabitEthernet 1/1)# mpls ip
PE1(config-GigabitEthernet 1/1)# exit

# OSPF通告接口网络。
PE1(config)# router ospf 1
PE1(config-router)# network 172.168.10.0 0.0.0.255 area 0
PE1(config-router)# network 172.168.0.1 0.0.0.0 area 0

(4) PE2上的配置。
# 配置环回口0。
PE2> enable
PE2# configure terminal
PE2(config)# interface loopback 0
PE2(config-Loopback 0)# ip address 172.168.0.2 255.255.255.255
PE2(config-Loopback 0)# exit

# 创建VRF VPNA,并定义其RD和RT属性值。
PE2(config)# ip vrf VPNA
PE2(config-vrf)# rd 1:100
PE2(config-vrf)# route-target both 1:100
PE2(config-vrf)# exit

# 配置接口IP,并将VRF和对应接口关联。
PE2(config)# interface gigabitethernet 1/2
PE2(config-GigabitEthernet 1/2)# ip vrf forwarding VPNA
PE2(config-GigabitEthernet 1/2)# ip address 192.168.30.1 255.255.255.0
PE2(config-GigabitEthernet 1/2)# exit
PE2(config)# interface loopback 10
PE2(config-Loopback 10)# ip vrf forwarding VPNA
PE2(config-Loopback 10)# ip address 192.168.0.2 255.255.255.255
PE2(config-Loopback 10)# exit

# 配置BGP协议,和PE2建立MP-IBGP会话。
PE2(config)# router bgp 1
PE2(config-router)# neighbor 172.168.0.1 remote-as 1
PE2(config-router)# neighbor 172.168.0.1 update-source loopback 0
PE2(config-router)# address-family vpnv4
PE2(config-router-af)# neighbor 172.168.0.1 activate
PE2(config-router-af)# exit
PE2(config-router)# exit

# 配置和PE2上的OSPF实例建立伪链路。
PE2(config)# router ospf 10 vrf VPNA
PE2(config-router)# network 192.168.30.0 255.255.255.0 area 0
PE2(config-router)# redistribute bgp subnets
PE2(config-router)# area 0 sham-link 192.168.0.2 192.168.0.1
PE2(config-router)# exit

# 配置BGP重分发OSPF、直连路由。
PE2(config)# router bgp 1
PE2(config-router)# address-family ipv4 vrf VPNA
PE2(config-router-af)# redistribute ospf 10
PE2(config-router-af)# redistribute connected
PE2(config-router-af)# exit

# 配置骨干网MPLS信令,打开公网口的MPLS能力。
PE2(config)# mpls ip
PE2(config)# mpls router ldp
PE2(config-mpls-router)# ldp router-id interface loopback 0 force
PE2(config-mpls-router)# exit
PE2(config)# interface gigabitethernet 1/1
PE2(config-GigabitEthernet 1/1)# ip address 172.168.40.2 255.255.255.0
PE2(config-GigabitEthernet 1/1)# label-switching
PE2(config-GigabitEthernet 1/1)# mpls ip
PE2(config-GigabitEthernet 1/1)# exit

# OSPF通告接口网络。
PE2(config)# router ospf 1
PE2(config-router)# network 172.168.40.0 0.0.0.255 area 0
PE2(config-router)# network 172.168.0.2 0.0.0.0 area 0

(5) P1上的配置。
# P1配置环回口0。
P1> enable
P1# configure terminal
P1(config)# interface loopback 0
P1(config-Loopback 0)# ip address 172.168.0.3 255.255.255.255
P1(config-Loopback 0)# exit

# OSPF基础配置。
P1(config)# router ospf 1
P1(config-router)# network 172.168.40.0 0.0.0.255 area 0
P1(config-router)# network 172.168.10.0 0.0.0.255 area 0
P1(config-router)# network 172.168.0.3 0.0.0.0 area 0
P1(config-router)# exit

# 在P1上配置骨干网MPLS信令,打开接口MPLS能力。
P1(config)# interface gigabitethernet 1/0
P1(config-GigabitEthernet 1/0)# ip address 172.168.10.2 255.255.255.0
P1(config-GigabitEthernet 1/0)# mpls ip
P1(config-GigabitEthernet 1/0)# label-switch
P1(config-GigabitEthernet 1/0)# exit
P1(config)# interface gigabitethernet 1/1
P1(config-GigabitEthernet 1/1)# ip address 172.168.40.1 255.255.255.0
P1(config-GigabitEthernet 1/1)# mpls ip
P1(config-GigabitEthernet 1/1)# label-switch
P1(config-GigabitEthernet 1/1)# exit
P1(config)# mpls ip
P1(config)# mpls router ldp
PE2(config-mpls-router)# ldp router-id interface loopback 0 force
PE2(config-mpls-router)# exit

五、验证配置结果
(1) PE1的配置验证。
# 检查PE1上存在OSPF伪链路路由。
PE1# show ip ospf 10 sham-links
Sham Link SLINK0 to address 192.168.0.2 is up
Area 0.0.0.0 source address 192.168.0.1, Cost: 1
Output interface is GigabitEthernet 1/1
Nexthop address 172.16.40.2
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Adjacency state Full

# 检查PE1的OSPF邻居。
PE1# show ip ospf 10 neighbor
OSPF process 10, 1 Neighbors, 1 is Full:
Neighbor ID Pri State BFD State Dead Time Address Interface
192.168.0.2 1 Full/ – – 00:00:34 192.168.0.2 SLINK0

# 检查PE1 VRF路由。
PE1# show ip route vrf VPNA
Routing Table: VPNA
Codes: C – connected, S – static, R – RIP, B – BGP
O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default
Gateway of last resort is no set
C 192.168.10.0/24 is directly connected, GigabitEthernet 1/2
O 192.168.20.0/24 [110/101] via 192.168.1.2, 00:56:23, GigabitEthernet 1/2
O 192.168.30.0/24 [110/2] via 172.168.0.2, 00:00:36
O 192.168.40.0/24 [110/2] via 172.168.0.2, 00:00:36

(2) PE2的配置验证。
# 检查PE1上存在OSPF 伪链路路由。
PE2# show ip ospf 10 sham-links
Sham Link SLINK0 to address 192.168.0.1 is up
Area 0.0.0.0 source address 192.168.0.2, Cost: 1
Output interface is GigabitEthernet 1/1
Nexthop address 172.16.10.1
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Adjacency state Full

# 检查PE2的OSPF邻居。
PE2# show ip ospf 10 neighbor
OSPF process 10, 1 Neighbors, 1 is Full:
Neighbor ID Pri State BFD State Dead Time Address Interface
192.168.0.1 1 Full/ – – 00:00:34 192.168.0.1 SLINK0

# 检查PE2 VRF路由。
PE2# show ip route vrf VPNA
Routing Table: VPNA
Codes: C – connected, S – static, R – RIP, B – BGP
O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default
Gateway of last resort is no set
O 192.168.10.0/24 [110/2] via 172.168.0.1, 00:00:36
O 192.168.20.0/24 [110/2] via 172.168.0.1, 00:00:36
C 192.168.30.0/24 is directly connected, GigabitEthernet 1/2
O 192.168.40.0/24 [110/101] via 192.168.30.2, 00:56:23, GigabitEthernet 1/2

六、 配置文件
● SITEA的配置文件。
!
interface gigabitethernet 1/0
ip address 192.168.10.2 255.255.255.0
ip ospf cost 1
!
interface gigabitethernet 1/1
ip address 192.168.20.1 255.255.255.0
ip ospf cost 200
!
router ospf 10
network 192.168.10.0 255.255.255.0 area 0
network 192.168.20.0 255.255.255.0 area 0
!
●SITEB的配置文件。
!
interface gigabitethernet 1/0
ip address 192.168.30.2 255.255.255.0
ip ospf cost 1
!
interface gigabitethernet 1/1
ip address 192.168.20.2 255.255.255.0
ip ospf cost 200
!
router ospf 10
network 192.168.30.0 255.255.255.0 area 0
network 192.168.20.0 255.255.255.0 area 0
!
● PE1的配置文件。
!
ip vrf VPNA
rd 1:100
route-target both 1:100
!
interface gigabitethernet 1/1
ip address 172.168.10.1 255.255.255.0
label-switching
mpls ip
!
interface gigabitethernet 1/2
ip vrf forwarding VPNA
ip address 192.168.10.1 255.255.255.0
interface loopback 0
ip address 172.168.0.1 255.255.255.255
!
interface loopback 10
ip vrf forwarding VPNA
ip address 192.168.0.1 255.255.255.255
!
router bgp 1
neighbor 172.168.0.2 remote-as 1
neighbor 172.168.0.2 update-source loopback 0
address-family vpnv4
neighbor 172.168.0.2 activate
address-family ipv4 vrf VPNA
redistribute ospf 10
redistribute connected
!
router ospf 1
network 172.168.10.0 0.0.0.255 area 0
network 172.168.0.1 0.0.0.0 area 0
!
router ospf 10 vrf VPNA
network 192.168.10.0 255.255.255.0 area 0
redistribute bgp subnets
area 0 sham-link 192.168.0.1 192.168.0.2
!
mpls ip
mpls router ldp
ldp router-id interface loopback 0 force
!
●PE2的配置文件。
!
ip vrf VPNA
rd 1:100
route-target both 1:100
!
interface gigabitethernet 1/1
ip address 172.168.40.2 255.255.255.0
label-switching
mpls ip
!
interface gigabitethernet 1/2
ip vrf forwarding VPNA
ip address 192.168.30.1 255.255.255.0
!
interface loopback 0
ip address 172.168.0.2 255.255.255.255
!
interface loopback 10
ip vrf forwarding VPNA
ip address 192.168.0.2 255.255.255.255
!
router bgp 1
neighbor 172.168.0.1 remote-as 1
neighbor 172.168.0.1 update-source loopback 0
address-family vpnv4
neighbor 172.168.0.1 activate
address-family ipv4 vrf VPNA
redistribute ospf 10
redistribute connected
!
router ospf 1
network 172.168.40.0 0.0.0.255 area 0
network 172.168.0.2 0.0.0.0 area 0
!
router ospf 10 vrf VPNA
network 192.168.30.0 255.255.255.0 area 0
redistribute bgp subnets
area 0 sham-link 192.168.0.2 192.168.0.1
!
mpls ip
mpls router ldp
ldp router-id interface loopback 0 force
!
●P1的配置文件。
!
interface gigabitethernet 1/0
ip address 172.168.10.2 255.255.255.0
mpls ip
label-switch
!
interface gigabitethernet 1/1
ip address 172.168.40.1 255.255.255.0
mpls ip
label-switch
!
interface loopback 0
ip address 172.168.0.3 255.255.255.255
!
router ospf 1
network 172.168.40.0 0.0.0.255 area 0
network 172.168.10.0 0.0.0.255 area 0
network 172.168.0.3 0.0.0.0 area 0
!
mpls ip
mpls router ldp
ldp router-id interface loopback 0 force
!

 

锐捷网管交换机通过OSPF协议实现快速重路由配置举例

一、组网需求
如下图:三台设备Device A、B、C属于同一OSPF区域,两两通过OSPF协议实现网络互连。当A的某一条的链路出现故障时,业务可以快速切换到备份链路上。要求切换时延尽可能降低。

二、 组网图
OSPF快速重路由配置组网图

三、配置要点
● Device A配置快速重路由。
●Device A配置接口carrier-delay 0。

四、 配置步骤
(1) 所有设备配置接口IP地址(略)。
(2) 所有设备配置OSPF基本功能(略)。
(3) 配置Device A配置快速重路由。
Device A> enable
Device A# configure terminal
Device A(config)# router ospf 1
Device A(config-router)# fast-reroute lfa
Device A(config-router)# exit

(4) Device A所有接口配置carrier-delay 0。
Device A(config)# interface gigabitethernet 0/1
Device A(config-if-GigabitEthernet 0/1)# carrier-delay 0
Device A(config-if-GigabitEthernet 0/1)# exit
Device A(config)# interface gigabitethernet 0/2
Device A(config-if-GigabitEthernet 0/2)# carrier-delay 0

五、验证配置结果
# 检查Device A路由表,192.168.4.0/24表项存在备份路由。
Device A# show ip route fast-reroute | begin 192.168.4.0
O 192.168.4.0/24 [ma] via 192.168.1.2, 00:39:28, GigabitEthernet 0/1
[b] via 192.168.2.2, 00:39:28, GigabitEthernet 0/2

六、 配置文件
Device A的配置文件。
!
router ospf 1
fast-reroute lfa
!
interface gigabitethernet 0/1
carrier-delay 0
!
interface gigabitethernet 0/2
carrier-delay 0
!

锐捷网管交换机OSPF 进程与 BFD 联动配置举例

一、组网需求
如下图:Device A、Device B和Device C之间通过运行OSPFv2协议实现网络互通。
Device A和Device B使用Switch为主链路,当Switch或者其连接链路故障上,BFD能够快速检测故障,并切换至DeviceC进行通讯。

二、 组网图
OSPF 进程与 BFD 联动配置组网图

三、配置要点
● 所有设备配置接口IP地址(略)。
●所有设备配置OSPF基本功能(略)。
●所有设备配置接口BFD参数。
● 所有设备配置OSPF联动BFD。

四、 配置步骤
(1) 在设备接口配置BFD参数。
# Device A的配置。
Device A> enable
Device A# configure terminal
Device A(config)# interface gigabitethernet 0/1
Device A(config-if-GigabitEthernet 0/1)# bfd interval 200 min_rx 200 multiplier 5
Device A(config-if-GigabitEthernet 0/1)# exit
Device A(config)# interface gigabitethernet 0/2
Device A(config-if-GigabitEthernet 0/2)# bfd interval 200 min_rx 200 multiplier 5
Device A(config-if-GigabitEthernet 0/2)# exit

# Device B的配置。
Device B> enable
Device B# configure terminal
Device B(config)# interface gigabitethernet 0/1
Device B(config-if-GigabitEthernet 0/1)# bfd interval 200 min_rx 200 multiplier 5
Device B(config-if-GigabitEthernet 0/1)# exit
Device B(config)# interface gigabitethernet 0/2
Device B(config-if-GigabitEthernet 0/2)# bfd interval 200 min_rx 200 multiplier 5
Device B(config-if-GigabitEthernet 0/2)# exit

(2) OSPF联动BFD。
# Device A的配置。
Device A(config)# router ospf 1
Device A(config-router)# bfd all-interfaces

# Device B的配置。
Device B(config)# router ospf 1
Device B(config-router)# bfd all-interfaces

五、验证配置结果
# 检查Device A上查看OSPF联动BFD处于UP状态。
Device A# show ip ospf neighbor
OSPF process 1, 1 Neighbors, 1 is Full:
Neighbor ID Pri State BFD State Dead Time Address Interface
192.168.1.2 1 Full/BDR Up 00:00:40 192.168.1.2 GigabitEthernet 0/1
192.168.13.3 1 Full/BDR Up 00:00:40 192.168.13.3 GigabitEthernet 0/2

# 检查Device B上查看OSPF联动BFD处于UP状态。
Device B# show ip ospf neighbor
OSPF process 1, 1 Neighbors, 1 is Full:
Neighbor ID Pri State BFD State Dead Time Address Interface
192.168.1.1 1 Full/BDR Up 00:00:40 192.168.1.1 GigabitEthernet 0/1
192.168.13.3 1 Full/BDR Up 00:00:40 192.168.23.3

六、 配置文件
●Device A的配置文件。
!
interface gigabitethernet 0/1
bfd interval 200 min_rx 200 multiplier 5
!
interface gigabitethernet 0/2
bfd interval 200 min_rx 200 multiplier 5
!
router ospf 1
bfd all-interfaces
!
●Device B的配置文件。
!
interface gigabitethernet 0/1
bfd interval 200 min_rx 200 multiplier 5
!
interface gigabitethernet 0/2
bfd interval 200 min_rx 200 multiplier 5
!
router ospf 1
bfd all-interfaces
!

锐捷网管交换机RIP 发布聚合路由配置举例

一、组网需求
如下图,Device B和Device A、C和D之间通过RIPv2路由协议实现互联互通。
为缩小Device A的路由表,在Device B上配置路由聚合成172.16.0.0/21。

二、 组网图
RIP 发布聚合路由配置组网图

三、配置要点
(1) 所有设备配置接口IP地址(略)。
(2) 所有设备配置RIP基本功能(略)。
(3) Device B关闭自动汇总,并配置路由汇聚。

四、 配置步骤
(1) 配置各接口的IP地址和启动单播路由协议(略)。
(2) 配置设备配置RIP基本功能(略)。
(3) Device B关闭自动汇总。
Device B> enable
Device B# configure terminal
Device B(config)# router rip
Device B(config-router)# version 2
Device B(config-router)# no auto-summary
Device B(config-router)# exit

(4) Device B GigabitEthernet 0/1接口上配置172.16.0.0/21路由汇聚。
Device B(config)# interface gigabitethernet 0/1
Device B(config-if-GigabitEthernet 0/1)# ip rip summary-address 172.16.0.0 255.255.248.0

五、验证配置结果
# 检查设备A路由表,生成172.16.0.0/16表项。
Device A# show ip route rip
R 172.16.0.0/21 [120/2] via 192.168.1.2, 00:01:04, GigabitEthernet 0/1

六、 配置文件
Device B配置文件。
!
interface gigabitethernet 0/1
ip address 196.38.165.1 255.255.255.0
!
router rip
version 2
no auto-summary
!

锐捷网管交换机RIP 接口附加度量值配置举例

一、组网需求
Device A、Device B、Device C和Device C之间通过RIPv2路由协议实现互联互通。
Device A到Device C的10.3.3.3/24有两条等价路径,由于Device D型号老旧,性能较低,通过增加Device A的GigabitEthernet 0/2接口度量值,使Device A去往10.3.3.3优选Device B。

二、 组网图
RIP 接口附加度量值配置组网图

三、配置要点
(1) 所有设备配置接口IP地址。
(2) 所有设备配置RIP基本功能。
(3) Device C上配置ACL,并配置offset-list在与B连接接口生效。

四、 配置步骤
(1) Device C配置ACL,匹配10.3.3.3/24路由。
Device C> enable
Device C# configure terminal
Device C(config)# access-list 1 permit 10.3.3.3 0.0.0.255

(2) Device C配置Offset-List关联ACL 1,并在GigabitEthernet 0/2上生效。
Device C(config)# router rip
Device C(config-router)# offset-list 1 out 3 gigabitEthernet 0/2

五、验证配置结果
# 检查Device A路由表。
Device A# show ip route rip
R 10.3.3.0/24 [120/5] via 192.168.14.4, 00:06:11, GigabitEthernet 0/1

六、 配置文件
Device C配置文件。
!
access-list 1 permit 10.3.3.3 0.0.0.255
!
router rip
offset-list 1 out 3 gigabitEthernet 0/2

锐捷网管交换机RIP 防止路由环路配置举例

一、组网需求
如下图,Device A、Device B和Device C通过RIP路由协议实现互联互通。
为避免路由环路,需要配置毒性逆转的水平分割和触发更新。
为提高可靠性,开启GR,并在Device A和Device B连接接口开启BFD。

二、组网图
启动触发更新配置组网图

三、 配置要点
(1) 所有设备配置接口IP地址(略)。
(2) 所有设备配置RIP基本功能。
(3) Device A和Device B启用RIP触发更新和毒性逆转。

四、配置步骤
(1) 配置所有设备配置接口IP地址(略)。
(2) 开启设备的RIP进程,并且通告各个接口的网络信息。
# Device A的配置。
Device A> enable
Device A# configure terminal
Device A(config)# router rip
Device A(config-router)# network 192.168.1.0
Device A(config-router)# network 200.1.1.0
Device A(config-router)# exit

# Device B的配置。
Device B> enable
Device B# configure terminal
Device B(config)# router rip
Device B(config-router)# network 192.168.1.0
Device B(config-router)# network 201.1.1.0
Device B(config-router)# exit

(3) 启用RIP毒性逆转与触发更新。
# Device A的配置。
Device A(config)# interface gigabitethernet 0/1
Device A(config-if-GigabitEthernet 0/1)# ip rip triggered
Device A(config-if-GigabitEthernet 0/1)# ip rip split-horizon poisoned-reverse

# Device B的配置。
Device B(config)# interface gigabitethernet 0/1
Device B(config-if-GigabitEthernet 0/1)# ip rip triggered
Device B(config-if-GigabitEthernet 0/1)# ip rip split-horizon poisoned-reverse

五、 验证配置结果
# 检查设备A、B检查RIP的数据库,对应的路由属性是永久的。
●Device A
Device A# show ip rip database
201.1.1.0/24 auto-summary
201.1.1.0/24
[1] via 192.168.12.2 GigabitEthernet 0/1 06:25 permanent

● Device B
Device B# show ip rip database
200.1.1.0/24 auto-summary
200.1.1.0/24
[1] via 192.168.12.1 GigabitEthernet 0/1 06:25 permanent

六、配置文件
● Device A的配置文件。
!
interface gigabitethernet 0/1
ip rip split-horizon poisoned-reverse
ip rip triggered
!
!
router rip
network 192.168.1.0
network 200.1.1.0
!
● Device B的配置文件。
!
interface gigabitethernet 0/1
ip rip split-horizon poisoned-reverse
ip rip triggered
!
router rip
network 192.168.1.0
network 201.1.1.0
!

七、常见错误
● 链路两端的RIP配置一致,但确启用了该功能。
● 与BFD同时启用。
● 未在同链路所有设备上启用该功能。

锐捷网管交换机建立 RIP 路由域配置举例

一、组网需求
Device A、Device B和Device C通过RIPv2路由协议实现互联互通。
为节约设备性能,3台设备所有接口默认配置成被动接口,只有与RIP邻居直连的接口关闭被动接口。

二、 组网图
RIP 路由域配置组网图

三、配置要点

● 所有设备配置接口IP地址。
● 所有设备配置RIP基本功能。

四、配置步骤
(1) 配置各接口的IP地址和启动单播路由协议。
# Device A的配置。
Device A> enable
Device A# configure terminal
Device A(config)# interface gigabitethernet 0/1
Device A(config-if-GigabitEthernet 0/1)# no switchport
Device A(config-if-GigabitEthernet 0/1)# ip address 110.11.2.1 255.255.255.0
Device A(config-if-GigabitEthernet 0/1)# exit
Device A(config)# interface gigabitethernet 0/2
Device A(config-if-GigabitEthernet 0/2)# no switchport
Device A(config-if-GigabitEthernet 0/2)# ip address 155.10.1.1 255.255.255.0
Device A(config-if-GigabitEthernet 0/2)# exit

# Device B的配置。
Device B> enable
Device B# configure terminal
Device B(config)# interface gigabitethernet 0/1
Device B(config-if-GigabitEthernet 0/1)# no switchport
Device B(config-if-GigabitEthernet 0/1)# ip address 110.11.2.2 255.255.255.0
Device B(config-if-GigabitEthernet 0/1)# exit
Device B(config)# interface gigabitethernet 0/2
Device B(config-if-GigabitEthernet 0/2)# no switchport
Device B(config-if-GigabitEthernet 0/2)# ip address 196.38.165.1 255.255.255.0
Device B(config-if-GigabitEthernet 0/2)# exit

# Device C的配置。
Device C> enable
Device C# configure terminal
Device C(config)# interface gigabitethernet 0/1
Device C(config-if-GigabitEthernet 0/1)# no switchport
Device C(config-if-GigabitEthernet 0/1)# ip address 110.11.2.3 255.255.255.0
Device C(config-if-GigabitEthernet 0/1)# exit
Device C(config)# interface gigabitethernet 0/2
Device C(config-if-GigabitEthernet 0/2)# no switchport
Device C(config-if-GigabitEthernet 0/2)# ip address 117.102.0.1 255.255.0.0
Device C(config-if-GigabitEthernet 0/2)# exit

(2) 配置设备配置RIP基本功能。除了RIP邻居接口,其余接口都配置成被动接口。
# Device A的配置。
Device A(config)# router rip
Device A(config-router)# version 2
Device A(config-router)# network 0.0.0.0 255.255.255.255
Device A(config-router)# passive-interface default
Device A(config-router)# no passive-interface gigabitethernet 0/1

# Device B的配置。
Device B(config)# router rip
Device B(config-router)# version 2
Device B(config-router)# network 0.0.0.0 255.255.255.255
Device B(config-router)# passive-interface default
Device B(config-router)# no passive-interface gigabitethernet 0/1

# Device C的配置。
Device C(config)# router rip
Device C(config-router)# version 2
Device C(config-router)# no auto-summary
Device C(config-router)# network 0.0.0.0 255.255.255.255
Device C(config-router)# passive-interface default
Device C(config-router)# no passive-interface gigabitethernet 0/1

五、验证配置结果
# 检查A、B和C上的IP路由表,应看到RIP学到了远端网络的路由。
●Device A
Device A# show ip route
Codes: C – connected, S – static, R – RIP, B – BGP
O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default
Gateway of last resort is no set
C 110.11.2.0/24 is directly connected, GigabitEthernet 0/1
C 110.11.2.1/32 is local host.
R 117.0.0.0/8 [120/1] via 110.11.2.2, 00:00:47, GigabitEthernet 0/1
C 155.10.1.0/24 is directly connected, GigabitEthernet 0/2
C 155.10.1.1/32 is local host.
C 192.168.217.0/24 is directly connected, VLAN 1
C 192.168.217.233/32 is local host.
R 196.38.165.0/24 [120/1] via 110.11.2.3, 00:19:18, GigabitEthernet 0/1

●Device B
Device B# show ip route
Codes: C – connected, S – static, R – RIP, B – BGP
O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default
Gateway of last resort is no set
C 110.11.2.0/24 is directly connected, GigabitEthernet 0/1
C 110.11.2.2/32 is local host.
R 155.10.0.0/16 [120/1] via 110.11.2.1, 00:15:21, GigabitEthernet 0/1
C 196.38.165.0/24 is directly connected, GigabitEthernet 0/2
C 196.38.165.1/32 is local host.
R 117.0.0.0/8 [120/1] via 110.11.2.2, 00:00:47, GigabitEthernet 0/1

●Device C
Device C# show ip route
Codes: C – connected, S – static, R – RIP, B – BGP
O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default
Gateway of last resort is no set
C 110.11.2.0/24 is directly connected, GigabitEthernet 0/1
C 110.11.2.3/32 is local host.
C 117.102.0.0/16 is directly connected, GigabitEthernet 0/2
C 117.102.0.1/32 is local host.
R 155.10.0.0/16 [120/1] via 110.11.2.1, 00:20:55, GigabitEthernet 0/1
R 196.38.165.0/24 [120/1] via 110.11.2.3, 00:19:18, GigabitEthernet 0/1

六、配置文件
● 设备A的配置文件。
!
interface gigabitethernet 0/1
no switchport
ip address 110.11.2.1 255.255.255.0
!
interface gigabitethernet 0/2
no switchport
ip address 155.10.1.1 255.255.255.0
!
router rip
version 2
passive-interface default
no passive-interface gigabitethernet 0/1
network 0.0.0.0
!
●设备B的配置文件。
!
interface gigabitethernet 0/1
no switchport
ip address 110.11.2.2 255.255.255.0
!
interface gigabitethernet 0/2
no switchport
ip address 196.38.165.1 255.255.255.0
!
router rip
version 2
passive-interface default
no passive-interface gigabitethernet 0/1
network 0.0.0.0
!
● 设备C的配置文件。
!
interface gigabitethernet 0/1
no switchport
ip address 110.11.2.3 255.255.255.0
!
interface gigabitethernet 0/2
no switchport
ip address 117.102.0.1 255.255.255.0
!
router rip
version 2
no auto-summary
passive-interface default
no passive-interface gigabitethernet 0/1
network 0.0.0.0
!
七、常见错误
●接口上未配置IPv4地址。
● 某台设备上没有定义RIP版本,或RIP版本号与其他设备不一致。
● network命令配置的地址范围未覆盖某接口。
● network命令参数IP地址比较比特位配置错误。0表示精确匹配,1表不做比较。
● 设备互联接口被设置为被动接口。

锐捷网管交换机RIP 引入外部路由举例

一、组网需求
如下图,Device B通过RIP和Device A通讯,Device B通过静态路由获取10.3.3.3路由。为了Device A能够获得10.3.3.3路由信息,在Device B上将OSPF路由协议。引入外部路由的可靠性低,设置外部缺省度量值为5。

二、组网图
RIP 引入外部路由配置组网图

三、 配置要点
(1) 配置各接口的IP地址和启动单播路由协议(略)。
(2) Device B配置静态路由。
(3) Device A和Device B配置RIP基本功能(略)。
(4) Device B配置路由重分发,设置重分发路由缺省度量值。

四、 配置步骤
(1) 配置各接口的IP地址和启动单播路由协议(略)。
(2) Device B配置去往10.3.3.3/24的静态路由,下一跳为192.168.23.3。
Device B> enable
Device B# configure terminal
Device B(config)# ip route 10.3.3.3 255.255.255.0 192.168.23.3

(3) Device A和Device B配置RIP基本功能

(4) Device B配置重分发路由缺省度量值为5。
Device B(config)# router rip
Device B(config-router)# default-metric 5
(5) Device B配置重分发静态路由至RIP。
Device B(config-router)# redistribute static

五、 验证配置结果
# Device A上检查路由表,可以查到10.3.3.0/24的RIP路由,度量值为6。
Device A# show ip route rip
R 10.3.3.0/24 [120/6] via 192.168.12.2, 00:06:11, GigabitEthernet 0/1

六、 配置文件
# Device B的配置文件。
!
ip route 10.3.3.3 255.255.255.0 192.168.23.3
!
router rip
default-metric 5
redistribute static
!

锐捷网管交换机快速重路由配置举例

一、组网需求
Device A,Device B和Device C通过静态路由实现互联,Device A默认通过Device C访问Host C。以防Device A和Device C的链路故障,配置快速重路由,在链路故障时能够快速切换至备份链路。

二、 组网图
快速重路由配置组网图
三、配置要点
● 在Device A上配置到达Host C网段的静态路由,出接口下一跳指向Device C。
● 在Device A上配置静态快速重路由,备份路由出接口下一跳指向Device B。

四、 配置步骤
(1) 配置路由器IP地址。
(2) 配置静态路由,使各主机网络互通(略)。
(3) 配置路由图,设置备份路由出接口下一跳指向Device B。
Device A> enable
Device A# configure terminal
Device A(config)# route-map fast-reroute
Device A(config-route-map)# set fast-reroute backup-interface gigabitethernet 0/2 backup-nexthop 1.1.12.2

(4) 配置静态快速充路由。
Device A(config-route-map)# exit
Device A(config)# ip fast-reroute static route-map fast-reroute

五. 验证配置结果
# 显示Device A上的主备路由。
Device A# show ip route fast-reroute
Codes: C – connected, S – static, R – RIP, B – BGP
O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default
Status codes: m – main entry, b – backup entry, a – active entry
Gateway of last resort is no set
S 1.1.3.0 /24 [ma] via 1.1.13.3, GigabitEthernet 0/3
[b] via 1.1.12.2, GigabitEthernet 0/2

六、配置文件
●Device A的配置文件。
!
route-map fast-reroute
set fast-reroute backup-interface gigabitethernet 0/2 backup-nexthop 1.1.12.2
!
ip fast-reroute static route-map fast-reroute
!

七、常见错误
● 接口链路没有Up。
● 未配置静态路由。
● 路由图中未设置match匹配条件,或设置错误。

锐捷网管交换机静态路由联动 BFD 配置举例

1. 组网需求
通过配置静态路由Host A和Host B实现互通,其中Device A-Device B为主链路,通过配置BFD,当主链路故障时,快速切换到Device C进行通讯。

2. 组网图
静态路由联动 BFD 配置组网图

3. 配置要点
● 在Device A、Device B和Device C上配置静态路由,指定出接口/下一跳为互联接口。
● 在Device A、Device B互联接口上配置BFD会话。
● 在Device A、Device B上配置静态路由与BDF联动,检测静态路由下一跳的连通性。

四、配置步骤
(1) 配置接口IP地址。
(2) 配置静态路由实现网络互通。
# Device A的配置。
Device A> enable
Device A# configure terminal
Device A(config)# ip route 1.1.2.0 255.0.0.0 gigabitethernet 0/1 1.1.12.2
Device A(config)# ip route 1.1.2.0 255.0.0.0 gigabitethernet 0/2 1.1.13.3 40

# Device B的配置。
Device B> enable
Device B# configure terminal
Device B(config)# ip route 1.1.1.0 255.0.0.0 gigabitethernet 0/1 1.1.12.1
Device B(config)# ip route 1.1.1.0 255.0.0.0 gigabitethernet 0/2 1.1.23.3 40

# Device C的配置。
Device C> enable
Device C# configure terminal
Device C(config)# ip route 1.1.1.0 255.0.0.0 gigabitEthernet 0/0 1.1.13.1
Device C(config)# ip route 1.1.2.0 255.0.0.0 gigabitEthernet 0/1 1.1.23.2
(3) 接口下配置BFD。
# Device A的配置。
Device A(config)# interface gigabitethernet 0/1
Device A(config-if-GigabitEthernet 0/1)# bfd interval 100 min_rx 100 multiplier 3
Device A(config-if-GigabitEthernet 0/1)# exit

# Device B的配置。
Device B(config)# interface gigabitethernet 0/1
Device B(config-if-GigabitEthernet 0/1)# bfd interval 100 min_rx 100 multiplier 3
Device B(config-if-GigabitEthernet 0/1)# exit

(4) 静态路由与BFD联动。
# Device A的配置。
Device A(config)# ip route static bfd gigabitethernet 0/1 1.1.12.2
# Device B的配置。
Device B(config)# ip route static bfd gigabitethernet 0/1 1.1.12.1

五、验证配置结果
# 查看BFD邻居状态。
Device A# show bfd neighbors
OurAddr NeighAddr LD/RD RH/RS Holdown(mult) State Int
1.1.12.1 1.1.12.2 8192/0 Up 0(3 ) Up GigabitEthernet 0/1

# 检查设查看BFD邻居状态。
Device A# show ip route static bfd
S 1.1.2.0/24 via 1.1.12.2, GigabitEthernet 0/1, BFD state is Up

六、 配置文件
● Device A的配置文件。
!
interface gigabitethernet 0/1
bfd interval 50 min_rx 50 multiplier 3
!
ip route 1.1.2.0 255.0.0.0 gigabitEthernet 0/1 1.1.12.2
ip route 1.1.2.0 255.0.0.0 gigabitEthernet 0/2 1.1.13.3 40
!
ip route static bfd gigabitEthernet 0/1 1.1.12.2
!
● Device B的配置文件。
!
interface gigabitethernet 0/1
bfd interval 50 min_rx 50 multiplier 3
!
ip route 1.1.1.0 255.0.0.0 gigabitEthernet 0/1 1.1.12.1
ip route 1.1.1.0 255.0.0.0 gigabitEthernet 0/2 1.1.23.3 40
!
ip route static bfd gigabitEthernet 0/1 1.1.12.1
!
● Device C的配置文件。
!
ip route 1.1.1.0 255.0.0.0 gigabitEthernet 0/0 1.1.13.1
ip route 1.1.2.0 255.0.0.0 gigabitEthernet 0/1 1.1.23.2
!

七、 常见错误
● 接口链路没有Up。
●接口没有配置IP地址。
● 没有配置BFD会话参数。
● 没有配置静态路由。

 

 

 

ICP备案号:晋ICP备18007549号-1