Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

next hop in BGP


Is there any difference between next hop and gateway ? In BGP when we say show ip bgp we get this type of output

Router# show ip bgp

network     next-hop     metric.........(attributes)

I'm learing BGP, when is implement IBGP with EBGP, It made me confused. I want to know what is next hop ? what it should be? and is there any difference between next hop and gateway ? Please explain Next-Hop in BGP protocol


Sulaiman Ejaz

Cisco Employee

next hop in BGP


Is there any difference between next hop and gateway ?

Not really - both these terms apply to a device through which packets must be routed in order to reach their destination.

The term gateway is used more often when talking about end hosts like PCs, notebooks, workstations, network printers etc. that usually have only one active network card, and so their routing is very simplified: either they talk to stations in their own network, or they send the packets to their default gateway to reach other networks.

The term next hop is used more often with routers which know about multiple networks, possibly through multiple neighbors, and the next hop for a particular destination is a router chosen to reach that destination.

If you think about how the routing in end hosts is implemented, it is perfectly sufficient for them to have just two entries in their routing tables: their own directly connected network, and the default route. The next hop in this default route is commonly referred to as the default gateway.

I'm learing BGP, when is implement IBGP with EBGP,

With BGP, think of entire autonomous systems as giant single routers - it's an abstraction used by BGP. Each AS can be thought of as a single imaginary router, and links between ASes can be thought of as links between these imaginary routers. If these were real routers, the next hop for a network would be the very next router towards the destination. But because these are just imaginary routers, in BGP, the next hop towards a destination is the address of the border router in the very next AS that must be traversed in order to reach the destination.

More precisely, in BGP, the next hop is an attribute of a route that indicates the next router through which the packets should be routed to reach their destination. However, in BGP, this attribute is set or modified only when injecting a route into BGP for the very first time (in which case it is the address of the router that has injected the route into BGP), or when a route is advertised via EBGP to a router in another AS. So the next hop in BGP does tell you about the router the packets need to go through, however, it is not necessarily your physical neighbor - rather, it is the next border router that must be traversed. Remember, the BGP is the border gateway protocol, so it is primarily concerned with routes behind a particular border router. This is why you actually need to use an IGP along with BGP: the BGP will tell you which border router has to be traversed to reach the destination, and the IGP will tell you how to get through your own AS to reach that border router.

This is quite a difficult concept to grasp for newcomers - feel welcome to ask further.

Best regards,


CreatePlease to create content