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

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



MSR系列路由器 BGP4+负载分担功能的配置

 

关键字: MSR;IPv6;BGP4+;负载分担

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

一、组网需求

    RouterCRouterARouterB建立EBGP连接,与RouterD建立IBGP连接。

分别在RouterARouterB中引入静态路由9.0.0.0/8。要求RouterARouterB实现负载分担。

二、组网图

   

1   BGP4+负载分担组网示意图

三、配置步骤

       1配置RouterA

#

 ipv6

#

interface Ethernet0/0

 port link-mode route

 ipv6 address 2::1/96

#

interface Ethernet0/1

 port link-mode route

 ipv6 address 1::1/96

#

//MSR20210/3交换口模式改为route

interface Ethernet0/3

 port link-mode route

 ipv6 address 3::1/96

#

interface LoopBack0

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

#

bgp 200

 undo synchronization

 #

 ipv6-family

  network 1:1:1::1 128

  import-route direct

  undo synchronization

  balance 2

  peer 1::2 as-number 100

  peer 2::2 as-number 100

  peer 3::2 as-number 200

#

2.配置RouterB

#

 ipv6

#

interface Ethernet0/0

 port link-mode route

 ipv6 address 3::1/96

#

interface Ethernet0/1

 port link-mode route

 ipv6 address 1::2/96

#

interface LoopBack0

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

#

bgp 100

 undo synchronization

 #

 ipv6-family

  network 2:2:2::2 128

  import-route static

  undo synchronization

  peer 1::1 as-number 200

#

 ipv6 route-static 9:: 32 NULL0

#

3.配置RouterC

#

 ipv6

#

interface LoopBack0

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

#

interface GigabitEthernet0/0

 port link-mode route

 ipv6 address 2::2/96

#

bgp 100

 undo synchronization

 #

 ipv6-family   

  network 3:3:3::3 128

  import-route static

  undo synchronization

  peer 2::1 as-number 200

#

 ipv6 route-static 9:: 32 NULL0

#

4.配置RouterD

#

 ipv6

#

interface LoopBack0

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

#

interface GigabitEthernet0/0

 port link-mode route

 ipv6 address 3::2/96

#

bgp 200

 undo synchronization

 #

 ipv6-family

  network 4:4:4::4 128

  import-route direct

  undo synchronization

  peer 3::1 as-number 200

四、配置关键点

    BGP4+的基本配置完成以后,分别在RTBRTC的系统视图下建立到达空地址9::32的静态路由,即命令:

ipv6 route-static 9:: 32 NULL0

然后分别在BGP中引入该静态路由。

 

五、试验分析

    配置完成后在RTBRTC上有等价路由均到达9:: 32网段,这时在其它条件相同的情况下,系统默认会选择地址小的做为默认路由,此时路由表如下:

    [RTA-2021-bgp-af-ipv6]dis ipv6 rou

Routing Table :

        Destinations : 14       Routes : 14

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 1::/96                                      Protocol  : Direct

NextHop    : 1::1                                        Preference: 0

Interface  : Eth0/1                                      Cost      : 0

 

Destination: 1::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 1:1:1::1/128                                Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 2::/96                                      Protocol  : Direct

NextHop    : 2::1                                        Preference: 0

Interface  : Eth0/0                                      Cost      : 0

 

Destination: 2::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 2:2:2::2/128                                Protocol  : BGP4+

NextHop    : 1::2                                        Preference: 255

Interface  : Eth0/1                                      Cost      : 0

 

Destination: 3::/96                                      Protocol  : Direct

NextHop    : 3::1                                        Preference: 0

Interface  : Eth0/3                                      Cost      : 0

 

Destination: 3::1/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 3:3:3::3/128                                Protocol  : BGP4+

NextHop    : 2::2                                        Preference: 255

Interface  : Eth0/0                                      Cost      : 0

 

Destination: 4:4:4::4/128                                Protocol  : BGP4+

NextHop    : 3::2                                        Preference: 255

Interface  : Eth0/3                                      Cost      : 0

 

Destination: 9::/32                                      Protocol  : BGP4+

NextHop    : 1::2                                        Preference: 255

Interface  : Eth0/1                                      Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : NULL0                                       Cost      : 0

 

当在RTA上配置了负载均衡路由的最大数为2系统默认将两条路由均加入路由表

    [RTA-2021]dis bgp ipv routing-table

 

 Total Number of Routes: 11

 

 BGP Local router ID is 1.0.0.1

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

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

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

-------------------------------------

balance 值为2的条件下

 *>  Network : 1::                                      PrefixLen : 96    

     NextHop : 1::1                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                        

     Path/Ogn: ?

 

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

     NextHop : ::1                                      LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: i

 

 *>  Network : 2::                                      PrefixLen : 96    

     NextHop : 2::1                                     LocPrf    :          

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: ?

 

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

     NextHop : 1::2                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: 100 i

 

 *>  Network : 3::                                      PrefixLen : 96    

     NextHop : 3::1                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: ?

 

 * i Network : 3::                                      PrefixLen : 96    

     NextHop : 3::2                                     LocPrf    : 100      

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn:  ?

 

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

     NextHop : 2::2                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: 100 i

 

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

     NextHop : 3::2                                     LocPrf    : 100      

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn:  i

 

 *>  Network : 9::                                      PrefixLen : 32    

     NextHop : 1::2                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                       

     Path/Ogn: 100 ?

 

 *>  Network : 9::                                      PrefixLen : 32    

     NextHop : 2::2                                     LocPrf    :         

     PrefVal : 0                                        Label     : NULL     

     MED     : 0                                        

     Path/Ogn: 100 ?

X Close
X Close