a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 173|回复: 2

[CCIE] CCIE复习指导:配置BGP案例二

[复制链接]
发表于 2012-8-3 20:12:39 | 显示全部楼层 |阅读模式
Case 2) @$ W( k% s9 p- n1 i/ P
使用回环接口建立BGP邻居关系并进行负载均衡的实例:
7 I. g# E! L4 r路由器A配置如下:7 h' v- M( _$ P& H8 [, F
!
  r( E& k+ q3 \5 h4 d3 P6 N) Q0 Minterface Loopback0. G: O" D- X' E$ Q# A& c
ip address 150.10.1.1 255.255.255.255: [" F4 Z6 L3 @/ P1 e9 |" V
!( p5 S- u; R7 j
router bgp 100
' y) |3 p& k9 u! |  w- cneighbor 160.10.1.1 remote-as 200
5 Y: ^( u6 ^3 qneighbor 160.10.1.1 ebgp-multihop/ i  s  j* y" m6 y/ @
neighbor 160.10.1.1 update-source Loopback02 {. D: L$ e8 N+ M. ?" b4 |9 N
network 150.10.0.0# ~. A6 q: y, }5 m' |+ H; Q
!
# {* P, V1 A) Z/ ~, m3 F$ tip route 160.10.1.1 255.255.255.255 1.1.1.2+ R8 Q# k+ ]5 ?! P
ip route 160.10.1.1 255.255.255.255 2.2.2.2
0 Z/ R: f( ^5 F: k: w8 N6 r!
7 {) V/ l  J$ H9 e& ^路由器B配置如下:
  I- n+ l! _- ~7 s!7 G, o. ^* n+ O% Z+ ~
router bgp 200
- G) \) E) g! n7 h( ^neighbor 150.10.1.1 remote-as 100+ n/ m/ Y0 o% _/ S& ~& y3 o5 G
neighbor 150.10.1.1 ebgp-multihop# O) ?& }9 R# @0 q+ p9 _5 ?5 {
neighbor 150.10.1.1 update-source Loopback0
( `) O$ `: i' l" \6 ^network 160.10.0.0
+ a, j5 X' _$ w+ y& A
' r9 o+ y7 }/ N, l1 T!
回复

使用道具 举报

 楼主| 发表于 2012-8-3 20:12:40 | 显示全部楼层

CCIE复习指导:配置BGP案例二

</p>ip route 150.10.1.1 255.255.255.255 1.1.1.1$ f; [5 l1 A0 m+ D' ^
ip route 150.10.1.1 255.255.255.255 2.2.2.1' X6 ]# u1 l$ Q- E
!
  O$ s. h( P3 R* p6 j0 x在使用回环接口建立BGP邻居关系并进行负载均衡的时候,要注意:' O  k5 s, r) K/ }
1.使用回环接口建立邻居关系,对于EBGP,要指定多跳关系.
4 U  J, n+ T% ~  V9 Z  h2.要确保本地BGP路由器的IGP路由表中有到达邻居回环接口的路由.
& c+ a$ S7 x  {6 u- x3.为了防止路由环路,如果到达多跳对等体的路由是默认路由(0.0.0.0/0),邻居关系是不会建立的.Performance Tuning
" W1 m3 @* X4 V2 |' k; k2 C$ j% R. {8 j[NextPage]# K/ O6 J. n5 S& h5 G
一些性能调试的命令:
1 Y  f8 V% N+ n1.重启BGP进程:3 G; V: K6 q% \8 v7 q
Aiko#clear ip bgp {*|ip-address} [soft {out|in}]
( [, H8 Z2 R9 c2.启用BGP对等体的MD5加密认证:
6 g* S! C4 H) t: x6 {7 RAiko(config-router)#neighbor {ip-address} password {password}, T0 `0 `) Y* V& y( d" O9 t- v
3.设置邻居的描述信息:
; t2 e  n; A! [8 V, x* l+ KAiko(config-router)#neighbor {ip-address} description {string}* z/ X. s* Z/ D/ S# l
4.暂时关闭和某个BGP邻居的通信:# R8 w- T9 a& n
Aiko(config-router)#neighbor {ip-address} shutdown
$ [6 T& e4 }) R* i% A+ f- r! P0 P+ r" W5.手动指定BGP的RID,可以指定一个不存在的IP地址为RID:
1 T& r9 O1 ~9 s" {Aiko(config-router)#bgp router-id {ip-address}
' n; b3 s; B, f4 d0 [" U' @6 j# K- q+ @6.移除出站的BGP路由更新中的私有AS号.私有AS号的范围是64512到65535.该命令只对EBGP有效:
) I* F- v! v9 w/ q. S4 {' XAiko(config-router)#neighbor {ip-address} remove-private-as: Y7 c+ p% K2 T- ?% I( P1 v
7.当接口振荡的时候,立即断开BGP邻接关系,该特性默认是起用的:  Y. \! Q- i, B+ J# g! v. g- j
Aiko(config-router)#bgp fast-external-fallover3 z, i4 W* u9 z4 i  C& J6 Y
8.设置从邻居那里接收到的网络前缀的最大数目.当达到能够接收的最大网络前缀数目的75%时,本地BGP路由器将产生警告信息;当达到能够接收的最大前缀数目时,邻接关系将被切断:* x$ B' I4 Q1 a0 h. D
Aiko(config-router)#neighbor   {ip-address}  maximum-prefix   {number}  [threshold][warning-only]; Q; a- x% q0 {; J2 I9 D
9.让BGP社团属性以AA:NN的形式显示:- U5 `5 u% [- H) s
Aiko(config)#ip bgp-community new-format
+ k& U5 t  z$ r( L# f5 C/ J/ Z10.定义BGP负载均衡的最大路径数目,默认为一条:
* n' s) o* z4 [' MAiko(config-router)#maximum-paths {number}$ c0 b* D, I2 t; z
11.配置BGP的路由惩罚,默认4个参数的值分别为15分钟,750,2000,和60分钟:5 d% n1 r4 M: S5 I' a4 L
Aiko(config-router)#bgp dampening [half-life reuse suppress max] [route-map map-name]12.在选路决策中启用RID的比较:$ m+ A9 R( C4 a1 u. k6 n& U
Aiko(config-router)#bgp bestpath compare-routerid
6 g. m* p! m- T+ e+ ~4 i# e# }: M+ V
6 f" D5 u- a: k0 t, O3 A  o1 GAdjusting BGP Timers
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-8-3 20:12:41 | 显示全部楼层

CCIE复习指导:配置BGP案例二

</p>一些BGP计时器微调的命令:! w; {0 |! c" r& _0 u( d
1.全局微调BGP的计时器.默认keepalive发送的时间间隔为60秒,hold time为180秒.如果双方的BGP计时器的值不同,值小的计时器将生效:9 V* o( K; T% Y8 v7 y/ L- `
Aiko(config-router)#timers bgp {keepalive holdtime}3 H7 y1 m: z% y! I2 |0 [
2.基于邻居的微调计时器,该命令将超越全局计时器的微调:! i& @$ _9 R* e0 S5 V) P& o* p. y
Aiko(config-router)#neighbor {ip-address} timers {keepalive holdtime}
1 `0 u/ \  n4 s4 j' j# m! X& [0 X9 p7 }3.调整BGP路由更新发送的最小间隔时间.默认情况下,对于IBGP对等体是5秒;对于EBGP对等体是30秒:
* d: E5 b# G0 h7 Y2 M9 m/ QAiko(config-router)#neighbor {ip-address} advertisement-interval {seconds}* D: L8 R: `7 ]/ B9 a
Administrative Distance in BGP7 z) l" a& j: T( `( J# R  G0 H7 _1 c
[NextPage]1 |8 c' Y. x: D6 E: h9 L
修改BGP的管理距离的一些方法:+ L* h: \* Q  G- M$ y+ C# t
1.全局修改BGP路由的管理距离:* f' W# z1 r" t5 k1 o4 ^
Aiko(config-router)#distance bgp {external internal local}
- E/ p& a& z6 O, L& Q6 u+ p5 r% D' [2.修改从特定邻居学来的所有BGP路由的管理距离.其中IP地址只能为特定邻居的RID,或者是0.0.0.0:Aiko(config-router)#distance {distance} {ip-address} {wildcard-mask}% S5 o# L, c) D9 i  z1 d
3.修改从特定邻居学来的特定BGP路由的管理距离.其中IP地址只能为特定邻居的RID,或者是0.0.0.0:Aiko(config-router)#distance {distance} {ip-address} {wildcard-mask} {ACL}0 t5 g: E. ~7 |6 |; q9 p
4.配置BGP的后门(backdoor)路由:
5 M2 L1 e6 b5 K3 s; mAiko(config-router)#network {ip-address} backdoor
9 ^. ~) C8 p8 `( M7 W! LRoute Summarization in BGP
8 ?, S  V5 R6 h3 r, Z当路由更新经过主类网络边界的时候,它会自动向主类网络号进行汇总.路由自动汇总特性是BGP默认的操作.BGP可以关闭该特性,而且可以进行手动的路由汇总:
5 O2 H, w4 @& {8 C1 V, }& A1.关闭BGP路由的自动汇总特性:1 w! W5 {; M5 ^7 [# ~
Aiko(config-router)#no auto-summary) `  V6 q- o( T$ j* H: r6 R# Y
2.BGP手动的路由汇总.当使用了关键字summary-only或suppress map之后,本地BG的细致路由全部被抑制,并且在BGP表中以s进行标记:8 {5 p0 }: p) }
Aiko(config-router)#aggregate-address {ip-address} {mask} [suppress-map map-name][summary-only] [attribute-map map-name] [route-map map-name]
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-6-18 11:04 , Processed in 0.572888 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表