Addressing and routingIP connectivityIntermediate20 min read

What Is Next hop in Networking?

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

When data travels across a network, it passes through multiple routers. Each router decides where to send the data next. The next hop is the address of the next router that should receive the packet. It is like telling a driver which town to go to next on a cross-country trip.

Commonly Confused With

Next hopvsDefault gateway

The default gateway is a specific type of next hop that is used for all traffic when no more specific route exists. It is the next hop for the default route (0.0.0.0/0). The term “next hop” is broader and can refer to any route, not just the default.

Your home router’s IP is your default gateway. When you browse a website, your PC sends packets to that router as the next hop. That router then uses its own next hop (the ISP router) to forward the traffic.

Next hopvsOutgoing interface

The outgoing interface is the physical or logical port through which the packet leaves the router. The next hop is the IP address of the next router. In some configurations, you can specify just the outgoing interface instead of the next hop (e.g., on point-to-point links). The next hop is derived from the interface.

If you configure “ip route 10.10.0.0 255.255.0.0 serial 0/0/0”, you are using the outgoing interface. The router will assume the next hop is the router on the other end of that serial link.

Next hopvsHop count

Hop count is a metric that counts the number of routers a packet passes through. The next hop is a specific router at the next step. Hop count is used by routing protocols like RIP to choose the best path, while next hop is the actual forwarding address.

In traceroute output, each line shows a hop number and the IP address of the router at that hop. The next hop is the IP address shown in the second line, and the hop count is the line number.

Must Know for Exams

In IT certification exams, the concept of next hop appears frequently across multiple domains. For CompTIA Network+, routing fundamentals are a core objective. Candidates must understand how routers use routing tables to determine next hops. Questions often ask you to interpret a simple routing table and identify the next hop for a given destination. You may also see questions about default gateway, which is essentially the next hop for all traffic to unknown networks.

For the Cisco CCNA exam, next hop is even more central. The exam objectives include configuring static routes and dynamic routing protocols like OSPF and EIGRP. You need to know how to configure a static route by specifying the destination network, subnet mask, and next hop IP address or exit interface. Troubleshooting scenarios often present a routing table and ask why a particular next hop is not reachable. You might also see questions about recursive routing and the need for the next hop to be directly connected.

In the CompTIA Network+ exam, you might get a scenario where a network administrator configures a static route but uses an incorrect next hop. The question will ask you to identify the symptom, such as packets being discarded or sent to the wrong network. Understanding the Next Hop field in a routing table is critical.

For Juniper JNCIA, the concept is similar but uses different terminology in configuration syntax. The exam expects you to understand the “next-hop” statement in policy options and routing table output.

In BGP-related exam objectives (like for CCNP or JNCIS), next hop becomes more complex. BGP updates carry a next-hop attribute. Misconfiguration of this attribute can cause routing loops. Exam questions may ask how to manipulate the next hop using route maps or the “next-hop-self” command.

Question types include multiple-choice, fill-in-the-blank (e.g., type the next hop IP based on a routing table), and simulation where you configure a static route. The key is to be able to read a routing table, identify the correct next hop for a given destination, and understand the implications if the next hop is down.

Simple Meaning

Imagine you are mailing a letter to a friend who lives in another city. You drop the letter at your local post office. That post office does not send the letter directly to your friend’s mailbox. Instead, it sends it to a regional sorting center. The regional center then sends it to a post office near your friend, and finally a mail carrier delivers it. In this chain, each stop along the way is a next hop.

In computer networking, data travels in packets. Each packet carries the final destination address, but routers along the way do not know the entire route. Instead, each router knows only the next router to send the packet to, which is called the next hop. Think of it like driving directions where you are told to turn onto Highway 101 North, and later you will get more directions. You do not need to know every street from start to finish. You just need to know the next turn.

The next hop is determined by the router’s routing table. This table is like a map that tells the router where to send packets based on their destination. The router looks at the destination IP address, finds the best matching route in its table, and then forwards the packet to the next hop listed for that route. The next hop can be another router or, if the destination is on the same local network, it can be the destination device itself.

Without the concept of next hop, every router would need a complete map of the entire internet, which is impossible. By breaking the journey into small hops, the network can scale to billions of devices.

Full Technical Definition

In IP networking, the next hop is the IP address of the next router or host that a packet should be forwarded to in order to reach its ultimate destination. It is a fundamental concept in routing that enables hop-by-hop forwarding, also known as next-hop routing. Each router in the path independently makes a forwarding decision based on its local routing table.

When a router receives a packet, it examines the destination IP address in the packet header. It then performs a longest prefix match lookup in its routing table to find the most specific route. The routing table entry includes the destination network prefix, the outgoing interface, and the next-hop IP address. The router then encapsulates the packet in a new Layer 2 frame (e.g., Ethernet) with the next-hop router’s MAC address as the destination. This frame is sent out of the correct interface.

The next hop is not always the final destination. In many cases, it is an intermediate router. The routing table may contain static routes configured by a network administrator or dynamic routes learned via routing protocols such as OSPF, EIGRP, or BGP. The next-hop address in a dynamic route is usually the IP address of the neighbor router that advertised the route.

A special case is the default route, often represented as 0.0.0.0/0. Its next hop is the gateway of last resort, typically the router that provides connectivity to the internet. If no specific route matches, the packet is sent to this default next hop.

In IPv6, the concept is identical but uses IPv6 addresses. The next hop is determined similarly using the routing table. Recursive routing is another important aspect. If the next-hop address itself is not directly reachable (not on a directly connected subnet), the router must perform another lookup to determine the next hop for that next hop. This is common in BGP scenarios where the next hop may be several hops away.

In modern networks, the next-hop concept is also used in policy-based routing, where packets can be forwarded to a specific next hop based on criteria other than destination. Technologies like VRF (Virtual Routing and Forwarding) and MPLS (Multiprotocol Label Switching) modify how next hops are used, but the core idea remains the same.

Real-Life Example

Think about a package delivery service like FedEx or UPS. When you ship a package from New York to Los Angeles, the driver picks it up and takes it to a local distribution center. That is the first next hop. The distribution center sorts packages and sends them by truck to a regional hub in, say, Chicago. That is the second next hop. From Chicago, the package flies to a hub in Dallas (third next hop), then to a local facility in Los Angeles (fourth next hop), and finally a local driver delivers it to the recipient’s door (fifth next hop).

Each facility along the way does not need to know the entire path. The New York driver only needs to know to go to the local center. The local center only needs to know to send the package to Chicago. The Chicago hub knows to send it to Dallas. Each step only cares about the next stop. This is exactly how IP routing works.

Now imagine if every driver needed a complete map of every street in America. That would be impossible and inefficient. By using next hops, each router only needs to know about its immediate neighbors and the best way to reach certain destinations. This makes the system scalable and resilient. If a road closes between Chicago and Dallas, the Chicago hub can simply send the package via a different route, like through Denver. The sender and receiver never need to know about the change.

Why This Term Matters

The next hop is a cornerstone of how the internet functions. Without it, every router would need to store a complete map of the entire internet, which is billions of routes. That would be impossible due to memory and processing constraints. By breaking routing into hop-by-hop decisions, the internet can scale globally.

For IT professionals, understanding next hop is essential for troubleshooting network issues. When a user cannot reach a website, you often need to trace the path packets take. Tools like traceroute show each hop along the route. If a packet stops at a certain next hop, you know where the problem lies. Misconfigured next hop addresses are a common cause of routing black holes, where packets are sent into oblivion.

In enterprise networks, next hop plays a role in redundancy and load balancing. Multiple paths to the same destination can have different next hops. If one next hop fails, the router can switch to a backup next hop. This is critical for high availability. Implementing and verifying next hop configurations is a daily task for network engineers.

Security also depends on next hop. Source routing, which allows the sender to specify the next hop, is often disabled because it can be used for attacks. Routers must be configured to trust only certain next hop advertisements from routing protocols. Man-in-the-middle attacks can be launched by spoofing next hop addresses.

Finally, next hop is part of the IPv4 and IPv6 standards. It appears in routing tables, packet forwarding, and routing protocol updates. A solid grasp of this concept helps in earning certifications like CompTIA Network+, Cisco CCNA, and Juniper JNCIA.

How It Appears in Exam Questions

Questions about next hop appear in several patterns. A common multiple-choice question presents a routing table and asks: “For a packet destined to 192.168.10.5, what is the next hop?” The routing table will list several networks and their next hops. You must find the most specific match (longest prefix) and pick the correct next hop IP.

Another pattern involves configuration scenarios. For example: “A network administrator needs to add a static route to the 10.10.20.0/24 network via the router at 192.168.1.2. Which command should be used?” The answer is something like: ip route 10.10.20.0 255.255.255.0 192.168.1.2. Here, 192.168.1.2 is the next hop.

Troubleshooting questions are also common. A scenario describes users unable to reach an external website. The administrator runs a traceroute and sees that packets stop at a specific next hop. The question asks what the likely cause is. Possible answers include: the next hop router is down, the next hop has no route back, or an access control list is blocking traffic.

In more advanced questions, you may see BGP next-hop manipulation. For instance: “Which command ensures that a router advertises itself as the next hop for routes learned from an eBGP neighbor?” The answer is the neighbor next-hop-self command.

Finally, some questions test understanding of the difference between next hop and outgoing interface. For example, a question might ask: “When configuring a static route, why would you specify the exit interface instead of the next hop IP?” The answer is that for point-to-point interfaces (like serial links), specifying the exit interface is sufficient because the next hop is implicitly known.

In all these patterns, the key is to remember that the next hop must be directly reachable on a connected network. If the next hop is not directly connected, the packet cannot be forwarded. This is a frequent exam trap.

Practise Next hop Questions

Test your understanding with exam-style practice questions.

Practise

Example Scenario

Imagine a small company network with three routers: Router A, Router B, and Router C. Router A connects to the internet via Router B. Router B connects to an internal server in a different building. The network administrator needs to ensure that computers on Router A’s network can reach the server on Router B’s network.

The server’s IP address is 10.10.10.10. The network administrator logs into Router A and checks the routing table. There is no route to the 10.10.10.0/24 network. The administrator needs to add a static route. The correct command is: ip route 10.10.10.0 255.255.255.0 192.168.1.2. Here, 192.168.1.2 is the next hop, which is the IP address of Router B’s interface that is connected to Router A.

Now, when a computer on Router A’s network sends a packet to 10.10.10.10, Router A looks up the destination. It finds the static route, sees that the next hop is 192.168.1.2, and forwards the packet out of its interface connected to Router B. Router B receives the packet, looks up its own routing table, and sees that 10.10.10.10 is directly connected. So Router B delivers the packet to the server.

Now imagine that the administrator accidentally typed the next hop as 192.168.1.100, which does not exist. The packet would be sent to an incorrect address and likely dropped. The server would remain unreachable. When troubleshooting, the administrator would use the command “show ip route” on Router A and see the misconfigured next hop. The fix is to correct the next hop address.

This scenario shows how a simple misconfiguration of the next hop can break connectivity. It also illustrates why understanding next hop is crucial for network professionals.

Common Mistakes

Confusing next hop with the destination IP address

The next hop is an intermediate router, not the final destination. Setting the next hop to the destination IP when the destination is not directly connected will cause the packet to be sent to the wrong device or dropped.

Always ensure the next hop is the IP address of a directly connected router that knows how to reach the destination.

Using a next hop that is not directly connected

Routers can only forward packets to devices on directly connected networks. If the next hop is not reachable on a directly connected subnet, the router will not be able to send the packet, resulting in a routing black hole.

Check that the next hop IP is on a network that is directly connected to the router. Use the show ip interface brief command to verify.

Assuming the next hop is always a router

In some cases, the next hop can be the final destination itself if it is on the same local network. For example, when the destination is on the same subnet, the next hop is the destination host.

If the destination is on a directly connected network, no router is needed. The packet is sent directly to the destination MAC address.

Forgetting to update next hop after a network change

If a router is replaced or its IP address changes, static routes with the old next hop become invalid. Packets will be sent to a non-existent device.

After any network change, review and update static routes. Use dynamic routing protocols to automatically adjust next hop information.

Thinking the next hop in a routing table is the same as the MAC address

The next hop is a Layer 3 IP address. The router uses ARP to find the corresponding MAC address for that IP before forwarding the frame. They are different layers.

Understand the difference between IP routing (Layer 3) and Ethernet switching (Layer 2). The next hop IP is resolved to a MAC address using ARP.

Exam Trap — Don't Get Fooled

{"trap":"A question shows a routing table with a route to 0.0.0.0/0 (default route) with next hop 10.0.0.1. It then asks what happens to a packet destined to 8.8.8.8. Many learners think the packet will go to 10.

0.0.1, but the trap is that 10.0.0.1 might not be reachable because the router has no route to 10.0.0.0/24.","why_learners_choose_it":"Learners assume that because the default route matches, the packet will be forwarded successfully.

They forget that the next hop itself must be reachable via a directly connected network or another route.","how_to_avoid_it":"Always check if the next hop IP is directly connected. If not, the router will perform another lookup for the next hop’s IP.

If that fails, the packet is dropped. In this case, 10.0.0.1 must be reachable. If it is not, the packet is discarded."

Step-by-Step Breakdown

1

Receive the packet

A router receives an IP packet on one of its interfaces. The packet contains a destination IP address in its header. The router checks its routing table to determine where to forward it.

2

Routing table lookup

The router examines the destination IP and performs a longest prefix match on its routing table. This means it looks for the most specific network entry that includes the destination address. For example, if the destination is 192.168.1.5, a route to 192.168.1.0/24 is preferable over 192.168.0.0/16.

3

Identify the next hop

Once a matching route is found, the router reads the next-hop IP address associated with that route. This is the IP address of the next router that should receive the packet. If the route says “directly connected,” the next hop is the destination itself.

4

Determine the outgoing interface

The router also extracts the outgoing interface from the same routing table entry. This is the interface through which the packet should leave the router. The next hop must be reachable via this interface.

5

Resolve the next hop MAC address

The router needs to send the packet inside a Layer 2 frame. It uses Address Resolution Protocol (ARP) to find the MAC address of the next hop IP. It looks in its ARP cache first; if not found, it sends an ARP request.

6

Forward the packet

The router encapsulates the IP packet in a new Ethernet frame with the destination MAC set to the next hop’s MAC. The source MAC is the router’s own interface MAC. The frame is then transmitted out of the outgoing interface.

Practical Mini-Lesson

In a real network, the next hop is not just a concept but a configurable parameter that directly affects traffic flow. Network professionals configure static routes on routers and switches to direct traffic to specific next hops. For example, on a Cisco router, the command “ip route 10.10.10.0 255.255.255.0 192.168.1.2” tells the router to forward all traffic for the 10.10.10.0/24 network to the router at 192.168.1.2 as the next hop. This is common in branch offices where you want to send all corporate traffic to a central hub.

But there is a nuance: the next hop must be directly connected. If 192.168.1.2 is not on a directly connected subnet, the router cannot forward packets. This is why you often see static routes configured with both the next hop and the exit interface, like “ip route 10.10.10.0 255.255.255.0 serial 0/0/0 192.168.1.2”. The interface ensures the router knows which port to use, and the next hop provides the Layer 3 address.

Dynamic routing protocols also use next hop. In OSPF, each router learns routes and their next hops from neighbor routers. The OSPF database contains the next-hop IP for each route. In EIGRP, the successor route is the best route, and its next hop is stored in the topology table. BGP is particularly interesting because the next hop can be non-directly connected in some scenarios, which requires recursive route lookups.

What can go wrong? A common issue is that the next hop becomes unreachable. This can happen if an interface goes down, if a neighbor router fails, or if an IP address changes. When the next hop is unreachable, the router will not be able to forward packets, and traffic will be lost. This is why network administrators use tools like IP SLA and object tracking to monitor next hop reachability and adjust routes dynamically.

Another practical point is the use of the “next-hop-self” command in BGP. By default, BGP preserves the next hop of the original route. In some topologies, an internal router may not have a route to the external next hop. The “next-hop-self” command forces the router to advertise itself as the next hop, solving reachability issues.

next hop is a small detail with big implications. Knowing how to configure it, verify it with “show ip route”, and troubleshoot it when traffic stops is a fundamental skill.

Memory Tip

Think of next hop as the next street corner on a driving route, you don’t need to know every street, just the next turn.

Covered in These Exams

Current Exam Context

Current exam versions that test this topic — use these objectives when studying.

Related Glossary Terms

Frequently Asked Questions

Can the next hop be the same as the destination IP?

Yes, if the destination is on a directly connected network. In that case, the packet is sent directly to the destination host without going through another router.

What happens if the next hop is unreachable?

The router will be unable to forward the packet. It will likely drop the packet and may send an ICMP Destination Unreachable message back to the source.

How do I find the next hop on a Cisco router?

Use the command “show ip route”. The output shows the next hop IP address for each route in the rightmost column after the interface.

Is the next hop always a router?

Not always. It can be any host on a directly connected network, such as a server or firewall. It can also be a Layer 3 switch acting as a router.

What is the difference between next hop and default gateway?

The default gateway is the next hop used for all traffic that does not match any other route. It is a specific instance of a next hop.

Why does BGP have a next-hop attribute?

BGP uses the next-hop attribute to tell other routers the IP address to use to reach a certain prefix. It ensures interoperability between different autonomous systems.

Summary

The next hop is a fundamental concept in IP networking that enables efficient packet forwarding across complex networks. Instead of every router knowing the entire path to every destination, each router only needs to know the next immediate router to send the packet to. This hop-by-hop approach allows the internet to scale to millions of networks.

Understanding next hop is critical for network configuration, troubleshooting, and security. It appears in routing tables, static route configurations, and dynamic routing protocol updates. Common mistakes include using a non-directly connected next hop, confusing it with the destination IP, and forgetting to update next hops after network changes.

In IT certification exams, next hop questions appear in multiple formats, from reading routing tables to configuring static routes. The exam trap often involves next hop reachability. By mastering this concept, you build a strong foundation for routing and networking. Whether you are studying for CompTIA Network+, Cisco CCNA, or Juniper JNCIA, the next hop is a concept you will encounter and need to understand thoroughly.