MSR系列路由器
BGP4+路由协议反射器功能的配置
关键字: BGP; 路由反射;IPv6
试验设备:RouterA(MSR20-21),RouterB(MSR20-20),RouterC(MSR30-20),RouterD(MSR30-20)
RouterB接收了一个经过EBGP的更新报文并将之传给RouterC。RouterC被配置为路由反射器,它有两个客户:RouterB和RouterD。RouterB和RouterD间不需一个IBGP连接,当RouterC接收了来自RouterB的路由更新时,它将此信息反射给RouterD,反之亦然。
1.RouterA配置:
#
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
#
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. 作为反射client的RouterB、D上无需配reflect-client,这些都是要在反射器routerC上配的
2. 需要在边界路由器RouterB与RouterC上引入直连路由,否则在ping 1:1:1::1地址的时候找不到下一跳1::1, 即无法到达BGP路由表中的下一跳。因为边界路由器在向IBGP发布路由的时候不改变该条路由的下一跳。
1. 在RouterA上再配置一个loopback地址:2001:da8::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
此时在RouterB与RouterD的BGP路由表中均有到达该地址的路由,
<RouterB-2020>display bgp ipv6 routing-table
Total Number of Routes: 9
BGP Local router ID is
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 =