BGP Next-hop-self 之 -- IGP redistribution

本文涉及的产品
云数据库 Tair(兼容Redis),内存型 2GB
Redis 开源版,标准版 2GB
推荐场景:
搭建游戏排行榜
简介:

【实验目的】

在R1与R4上配置重定向,确保R3与R5之间的网络互相能够访问,(非next-hop-self方式)

 
【实验拓扑】

 

 

【实验基本配置】
R1:
interface FastEthernet0/0
ip address 155.1.146.1 255.255.255.0
!
interface Serial0/0
ip address 155.1.13.1 255.255.255.0
clock rate 2000000
!
router eigrp 2
network 155.1.13.1 0.0.0.0
no auto-summary
!
router bgp 2
neighbor 155.1.13.3 remote-as 2
neighbor 155.1.146.4 remote-as 1
no auto-summary

R3:

interface Loopback0
ip address 155.1.37.3 255.255.255.0
!
interface Serial0/1
ip address 155.1.13.3 255.255.255.0
clock rate 64000
!
router eigrp 2
network 155.1.13.3 0.0.0.0
no auto-summary
!
router bgp 2
network 155.1.37.0 mask 255.255.255.0
neighbor 155.1.13.1 remote-as 2

 
R4:
interface FastEthernet0/0
ip address 155.1.146.4 255.255.255.0
interface Serial0/0
ip address 155.1.45.4 255.255.255.0
clock rate 2000000
router eigrp 1
network 155.1.45.4 0.0.0.0
no auto-summary
router bgp 1
neighbor 155.1.45.5 remote-as 1
neighbor 155.1.146.1 remote-as 2
R5:
interface Loopback0
ip address 155.1.5.5 255.255.255.0
!
interface Serial0/1
ip address 155.1.45.5 255.255.255.0
clock rate 64000
!
router eigrp 1
network 155.1.45.5 0.0.0.0
no auto-summary
!
router bgp 1
network 155.1.5.0 mask 255.255.255.0
neighbor 155.1.45.4 remote-as 1

 
【实验前验证】
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path
* i155.1.5.0/24 155.1.146.4 0 100 0 1 i
*> 155.1.37.0/24 0.0.0.0 0 32768 i

 
R3#show ip bgp 155.1.5.0
BGP routing table entry for 155.1.5.0/24, version 0
Paths: (1 available, no best path)
Not advertised to any peer
1
155.1.146.4 ( inaccessible) from 155.1.13.1 (155.1.146.1)
Origin IGP, metric 0, localpref 100, valid, internal
在没有配置next-hop-self之前,我们看到结果不可达,原因是,在R3上收到去往155.1.5.0 的下一跳应该是R1的地址(155.1.13.1);由于IGP之间传输BGP路由时不改变下一跳,这就造成了不可达。

 
R3#show ip route 路由表中冶没有任何去放155.1.146 网络的路由
155.1.0.0/24 is subnetted, 2 subnets
C 155.1.13.0 is directly connected, Serial0/1
C 155.1.37.0 is directly connected, Loopback0

 

 

 
【实验配置】
接下来,我们不用next-hop-self,而采用重定向EGP到IGP中,我们在R1与R4上分别将直连网络重定向到IGP来解决不可达的问题。
R1
router eigrp 2
redistribution connected metric 1 1 1 1 1
R4
router eigrp 1
redistribution connected metric 1 1 1 1 1

 

 
【实验验证】
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i155.1.5.0/24 155.1.146.4 0 100 0 1 i
*> 155.1.37.0/24 0.0.0.0 0 32768 i

 
注意这里,虽然下一跳没有改变,但路由表中多了一条去往155.1.146.0 的路由,因此路由器知道怎么走。
R3#show ip route
155.1.0.0/24 is subnetted, 4 subnets
D EX 155.1.146.0 [170/2560512256] via 155.1.13.1, 00:01:21, Serial0/1
C 155.1.13.0 is directly connected, Serial0/1
B 155.1.5.0 [200/0] via 155.1.146.4, 00:00:42
C 155.1.37.0 is directly connected, Loopback0

R3#ping 155.1.5.5 source 155.1.37.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 155.1.5.5, timeout is 2 seconds:
Packet sent with a source address of 155.1.37.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/48/80 ms


本文转自zcm8483 51CTO博客,原文链接:http://blog.51cto.com/haolun/992836
相关文章
|
4月前
|
网络协议
配置BGP与IGP交互和路由自动聚合
本文介绍了如何通过BGP与IGP协议实现两个自治系统(AS)之间的互相通信。网络被划分为AS65008和AS65009,在AS65009内使用OSPF作为IGP协议计算路由。配置思路包括:1) 在AR2、AR3和AR4上配置OSPF协议以实现互访;2) 在AR1和AR2上配置EBGP连接传递路由;3) 在AR2上配置BGP与OSPF互相引入;4) 配置BGP路由聚合简化路由表。操作步骤涵盖IP地址配置、OSPF与BGP的配置及路由引入,最后验证AS间的互通性并实施自动路由聚合,确保网络高效稳定运行。
配置BGP与IGP交互和路由自动聚合
|
网络协议 网络架构
|
网络协议 数据库 数据安全/隐私保护
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(7)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(7)
1191 2
|
负载均衡 网络协议 数据库
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(6)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(6)
1292 0
|
网络协议 算法 数据库
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(5)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(5)
1436 0
|
网络协议 算法 数据库
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(4)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(4)
663 0
|
网络协议 数据库 vr&ar
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(3)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(3)
691 0
|
网络协议 数据库 网络架构
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(2)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(2)
797 0
|
网络协议 算法 数据库
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(1)
【华为数通HCIP | 网络工程师】821-IGP高频题、易错题之OSPF(1)
782 0
|
SQL Java 数据库连接
若依代码生成器-Domain代码生成篇(一)
若依代码生成器-Domain代码生成篇(一)
608 0