Hi,
I have a doubt regarding bgp MED configuration. Everywhere I learn that you can set it outbound to an external peer to affect the incoming traffic from another AS into yours. But is it OK if you apply it inbound to affect your outbound traffic ? (like Local Preference for example).
There is a task in Vl3-Lab4 task 5.2 which is asking to use MED to route from R5 in AS100 to AS200 one prefix over R2, and all other prefix over R1.
The SG describes that R2 is send MED 1000 to R5, and then on R5 we have to change bgp behaviour like no-med worst and check router-id.
I set up a route-map on incoming peers on R5 like this and it works. (or seems to work). Did I miss something ?
RSRack1R5#sh ip bgp
BGP table version is 16, local router ID is 150.1.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
***
* 205.90.31.0 152.1.125.2 200 0 200 254 ?
*> 152.1.125.1 100 0 200 254 ?
* 220.20.3.0 152.1.125.2 200 0 200 254 ?
*> 152.1.125.1 100 0 200 254 ?
*> 222.22.2.0 152.1.125.2 50 0 200 254 ?
* 152.1.125.1 100 0 200 254 ?
RSRack1R5#sh run | s router bgp
router bgp 100
no synchronization
bgp router-id 150.1.5.5
bgp log-neighbor-changes
neighbor 150.1.4.4 remote-as 100
neighbor 150.1.4.4 update-source Loopback0
neighbor 152.1.125.1 remote-as 200
neighbor 152.1.125.1 route-map FROM_R1 in
neighbor 152.1.125.2 remote-as 200
neighbor 152.1.125.2 route-map FROM_R2 in
no auto-summary
RSRack1R5#sh route-map
route-map FROM_R2, permit, sequence 10
Match clauses:
ip address prefix-lists: ROUTE222
Set clauses:
metric 50
Policy routing matches: 0 packets, 0 bytes
route-map FROM_R2, permit, sequence 20
Match clauses:
Set clauses:
metric 200
Policy routing matches: 0 packets, 0 bytes
route-map FROM_R1, permit, sequence 10
Match clauses:
Set clauses:
metric 100
Policy routing matches: 0 packets, 0 bytes
RSRack1R5#
Thanks in advance for your help,
Regards,
Olivier