BGP Next-hop-self

【实验目的】

通过配置next-hop-self命令,确保R3与R5之间的155.1.37.0/24 与155.1.5.0/24 网络能够互相访问

 
【实验拓扑】

 

【实验基本配置】
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
!
router bgp 2
neighbor 155.1.13.3 remote-as 2
neighbor 155.1.146.4 remote-as 1

 
R3:
interface s0/1
ip address 155.1.13.3 255.255.255.0
clockrate 64000
!
interface loopback 0
ip add 155.1.37.3 255.255.255.0
!
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
!
router bgp 1
neighbor 155.1.45.5 remote-as 1
neighbor 155.1.45.5 next-hop-self
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
clockrate 64000
!
router bgp 1
network 155.1.5.0 mask 255.255.255.0
neighbor 155.1.0.3 remote-as 2
neighbor 155.1.45.4 remote-as 1

 
【实验配置】
你会发现不配置next-hop-self,R3与R5之间的用network通告的网络不能够相互访问,原因是什么呢?
因为R1在学习到AS1传输过来的BGP路由是,将该条目传输给R3时是不会改变下一跳的,因此使用默认的下一跳地址即R4上的地址,因此这个过程是有问题的。
因此需要在R1与R4上针对ibgp分别配置next-hop-self才能够使R3与R5之间的公布地址互相访问。

 
下面有两种配置方法,都可以,方法1更简单一些

 
配置方法1
R1:
router bgp 2
neighbor 155.1.13.3 next-hop-self
R4:
router bgp 1
neighbor 155.1.45.5 next-hop-self

 
配置方法2:
R1:
route-map NEXT_HOP_SELF
set ip next-hop 155.1.13.1
router bgp 2
neighbor 155.1.13.3 route-map NEXT_HOP_SELF
R4:
route-map NEXT_HOP_SELF
set ip next-hop 155.1.45.4
router bgp 2
neighbor 155.1.45.5 route-map NEXT_HOP_SELF


推介本站相关博文

 
http://haolun.blog.51cto.com/173913/992861

你可能感兴趣的:(实验,BGP,Next-hop-self)