日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

router3 BGP1 基础部分

發布時間:2024/4/11 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 router3 BGP1 基础部分 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

1AS--自治系統 由同1個管理組織一組路由器,有相同策略 0-65535 公有AS1-64511 私有AS64512-65535=1024 route-views.routeviews.org 2、為什么使用BGP 1承載大量路由---37W增長中....20110407 2路由策略 實際使用:MAN多個出口 ????????? MPLS×××?? ? 3、什么時候不使用BGP 1)設備資源不足:2G 2)不是很懂BGP 3)單出口 4 BGP特點: 1BGP是屬于EGP、無類、DV路由協議 不同AS之間使用---->EGP 2BGP是一個路徑vector路由協議 AS-BY-AS而不是hop-by-hop 3可靠更新工作在TCP=179端口上 4BGP采用增量、觸發更新 5)周期性keepalive檢驗tcp連接 6)有豐富屬性-->控制路由選擇 5BGP三張表 1)鄰居表 sh ip bgp summary? sh ip bgp neighbor 2BGP數據庫 列出BGP所有的路由條目(包含最佳和次佳) sh ip bgp *> 3路由表 BGP表中最佳的路徑放到轉發表中 sh ip route bgp 6BGP數據包結構 1open +keepalive=hello routerid?holdtime 2)keepalive?只有頭部大小=19byte 60sec?holdtime=180sec 3)update: 最佳路由=網絡號+mask+屬性 *> 4)notification 發現有錯誤報警撤除TCP連接 7BGP鄰居 1IBGP 1)同1AS形成的鄰居 2)條件:只要可達 3)過程:建鄰居--->建立TCP連接---->發包---->查找IGP路由 4IBGP通常使用loopback建立鄰居 2EBGP 1)不同AS形成的鄰居 2)條件:直連 3)通常是使用物理接口建立鄰居 8BGP路由傳遞 1)控制層面 AS-BY-AS 2數據層面 hop-by-hop 黑洞:(1)重發布BGP---->IGP 擴展性問題 ?????? (2)full-mesh IBGP鄰居--->鄰居關系多 ?????? (3)RR/聯邦 ?????? (4)MPLS 9BGP基本配置 1 R4(config-if)#router bgp 4 R4(config-router)#nei 24.1.1.2 remote-as 123 R2(config-router)#router bgp 123 R2(config-router)#nei 24.1.1.4 remote-as 4 R2(config-router)#nei 3.3.3.3 remote-as 123 R3(config-router)#router bgp 123 R3(config-router)#bgp router-id 3.3.3.3 R3(config-router)#nei 2.2.2.2 remote-as 123 R3(config-router)#nei 35.1.1.5 remote-as 5 R5(config-router)#bgp router-id 35.1.1.3????????????? R5(config-router)#nei 35.1.1.3 remote-as 123 2更新源 R3(config-router)#nei 2.2.2.2 update-source lo0 R2(config-router)#nei 3.3.3.3 update-source lo0 R3(config-router)#do sh ip bgp sum BGP router identifier 3.3.3.3, local AS number 123 BGP table version is 1, main routing table version 1 Neighbor??????? V??? AS MsgRcvd MsgSent?? TblVer?InQ OutQ Up/Down? State/PfxRcd 2.2.2.2???????? 4?? 123?????? 4?????? 4??????? 1??? 0??? 0 00:00:11??????? 0 35.1.1.5??????? 4???? 5?????? 9?????? 9??????? 1??? 0??? 0 00:05:46??????? 0 3發布網絡 R4(config-router)#network 4.4.4.0 mask 255.255.255.0 被發布的網絡必須跟路由表嚴格匹配 R5(config-router)#net 5.5.5.0 mask 255.255.255.0 R2(config-router)#do sh ip bgp ?* valid, > best, ?? Network????????? Next Hop??????????? Metric LocPrf Weight Path *> 4.4.4.0/24?????? 24.1.1.4???????????????? 0???????????? 0 4 i * i5.5.5.0/24?????? 35.1.1.5???????????????? 0??? 100????? 0 5 i *> 表示可以發布給其它R、可以放進路由表 4next-hop-self R3(config-router)#neighbor 2.2.2.2 next-hop-self R2(config-router)#nei 3.3.3.3 next-hop-self 5)解決數據黑洞---full mesh ibgp R1(config-router)#router bgp 123 R1(config-router)#bgp router-id 1.1.1.1 R1(config-router)#nei 2.2.2.2 remote-as 123 R1(config-router)#nei 2.2.2.2 update-source lo0 R1(config-router)#nei 3.3.3.3 remote-as 123 R1(config-router)#nei 3.3.3.3 update-source lo0 R2(config-router)#nei 1.1.1.1 remote-as 123 R2(config-router)#nei 1.1.1.1 update-source lo0 R2(config-router)#nei 1.1.1.1 next-hop-s R3(config-router)#nei 1.1.1.1 remote-as 123 R3(config-router)#nei 1.1.1.1 update-source lo 0 R3(config-router)#nei 1.1.1.1 next-hop-s sh ip bgp summ ----查看鄰居 sh ip bgp查看BGP 數據庫 sh ip route bgp查看BGP 路由 clear ip bgp *硬清除 1BGP1跳行為 1)路由往IBGP鄰居通告下1跳不變 2)路由往EBGP鄰居通告下1跳是當前R 3next-hop-self 4)MA環境中的下一跳重定向 R1(config-router)#router bgp 13 R1(config-router)#bgp router-id 1.1.1.1 R1(config-router)#nei 12.1.1.2 remote-as 2 R1(config-router)#nei 3.3.3.3 remote-as 13 R1(config-router)#nei 3.3.3.3 upda?? lo0?? R1(config-router)#nei 3.3.3.3 next-hop-self R2(config-if)#router bgp 2 R2(config-router)#nei 12.1.1.1 remote-as 13 R2(config-router)#net 2.2.2.0 mask 255.255.255.0 R3(config-router)#router bgp 13 R3(config-router)#nei 1.1.1.1 remote-as 13 R3(config-router)#nei 1.1.1.1 up lo 0???? R3(config-router)#nei 134.1.1.4 remote-as 4 R4(config-if)#router bgp 4 R4(config-router)#nei 134.1.1.3 remote-as 13 R4(config-router)#do sh ip bgp??? ?? Network????????? Next Hop??????????? Metric LocPrf Weight Path *> 2.2.2.0/24?????? 134.1.1.1????????????????????????????? 0 13 2 i debug ip bgp update 2peer-group 1)有相同路由策略1組路由器a 2)作用:簡化配置、節省資源 3)配置 1)創建peer-group 2)把peer放到peer-group中去 3、同步 1)BGP路由和IGP路由的同步 2)同步作用:防止黑洞在發送路由給EBGP鄰居之前首先保證IGP有這條路由 12.2(8)T默認都是關閉 3 router bgp 13 ?no synchronization 4BGP狀態 1idle:查找路由表 2connectTCP連接已經成功建立 3open sent:已發送open,等待對方的open 4open confirm:收到對方open,發送keepalive,等待對方的keepalive 5established:成功接收keepalive 停在idle:沒有鄰居的路由 停在active: 1)鄰居沒有我的路由 2)鄰居配錯鄰居IP 3)鄰居沒有配置 4AS配置錯誤 debug ip bgp 5BGP認證 1MD5 2 R1(config-router)#neighbor 12.1.1.2 password chuyue100 R2(config-router)#neighbor 12.1.1.1 password chuyue100 6sh ip bgp rib-failure r>i3.3.3.0/24?????? 3.3.3.3????????????????? 0??? 100????? 0 i 注意:此路由依然可以發送給鄰居,因為是最佳 7BGP會話清除 1)硬清 clear ip bgp * BGP會話及TCP連接都清除 2)軟清 TCP連接不清除 clear ip bgp * soft 3 R1#sh ip bgp neighbor 12.1.1.2 advertised-routes R2#sh ip bgp neighbor 12.1.1.1 received-routes R2(config-router)#nei 12.1.1.1 soft-reconfiguration inbound 把從這個鄰居收到路由放到一個獨立內存空間 8、匯總 1自動 R2(config)#int lo 1 R2(config-if)#ip add 2.2.1.2 255.255.255.0 R2(config-if)#router?bgp 2 R2(config-router)#redistribute connected *> 2.0.0.0????????? 12.1.1.2???????????????? 0???????????? 0 2 ? 自動匯總僅針對重發布BGP的路由 no auto-summary -->攜帶metric auto-summary --->不攜帶metric 2手工 1非專業匯總 R2(config-router)#net 2.2.1.0 mask 255.255.255.0 R2(config)#ip route 2.2.0.0 255.255.252.0 null 0 R2(config)#router bgp 2 R2(config-router)#net 2.2.0.0 mask 255.255.252.0 2)專業匯總 R2(config-router)#aggregate-address 2.2.0.0 255.255.252.0 R2(config-router)#aggregate-address 2.2.0.0 255.255.252.0 summary-only ?//抑制細化路由 ????????????????? aggregate-address 2.2.0.0 255.255.252.0 as-set summary-only ???????????? //匯總路由會使之前的AS-PATH 丟失,as-set可以保留

轉載于:https://blog.51cto.com/nppstudy/725796

總結

以上是生活随笔為你收集整理的router3 BGP1 基础部分的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。