《CiscoBGP-4命令與配置手冊》是2011年人民郵電出版社出版的圖書,作者是帕克赫斯特。本書是一本清晰、簡潔與完整的BGP-4命令文檔,以配置示例的方式描述了每一條BGP-4命令的詳細用法。這些命令包括路由聚合、自動匯總、路由過濾、負載均衡、鄰居配置、路由廣播、路由重分發、地址匯總、同步、BGP計時器等,此外還包括通用的show、clear、debug等命令。
基本介紹
- 書名:Cisco BGP-4命令與配置手冊
- 作者:帕克赫斯特
- 譯者:朱劍雲,王曉磊
- 出版社:人民郵電出版社
基本資料,基本內容,目錄,
基本資料
作 者:(美)帕克赫斯特 著,朱劍雲,王曉磊 譯
出 版 社:人民郵電出版社
出版時間:2011-5-1
版 次:1頁 數:316字 數:449000 印刷時間:2011-5-1開 本:大16開紙 張:膠版紙
基本內容
本書既適用於大型網路的設計與管理人員、有志參加CCIE考試的網路工程師,還可作為網路科研人員掌握BGP協定的參考手冊。
目錄
第1章 路由聚合 1
1-1 aggregate-address address mask 1
1.1.1 配置案例1:聚合本路由器生成的路由 1
1.1.2 配置案例2:聚合經過重分發的路由 5
1.1.3 配置案例3:聚合學得的BGP路由 6
1.1.4 配置案例4:利用靜態路由執行聚合 8
1-2 aggregate-address address mask as-set 9
配置案例:對不同自治系統通告的前綴執行聚合 9
1-3 aggregate-address address mask as-set advertise-map route-map-name 13
配置案例:以來自不同自治系統的特定前綴形成聚合路由 14
1-4 aggregate-address address mask attribute-map route-map-name 19
1-5 aggregate-address address mask route-map route-map-name 19
配置案例:修改聚合路由的屬性 20
1-6 aggregate-address address mask summary-only 23
配置案例:抑制明細路由的同時,通告聚合路由 24
1-7 aggregate-address address mask suppress-map route-map-name 27
配置案例:抑制用來構成聚合路由的部分明細路由的通告 27
第2章 自動匯總 33
2.1 auto-summary 33
配置案例:自動路由匯總 34
第3章 BGP專有命令 39
3-1 bgp always-compare-med 39
配置案例:比較學自不同自治系統的路由MED值 40
3-2 bgp bestpath as-path ignore 44
配置案例:做出最佳路徑決策時,忽略AS路徑(AS-Path)屬性 45
3-3 bgp bestpath med confed 48
配置案例:聯盟內BGP MED的比較 49
3-4 bgp bestpath med missing-as-worst 52
配置案例:比較學自不同自治系統的路由MED值 53
3-5 bgp client-to-client reflection 55
配置案例:路由反射器和對等體組 55
3-6 bgp cluster-id 32-bit_id 58
配置案例: 互為冗餘的路由反射器 58
3-7 bgp confederation identifier AS-number 62
3-8 bgp confederation peers 1_or_more_AS-numbers 62
配置案例:BGP聯盟 63
3-9 bgp dampening 67
3-10 bgp dampening half-life 67
3-11 bgp dampening half-life reuse suppress max-suppress-time 67
3-12 bgp dampening route-map route-map-name 67
配置案例1:路由抑制特性的默認行為 68
配置案例2:配置路由抑制參數 72
配置案例3:使用路由映射來配置路由抑制參數 72
3-13 bgp default local-preference local-preference 74
配置案例:默認的本地優先值 74
3-14 bgp deterministic-med 76
3-15 bgp fast-external-fallover 77
配置案例:演示Fast external fallover|特性 77
3-16 bgp log-neighbor-changes 78
配置案例1:讓控制台(Console)記錄BGP鄰居狀態的變更日誌 79
配置案例2:在記憶體中記錄BGP鄰居狀態的變更日誌 79
3-17 bgp router-id ip-address 80
配置案例:BGP 路由器ID 80
第4章 默認路由信息 85
4-1 default-information originate 85
配置案例:BGP默認路由的通告 85
4-2 default-metric metric 87
配置案例:為經過重分發的路由分配度量值 88
第5章 BGP管理距離 91
5-1 distance admin-distance ip-source-address ip-address-mask 91
5-2 distance admin-distance ip-source-address ip-address-mask ip-access-list-number 91
5.2.1 配置案例1:修改由特定鄰居通告的所有路由的管理距離 92
5.2.2 配置案例2:修改接收自特定鄰居的具體路由的管理距離 93
5-3 distance bgp external internal local 94
配置案例:修改外部、內部以及本機GP路由的管理距離 94
第6章 BGP路由過濾 99
第7章 BGP多路徑 101
第8章 鄰居配置 107
8-1 neighbor {ip-address | peer-group-name} advertise-map route-map-name1 non-exist-map route-map-name2 107
配置案例:通告主要路由的同時,抑制次要路由 108
8-2 neighbor {ip-address | peer-group-name} advertisement-interval seconds 112
8.2.1 配置案例1:默認的路由通告時間間隔 112
8.2.2 配置案例2:修改路由通告時間間隔 114
8-3 neighbor {ip-address | peer-group-name} default-originate 115
8.3.1 配置案例1:設定單條默認路由 115
8.3.2 配置案例2:設定多條默認路由 117
8-4 neighbor {ip-address | peer-group-name} default-originate route-map route-map-name 119
配置案例:有條件地通告默認路由 120
8-5 neighbor {ip-address | peer-group-name} description text 122
配置案例:標識BGP鄰居 122
8-6 neighbor {ip-address | peer-group-name} distribute-list ip- access-list-number-or-name in 123
8.6.1 配置案例1:阻擋特定的路由 123
8.6.2 配置案例2:放行一條特定的路由,阻擋其他所有路由 126
8.6.3 配置案例3:放行聚合路由,阻擋明細路由 126
8-7 neighbor {ip-address | peer-group-name} distribute-list ip- access-list-number-or-name out 128
8.7.1 配置案例1:阻擋特定的路由 129
8.7.2 配置案例2:放行特定的路由,阻擋其他所有路由 131
8.7.3 配置案例3:放行聚合路由,阻擋明細路由 131
8-8 neighbor {ip-address | peer-group-name} ebgp-multihop 133
8-9 neighbor {ip-address | peer-group-name} ebgp-multihop maximum-hop-count 133
配置案例:非直連的EBGP鄰居 134
8-10 neighbor {ip-address | peer-group-name} filter-list as-path-list-number in 135
8.10.1 配置案例1:阻擋源自特定AS的路由 136
8.10.2 配置案例:阻擋AS 3生成的路由,但是放行途經AS 3的路由 139
8.10.3 配置案例3:阻擋所有包含了AS路徑號3的路由 141
8.10.4 配置案例4:阻擋由直連EBGP鄰居生成的路由 142
8-11 neighbor {ip-address | peer-group-name} filter-list as-path-list-number out 144
8.11.1 配置案例1:阻當由特定AS生成的路由 144
8.11.2 配置案例2:阻擋AS 3生成的路由,但放行途徑AS 3的路由 147
8.11.3 配置案例3:阻塞所有包含了AS路徑號3的路由 149
8.11.4 配置案例4:阻擋由直連EBGP鄰居生成的路由 150
8-12 neighbor {ip-address | peer-group-name} filter-list as-path-list-number weight weight 152
配置案例:為生成自特定AS的路由設定權重(weight) 152
8-13 neighbor {ip-address | peer-group-name} maximum-prefix prefix-limit 156
8-14 neighbor {ip-address | peer-group-name} maximum-prefix prefix-limit warning-only 156
8-15 neighbor {ip-address | peer-group-name} maximum-prefix prefix-limit threshold-value 156
8-16 neighbor {ip-address | peer-group-name} maximum-prefix prefix-limit threshold-value warning-only 156
配置案例:控制學自BGP鄰居的最多前綴數 156
8-17 neighbor { ip-address | peer-group-name } next-hop-self 160
配置案例:設定所通告前綴的下一跳信息 160
8-18 neighbor { ip-address | peer-group-name } password password 162
配置案例:在BGP對等體之間啟用TCP連線的MD5認證 163
8-19 neighbor peer-group-name peer-group 164
8-20 neighbor ip-address peer-group peer-group-name 164
配置案例:創建對等體組 164
8-21 neighbor {ip-address | peer-group-name} prefix-list prefix-list-name in 166
8.21.1 配置案例1:放行聚合路由,阻擋明細路由 167
8.21.2 配置案例2:接受精確前綴,阻擋聚合前綴 170
8-22 neighbor {ip-address | peer-group-name} prefix-list prefix-list-name out 171
8.22.1 配置案例1:放行聚合路由的同時,阻擋明細路由 172
8.22.2 配置案例2:放行精確前綴,阻擋聚合前綴 175
8-23 neighbor {ip-address | peer-group-name} remote-as number 176
8.23.1 配置案例1:EBGP鄰居 176
8.23.2 配置案例2:IBGP鄰居 178
8-24 neighbor {ip-address | peer-group-name} remove-private-as 179
配置案例:從通告給鄰居(或對等體組中的成員)的路由更新中剔除私有AS號 179
8-25 neighbor {ip-address | peer-group-name} route-map route-map-name in 181
8.25.1 配置案例1:利用IP標準訪問列表行使基本的路由過濾功能 182
8.25.2 配置案例2:利用IP擴展訪問列表行使基本的路由過濾功能 183
8.25.3 配置案例3:操縱基本的BGP屬性 184
8.25.4 配置案例4:選擇性地操縱BGP屬性 185
8.25.5 配置案例5:根據AS路徑信息執行過濾 186
8-26 neighbor {ip-address | peer-group-name} route-map route-map-name out 187
8.26.1 配置案例1:利用IP標準訪問列表行使基本的路由過濾功能 188
8.26.2 配置案例2:操縱AS路徑信息 189
8.26.3 配置案例3:為選定的路由追加AS信息 190
8.26.4 配置案例4:修改COMMUNITY屬性 191
8-27 neighbor {ip-address | peer-group-name} route-reflector-client 194
8.27.1 配置案例1:單台路由反射器 194
8.27.2 配置案例2:多路由反射器 197
8-28 neighbor {ip-address | peer-group-name} send-community 199
配置案例:NO-EXPORT團體值 199
8-29 neighbor {ip-address | peer-group-name} shutdown 201
配置案例:管理性地斷開BGP對話 202
8-30 neighbor {ip-address | peer-group-name} soft-reconfiguration inbound 202
配置案例:針對特定的鄰居設定inbound軟重配特性 203
8-31 neighbor {ip-address | peer-group-name} timers keepalive holdtime 204
配置案例:更改保活時間和保持時間值 204
8-32 neighbor {ip-address | peer-group-name} unsuppress-map route-map-name 205
配置案例:使用反抑制映射,有選擇的通告路由 205
8-33 neighbor {ip-address | peer-group-name} update-source interface-name 207
配置案例:使用loopback接口增強網路的穩定性 208
8-34 neighbor {ip-address | peer-group-name} version version-number 210
配置案例:鎖定鄰居BGP的版本 211
8-35 neighbor {ip-address | peer-group-name} weight default-weight 212
配置案例:設定路由器本機的路由權重值 212
第9章 路由通告 215
9-1 network ip-address 215
9-2 network ip-address mask network-mask 215
9.2.1 配置案例1:直連網路 216
9.2.2 配置案例2:使用靜態路由執行路由聚合 217
9-3 network ip-address backdoor 218
9-4 network ip-address mask network-mask backdoor 218
配置案例:通過管理距離發現最佳路由 219
9-5 network ip-address route-map route-map-name 221
9-6 network ip-address mask network-mask route-map route-map-name 221
9-7 network ip-address weight weight 222
9-8 network ip-address mask network-mask weight weight 222
第10章 路由重分發 225
10-1 redistribute protocol 225
配置案例:將直連、靜態和EIGRP學得的路由重分發進BGP 225
10-2 redistribute protocol metric metric 230
配置案例:將直連、靜態和EIGRP學得的路由重分發進BGP 230
10-3 redistribute protocol route-map route-map-name 234
10-4 redistribute protocol route-map route-map-name metric metric 234
配置案例:選擇性地將直連、靜態和EIGRP學得的路由重分發進BGP 235
10-5 redistribute protocol weight weight 239
第11章 地址匯總 241
第12章 同步 243
第13章 BGP計時器 249
第14章 BGP show命令 253
14-1 show ip bgp 253
14-2 show ip bgp | begin line 253
14-3 show ip bgp | exclude line 253
14-4 show ip bgp | include line 253
配置案例:顯示BGP路由表 253
14-5 show ip bgp prefix 255
配置案例:顯示BGP路由表中的精確前綴 255
14-6 show ip bgp prefix mask 255
14-7 show ip bgp prefix/mask-length 255
配置案例:顯示本地BGP路由表中具有特定掩碼的精確前綴 255
14-8 show ip bgp prefix mask longer-prefixes 256
14-9 show ip bgp prefix/mask-length longer-prefixes 256
配置案例:顯示BGP路由表中掩碼長度長於或等於命令中所指定掩碼的特定前綴 256
14-10 show ip bgp prefix | begin line 257
14-11 show ip bgp prefix | exclude line 257
14-12 show ip bgp prefix | include line 257
14-13 show ip bgp prefix mask | begin line 257
14-14 show ip bgp prefix mask | exclude line 257
14-15 show ip bgp prefix mask | include line 257
14-16 show ip bgp prefix/mask-length | begin line 258
14-17 show ip bgp prefix/mask-length | exclude line 258
14-18 show ip bgp prefix/mask-length | include line 258
14-19 show ip bgp prefix mask longer-prefixes | begin line 258
14-20 show ip bgp prefix mask longer-prefixes | exclude line 258
14-21 show ip bgp prefix mask longer-prefixes | include line 258
14-22 show ip bgp prefix/mask-length longer-prefixes | begin line 258
14-23 show ip bgp prefix/mask-length longer-prefixes | exclude line 258
14-24 show ip bgp prefix/mask-length longer-prefixes | include line 258
配置案例:使用輸出修飾符顯示BGP路由表中的特定前綴 258
14-25 show ip bgp cidr-only 259
14-26 show ip bgp cidr-only | begin line 259
14-27 show ip bgp cidr-only | exclude line 259
14-28 show ip bgp cidr-only | include line 259
配置案例 顯示具有原生態掩碼的BGP前綴 260
14-29 show ip bgp community community-number(s) 260
14-30 show ip bgp community community-number(s) exact-match 260
14-31 show ip bgp community community-number(s) | begin line 260
14-32 show ip bgp community community-number(s) | exclude line 260
14-33 show ip bgp community community-number(s) | include line 260
14-34 show ip bgp community community-number(s) | begin line exact-match 260
14-35 show ip bgp community community-number(s) | exclude line exact-match 261
14-36 show ip bgp community community-number(s) | include line exact-match 261
配置案例:顯示隸屬於特定團體的BGP前綴 261
14-37 show ip bgp community-list community-list-number 261
14-38 show ip bgp community-list community-list-number | begin line 261
14-39 show ip bgp community-list community-list-number | exclude line 261
14-40 show ip bgp community-list community-list-number | include line 261
14-41 show ip bgp community-list community-list-number exact match 261
14-42 show ip bgp community-list community-list-number exact-match | begin line 262
14-43 show ip bgp community-list community-list-number exact-match | exclude line 262
14-44 show ip bgp community-list community-list-number exact-match | include line 262
配置案例:使用團體列表顯示隸屬於特定團體的BGP前綴 262
14-45 show ip bgp dampened-paths 262
14-46 show ip bgp dampened-paths | begin line 262
14-47 show ip bgp dampened-paths | exclude line 262
14-48 show ip bgp dampened-paths | include line 262
配置案例:顯示受BGP路由抑制特性抑制的前綴 263
14-49 show ip bgp filter-list as-path-access-list 263
14-50 show ip bgp filter-list as-path-access-list | begin line 263
14-51 show ip bgp filter-list as-path-access-list | exclude line 263
14-52 show ip bgp filter-list as-path-access-list | include line 263
配置案例:顯示匹配指定AS路徑訪問列表,且受BGP路由抑制特性抑制的前綴 263
14-53 show ip bgp flap-statistics 264
14-54 show ip bgp flap-statistics prefix/mask-length 264
14-55 show ip bgp flap-statistics prefix/mask-length longer-prefi-xes 264
14-56 show ip bgp flap-statistics prefix/mask-length longer-prefi-xes | begin regular-expression 264
14-57 show ip bgp flap-statistics prefix/mask-length longer-prefi-xes | exclude regular-expression 264
14-58 show ip bgp flap-statistics prefix/mask-length longer-prefi-xes | include regular-expression 264
14-59 show ip bgp flap-statistics prefix/mask-length | begin regular-expression 264
14-60 show ip bgp flap-statistics prefix/mask-length | exclude regular-expression 264
14-61 show ip bgp flap-statistics prefix/mask-length | include regular-expression 264
14-62 show ip bgp flap- statistics prefix 264
14-63 show ip bgp flap-statistics prefix | begin regular-expression 264
14-64 show ip bgp flap-statistics prefix | exclude regular-expression 265
14-65 show ip bgp flap-statistics prefix | include regular-expression 265
14-66 show ip bgp flap-statistics prefix mask 265
14-67 show ip bgp flap-statistics prefix mask | begin regular-expression 265
14-68 show ip bgp flap-statistics prefix mask | exclude regular-expression 265
14-69 show ip bgp flap-statistics prefix mask | include regular-expression 265
14-70 show ip bgp flap-statistics prefix mask longer-prefixes 265
14-71 show ip bgp flap-statistics prefix mask longer-prefixes | begin regular-expression 265
14-72 show ip bgp flap-statistics prefix mask longer-prefixes | exclude regular-expression 265
14-73 show ip bgp flap-statistics prefix mask longer-prefixes | include regular-expression 265
14-74 show ip bgp flap-statistics filter-list list-number 265
14-75 show ip bgp flap-statistics filter-list list-number | begin regular-expression 265
14-76 show ip bgp flap-statistics filter-list list-number | exclude regular-expression 266
14-77 show ip bgp flap-statistics filter-list list-number | include regular-expression 266
14-78 show ip bgp flap-statistics quote-regexp quoted-line 266
14-79 show ip bgp flap-statistics quote-regexp quoted-line | begin regular-expression 266
14-80 show ip bgp flap-statistics quote-regexp quoted-line | excl-ude regular-expression 266
14-81 show ip bgp flap-statistics quote-regexp quoted-line | include regular-expression 266
14-82 show ip bgp flap-statistics regexp regular-expression 266
14-83 show ip bgp flap-statistics | begin regular-expression 266
14-84 show ip bgp flap-statistics | exclude regular-expression 266
14-85 show ip bgp flap-statistics | include regular-expression 266
配置案例:顯示BGP翻動統計信息 267
14-86 show ip bgp inconsistent-as 268
14-87 show ip bgp inconsistent-as | begin line 268
14-88 show ip bgp inconsistent-as | exclude line 268
14-89 show ip bgp inconsistent-as | include line 268
配置案例:顯示起源AS不一致的BGP路由 268
14-90 show ip bgp neighbors 268
14-91 show ip bgp neighbors | begin line 268
14-92 show ip bgp neighbors | exclude line 268
14-93 show ip bgp neighbors | include line 268
14-94 show ip bgp neighbors ip-address advertised-routes 268
14-95 show ip bgp neighbors ip-address dampened-routes 268
14-96 show ip bgp neighbors ip-address flap-statistics 269
14-97 show ip bgp neighbors ip-address paths 269
14-98 show ip bgp neighbors ip-address paths line 269
14-99 show ip bgp neighbors ip-address received-routes 269
14-100 show ip bgp neighbors ip-address routes 269
配置案例:顯示特定BGP鄰居的信息 269
14-101 show ip bgp paths 273
14-102 show ip bgp paths line 273
14-103 show ip bgp paths line 273
14-104 show ip bgp paths line 273
14-105 show ip bgp paths | begin line 273
14-106 show ip bgp paths | exclude line 273
14-107 show ip bgp paths | include line 273
配置案例:顯示BGP路徑信息 273
14-108 show ip bgp peer-group 274
14-109 show ip bgp peer-group peer-group-name 274
14-110 show ip bgp peer-group peer-group-name summary 274
配置案例:顯示BGP對等體組的信息 274
14-111 show ip bgp summary 274
14-112 show ip bgp summary | begin line 274
14-113 show ip bgp summary | exclude line 274
14-114 show ip bgp summary | include line 274
配置案例:顯示所有BGP連線的匯總信息 274
第15章 BGP clear命令 277
15-1 clear ip bgp * 277
15-2 clear ip bgp * soft 277
15-3 clear ip bgp * soft in 277
15-4 clear ip bgp * soft out 277
15-5 clear ip bgp * soft in out 277
15-6 clear ip bgp AS-number 277
15-7 clear ip bgp AS-number soft 277
15-8 clear ip bgp AS-number soft in 277
15-9 clear ip bgp AS-number soft out 277
15-10 clear ip bgp AS-number soft in out 277
15-11 clear ip bgp neighbor-ip-address 277
15-12 clear ip bgp neighbor-ip-address soft 277
15-13 clear ip bgp neighbor-ip-address soft in 278
15-14 clear ip bgp neighbor-ip-address soft out 278
15-15 clear ip bgp neighbor-ip-address soft in out 278
15-16 clear ip bgp peer-group peer-group-name 278
15-17 clear ip bgp peer-group peer-group-name soft 278
15-18 clear ip bgp peer-group peer-group-name soft in 278
15-19 clear ip bgp peer-group peer-group-name soft out 278
15-20 clear ip bgp peer-group peer-group-name soft in out 278
15-21 clear ip bgp dampening 279
15-22 clear ip bgp dampening prefix mask 279
15-23 clear ip bgp flap-statistics 279
15-24 clear ip bgp flap-statistics prefix mask 279
15-25 clear ip bgp flap-statistics filter-list list-number 279
15-26 clear ip bgp flap-statistics regexp regular-expression 279
15-27 clear ip bgp neighbor-ip-address flap-statistics 279
第16章 BGP debug命令 281
16-1 debug ip bgp 281
配置案例 281
16-2 debug ip bgp neighbor-ip-address updates 282
16-3 debug ip bgp neighbor-ip-address updates access-list-number 282
16.3.1 配置案例1:對接收自/傳送到特定鄰居的所有路由更新執行debug操作 282
16.3.2 配置案例2:對接收自和/或傳送到特定鄰居的特定路由更新執行debug操作 284
16-4 debug ip bgp dampening 285
16-5 debug ip bgp dampening access-list-number 285
配置案例:調試所有BGP路由抑制事件 285
16-6 debug ip bgp events 286
配置案例:對鄰居關係建立(formation)過程中的事件進行調試 286
16-7 debug ip bgp keepalives 287
配置案例:調試BGP保活訊息 287
16-8 debug ip bgp in neighbor-ip-address updates 287
16-9 debug ip bgp in neighbor-ip-address updates access-list-number 287
16-10 debug ip bgp out neighbor-ip-address updates 287
16-11 debug ip bgp out neighbor-ip-address updates access-list-number 287
16-12 debug ip bgp updates 287
16-13 debug ip bgp updates in 288
16-14 debug ip bgp updates out 288
16-15 debug ip bgp updates access-list-number 288
16-16 debug ip bgp updates access-list-number in 288
16-17 debug ip bgp updates access-list-number out 288
16.17.1 配置案例1:調試所有BGP更新 288
16.17.2 配置案例2:調試收到的路由更新 289
16.17.3 配置案例3:調試發往所有BGP鄰居的特定出站路由更新 290
16.17.4 配置案例4:調試接收自某特定BGP鄰居的特定出站路由更新 290
附錄A RFC 1771:邊界網關協定4 293
附錄B 正則表達式 305
附錄C 路由映射邏輯 309