BGP deterministic med

Unanswered Question

Hi all ,

I am having problem on understanding BGP deterministic MED . When issue the command of sh ip bgp . I can see my internal routes were assigned the value of 150 under Metric .

But when , i search in the confguration , i can't see any configuration , to specify the metric 150 . I have only specify my OSPF cost of 50000 . On my WAN Router i have specified BGP deterministic med . My router directly connected to ISP Router which connects to another site .

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (3 ratings)
Loading.
Giuseppe Larosa Thu, 07/02/2009 - 11:20

Hello Alman,

post the output of

sh ip bgp

and relevant configuration

BGP deterministic MED should be involved just in path selection not on the seed metric value.

Are you redistributing OSPF into BGP?

Be also aware that MED could have been reassigned on the other side device with a route-map.

see command reference at

http://www.cisco.com/en/US/partner/docs/ios/iproute/command/reference/irp_bgp1.html#wp1012961

Hope to help

Giuseppe

Thanks Giuseppe,

I am sorry , I am still new to BGP . You mean

sh ip bgp , example sh ip bgp 1.1.1.1 (internal routes ) Which prefix , are you refering to . Are you refering to the internal route that has the seed metric of 150 .There's no special configurations . other then the command of bgp deterministic med. I will post the configurations.

I am redistributing BGP in OSPF .

On the otherside , i have checked the route map is to receive the routes from this particular site and is in different AS . I believe the MED value will not be carried outside the AS .

I have the same configuration on my both WAN Routers . I can see the same things , the internal routes with seed metric of 150 . I believe this has been done to influance the incoming traffic to take both sides , load balancing , I believe.

I am not able to see the url that you sent . It says , special requirement needed .

Thanks

Giuseppe Larosa Sun, 07/05/2009 - 11:18

Hello,

>> I believe the MED value will not be carried outside the AS

MED = multi exit discriminator is passed to neighboring AS in an eBGP session no special configuration is required.

It is the local preference attribute that is not passed to a neighboring AS.

I wonder if you are calling MED the local preference.

see this link

http://www.cisco.com/en/US/docs/internetworking/technology/handbook/bgp.html#wp1020591

I will give you a link that you can open:

Edit:

link to command reference deterministic med

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_bgp1.html#wp1012961

When I say sh ip bgp

I mean the prefix you say that BGP deterministic med has caused a change in BGP metric attribute.

if you like you can post the

sh ip bgp

this command is very useful because it shows all known BGP paths to the destination with all their BGP attributes in a format that is easy to be read.

Hope to help

Giuseppe

Giuseppe Larosa Mon, 07/06/2009 - 12:26

Hello Alman,

let's see your current configurations.

I understand this is a production network and not a lab setup.

Hope to help

Giuseppe

Hi Giuseppe,

Below is the config

interface Loopback0

ip address 2.2.2.2 255.255.255.255

no ip redirects

no ip unreachables

no ip proxy-arp

!

interface Null0

no ip unreachables

!

interface GigabitEthernet0/0

ip address 3.3.3.3 255.255.255.252

no ip redirects

no ip proxy-arp

ip route-cache flow

ip ospf network point-to-point

ip ospf dead-interval minimal hello-multiplier 4

duplex auto

speed auto

media-type sfp

!

interface GigabitEthernet0/1

ip address 4.4.4.4 255.255.255.252

no ip redirects

no ip proxy-arp

ip route-cache flow

ip ospf authentication message-digest

ip ospf message-digest-key 1 md5 7 062F0E15586F582B1135

ip ospf network point-to-point

ip ospf dead-interval minimal hello-multiplier 4

duplex auto

speed auto

media-type rj45

!

interface FastEthernet1/0

ip address 5.5.5.5 255.255.255.252

no ip redirects

no ip proxy-arp

ip route-cache flow

duplex full

speed 100

max-reserved-bandwidth 100

!

interface FastEthernet1/1

no ip address

shutdown

duplex auto

speed auto

!

router ospf 1

router-id 2.2.2.2

log-adjacency-changes

auto-cost reference-bandwidth 50000

area 0 authentication message-digest

redistribute bgp 10 metric-type 1 subnets

passive-interface default

no passive-interface GigabitEthernet0/0

no passive-interface GigabitEthernet0/1

network 2.2.2.2 0.0.0.0 area 0

network 3.3.3.3 0.0.0.0 area 0

network 4.4.4.4 0.0.0.0 area 0

default-information originate

!

router bgp 10

bgp log-neighbor-changes

bgp deterministic-med

neighbor ISP peer-group

neighbor ISP remote-as 100

neighbor INTERNAL peer-group

neighbor INTERNAL remote-as 10

neighbor INTERNAL password 7 1526052D551E39003107

neighbor INTERNAL update-source Loopback0

neighbor INTERNAL timers 2 6

neighbor 2.2.2.1 peer-group INTERNAL

neighbor 20.20.20.20 peer-group ISP

!

address-family ipv4

neighbor ISP send-community both

neighbor ISP soft-reconfiguration inbound

neighbor ISP route-map ROUTES_IN in

neighbor ISP route-map ROUTES_OUT out

neighbor ISP filter-list 66 out

neighbor INTERNAL send-community both

neighbor INTERNAL next-hop-self

neighbor INTERNAL soft-reconfiguration inbound

neighbor 2.2.2.1 activate

neighbor 20.20.20.21 activate

no auto-summary

no synchronization

network 3.3.3.0 mask 255.255.255.0

network 4.4.4.0 mask 255.255.255.128

aggregate-address 3.3.0.0 255.255.240.0 summary-only

aggregate-address 4.4.0.0 255.255.240.0 summary-only

exit-address-family

!

no ip http server

no ip http secure-server

ip tacacs source-interface Loopback0

!

!

ip prefix-list 10 seq 5 permit 0.0.0.0/0

ip prefix-list 10 seq 10 permit 6.6.0.0

ip prefix-list 10 seq 15 permit 7.7.0.0

ip prefix-list 10 seq 20 permit 8.8.0.0

ip prefix-list 10 seq 25 permit 9.9.0.0

!

ip prefix-list 20 seq 5 permit 3.3.0.0

ip prefix-list 20 seq 10 permit 4.4.0.0

!

route-map ROUTES_OUT permit 10

match ip address prefix-list 20

!

route-map ROUTES_IN permit 10

match ip address prefix-list 10

!

!

If issue the command of :

sh ip bgp 2.2.2.0

BGP routing table entry for 2.2.2.0/24, version 49

Paths: (1 available, best #1, table Default-IP-Routing-Table, Advertisements suppressed by an aggregate.)

Not advertised to any peer

Local

2.2.2.20 from 0.0.0.0 (2.2.2.2)

Origin IGP, metric 150, localpref 100, weight 32768, valid, sourced, local, best

Giuseppe Larosa Tue, 07/07/2009 - 00:03

Hello Alman,

Local

2.2.2.20 from 0.0.0.0 (2.2.2.2)

Origin IGP, metric 150, localpref 100, weight 32768, valid, sourced, local, best

the route is generated locally by the router with origin IGP weight 32768 next-hop 0.0.0.0.

The MED field is copied from IGP metric you can check this with

sh ip ospf int loop0

if the OSPF cost you see here is 150 you are fine.

Notice that you have changed the auto-reference BW in OSPF.

auto-cost reference-bandwidth 50000

Hope to help

Giuseppe

Hi ,

Yes , you are correct,it comes from the OSPF cost . I have changed the default cost .So , does it mean the MED is 150 ,and being advertised to other routers . Both WAN Routers has the same output , does it mean , it's being loadbalanced .Is the BGP deterministic , really works in my scenario.

Thanks for your help

The cost is actually is 1 .

sorry there's some mistake on the ip address of the loopback that i posted , actually is

2.2.2.1

Below is output of the command .

sh ip ospf int loop0

Loopback0 is up, line protocol is up

Internet Address 2.2.2.1/32, Area 0

Process ID 1, Router ID 2.2.2.1, Network Type LOOPBACK, Cost: 1

Loopback interface is treated as a stub Host

Actions

This Discussion