cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
974
Views
4
Helpful
8
Replies

eBGP and next hop behaviour

borek
Level 1
Level 1

I thought, that external BGP sessions always set next hop to be their update source address (as if "next-hop-self" was used). Yet in the case I have just created in lab, my EBGP clearly does not change next hop address (as if "next-hop-unchanged" was configured).

Can you, please, enlighten me how it really is with eBGP next hop behaviour?

1 Accepted Solution

Accepted Solutions

Borek

Think it's becoming clear now :-)

I think you are seeing this behaviour because all your routers are on the same L2 network. So what you are seeing is normal behaviour for BGP when all routers are connected to the same network. What happens is -

SW1 learns about the loopbacks from SW2. SW1 then sends the advertisements via EBGP to R4 but it does not set itself as the next hop because otherwise it would be an extra hop to get to SW2. As R4 & SW2 each have an interface in the same network R4 can send packets directly to SW2.

To test this have a dedicated subnet for connectivity between R4 and SW1. SW2 should share a subnet with SW1 only. Then i think you would see the behaviour you are expecting.

HTH

Jon

View solution in original post

8 Replies 8

Hm, this doesn't seem to help...

1) The first link just reiterates what I have mentioned and what's written in docs (eBGP=use your own IP as next hop; iBGP=dont change next hop).

2) The Cisco link deals with something different altogether.

Jon Marshall
Hall of Fame
Hall of Fame

Hi

Next-hop-self is used in the following situation

1) R1 is in AS50 and talks EBGP to R2 which is in AS100.

R1 receives a route from R2 with next hop set to R2 interface.

R1 is running IBGP with r3 which is also in AS50.

When R1 sends the route to R3 by default the next hop will be R2 interface in AS100.

R2 might not have a route to this next hop so R1 can change the next hop to be itself. Then R2 can forward packets to the remote network.

HTH

Jon

Hello Jon,

What you write is how I understand things. Problem is, that routers in my lab seem to behave differently.

I have eBGP session which clearly propagates next hop IP address, that is in different AS. This can be remedied by adding "next-hop-self", but what I am trying to discover why does it behave like it does.

Borek

Hi Borek

Could you send an example. I might be misunderstanding what you are saying but you state

"I have eBGP session which clearly propagates next hop IP address, that is in different AS"

This is normal behaviour for EBGP if i understand you statement.

Jon

Oops, obviously, that is misstatement -- silly me.

Anyway, I have three routers, R4 (AS2), SW1 and SW2 (both AS3)

There is iBGP relation between SW1 and SW2.

There is eBGP relation between R4 and SW1.

On SW2 there are some loopbacks, their addresses being injected into BGP (via "network" statement).

Now the interesting thing: R4 sees these prefixes (the loopbacks on SW2) with SW2's IP address. If I understand it correctly, R4 should see as nexthop address of SW1!

In this case it actually works, because all R4, SW1 and SW2 are on single L2 network. If R4 was in AS2 and R4-SW1 was iBGP session, everything would work according to the books, but there's eBGP and hence my question.

Borek

Borek

Think it's becoming clear now :-)

I think you are seeing this behaviour because all your routers are on the same L2 network. So what you are seeing is normal behaviour for BGP when all routers are connected to the same network. What happens is -

SW1 learns about the loopbacks from SW2. SW1 then sends the advertisements via EBGP to R4 but it does not set itself as the next hop because otherwise it would be an extra hop to get to SW2. As R4 & SW2 each have an interface in the same network R4 can send packets directly to SW2.

To test this have a dedicated subnet for connectivity between R4 and SW1. SW2 should share a subnet with SW1 only. Then i think you would see the behaviour you are expecting.

HTH

Jon

You are right Jon. When I put R4-SW1 to a separate subnet eBGP works as expected. I still find it kind of misleading, that all documents I have read insist on eBGP using self as next hop.

Thanks for help,

Borek

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card