cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1749
Views
0
Helpful
23
Replies

does higher Prefix length prefer over metric in eigrp

Binu Steephen
Level 1
Level 1

i have two routers and one switch connected between the routers,eigrp is enabled in the lan and wan, one link connected on each router.routing protocol is eigrp..

A router is learning destination 10.155.10.0/24 and B router is learning destination 10.155.10.0/26 when i do a sh ip route 10.155.10.20, A router metric to reach destination is 200 and through B router is 500. which link will be prefered for destination 10.155.10.20 from the local lan.

Please advise. I need to prepare configuration before applying..

2 Accepted Solutions

Accepted Solutions

Yes you can define a /32 network in BGP and advertise it.  Note that if this was advertising to an ISP for internet they wouldn't accept but within your own network it is fine.

You could also use PBR if needed but a /32 would work fine.

Edit - if B connects to C and D with EIGRP how are you going to advertise the route with BGP to C and D ?

Jon

View solution in original post

Not sure what you want to do.

With your setup if B is connected to C then all traffic to B has to go to C. You don't have another link from C to B so there is not much point in advertising the host route.

Jon

View solution in original post

23 Replies 23

Jon Marshall
Hall of Fame
Hall of Fame

The most specific route is always chosen so it will be 10.155.10.0/26 that is used.

Jon

Thanks a lot John..

Please advise on below too.

I have 10.155.20.0/24 configured in our internal network under OSPF on A router, A is connected B and BGP is configured there..B connectes to C and D with EIGRP....I want to make C to B as primary link for destination 10.155.20.100 and D to B for remaining all traffic. is it possible to create /32 route for 10.155.20.100 in bgp and advertise to its neighbor for more preference over the 1st wan link on C connectes to B,  wan link on D connects to B for remaing all traffoic in 10.155.20.0/24.

!

We will define distribute list in eigrp out on B to C to permit 10.155.20.100/32 and on B to D to permit 10.155.20.0/24.

!

will it work? , please advise as i need prepare config and update before applying on device.

A router

-------------

int fa0/0

description ***local lan***

ip addess 10.155.20.1 255.255.255.0

in fa0/1

description connection to B

ip address 10.145.10.1 255.255.255.252

router ospf 1

network 10.145.10.0  0.0.0.3 are1

network 10.155.20.0  0.0.0.255 are1

B router

-------------

in fa0/1

description connection to A

ip address 10.145.10.2 255.255.255.252

in fa0/0

description connection to C

ip address 10.10.10.1 255.255.255.252

router ospf 1

redistribute bgp 200

network 10.145.10.0  0.0.0.3

router bgp 200

neighbbor 10.10.10.2 remote as 100

network 10.10.10.0 mask 255.255.255.252

network 10.155.20.0 mask 255.255.255.0

!

network 10.155.20.100 mask 255.255.255.255

!

ip route 10.155.20.100 255.255.255.255 null0 200

Yes you can define a /32 network in BGP and advertise it.  Note that if this was advertising to an ISP for internet they wouldn't accept but within your own network it is fine.

You could also use PBR if needed but a /32 would work fine.

Edit - if B connects to C and D with EIGRP how are you going to advertise the route with BGP to C and D ?

Jon

Thanks Jon for your qucik response.. I will test it now.

let me correct it

OSPF  A-->B

BGP    B--> C

EIGRP C-->D

EIGRP C--> F

B and C router will be running EBGP.

A redistibute BGP to OSPF

C redistribute BGP to EIGRP

we will define distribute OUT on C router connects to D and E in EIGRP.

C to D permit 10.155.20.100/32 only

C to F permite 10.155.20.0/24 only

Please advise

Not sure what you want to do.

With your setup if B is connected to C then all traffic to B has to go to C. You don't have another link from C to B so there is not much point in advertising the host route.

Jon

B connects to C only with EBGP

but C connects to D and E in EIGRP,

We will advertise 10.155.10.100/32 and 10.155.10.0/24 by redistribute BGP to EIGRP in C.

under eigrp in C we will put distribute list to D and E..C to D link will permit 10.155.10.100/32 only and C to E link will permit 10.155.10.0/24..D and E are connected in EIGRP peering throuigh local switch..

I need to prefer D to C link for 10.155.10.100 from local switch connected on D and E even if the eigrp metric is high through D to C link  than E to C..Is it work or do i need to apply PBR

how does set ip next hop recursive work in PBR?

Is the switch running EIGRP as well or is it just a L2 switch ?

If it is a L2 switch then E will receive a route for 10.155.10.0/24 from C but a route for 10.50.55.100 from D and so will send any traffic destined for 10.155.10.100 to D which is what you want.

If the switch is running EIGRP then it too will send all traffic for 10.155.10.100 to D.

Jon

If it is a L2 switch then E will receive a route for 10.155.10.0/24 from  C but a route for 10.50.55.100 from D and so will send any traffic  destined for 10.155.10.100 to D which is what you want. --> yes

Switch is L2 switch only....

Then you should be fine.

If it doesn't work simply do PBR on the LAN interface of E pointing to D for any traffic destined for 10.155.10.100

Jon

is creating specific netwokr advertisemnet in bgp and point to null0 to create routing entry even if actual /24 is present cisco advisable, right?

A router

---------------------

int fa0/0

des LAN

ip address 10.155.10.1 255.255.255.0

router ospf 1

network 10.155.10.0  0.0.0.255 are 1

A to B ospf neighbor

B router

--------------------

router ospf 1

redistribute bgp route-map subnets

router bgp 1

network 10.155.10.0 mask 255.255.255.0 [null0 pointed route not required as the same network segment is availbale through ospf

network 10.155.10.100 mask 255.255.255.255

ip route 10.155.10.100 255.255.255.255 null0 200

If the 10.155.10.x network is connected to B then you are fine. If it is connected to A then you can't do this. You would then need to look at PBR on router E.

Jon

ohh..10.155.10.x network is connected on A router[ A router running OSPF only] and BGP is running on B router [running ospf and BGP]..what is the issue if we do specific 10.155.10.100/32 in B router BGP with ip route pointing to null0 200 to creates routing entry in BGP and advertise 10.155.10.100/32 and 10.155.10.0/24 to router C through EBGP..

will it cause any issue?

Yes it will create a problem because when the BGP router receives a packet for that host it will simply drop it because it has a route to Null0. It cannot deliver it to A because your host specific route pointing to Null0 will override the network advertisement from A for 10.155.10.0/24.

So i would use PBR to solve your issue.

Jon

Review Cisco Networking for a $25 gift card