欢迎访问 水平网    今天是:2017年11月19日 注册 | 登录 | 订阅 | 收藏
>> 网络技术 >> 路由交换 >> H3C MSR系列路由器的BGP4+静态等价路由实现负载分担功能的配置
推荐文章
热点文章
专题
JQuery框架
Prototype.js
HTML5

H3C MSR系列路由器的BGP4+静态等价路由实现负载分担功能的配置

作者:未知,  来源:网络,  阅读:1426,  发布时间:2014-07-01 【放入收藏夹
一、组网需求
RTA与RTB、RTC建立EBGP连接,与RouterD建立IBGP连接。分别在RTB、RTC中引入到达空地址9:: / 32的静态路由。要求RTB和RTC实现负载分担。
设备清单:RTA(MSR20-21),RTB(MSR20-20),RTC(MSR30-20)
适用版本:Version 5.20, Beta 1105

二、组网图


图1 – BGP4+静态等价路由实现负载分担组网示意图

三、配置步骤
以下为RTA配置: #
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
#
//将MSR20-21的0/3交换口模式改为route
interface Ethernet0/3
port link-mode route
ipv6 address 3::1/96
#
interface LoopBack0
ipv6 address 1:1:1::1/128
//建立EBGP与IBGP
#
bgp 200
undo synchronization
#
ipv6-family
network 1:1:1::1 128
import-route direct
undo synchronization
//配置负载平衡最大路由数为2
balance 2
peer 1::2 as-number 100
peer 2::2 as-number 100
peer 3::2 as-number 200
以下为RTB配置: #
ipv6
#
interface Ethernet0/1
port link-mode route
ipv6 address 1::2/96
#
interface LoopBack0
ipv6 address 2:2:2::2/128
//配置EBGP
#
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
以下为RTC配置: #
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
#
return
以下为RTD配置: #
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+的基本配置完成以后,分别在RTB和RTC的系统视图下建立到达空地址9:: 32的静态路由,即命令:
ipv6 route-static 9:: 32 NULL0
然后分别在BGP中引入该静态路由。

五、试验分析
配置完成后在RTB和RTC上有等价路由均到达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-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 ?
TGAS:H3CMSR路由器BGP4+静态等价路由负载分担
评论【共有0条评论】查看所有评论
称呼:(*)   邮箱:   QQ:   验证码: 看不清楚?点击刷新验证码