好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



MSR系列路由器

BGP4+路由协议反射器功能的配置

 

关键字: BGP; 路由反射;IPv6

试验设备RouterAMSR20-21),RouterBMSR20-20,RouterCMSR30-20,RouterDMSR30-20

一、组网需求

       RouterB接收了一个经过EBGP的更新报文并将之传给RouterCRouterC被配置为路由反射器,它有两个客户:RouterBRouterDRouterBRouterD间不需一个IBGP连接,当RouterC接收了来自RouterB的路由更新时,它将此信息反射给RouterD,反之亦然。

二、组网图

      

 

三、配置步骤

       1RouterA配置

#

 ipv6

#

interface Ethernet0/1

 port link-mode route

 ipv6 address 1::1/96

#

interface NULL0

#

interface LoopBack0

 ipv6 address 1:1:1::1/128

#               

bgp 100

 undo synchronization

 #

 ipv6-family

//发布该网段的路由,此处为loopback0地址

  network 1:1:1::1 128

  undo synchronization

//与对端建立EBGP连接

  peer 1::2 as-number 200

 

2.配置RouterB

#

 ipv6

#

interface Ethernet0/0

 port link-mode route

 ipv6 address 2::1/96

#

interface Ethernet0/1

 port link-mode route

 ipv6 address 1::2/96

#

interface LoopBack0

 ipv6 address 2:2:2::2/128

#

bgp 200

 undo synchronization

 #

 ipv6-family   

  network 2:2:2::2 128

  //引入直连路由以保证下一跳路由可达

  import-route direct 

  undo synchronization

  //注意:此处并未将Router D加入对等体

  peer 1::1 as-number 100

  peer 2::2 as-number 200

 

3.配置RouterC

#

 ipv6

#

interface LoopBack0

 ipv6 address 3:3:3::3/128

#

interface GigabitEthernet0/0

 port link-mode route

 ipv6 address 2::2/96

#

interface GigabitEthernet0/1

 port link-mode route

 ipv6 address 3::1/96

#

bgp 200

 undo synchronization

 #             

 ipv6-family

  network 3:3:3::3 128

  import-route direct

  undo synchronization

  group alanker internal

    //设定组内的对等体都为反射器的客户端

  peer alanker reflect-client

  peer 2::1 group alanker

  peer 3::2 group alanker

 

4.配置RouterD

#

 ipv6

#

interface LoopBack0

 ipv6 address 4:4:4::4/128

#

interface GigabitEthernet0/0

 port link-mode route

 ipv6 address 3::2/96

 ip address 1.0.0.4 255.255.255.0

#

interface GigabitEthernet0/1

 port link-mode route

#

bgp 200

   undo synchronization

   #

   ipv6-family

     network 4:4:4::4 128

     import-route direct

     undo synchronization

     peer 3::1 as-number 200

 

四、配置关键点

1.  作为反射clientRouterBD上无需配reflect-client这些都是要在反射器routerC上配的

2.  需要在边界路由器RouterBRouterC上引入直连路由,否则在ping 1:1:1::1地址的时候找不到下一跳1::1, 即无法到达BGP路由表中的下一跳。因为边界路由器在向IBGP发布路由的时候不改变该条路由的下一跳。

 

五、试验分析

1.                  RouterA上再配置一个loopback地址2001da8::1, 并在BGP视图下用如下命令使能:(红色部分)

[RouterA-2021-bgp-af-ipv6]dis th

#

 ipv6-family

  network 1:1:1::1 128

  network 2001:DA8::1 128

  undo synchronization

  peer 1::2 as-number 200

 

此时在RouterBRouterDBGP路由表中均有到达该地址的路由

<RouterB-2020>display bgp ipv6 routing-table

 

 Total Number of Routes: 9

 

 BGP Local router ID is 1.0.0.2

 Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

 

 *>  Network : 1::                                      PrefixLen : 96    

     NextHop : 1::2                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: ?

 

 *>  Network : 1:1:1::1                                 PrefixLen : 128   

     NextHop : 1::1                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: 100 i

 

 *>  Network : 2::                                      PrefixLen : 96    

     NextHop : 2::1                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: ?

 

 * i Network : 2::                                      PrefixLen : 96    

     NextHop : 2::2                                     LocPrf    : 100      

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn:  ?

 

 *>  Network : 2:2:2::2                                 PrefixLen : 128   

     NextHop : ::1                                      LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: i

 

 *>i Network : 3::                                      PrefixLen : 96    

     NextHop : 2::2                                     LocPrf    : 100      

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn:  ?

 

 *>i Network : 3:3:3::3                                 PrefixLen : 128   

     NextHop : 2::2                                     LocPrf    : 100      

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                        

     Path/Ogn:  i

 

 *>i Network : 4:4:4::4                                 PrefixLen : 128   

     NextHop : 3::2                                     LocPrf    : 100      

     PrefVal : 0                                        Label     : NULL      

     MED     : 0                                       

     Path/Ogn:  i

 

 *>  Network : 2001:DA8::1                              PrefixLen : 128   

     NextHop : 1::1                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: 100 i

<RouterB-2020>

 

D上可以ping通该地址结果如下

       <RouterD-3020>ping ipv6 2001:da8::1

  PING 2001:da8::1 : 56  data bytes, press CTRL_C to break

    Reply from 2001:DA8::1

    bytes=56 Sequence=1 hop limit=62  time = 3 ms

    Reply from 2001:DA8::1

    bytes=56 Sequence=2 hop limit=62  time = 3 ms

    Reply from 2001:DA8::1

    bytes=56 Sequence=3 hop limit=62  time = 3 ms

    Reply from 2001:DA8::1

    bytes=56 Sequence=4 hop limit=62  time = 4 ms

    Reply from 2001:DA8::1

    bytes=56 Sequence=5 hop limit=62  time = 3 ms

 

  --- 2001:da8::1 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 3/3/4 ms

 

X Close
X Close