</p>ip route 150.10.1.1 255.255.255.255 1.1.1.1
! K) `' F9 k4 G1 \ \0 R/ X0 x$ \ip route 150.10.1.1 255.255.255.255 2.2.2.1
! N/ c% S( A2 E$ D!6 c5 r" D& p3 w
在使用回环接口建立BGP邻居关系并进行负载均衡的时候,要注意:
& N, h$ }+ {+ S9 G1 I0 N3 d1.使用回环接口建立邻居关系,对于EBGP,要指定多跳关系.
4 \4 r1 }4 N5 {, g( l& ^3 f( \2.要确保本地BGP路由器的IGP路由表中有到达邻居回环接口的路由.
4 K# @! M+ Q, a; g: P h3.为了防止路由环路,如果到达多跳对等体的路由是默认路由(0.0.0.0/0),邻居关系是不会建立的.Performance Tuning- n8 d A# A6 C2 k& X2 `
[NextPage]6 S" h# X4 B( K5 G r9 a' ]' Q- l
一些性能调试的命令:1 T# u. R/ X7 q* o% m7 [' {
1.重启BGP进程:! N+ A3 \- G, I7 R/ C
Aiko#clear ip bgp {*|ip-address} [soft {out|in}]4 a& p. M U1 o# E
2.启用BGP对等体的MD5加密认证:
O) R. [0 q) L; `4 XAiko(config-router)#neighbor {ip-address} password {password}2 p& r# H' J1 \! c
3.设置邻居的描述信息:
& W/ f3 `9 L v8 J3 j' sAiko(config-router)#neighbor {ip-address} description {string}6 W7 i- b& h3 z3 L9 ~: }' ?9 u
4.暂时关闭和某个BGP邻居的通信:
9 o+ ?& G* q5 |; ^' l* f: U* dAiko(config-router)#neighbor {ip-address} shutdown
/ q% k9 f) Z7 i" a5.手动指定BGP的RID,可以指定一个不存在的IP地址为RID:' @$ q/ P& K( s# K: M8 N/ X
Aiko(config-router)#bgp router-id {ip-address}
3 W6 c1 v, x6 Z0 y6.移除出站的BGP路由更新中的私有AS号.私有AS号的范围是64512到65535.该命令只对EBGP有效:) T# V/ s- L( H. Y8 v
Aiko(config-router)#neighbor {ip-address} remove-private-as P2 G9 W$ Z( E4 C( N
7.当接口振荡的时候,立即断开BGP邻接关系,该特性默认是起用的:
: k! F7 `; }* X3 `' hAiko(config-router)#bgp fast-external-fallover' Q* r, G# W8 U# Q
8.设置从邻居那里接收到的网络前缀的最大数目.当达到能够接收的最大网络前缀数目的75%时,本地BGP路由器将产生警告信息;当达到能够接收的最大前缀数目时,邻接关系将被切断: S% _2 V5 ~& n( M
Aiko(config-router)#neighbor {ip-address} maximum-prefix {number} [threshold][warning-only]1 A8 g {4 X. e4 u
9.让BGP社团属性以AA:NN的形式显示:4 Y% c. g, [% u: _3 y" d
Aiko(config)#ip bgp-community new-format4 B5 f$ {9 ~; [
10.定义BGP负载均衡的最大路径数目,默认为一条:7 f' x0 H6 i* ^1 D) F8 u, ?' w P
Aiko(config-router)#maximum-paths {number}
3 `- _2 y# }7 }5 i1 m11.配置BGP的路由惩罚,默认4个参数的值分别为15分钟,750,2000,和60分钟:+ P& O0 t# k# T% X$ K( V
Aiko(config-router)#bgp dampening [half-life reuse suppress max] [route-map map-name]12.在选路决策中启用RID的比较:! u4 ?6 ^9 S2 n, _! U/ j A+ Q( C
Aiko(config-router)#bgp bestpath compare-routerid7 i5 l8 D6 a6 ]" i
9 H& A& {' \- V( W& gAdjusting BGP Timers |