Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BGP and Traffic propagation

Status
Not open for further replies.

leedsit

Technical User
Nov 25, 2004
364
GB
Hi,

I seem to really be missing point that I cannot get my head around, but sure you guys can clear this up for me. With protocols such as OSPF and RIP etc neighbors are right next to each other. And the routing tables on each device has the route to the destination say 3-4 hops away. The 1st router does not alter the layer 3 header but in the layer 2 header it changes the destination Mac to the next hop router, All fine.

However with BGP im slightly lost. An eBGP session for example can neighbor up with another EBGP router in a different AS 2-3 hops away. The First eBGP router will have a route in its routing table (via BGP) to a network behind the second BGP Router, however the IGP on the routers between the eBGP wont have this route in their tables. How does the packet get to its detination?

Im studying MPLS at the moment with VPNv4 addressing and would like to get this solid in my head.

LEEroy
MCNE6,CCNP,CWNA,CCSA,Project+
 
With regards to this statement below:-

EBGP Multihop
Used when to EBGP speakers cannot be directly connected. Its configuration must include static routes or must enable an IGP so that the neighbors can reach each other. If you have multiple physical connections between EBGP neighbors, using a loopback interface and static routes to the loopback interface allows you to load balance the traffic between the multiple connections.

Q - Ok so the IGP between the eBGP neighbors 3 hops away will allow the Neighbors(BGP) to communicate and exchange routes, but What im missing is when a packet hits the first BGP router, it will have a BGP entry that the network is behing the other BGP network 3 hops away, so the BGP router sends the packet on its merry way via the first hop(non BGP router), however its routing table does not have a route to the network behind the second BGP router so its dropped?



LEEroy
MCNE6,CCNP,CWNA,CCSA,Project+
 
With BGP, routers are directly connected to each other as well. The difference in eBGP Multihop is that you have an IGP (static routes, ospf, etc) connecting the two peers together ensuring reachability. The transit routers in between the two peers don't need to know the destintation as they are forwarding to the next hop.
 
thanks for the reply, however I probably didnt make it clear whats stumping me.


I get the fact that in order for the eBGP session to form over the 3 or x amount of hops each eBGP router must be able to connect to each other, probably via their Loopback interfaces which must be in the IGP, however lets say the First BGP Router in AS1 is Router A, this must traverse routers 1,2 and 3 get form a eBGP session with the other BGP Router in AS2, lets call this B. Routers 1,2,3 will have reachability information for A and B so the session can work and will work and BGP tables will populate. However lets say Router B has a network Z attached which it will advertise to A only via BGP, routers 1,2 and 3 running ospf or eigrp will know nothing of network Z. When I send a packet to BGP Router A, this will have a route to Network Z via router B, however when the packet leaves A it will hit router 1, this router is only running OSPForEIGRP, it does not have a route to Z, so the packets dropped?
'

LEEroy
MCNE6,CCNP,CWNA,CCSA,Project+
 
RIP OSPF and eigrp are interior gateway protocols,
BGP is an exterior gateway protocol.
EBGP routes network between autonomous systems.

bgp also relies on teh underlying IGP to get teh network routes redistributed into the bgp table.

bgp will not advertise a route that it's underlying IGP does not knwo about, in your lingo, bgp would never advertise network z
if the underlying igp does not have a route in it's routing table.
 
we should add that with BGP you can set the next-hop element to be advertised as itself...
in your case, router B would tell router A that there is a network Z however the next hop is router B.

in this case, when router A sends information for network Z it sends it to the router B.


We must go always forward, not backward
always up, not down and always twirling twirling towards infinity.
 
However lets say Router B has a network Z attached which it will advertise to A only via BGP, routers 1,2 and 3 running ospf or eigrp will know nothing of network Z. When I send a packet to BGP Router A, this will have a route to Network Z via router B, however when the packet leaves A it will hit router 1, this router is only running OSPForEIGRP, it does not have a route to Z, so the packets dropped?
In your scenario, Router A and B being BGP peers advertise their various routes to each other. Router A wanting to send a packet into network Z knows it can reach network Z via it's BGP peer router B. The router thinks the next hop for network Z is router B when in reality router B is multiple hops away.

Because the next hop for this network is router B and not the routers in between, the packet will be forwarded by the routers in between. This is possible because BGP multihop does not use a TTL of 1 like other routing protocols you are thinking of. When a router in transit receives that packet, it will lookup the route in it's routing table and forward the packet to it's next hop decrementing the TTL by 1.
 
Hi,

Thanks so much for the replies

I get the feeling im missing something fundamental but maybe a network would never be designed in this way but sure ive seen examples.

Please see the attached Image and my logic for steps 1,2 and 3.

Without the whole BGP Table being available in the IGP I dont see how the packets will traverse correctly. Router 2 simply doesnt have the route. Now if we were using MPLS Label switching, I can see how that would work in this example, as the Labels target the BGP next hop which will be in the IGP, however in Basic IP packet routing outside MPLS, all the routers have to go on is the layer 3 dst IP.

LEEroy
MCNE6,CCNP,CWNA,CCSA,Project+
 
 http://img33.imageshack.us/img33/5284/bgpexample.jpg
Without the whole BGP Table being available in the IGP I dont see how the packets will traverse correctly. Router 2 simply doesnt have the route.

how did BGP Router A establish connection to BGP router B if Router 2 doesn't know where A and B are? BGP needs a TCP connection. So if in your scenario A and B are peers then there exists at least one active route between them.

I think you are confusing some material regarding the routing and the way BGP works. if there is a network Z behind router B and its only being advertised via BGP to router A it will have router B's IP address as the destination for next HOP. IE Router A will just send it to router B saying you deal with it. Since I've already established that there HAS to be at least one active path between A and B we know the packet gets there.




We must go always forward, not backward
always up, not down and always twirling twirling towards infinity.
 
In the picture look at the routing table for Router A. Notice the BGP advertised network "B - 10.52.1.0/24 via 172.16.199.2".

What this means is that Router A knows to reach 10.52.1.0/24 via Router B. It has learned how to reach Router B because of OSPF route "172.16.199.2/32 via 1.1.1.2". The router 1 and 2 do NOT need to know about the eBGP routes because those routes are only used by Router A and B.

When a packet leaves Router A destined for 10.52.1.0/24, it's next hop attribute is set to the IP address of Router B. Routers 1 and 2 handle the packet on getting to router B because of the way eBGP multihop inserted the route in A's routing table. They don't need to know about the eBGP routes as that isn't used.
 
Thanks Guys,

Baddos, your statement "When a packet leaves Router A destined for 10.52.1.0/24, it's next hop attribute is set to the IP address of Router B"

the above is reference to a routed packet, however where is the "next Hop attribute" set??? I cannot be the Layer 3 Header Dst IP?

Thanks, Lee.





LEEroy
MCNE6,CCNP,CWNA,CCSA,Project+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top