MSR路由器
BGP4+静态等价路由实现负载分担功能的配置
关键字: MSR;IPv6;BGP4+;负载分担
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]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 ?
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作