資源描述:
《操縱bgp路徑選擇---local preference屬性案例》由會員上傳分享,免費在線閱讀,更多相關內容在教育資源-天天文庫。
1、操縱BGP路徑選擇---local?preference屬性案例本地優(yōu)先級(localpref)屬性是分配給路由的一種優(yōu)先級度量,用于和到同一目的地的其他路由相比較。這是BGP路由處理中的第二優(yōu)先屬性(WEIGHT是第一優(yōu)先屬性)。LocalPref屬性只在本AS內部有效,不會被傳送到EBGP鄰居上。本地優(yōu)先級越高,路由優(yōu)先級越高。?以上案例中,我們通過對R3的配置,設置從R1學到的1.0.0.0的本地優(yōu)先級(Localpref)設置為200,由于缺省的值為100,AS200中所有的路由器都會選擇R3到達1.0.0.0。??////r1//
2、//intf2/0?ipad192.1.1.1255.255.255.0?intf3/0?ipad193.1.1.1255.255.255.0?intlo0?ipad1.1.1.1255.255.255.0?intlo1?ipad2.2.2.2255.255.255.0?routerbgp100?nosyn?neighbor192.1.1.2remote-as200?neighbor193.1.1.3remote-as200?network1.0.0.0?network1.0.0.0???////r2////intf2/0?ipad192.
3、1.1.2255.255.255.0?intf4/0?ipad194.1.1.2255.255.255.0?routeros1?netw0.0.0.0255.255.255.255a0?passive-interfacef2/0?routerbgp200?nosyn?neighbor192.1.1.1remote-as100?neighbor194.1.1.4remote-as200?neighbor195.1.1.3remote-as200?neighbor194.1.1.4next-hop-self??////r3////intf3/0
4、?ipad193.1.1.3255.255.255.0?intf5/0?ipad195.1.1.3255.255.255.0?routeros1?netw0.0.0.0255.255.255.255a0?passive-interfacef3/0?routerbgp200?nosyn?neighbor193.1.1.1remote-as100?neighbor195.1.1.4remote-as200?neighbor195.1.1.4next-hop-self?neighbor194.1.1.2remote-as200?neighbor1
5、93.1.1.1route-maplocalprefin?access-list1permit1.0.0.00.255.255.255?route-maplocalprefpermit10?matchipad1?setlocal-pref200route-maplocalprefpermit20?setlocal-pref100?////r4////intf4/0?ipad194.1.1.4255.255.255.0?intf5/0?ipad195.1.1.4255.255.255.0?intlo0?ipad4.4.4.4255.255.2
6、55.0?routeros1?netw0.0.0.0255.255.255.255a0?routerbgp200?nosyn?neighbor194.1.1.2remote-as200?neighbor195.1.1.3remote-as200?netw4.0.0.0????驗證:////r4////r4#shipbgp??Network?????????NextHop???????????MetricLocPrfWeightPath*>i1.0.0.0?????????195.1.1.3???????????????0???200????
7、?0100i*i2.0.0.0?????????195.1.1.3???????????????0???100?????0100i*>i????????????????194.1.1.2???????????????0???100?????0100i*>4.0.0.0?????????0.0.0.0?????????????????0????????32768i??r4#shiproB???1.0.0.0/8[200/0]via195.1.1.3,00:02:20B???2.0.0.0/8[200/0]via194.1.1.2,00:02:
8、24????4.0.0.0/24issubnetted,1subnetsC??????4.4.4.0isdirectlyconnected,Loopback0O???193.1.