【正文】
配置 說明:【R1】interface Loopback0 ip address interface Serial1/0 no sh ip address interface Serial1/1 no sh ip address interface Serial1/2 no sh ip address interface Serial1/3 no sh ip address ip route 【虛擬下一跳地址指向真正下一跳,并由本域內(nèi)IGP(OSPF)路由引入,使本域內(nèi)所有鄰居都能學習到虛擬下一跳地址的路由,從而使鄰居從自己學習到的路由能最優(yōu)化】ip route ip prefixlist ISPB seq 5 permit 【做前綴列表匹配需要改變下一跳的前綴】routemap setnexthop permit 10 【做routemap,改相應前綴下一跳性】 match ip address prefixlist ISPB set ip nexthop routemap setnexthop permit 20router ospf 1 routerid no autocost redistribute static metric 10 metrictype 1 subnets【引入靜態(tài)路由,使域內(nèi)所有IBGP鄰居能學到虛擬下一跳地址,從面使鄰居從自己學習到的路由能最優(yōu)化】 network area 0 network area 0 network area 0 network area 0router bgp 100 no synchronization bgp routerid bgp logneighborchanges neighbor internal peergroup neighbor internal remoteas 100 neighbor internal updatesource Loopback0 neighbor internal routemap setnexthop out【做出方向的ruoutmap改變發(fā)向鄰居路由的下一跳】