|
Network Diagram:

***************************************************************** AIM: Force ISPs to use line between R2 and R4 when traffic is sent to AS1 *****************************************************************
================================================ R3 trace: ================================================

================================================ R6 trace: ================================================


We want to force the ISPs to use upper link - MED won't work as lost between AS 2 and AS 4 - Not happening now!
================================================ R5 trace: ================================================

We want to force the ISPs to use upper link - MED won't work as lost between AS 2 and AS 4 - Not happening now!
================================================ Traffic Flow: =================================================
Green = out of the AS
Red = into the AS
As can be seen, return traffic will sometimes use the bottom link - we want it to always use the top link.

================================================ Config on R3: =================================================
router bgp 1 no synchronization bgp router-id 3.3.3.3 bgp cluster-id 151587081 network 3.3.3.3 mask 255.255.255.255 network 9.9.9.9 mask 255.255.255.255 network 10.1.3.0 mask 255.255.255.0 network 10.1.4.0 mask 255.255.255.0 neighbor 2.2.2.2 remote-as 1 neighbor 2.2.2.2 ebgp-multihop 255 neighbor 2.2.2.2 update-source Loopback0 neighbor 2.2.2.2 route-map setnexthop in neighbor 5.5.5.5 remote-as 4 neighbor 5.5.5.5 ebgp-multihop 255 neighbor 5.5.5.5 update-source Loopback0 neighbor 5.5.5.5 send-community neighbor 5.5.5.5 route-map setmetricout out <==== Route map is applied to neighbor R5 no auto-summary ! ip classless ip route 2.2.2.2 255.255.255.255 10.1.3.1 ip route 5.5.5.5 255.255.255.255 10.1.4.2 no ip http server ip as-path access-list 1 permit ^2$ ! access-list 1 permit any access-list 10 permit any route-map setmetricout permit 10 match ip address 10 set metric 200 set as-path prepend 1 1 1 1 <==== Prepend the AS1 four times to make path longer for all routes ! route-map setnexthop permit 10 set ip next-hop peer-address ! route-map setweightin permit 10 match as-path 1 set ip next-hop peer-address set weight 100
================================================ Output on R5: =================================================


As you can see above, the trace went via the upper link!! As expected!
================================================ Output on R6: =================================================

I hope that this has been beneficial to you.
To your success,
David Bombal Managing Director Network Experts Limited
|