Network Routing: Static Routes, OSPF and NAT

Learn how routers move packets between networks and how to configure them. Read a routing table and predict the route a router chooses with longest prefix match, administrative distance and metrics. Configure interfaces, static, default and floating static routes for IPv4 and IPv6, compare the main dynamic routing protocols, and configure and troubleshoot single-area OSPF. Finish with NAT and PAT for internet access and first-hop redundancy with HSRP and VRRP that keeps the default gateway available.

BeginnerLesson 5 of 9 in Networking Fundamentals Course

What you will learn

  1. Follow a packet hop by hop across routers, read every part of a routing table entry and predict which route a router uses for any destination.
    • Follow a packet from one host to another across routers
      Describe what hosts and routers do with each packet: deciding between local and remote delivery, using the default gateway, rewriting frames and lowering the TTL.
    • Read the entries of a routing table
      Identify where each route came from and interpret its prefix, administrative distance, metric, next hop, exit interface and the gateway of last resort.
    • Predict which route a router uses
      Apply longest prefix match, administrative distance and metric in the right order to work out the route a router chooses for any destination.
  2. Set up a router's interfaces from the command line, then build and verify static, default and floating static routes for IPv4 and IPv6.
    • Configure a router's basic settings and interfaces
      Move between command modes, address and enable interfaces for IPv4 and IPv6, route between VLANs with subinterfaces, check interface status and save the configuration.
    • Configure and verify static routes
      Write static network and host routes for IPv4 and IPv6 with a next hop or an exit interface, and work out why a static route is or is not doing its job.
    • Use default and floating static routes
      Send unknown destinations to a default route, back up a primary path with a floating static route and decide when each is the right choice.
  3. Explain how routing protocols learn and maintain routes and how RIP, EIGRP, OSPF, IS-IS and BGP differ in type, metric, scope and administrative distance.
    • Explain how dynamic routing protocols learn and maintain routes
      Describe what routing protocols do, how convergence works and how distance-vector, link-state and path-vector protocols and interior and exterior protocols differ.
    • Compare RIP, EIGRP, OSPF, IS-IS and BGP
      Match each common protocol with its type, metric, standard status, administrative distance and typical use, and pick a suitable routing approach for a given network.
  4. Explain how OSPF discovers neighbors and computes routes, how routers on a shared segment elect a DR and BDR, and configure, verify and troubleshoot OSPF for IPv4 and IPv6 in one area.
    • Explain how OSPF builds its routes
      Describe OSPF's tables, areas, router ID, hello process, neighbor states and adjacency requirements, and calculate OSPF cost and the best path.
    • Explain DR and BDR election and OSPF network types
      Explain why OSPF elects a designated router on shared segments, predict the result of an election and recognize point-to-point and broadcast behavior.
    • Configure, verify and troubleshoot single-area OSPF
      Enable OSPFv2 and OSPFv3 on a router, control which interfaces take part, advertise a default route, adjust costs, verify the result and fix adjacencies that do not form.
  5. Explain why and how routers translate private addresses to public ones, then configure static NAT, dynamic NAT and PAT and read the translation table.
    • Explain how NAT and PAT translate addresses
      Use the four NAT address terms, compare static NAT, dynamic NAT, PAT and port forwarding, and follow a translation table through a worked example.
    • Configure and verify NAT and PAT on a router
      Mark inside and outside interfaces, configure static NAT, dynamic NAT, PAT and port forwarding, verify translations and find the cause of failed translation.
  6. Explain how a group of routers shares one virtual default gateway, and compare, configure and read the status of HSRP, VRRP and GLBP.
    • Explain why and how first-hop redundancy works
      Describe the single-gateway problem and how a virtual IP and virtual MAC, priority, preemption and tracking keep hosts connected when a router fails.
    • Compare HSRP, VRRP and GLBP and read their status
      Compare the defaults and features of HSRP, VRRP and GLBP, configure a basic HSRP group and interpret first-hop redundancy status output.

Network Routing study guide

6 chapters

1

Follow packets and choose routes

A packet crosses a network through a series of local decisions. The sending host chooses its first hop, and each router chooses the next one from its own routing table. Reading that table lets you predict where traffic goes and explain why an apparently good route may lose to another. The packet path also gives you a way to investigate failed communication: check the forward path, the reply path, and what changes at each link.

1.1 The packet path across routers

A router connects different IP networks and forwards packets by destination IP address. An Ethernet switch forwards frames within a network by MAC address. The router's control plane builds routes; its data plane uses those routes to forward packets.

Local delivery or the gateway

A host applies its own subnet mask to decide whether a destination is local. From 192.168.1.10/24, 192.168.1.50 is local: the sender uses ARP to find that host's MAC address. The server 192.168.2.20 is remote, so the sender uses its gateway, 192.168.1.1. The frame is addressed to the gateway's MAC, while the packet inside is addressed to the server's IP.

ARP requests remain within their broadcast domain. Routers do not forward these Layer 2 broadcasts between subnets. A Layer 3 switch can perform the same routing job, using a switch virtual interface (SVI) as each VLAN's gateway.

Work through two routers

PC A is 192.168.1.10/24. R1 has LAN address 192.168.1.1 and connects to R2 over 10.0.12.0/30: R1 is .1, R2 is .2. R2's LAN interface is 192.168.2.1/24, beside server 192.168.2.20.

  1. PC A sends a frame to R1's LAN MAC. Its packet has source 192.168.1.10, destination 192.168.2.20, and TTL 64.
  2. R1 checks and removes the incoming frame. It reads the destination, lowers TTL to 63, and finds a route to 192.168.2.0/24 through 10.0.12.2.
  3. R1 uses ARP to find R2's MAC on that Ethernet link. It builds a new frame with R1's outgoing MAC as source and R2's MAC as destination.
  4. R2 removes that frame and lowers TTL to 62. The destination network is directly connected, so R2 resolves the server's MAC and sends the final frame.

The MAC addresses belong to the current link and change at each router. The IP endpoints remain the same unless NAT translates them. On a point-to-point serial link, the outgoing frame uses that link's encapsulation and needs no MAC resolution. IPv6 uses Neighbor Discovery on Ethernet and calls its counter Hop Limit.

When delivery stops

A router discards a packet whose TTL expires and sends ICMP Time Exceeded. This limits the lifetime of a packet caught in a routing loop. Changing TTL also requires an updated IPv4 header checksum; IPv6 has no header checksum.

If no installed route matches, including no default route, the router drops the packet and normally reports ICMP Destination Unreachable. It does not flood an unknown IP destination across its interfaces.

A reply makes its own journey. R1 needs a route to the server LAN, and R2 needs a route back to the PC LAN. A correct outward route alone cannot make ping succeed.

Traceroute sends probes with increasing TTL values. Replies identify responding hops. A line of * means no reply arrived; filtering, a missing route, or a router declining to answer can cause that silence. Inspect tables around the last responding hop, then continue checking the path.

Key Takeaways

  • A remote packet goes to the gateway’s MAC while keeping the remote destination IP.
  • Each router builds a new frame and decreases TTL or Hop Limit.
  • A successful exchange needs routes for both the request and the reply.
  • Traceroute shows responding hops; silent hops need further investigation.

1.2 Read a routing table entry

A routing table connects a destination prefix to a forwarding instruction. A prefix combines a network address with its length, such as 10.1.3.0/24. The instruction names a next-hop router, an exit interface, or both. A /32 IPv4 host route or /128 IPv6 host route covers one address.

Identify the source

Connected routes appear when an addressed interface is up/up and disappear when it goes down. Static routes come from configuration. Dynamic routes come from routing protocols. Cisco also installs a local host route for each interface address, identifying traffic meant for the router itself.

CodeMeaning
CConnected subnet
LLocal interface address
SStatic route
S*Static candidate default
OOSPF
O*E2OSPF external candidate default
DEIGRP
RRIP
BBGP

The legend in show ip route explains the codes present on that device.

Decode the whole line
O 10.1.3.0/24 [110/20] via 10.0.12.2, 00:12:44, GigabitEthernet0/1

Read it from left to right. OSPF supplied the destination 10.1.3.0/24. The brackets show administrative distance, 110, followed by metric, 20. The next hop is 10.0.12.2, the route age is 00:12:44, and the exit is GigabitEthernet0/1.

Administrative distance rates the route source. A lower value is preferred when different sources offer the same prefix. A value of 255 prevents installation. The metric measures the path according to one protocol: OSPF cost, RIP hop count, or EIGRP's bandwidth-and-delay measure. Comparing an OSPF cost of 20 with a RIP metric of 2 tells you nothing about which source wins; the units differ.

Connected and local entries omit the brackets:

C 10.0.12.0/30 is directly connected, GigabitEthernet0/1
L 10.0.12.1/32 is directly connected, GigabitEthernet0/1

The first reaches the link's subnet. The second identifies R1's own address. The connected route has AD 0.

Read headings and the default correctly

A line such as 10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks groups entries below it. It supplies no next hop and is not a covering route for the entire /8.

The gateway of last resort comes from the installed default route. For example, S* 0.0.0.0/0 [1/0] via 203.0.113.1 sends otherwise unmatched traffic to 203.0.113.1. If the gateway of last resort is not set, destinations outside all listed prefixes are unreachable through this router.

Ask the table a specific question

Use show ip route for the full table, show ip route static or show ip route ospf for one source, and show ip route 10.1.3.5 for a destination lookup. A configured route may be waiting as a backup or unusable; configuration alone does not establish that it is installed.

show ipv6 route uses the same ideas. A local route has length /128, and an OSPFv3 next hop commonly appears as FE80::2 together with its exit interface. The interface identifies which link contains that link-local neighbor.

Key Takeaways

  • Read bracketed values as administrative distance first, metric second.
  • Connected routes reach subnets; local routes identify the router’s own addresses.
  • A subnet-grouping heading is not an installed route.
  • The default supplies the gateway of last resort.
  • Use a destination lookup to inspect the route a packet will use.

1.3 Longest prefix, distance, and metric

Route selection has two stages: build the routing table, then consult it for a packet. Keeping these stages separate prevents the most common error: choosing a broad static route over a more specific OSPF route because the static route has lower administrative distance.

Build the table

A routing protocol uses its metric to find its preferred path to a prefix. If several sources offer exactly the same prefix, administrative distance decides which source supplies the installed route. Both the network address and prefix length must match before that comparison applies.

For 172.16.5.0/24, a usable static route with AD 1 takes preference over OSPF with AD 110 and RIP with AD 120. If that static route becomes unusable and is removed, OSPF can supply the route. Metrics from different protocols cannot be compared as though they use one scale.

SourceCisco default AD
Connected0
Static1
External BGP20
Internal EIGRP90
OSPF110
IS-IS115
RIP120
External EIGRP170
Internal BGP200
Unusable255

These are Cisco defaults. Other vendors can use different values for route preference.

Choose a route for one packet

Longest prefix match uses the installed route with the longest prefix that contains the destination. Check address membership before comparing lengths. A long prefix that covers a different range is irrelevant.

Suppose the table contains:

Destination prefixNext hop
10.1.0.0/16A
10.1.1.0/24B
10.1.1.128/25C
0.0.0.0/0D

For 10.1.1.200, all four prefixes match, so the /25 sends it to C. For 10.1.1.100, the /25 fails the membership test: its range starts at .128. The /24 wins and sends that packet to B. The address 10.1.2.5 uses A, and 192.0.2.10 uses D.

At the boundary, .127 uses B and .128 uses C. Writing a prefix's first and last addresses is useful when the mask cuts through an octet.

Now consider an installed static 10.0.0.0/8 and an installed OSPF 10.1.1.0/24. They cover different prefixes, so they can coexist. Traffic for 10.1.1.5 uses OSPF's /24; traffic for 10.9.9.9 uses the static /8.

Equal paths and IPv6

Equal-cost multipath (ECMP) allows several equal-metric paths to the same prefix to share traffic, within the device's configured path limit. Four paths is a common Cisco IOS default; the supported limit and default vary by platform and software. Unequal costs do not form OSPF ECMP.

IPv6 uses the same lookup rule. Given 2001:db8:acad::/48, 2001:db8:acad:10::/64, and ::/0, destination 2001:db8:acad:10::25 uses the /64. Destination 2001:db8:acad:20::1 uses the /48; 2001:db8:ffff::1 uses the default. Table order never replaces the prefix comparison.

Key Takeaways

  • Metrics compare paths within a protocol; AD compares sources for the same prefix.
  • Forward each packet using the longest matching installed prefix.
  • A more specific route wins even when its source has a higher AD.
  • Check the destination’s membership in each prefix before comparing lengths.
  • Equal OSPF costs can support ECMP within the device’s path limit.
  • IPv6 uses the same longest-prefix rule, with ::/0 as its default.
2

Configure interfaces and static routes

Router configuration turns an addressing plan into working interfaces and usable paths. Cisco IOS modes separate monitoring from configuration, while show commands reveal whether the changes are doing their job. You will address interfaces, route between VLANs, and build network, host, default, and backup routes for IPv4 and IPv6. Verification includes the next hop and the reply path, because a line in the configuration is only part of a working connection.

2.1 Interfaces, command modes, and saved settings

A new router can be configured through its console. Once addressing and secure remote access are ready, SSH provides network access to the CLI. Cisco IOS and IOS XE interface names vary by model; GigabitEthernet0/0/0 is one common form.

Move between command modes
PromptPurposeHow to enter
R1>Basic user EXEC monitoringLog in
R1#Privileged EXEC monitoring and file operationsenable
R1(config)#Global settingsconfigure terminal
R1(config-if)#One interface's settingsinterface GigabitEthernet0/0/0
R1(config-router)#Routing-process settingsrouter ospf 1

exit moves back one level; end returns to privileged EXEC. Type ? for available choices. Abbreviations work while unambiguous, such as conf t. From configuration mode, do show ip interface brief runs an EXEC check without leaving that mode.

Global commands include hostname R1, enable secret followed by a chosen secret, no ip domain-lookup to stop name lookups after mistyped commands, and banner motd to display a login warning.

Address and enable an interface
configure terminal
ipv6 unicast-routing
interface GigabitEthernet0/0/0
 description Link to R2
 ip address 10.0.12.1 255.255.255.252
 ipv6 address 2001:db8:acad:12::1/64
 ipv6 address fe80::1 link-local
 no shutdown
end

IPv4 takes a dotted-decimal mask; IPv6 takes a prefix length. no shutdown removes the administrative shutdown. ipv6 unicast-routing enables IPv6 forwarding and Router Advertisements: assigning IPv6 addresses alone does not enable those functions. An IPv6-enabled interface has a link-local address; assigning one explicitly makes the neighbor easier to recognize.

Read interface status

show ip interface brief lists the address and two status columns. up/up means both layers are working. administratively down/down needs no shutdown. down/down suggests a physical fault, such as an unplugged cable or powered-off neighbor. up/down points to a data-link issue, such as mismatched serial encapsulation. Use show interfaces for detail and show ipv6 interface brief for IPv6 addresses and status.

Avoid overlapping subnets on two routed interfaces. Also check for an address on the wrong port or mismatched masks at opposite ends of a link.

Route between VLANs on one link

Router-on-a-stick uses a switch trunk and one router subinterface per VLAN:

interface GigabitEthernet0/0/1
 no shutdown
interface GigabitEthernet0/0/1.10
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet0/0/1.20
 encapsulation dot1Q 20
 ip address 192.168.20.1 255.255.255.0

The switch port must carry VLANs 10 and 20 as an 802.1Q trunk. Hosts use their own VLAN's subinterface address as gateway. The dot1Q number selects the VLAN; the matching subinterface suffix is a naming convention.

Changes affect the running configuration in RAM immediately. copy running-config startup-config saves them to the startup configuration loaded at boot. Test with show commands, ping, and traceroute before saving the intended working settings.

Key Takeaways

  • The CLI prompt tells you which commands are available.
  • IPv6 forwarding requires ipv6 unicast-routing.
  • Check both interface-status columns before investigating remote routes.
  • Router-on-a-stick needs matching VLAN tags and a working trunk.
  • Running settings take effect immediately; saving preserves them across a restart.

2.2 Static network, host, and summary routes

A static route is an administrator's instruction for reaching a prefix. Its default Cisco administrative distance is 1. It needs no routing updates and suits a small network or a network with one exit. Maintaining many individual routes becomes harder as paths change; a static route does not learn a replacement path by itself.

Configure both directions

R1 reaches R2 over 10.0.12.0/30, using .1 on R1 and .2 on R2. R1's LAN is 192.168.1.0/24; R2's LAN is 192.168.2.0/24.

On R1:

ip route 192.168.2.0 255.255.255.0 10.0.12.2

On R2:

ip route 192.168.1.0 255.255.255.0 10.0.12.1

The first address must be the destination network address. The last address is the next-hop neighbor, not the local interface. The second route is essential for replies to the first LAN.

Choose the route form

A next-hop route names the neighbor. The router performs a recursive lookup to find the interface that reaches that neighbor. A directly attached route names only an exit interface. This works well on a point-to-point serial link, where there is only one possible neighbor.

On Ethernet, an interface-only route can make the router ARP separately for each destination and rely on proxy ARP from the neighbor. A fully specified route names both interface and next hop:

ip route 192.168.2.0 255.255.255.0 GigabitEthernet0/0/0 10.0.12.2

The next hop must resolve to a usable outgoing path. An interface-based route also depends on that interface being up. Check installation with show ip route static; an installed entry can read S 192.168.2.0/24 [1/0] via 10.0.12.2.

Change the destination scope

A host route selects one IPv4 address with mask 255.255.255.255:

ip route 192.168.2.20 255.255.255.255 10.0.12.2

It wins over matching network routes because /32 is more specific. A summary route does the opposite: it covers several networks. 10.2.0.0 255.255.252.0 represents 10.2.0.0/22, covering the four /24 networks from 10.2.0.0 through 10.2.3.0. Its last address is 10.2.3.255; 10.2.4.0/24 lies outside it. Summarize only ranges reached through the intended next hop.

Configure IPv6 and verify failures

Enable ipv6 unicast-routing, then use a prefix length:

ipv6 route 2001:db8:acad:2::/64 2001:db8:acad:12::2

For a link-local next hop, include its link:

ipv6 route 2001:db8:acad:2::/64 GigabitEthernet0/0/0 fe80::2

A link-local address can recur on other interfaces, so the address alone is insufficient. IPv6 host routes use /128. Verify with show ipv6 route static.

If a route is absent, check the next-hop spelling, its reachability, the exit interface, and a preferred source for that prefix. If it is present but ping fails, check destination coverage, the return route, and filters. An Ethernet interface can stay up through a switch even when the far router fails. The static route may remain installed; probe-based object tracking can detect a failure beyond the local link and remove it.

Key Takeaways

  • Static route destinations must use the correct network address and mask.
  • Configure a return path as well as the outward route.
  • A fully specified route identifies both the outgoing interface and the neighbor.
  • A /32 or /128 host route selects one address.
  • A summary covers an exact aligned range, including its boundaries.
  • An IPv6 link-local next hop requires an exit interface.

2.3 Default routes and waiting backups

A default route covers every destination: 0.0.0.0/0 in IPv4 and ::/0 in IPv6. Its prefix length is zero, so any matching network or host route wins over it. A default is useful at the edge of a network, where many remote destinations share one next hop.

Give a stub network one way out

A stub network has a single path to other networks. An office router can keep connected routes for its LANs and use these defaults toward its provider:

ip route 0.0.0.0 0.0.0.0 203.0.113.1
ipv6 route ::/0 2001:db8:ffff::1

The next hop must be reachable. New remote networks can use the same exit without requiring a separate static entry. The installed default supplies the gateway of last resort.

A host's default gateway and a router's default route operate at different points in the path. The host sends off-subnet traffic to its local gateway. That router consults its own table and uses its default only if no more specific route matches. On Cisco devices, ip default-gateway serves devices that are not routing, such as a Layer 2 switch sending management traffic. A routing router uses ip route for its default.

Keep a backup out of the table

A floating static route has a higher AD than the primary route to the same prefix. Consider two usable provider links:

ip route 0.0.0.0 0.0.0.0 203.0.113.1
ip route 0.0.0.0 0.0.0.0 198.51.100.1 5

The first uses default AD 1; the second uses AD 5. While both are usable, only the first is installed. Once the primary is removed, the backup becomes the best available default. When the primary returns, its lower AD restores it to use.

To back up OSPF's 10.5.0.0/16, whose Cisco AD is 110, use a larger distance:

ip route 10.5.0.0 255.255.0.0 172.16.9.2 130

Leaving out 130 would give the static route AD 1 and make it the primary. Also keep the prefix identical. A backup /24 inside a primary /16 would win immediately for its smaller range through longest prefix match, even with a higher AD.

Test the event that causes failover

A backup waits for the primary route to leave the table. A shutdown of a directly connected primary link can remove it, but a remote failure beyond an Ethernet switch may leave the local interface and route up. Tracking can remove a static primary after a failed probe. A dynamic protocol can withdraw a learned primary after detecting the failed neighbor or path.

show running-config | include ip route shows configured routes, including a waiting backup. show ip route shows what is installed. In a lab, record the original table, shut down the primary interface, and check the replacement route and traceroute path. Restore the interface and confirm that the primary returns.

An edge router can distribute its installed default through OSPF with default-information originate. Internal routers can then learn their exit dynamically instead of each needing a hand-entered default.

Key Takeaways

  • The default is used only when no more specific route matches.
  • A floating static must have the same prefix and a higher AD than its primary.
  • Backup activation depends on primary-route removal.
  • Check configuration for waiting routes and the routing table for active ones.
3

Choose a dynamic routing approach

Dynamic routing reduces the work of maintaining paths across a changing network. Routers share information, choose paths, and react when links fail, but protocols differ in what they exchange and what they consider a good route. Their scope also matters: routing inside one organization is a different job from exchanging routes between internet networks. Comparing those choices helps you select an approach without confusing hop count, bandwidth cost, and policy.

3.1 How routers learn and recover routes

A dynamic routing protocol lets routers learn remote prefixes and respond to changes automatically. Routers exchange information, select paths, and update their choices after a failure. This uses bandwidth, CPU, and memory, and routing exchanges need protection against false information.

Recover a consistent view

After a link fails, routers may temporarily disagree about reachable paths. Some have received the new information while others still use the old routes. Convergence is the return to a consistent, correct network view. Convergence time measures the delay; dropped packets or short-lived loops can occur while it completes.

Suppose a branch has two routed links. A static route continues to name its chosen next hop until its usability changes or tracking removes it. A dynamic protocol can detect a lost neighbor, distribute the change, and calculate another available path. It still needs time to detect the failure and propagate the update.

Inside or between autonomous systems

An autonomous system (AS) is a set of networks under one administration and routing policy. Internet ASes have AS numbers. An interior gateway protocol (IGP), such as RIP, EIGRP, OSPF, or IS-IS, routes within an AS. BGP is the exterior gateway protocol used between ASes on the internet. Internal BGP also exists; it carries BGP information within an AS.

Compare the information exchanged
FamilyWhat routers learnExamples
Distance-vectorA neighbor's reported distance and the direction through that neighborRIP, EIGRP
Link-stateLink descriptions that build a shared topology mapOSPF, IS-IS
Path-vectorPrefixes with AS paths and other attributesBGP

A distance-vector router relies on what its neighbors report. RIP is the simple example; EIGRP is an advanced distance-vector design with faster recovery features.

Link-state routers flood advertisements throughout an area. Each builds a link-state database (LSDB) and runs shortest path first (SPF), also called Dijkstra's algorithm, from its own position. Shared topology information lets each router calculate paths independently. Keeping and processing that map requires more resources than a simple distance-vector protocol.

BGP attaches an AS path to a route. Seeing its own AS in that path lets a router reject a loop. Other attributes support decisions based on each network's routing policy.

A metric changes the meaning of best

RIP chooses fewer router hops. It can prefer one 10 Mbps hop to two 1 Gbps hops. OSPF uses the sum of bandwidth-based costs; with a reference bandwidth that distinguishes those speeds, it can prefer the faster two-hop path. EIGRP normally combines the lowest path bandwidth with total delay. BGP uses policy and attributes, so its preferred path need not be fastest.

Current protocol versions carry prefix lengths and support VLSM and summarization; this is classless routing. RIPv1 omitted masks and was classful. IPv6 uses RIPng, EIGRP for IPv6, OSPFv3, IS-IS extensions, or multiprotocol BGP, preserving each protocol's basic approach.

Key Takeaways

  • Convergence takes time after a change and may briefly disrupt traffic.
  • IGPs operate inside an AS; BGP exchanges routes between ASes and also has an internal form.
  • Distance-vector, link-state, and path-vector protocols exchange different information.
  • The metric or policy defines what a protocol means by its preferred path.
  • Classless routing carries prefix lengths, supporting VLSM and summaries.

3.2 RIP, EIGRP, OSPF, IS-IS, and BGP

Choose a routing protocol for the network's size, equipment, and routing job. A protocol's administrative distance is a local preference for its routes, not a rating of how quickly it converges.

Compare the main choices
ProtocolType and path measureCisco default ADTypical setting
RIPv2Distance-vector; hop count120Small or older networks
EIGRPAdvanced distance-vector; bandwidth and delay90 internal, 170 externalMainly Cisco networks
OSPFLink-state; bandwidth-based cost110Multivendor enterprises
IS-ISLink-state; cost115Large service-provider networks
BGPPath-vector; attributes and policy20 external, 200 internalInternet and large interdomain networks

RIP permits at most 15 hops; 16 means unreachable. RIPv2 sends periodic routing updates every 30 seconds to 224.0.0.9. Its small maximum and slow convergence make it an uncommon choice for a new enterprise network. The hop limit counts router hops, not hosts connected to a LAN.

EIGRP was developed by Cisco and published in the informational RFC 7868 in 2016. It sends partial updates after changes. A qualifying loop-free backup is called a feasible successor; when one exists, the router can use it quickly. A network is not guaranteed to have such a backup for every destination.

OSPF is an open standard. OSPFv2 carries IPv4 routes, while OSPFv3 supports IPv6. Areas organize larger OSPF networks around backbone area 0. IS-IS is also an open-standard link-state protocol and is common in provider networks. It carries its protocol messages directly over the data-link layer, unlike OSPF's use of IP.

BGP peers use TCP port 179. External BGP connects different ASes; internal BGP distributes BGP routes inside one AS. BGP can choose a policy-preferred path even when another path has fewer hops or higher link speed. Its AS-path loop check and policy controls suit exchanges between separately administered networks.

Neighbor discovery and updates

OSPF, EIGRP, and IS-IS use neighbor relationships, while BGP forms peerings. Missing hellos or keepalives allow these protocols to detect lost neighbors. RIP forms no adjacency: it receives periodic updates and ages out routes that stop being refreshed. A missing RIP route therefore calls for different checks from an OSPF neighbor stuck during database exchange.

Match the approach to the job

A small office with one provider link can use a static default: there is no alternative internal path to discover. A multi-site enterprise with several equipment vendors can use OSPF. An all-Cisco enterprise can choose OSPF or EIGRP. An organization with its own public address space and two providers can use BGP toward those providers and an IGP for internal routes.

Keep source preference separate from protocol operation. Cisco's EIGRP AD 90 beats OSPF AD 110 only when both offer the same prefix. That comparison says nothing about which protocol has the faster physical path or which design is best for the whole organization.

Key Takeaways

  • RIP uses hop count, with 15 reachable hops and 16 meaning unreachable.
  • EIGRP can recover quickly through a qualifying feasible successor.
  • OSPF and IS-IS are open-standard link-state IGPs.
  • BGP uses policy and attributes over TCP port 179.
  • A static default can be sufficient when a network has only one exit.
  • Cisco AD values compare route sources, not convergence speed.
4

Build and troubleshoot single-area OSPF

OSPF turns neighbor relationships and a shared topology map into routes. A working configuration needs more than matching process commands: interfaces must participate, neighbors must exchange their databases, and the path costs must describe the network sensibly. You will follow those stages, work through cost and DR elections, and configure both OSPFv2 and OSPFv3. The same stages organize troubleshooting when a neighbor or a remote prefix is missing.

4.1 Neighbors, databases, and path cost

OSPF is an open-standard link-state IGP. OSPFv2 carries IPv4 routes; OSPFv3 supports IPv6. It runs over IP protocol 89. IPv4 multicast 224.0.0.5 reaches all OSPF routers and 224.0.0.6 reaches the designated routers; IPv6 uses FF02::5 and FF02::6.

Build the routes in stages

A router discovers neighbors with Hellos, synchronizes its link-state database, runs SPF, and installs the best routes. The neighbor table records who is communicating; the LSDB records topology; the routing table records selected paths. Routers in the same area share that area's topology view once synchronized, but calculate routes from their own locations.

Single-area OSPF puts participating interfaces in one area. Any valid area ID can serve a single-area network. Area 0 is common because it can later act as the backbone of a multi-area design.

The router ID is a unique 32-bit identifier written like an IPv4 address. Cisco selects an explicitly configured ID first, then the highest active loopback IPv4 address, then the highest active physical-interface IPv4 address. Selection occurs when the process starts. A later ID change requires a process restart or reload; clear ip ospf process interrupts adjacencies.

Reach Full adjacency

Broadcast and point-to-point defaults are Hello every 10 seconds and Dead after 40 seconds without a Hello. Neighbors need matching area, Hello/Dead intervals, and authentication settings, unique IDs, and participating nonpassive interfaces. On OSPFv2 broadcast networks, both ends also need the same subnet and mask. Point-to-point OSPFv2 does not check the mask during Hello processing. OSPFv3 uses link-local addresses and does not compare global prefixes.

The main state sequence is Down → Init → 2-Way → ExStart → Exchange → Loading → Full. At Init, a Hello has arrived. At 2-Way, both routers see themselves in the other's Hellos. ExStart and Exchange begin database synchronization; Loading obtains missing advertisements; Full means synchronization is complete. An MTU mismatch commonly stalls ExStart or Exchange. Two DROTHERs on a broadcast segment normally remain 2-Way.

The five packet types are Hello, Database Description, Link-State Request, Link-State Update, and Link-State Acknowledgment. Every router originates a Type 1 router LSA; a designated router originates a Type 2 network LSA for its shared segment.

Calculate the full path cost

Interface cost is reference bandwidth divided by interface bandwidth, with a minimum of 1. Use the same units. Cisco's default 100 Mbps reference makes 10 Mbps cost 10, while 100 Mbps, 1 Gbps, and 10 Gbps all cost 1.

R1 can reach R3's 1 Gbps destination LAN through two 1 Gbps transit links, or through one direct 100 Mbps link. With the default reference:

Cvia R2=1+1+1=3,Cdirect=1+1=2

OSPF chooses the direct link. Set auto-cost reference-bandwidth 10000 on all routers to use a 10 Gbps reference. Each 1 Gbps interface now costs 10; the 100 Mbps interface costs 100:

Cvia R2=10+10+10=30,Cdirect=100+10=110

The two-hop path now wins. Include the final interface onto the destination LAN in both totals.

Key Takeaways

  • OSPF builds neighbors, synchronizes the LSDB, runs SPF, and installs routes.
  • Router IDs must be unique and are selected when the process starts.
  • Match area, timers, and relevant link settings before expecting adjacency.
  • Full means database synchronization; 2-Way is normal between DROTHERs.
  • Add outgoing interface costs through the destination LAN.
  • A common reference bandwidth keeps costs consistent across routers.

4.2 DR elections on shared networks

OSPF's network type controls how neighbors organize a link. Ethernet defaults to broadcast multiaccess, even when only two routers are attached. A point-to-point network has two routers and no designated-router election.

Why elect a DR and BDR?

If every router on a shared segment became fully adjacent to every other, the number of adjacencies would grow quickly:

Nfull mesh=n(n−1)2

With five routers, that would be 10 pairs; with ten, 45. A designated router (DR) and backup designated router (BDR) reduce the exchange work. Every DROTHER becomes fully adjacent to those two, while DROTHER pairs remain 2-Way. Five routers then need seven full adjacencies, and ten need 17.

DROTHERs send updates to 224.0.0.6, reaching the DR and BDR. The DR floods updates to all routers at 224.0.0.5 and originates the segment's Type 2 network LSA. The BDR is ready to take over if the DR fails. These roles organize OSPF database exchange; they do not force user packets to travel through the DR.

Work through an election

At a fresh election, highest interface OSPF priority wins. Priorities range from 0 to 255 and default to 1. A tie goes to the highest router ID; priority 0 makes a router ineligible for both DR and BDR. Set priority per interface with ip ospf priority.

Four routers start together:

RouterPriorityRouter ID
R111.1.1.1
R212.2.2.2
R31003.3.3.3
R404.4.4.4

R3 becomes DR by priority. R2 becomes BDR because it wins the ID tie with R1. R1 and R4 are DROTHERs. R4's high ID cannot overcome priority 0.

The election is nonpreemptive. If a priority-200 router joins after these roles are established, it does not replace either incumbent. If R3 fails, R2 is promoted from BDR to DR and a new BDR is elected. In the original four-router group, that new BDR is R1.

Roles belong to segments, not to a router everywhere. R1 can be DR on one interface and DROTHER on another.

Read status and choose a network type

show ip ospf neighbor lists neighbor IDs, priorities, states, roles, dead times, addresses, and interfaces. FULL/DR identifies a fully adjacent designated router. 2WAY/DROTHER can be a healthy relationship between two DROTHERs. show ip ospf interface GigabitEthernet0/0/0 gives the network type, DR/BDR, timers, and cost.

On an Ethernet link used by exactly two routers, configure ip ospf network point-to-point at both ends to skip the election and its default 40-second wait. That link also needs no Type 2 network LSA. Match the type on both ends: a broadcast/point-to-point mismatch can reach Full yet fail to install expected routes because the routers describe the link differently.

Key Takeaways

  • Broadcast networks elect a DR and BDR; point-to-point networks do not.
  • A fresh election compares interface priority, then router ID.
  • Priority 0 prevents election as DR or BDR.
  • A late higher-priority router does not preempt established DR/BDR roles.
  • DR/BDR roles are per segment, and network types must match.

4.3 Configure OSPF and find missing routes

Start OSPFv2 with a local process ID, set a unique router ID, and enable OSPF on the intended interfaces. Process IDs are local labels: R1 can use process 1 and its neighbor process 7.

Enable OSPFv2 on a transit link and LAN

R1 has 10.0.12.1/30 toward R2 on G0/0/0 and 192.168.1.1/24 on its user LAN, G0/0/1:

router ospf 1
 router-id 1.1.1.1
 network 10.0.12.0 0.0.0.3 area 0
 network 192.168.1.0 0.0.0.255 area 0
 passive-interface GigabitEthernet0/0/1

A network statement selects local interfaces by their addresses. Its wildcard mask has zeros where bits must match and ones where bits may vary. Subtract a contiguous subnet mask from 255.255.255.255: /30 mask 255.255.255.252 gives wildcard 0.0.0.3; /24 gives 0.0.0.255. Wildcard 0.0.0.0 selects one exact interface address.

Alternatively, put ip ospf 1 area 0 under each participating interface. The LAN remains passive through the process command. A passive interface advertises its subnet but sends no Hellos. That suits host-facing LANs; making the transit interface passive prevents its neighbor from forming.

Share a default and set costs

An edge router with a usable default can advertise it:

ip route 0.0.0.0 0.0.0.0 203.0.113.1
router ospf 1
 default-information originate
 auto-cost reference-bandwidth 10000

Internal routers learn an O*E2 default. Without a default in the edge router's table, ordinary default-information originate advertises nothing; always changes that behavior. Use the same reference bandwidth everywhere, in Mbps. An interface command such as ip ospf cost 50 overrides its calculated cost. The interface bandwidth setting affects calculations, not the physical line speed.

Enable OSPFv3 for IPv6

With IPv6 addresses already on the interfaces:

ipv6 unicast-routing
ipv6 router ospf 1
 router-id 1.1.1.1
interface GigabitEthernet0/0/0
 ipv6 ospf 1 area 0
interface GigabitEthernet0/0/1
 ipv6 ospf 1 area 0

Set the host-facing interface passive under the IPv6 OSPF process as well. OSPFv3 still needs a 32-bit router ID; explicitly set it when there are no IPv4 addresses. Neighbors communicate using link-local addresses.

Verify one stage at a time

show ip protocols lists process settings and passive interfaces. show ip ospf neighbor checks synchronization. show ip ospf interface brief checks area, cost, state, and neighbor count. show ip route ospf shows installed O routes with [110/cost]. For IPv6, use show ipv6 ospf neighbor and show ipv6 route ospf.

For no adjacency, check up/up status, OSPF participation, wildcard coverage, passive settings, area, timers, unique IDs, and matching authentication settings. OSPFv2 broadcast links also need matching subnet and mask. ExStart/Exchange suggests checking MTU; filters must allow IP protocol 89. For Full neighbors with missing routes, check remote-prefix advertisement, matching network types, and a lower-AD source already supplying the same prefix.

Key Takeaways

  • OSPF process IDs need not match between neighbors.
  • A network wildcard selects participating local interfaces.
  • Passive interfaces advertise their subnet while suppressing Hellos.
  • Ordinary default origination requires an installed default route.
  • OSPFv3 uses link-local neighbors and a 32-bit router ID.
  • Check neighbors and advertisements separately from installed routes.
  • An MTU mismatch commonly stalls ExStart or Exchange.
5

Translate addresses for internet access

Private IPv4 networks need a way to exchange traffic with public networks. NAT changes addresses, and PAT also uses ports so many hosts can share a public address. Translation tables show how replies find their way back to the correct inside host. You will compare fixed mappings, address pools, and port forwarding, then configure the interface roles and source selection that make them work. Routing remains necessary on both sides of the translator.

5.1 NAT mappings and shared public addresses

Network address translation (NAT) rewrites addresses as packets cross between an inside and an outside network. A translation table records the mappings so replies can be translated back. This lets private IPv4 hosts communicate through globally routed addresses while conserving public IPv4 space.

The private ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. The middle range ends at 172.31.255.255; addresses beginning with 172 are not all private. Organizations can reuse these ranges internally, but the public internet does not route them.

Read the four address names
TermMeaning
Inside localThe inside host's real address, usually private
Inside globalThe address representing the inside host outside
Outside localThe outside host's address as seen inside
Outside globalThe outside host's real address

Inside/outside identifies the host's side. Local/global identifies the address view. With ordinary inside source NAT, the outside local and outside global values are the same.

Choose a mapping type

Static NAT gives one inside address a permanent one-to-one mapping. An inside server can then have a fixed outside address. Dynamic NAT assigns addresses from a pool on demand. A six-address pool without overload can serve six inside hosts at once; a seventh must wait until a mapping becomes free.

PAT, also called NAT overload, lets many hosts share one or a few public addresses. Ports distinguish TCP and UDP sessions; ICMP queries use query identifiers. The router can change a source port to prevent a collision. Port fields are 16 bits, but usable ports, destination reuse rules, and device resources determine actual session capacity.

Port forwarding, or static PAT, gives an inside service a fixed public address-and-port mapping. For example, public 203.0.113.2:443 can represent TCP 443 on 192.168.1.20. Other services can share the same public address through different port mappings.

Follow two connections

Hosts 192.168.1.10 and 192.168.1.11 both connect from TCP source port 51000 to 198.51.100.80:443. PAT uses outside address 203.0.113.2:

Inside localInside global
192.168.1.10:51000203.0.113.2:51000
192.168.1.11:51000203.0.113.2:51001

The second mapping avoids a collision. A reply to public port 51001 returns to 192.168.1.11:51000. The external server stays 198.51.100.80:443 in both outside-address columns.

Translation and protection do different jobs

NAT is not a firewall. It changes addressing; a firewall applies security rules. Translation also breaks direct end-to-end addressing. Applications that place addresses inside their data, such as SIP or active-mode FTP, may need helpers or NAT traversal. Translation logs help trace a shared public connection to an inside host.

IPv6 hosts normally use global addresses without NAT, with firewalls providing traffic control. Providers may apply carrier-grade NAT to IPv4 customers, often using shared range 100.64.0.0/10. That range is separate from RFC 1918 private space, and a customer's outside address can therefore still be behind another translator.

Key Takeaways

  • Inside local and inside global describe the same inside host from different views.
  • Dynamic NAT needs one pool address per concurrently mapped inside host.
  • PAT distinguishes shared-address sessions using ports or query identifiers.
  • Port forwarding publishes a specific inside service.
  • NAT changes addresses; firewall rules control permitted traffic.

5.2 Configure translations and check the table

A working NAT configuration needs correct interface roles, a selection of inside addresses, a mapping rule, and routes. NAT cannot repair a missing path to the provider or a missing return route to the public mapping.

Mark the two sides

Suppose G0/0/0 faces 192.168.1.0/24 and G0/0/1 faces the provider:

interface GigabitEthernet0/0/0
 ip nat inside
interface GigabitEthernet0/0/1
 ip nat outside

The roles describe packet traversal. Reversing them prevents the intended inside-source translation.

Select a translation type

For a fixed one-to-one server mapping:

ip nat inside source static 192.168.1.20 203.0.113.5

For only the server's TCP 443 service:

ip nat inside source static tcp 192.168.1.20 443 203.0.113.2 443

Dynamic translation first selects sources and defines a pool:

access-list 1 permit 192.168.1.0 0.0.0.255
ip nat pool PUBLIC 203.0.113.9 203.0.113.14 netmask 255.255.255.248
ip nat inside source list 1 pool PUBLIC

The pool contains six host addresses, .9 through .14, in 203.0.113.8/29. Without overload, six inside hosts can hold mappings simultaneously. For PAT using that pool, add overload to the final command.

A common alternative uses the outside interface address:

ip nat inside source list 1 interface GigabitEthernet0/0/1 overload

These dynamic rules are alternatives for the intended design. The ACL here selects traffic for translation: permit means translate this source. It is not an interface filtering rule. A source that does not match may leave untranslated and fail to receive internet replies.

Decode a translation

show ip nat translations can display:

Pro Inside global        Inside local           Outside local        Outside global
tcp 203.0.113.2:51001     192.168.1.11:51000      198.51.100.80:443     198.51.100.80:443

Inside host .11 uses local port 51000, but appears outside on port 51001. Replies to that public endpoint map back to .11. The outside server's address and port are unchanged. Permanent static entries can show --- for fields that the mapping does not use.

show ip nat statistics lists active translations, hits, misses, interface roles, and pool usage. Generate traffic before expecting dynamic entries. Pool usage combined with failed new mappings helps identify exhaustion; a miss by itself does not establish the cause.

Find the broken dependency

Check roles, ACL source range, mapping rule, and whether overload was intended. Then check the router's default route and the provider's route back to the inside-global address or pool. A published server's clients must use the public address and mapped port.

In a lab, debug ip nat shows translation events. clear ip nat translation * clears dynamic entries after a change but interrupts those sessions; use it only when that interruption is acceptable. Static mappings remain configured.

Key Takeaways

  • Mark LAN and provider interfaces with the correct NAT roles.
  • The NAT ACL selects sources to translate; it does not filter traffic.
  • Add overload when hosts must share pool or interface addresses.
  • Read inside-global and inside-local endpoints together to follow a reply.
  • Check pool use and routing as well as the translation rule.
  • Clearing dynamic translations interrupts their active sessions.
6

Keep a usable default gateway

Two routers on a LAN do not by themselves give IPv4 hosts a resilient gateway. The hosts need one gateway address whose forwarding role can move between routers. First-hop redundancy provides that shared identity, while priority, tracking, and preemption control who uses it. You will follow a failure and recovery, compare HSRP, VRRP, and GLBP, and read status output to check both the routers’ roles and the gateway address configured on the hosts.

6.1 A virtual gateway that survives a failure

An IPv4 host normally receives one default gateway through configuration or DHCP. If that router fails, another router on the same LAN does not automatically inherit the host's gateway setting. A first-hop redundancy protocol (FHRP) lets routers share a gateway identity that can survive one router's failure.

Keep the host's gateway unchanged

The group shares a virtual IP address (VIP) and a virtual MAC address. Hosts use the VIP as their default gateway. The active forwarding router answers ARP for that VIP with the virtual MAC. A standby or backup watches the active router's messages and takes over after failure detection.

On VLAN 10, R1 has 192.168.10.2/24 and R2 has 192.168.10.3/24. Their HSRP VIP is unused address 192.168.10.1. DHCP supplies .1 as the host gateway, not .2 or .3.

R1 is active at priority 110; R2 is standby at priority 100. If R1 stops sending Hellos, R2 takes over within the configured hold behavior. It uses the same virtual MAC and announces the move with gratuitous ARP. Switches learn the MAC on R2's port. The hosts can keep the VIP-to-virtual-MAC mapping already in their ARP caches, although some packets may be lost during detection and switchover.

Decide who forwards after recovery

Priority ranks candidates; a higher number is preferred. Preemption allows a router with higher priority to take the active role from a working lower-priority router. Without preemption, the established active router can remain active after the preferred router returns.

Now suppose R1's LAN interface still works but its provider uplink fails. R1 can keep sending gateway Hellos despite having no useful onward path. Tracking connects the uplink's health to R1's priority. With decrement 20:

110−20=90

R2's 100 is higher than 90. If R2 has preemption enabled, it can take the active role. A decrement of only 10 would leave both at 100; that equality does not force the current active router to give up its role. Choose the decrement to make the backup strictly better after the failure.

Know what the shared gateway protects

An FHRP exchanges gateway-role messages, not routing information. Each forwarding router still needs usable routes. HSRP and VRRP have one forwarding router per group; adding a second member does not double that group's forwarding capacity. Separate groups can distribute different VLANs across different active routers.

For HSRP, use a separate unused VIP in the LAN subnet. VRRP has an address-owner case in which the VIP is a router's real interface address, so that HSRP address rule does not apply to every FHRP.

IPv6 hosts can learn multiple default routers through Neighbor Discovery and switch when one becomes unreachable. That native process can take many seconds with default detection settings. HSRPv2 and VRRPv3 can also supply IPv6 virtual gateways with controlled, faster failover.

Key Takeaways

  • Hosts use the virtual IP, allowing forwarding to move between routers.
  • The virtual MAC moves on failover, while the hosts’ gateway setting stays valid.
  • Higher priority wins preference; preemption permits takeover from a working active router.
  • Tracking must reduce priority enough for the intended backup to become preferred.
  • First-hop redundancy still depends on usable onward routes.

6.2 HSRP, VRRP, GLBP, and status output

Gateway protocols share a purpose but differ in ownership, defaults, and load sharing. Use those differences when reading status: a higher-priority standby is normal in HSRP if it cannot preempt.

Compare roles and defaults
FeatureHSRPVRRPv3GLBP
StandardCisco proprietaryOpen standardCisco proprietary
Main rolesActive, standbyActive, backupAVG and AVFs
Default priority100100Protocol-specific configuration
Default preemptionOffOnDepends on role configuration
Forwarding in one groupOne routerOne routerMultiple forwarders

HSRP sends Hellos every 3 seconds with a 10-second hold time. Priority ranges from 0 to 255; a fresh-election tie goes to the highest interface IP. Version 1 supports groups 0–255, uses multicast 224.0.0.2, and virtual MAC 0000.0c07.acXX, with the group in hexadecimal. Group 10 therefore ends in 0a. Version 2 supports groups 0–4095, uses 224.0.0.102, and virtual MAC 0000.0c9f.fXXX; it also supports IPv6.

VRRPv3 is defined in RFC 9568. Its forwarding role is active router; older commands and documentation may call it master. Priority 255 is reserved for the VIP's address owner. A priority tie uses the highest primary IP. IPv4 advertisements go to 224.0.0.18 using IP protocol 112, with a default interval of 1 second. The virtual MAC is 0000.5e00.01XX, with the virtual router ID in hexadecimal.

VRRP's active-down interval is three advertisement intervals plus skew time. With priority 100 and a 1-second advertisement interval:

Tdown=3+256−100256=3.609375 s

A higher-priority backup has a smaller skew and waits slightly less.

GLBP's active virtual gateway (AVG) answers ARP for one VIP with different virtual MACs. Up to four active virtual forwarders (AVFs) share the hosts' traffic. HSRP and VRRP can distribute traffic across multiple groups, but do not share forwarding within one group this way.

Configure one HSRP group

Under R1's LAN interface:

ip address 192.168.10.2 255.255.255.0
standby version 2
standby 10 ip 192.168.10.1
standby 10 priority 110
standby 10 preempt

R2 uses .3, the same version, group, and VIP, and standby 10 preempt; it keeps default priority 100. Both LAN interfaces must be enabled.

Read the current roles

show standby brief can show R1 as:

Interface Grp Pri P State  Active Standby      Virtual IP
Gi0/0/0   10  110 P Active local  192.168.10.3 192.168.10.1

P means preemption is configured; local identifies this router's role. On R2, State is Standby, Active is 192.168.10.2, and Standby is local. HSRP's states include Initial, Learn, Listen, Speak, Standby, and Active.

Both routers reporting Active calls for checks of hello delivery, VLAN, group, version, filters, and links. A higher-priority standby may lack preemption. If roles look healthy but hosts fail, check that their gateway is the VIP. show vrrp brief gives VRRP's equivalent overview. Choose VRRP for multivendor support, HSRP for a Cisco design, or GLBP when one Cisco group must share forwarding.

Key Takeaways

  • HSRP preemption defaults off; VRRP preemption defaults on.
  • HSRP version, group, and VIP must match across members.
  • VRRP priority 255 identifies the address owner.
  • GLBP can distribute one group’s traffic through multiple virtual forwarders.
  • In HSRP status, P marks preemption and local marks this router’s role.
  • Both routers Active suggests failed communication between group members.
  • Healthy FHRP roles still require hosts to use the correct VIP.

Network Routing examples

6 Walkthroughs

1

Trace a packet and justify its next hop

13 steps
Follow the changing frame, read the route entry, and apply longest prefix match without confusing it with source preference.
  1. 1
    IntroductionFrom a host to a remote server

    A host cannot deliver an Ethernet frame directly across several routed networks. It starts with a local receiver, then routers make their own decisions along the way. Follow one request through two routers, identify the table entries that guide it, and check how a more specific route changes the path. Keep the frame’s receiver separate from the packet’s final destination.

  2. 2
    ExampleChoose the first receiver

    PC A is 192.168.1.10/24 and wants server 192.168.2.20. Its gateway is 192.168.1.1 on R1. Applying /24 gives different local networks, so PC A resolves R1’s MAC with ARP.

    The first frame goes to R1, but the packet inside still names the server. Using the gateway does not replace the packet’s destination IP.

  3. 3
    ExampleCross the transit link

    R1 and R2 share 10.0.12.0/30, with R1 .1 and R2 .2. R1 has a route to the server LAN through .2.

    R1 removes the incoming frame, decreases TTL from 64 to 63, and builds a new Ethernet frame addressed to R2’s MAC. Its outgoing MAC becomes the source. Neither IP endpoint changes because this path has no NAT.

  4. 4
    ExampleDeliver onto the server LAN

    R2 removes the transit frame and decreases TTL from 63 to 62. Its routing table shows the server’s 192.168.2.0/24 as directly connected.

    R2 resolves 192.168.2.20 with ARP and builds a frame to the server. This final link uses R2’s LAN MAC as source. The original packet has now traveled inside three different Ethernet frames.

  5. 5
    ChallengeCan the reply return?

    R1 reaches the server LAN, but R2 has no matching route or default for PC A’s LAN. Can a ping from PC A succeed?

    ---reveal---

    No. The request can arrive, but the reply is a separate packet to 192.168.1.10. R2 drops it because no route matches. Add and verify a return route; the request’s successful delivery does not create one automatically.

  6. 6
    TipInterpret a silent traceroute hop

    Traceroute raises probe TTL one hop at a time. A router where TTL expires can return Time Exceeded, revealing its place on the path.

    A * means no reply arrived, not a uniquely identified fault. Filtering or response behavior can hide a router that still forwards. Use the last responding hop to choose where to inspect tables, and check later responses before concluding where forwarding stopped.

  7. 7
    ExplanationRead the route fields

    Consider O 10.1.3.0/24 [110/20] via 10.0.12.2, GigabitEthernet0/1. The route came from OSPF, reaches 10.1.3.0/24, and sends traffic to .2 on the listed interface.

    The bracket order is AD, metric. Here 110 rates the route source and 20 measures OSPF path cost. They answer different questions and are not two measurements of link speed.

  8. 8
    Key InsightA local route means this router

    Cisco adds C for an up interface’s connected subnet and L for its own address. For interface 10.0.12.1/30, C covers 10.0.12.0/30, while L covers 10.0.12.1/32.

    A packet matching the local host route belongs to the router. A line grouping several subnets under 10.0.0.0/8 is only a heading and supplies no covering next hop.

  9. 9
    ChallengeFind the fallback

    A table says “Gateway of last resort is not set.” It contains only 10.4.0.0/16 and connected transit routes. What happens to a packet for 198.51.100.12?

    ---reveal---

    It is dropped: neither the listed networks nor a default covers the destination. A router does not flood unknown IP destinations. Normally it sends an ICMP Destination Unreachable message back toward the source.

  10. 10
    ExampleCheck ranges before lengths

    A table has 10.1.0.0/16 through A, 10.1.1.0/24 through B, and 10.1.1.128/25 through C. For 10.1.1.200, every prefix matches and the /25 wins.

    For 10.1.1.100, the /25 fails because its first address is .128. The /24 wins. A longer prefix only helps when it actually contains the destination.

  11. 11
    ExplanationSeparate installation from lookup

    A protocol compares its path metrics. If different sources offer the identical prefix, AD selects the source. Forwarding then uses the longest matching installed prefix.

    A static 10.0.0.0/8 and OSPF 10.1.1.0/24 can coexist. Traffic inside that /24 uses OSPF even though static AD is lower. AD does not compare those different prefixes.

  12. 12
    ChallengeCombine source and prefix decisions

    Cisco learns 172.19.4.0/24 through OSPF (AD 110) and RIP (AD 120). It also has an installed static 172.19.0.0/16. What route serves 172.19.4.77?

    ---reveal---

    OSPF supplies the /24 because its AD beats RIP for that same prefix. The installed /24 then beats the static /16 by longest prefix match. RIP’s hop metric cannot be compared directly with OSPF’s cost.

  13. 13
    RecapA packet path you can explain

    For each hop, identify the packet destination, the matching installed prefix, and the next receiver on the outgoing link. MAC addressing serves that link; IP addressing carries the end-to-end destination unless NAT changes it.

    When delivery fails, check both directions. Read source and metric fields correctly, and treat traceroute silence as a reason to investigate the path further.

2

Build a working static path and backup

14 steps
Enable interfaces, configure routes in both directions, and test the event that makes a floating route take over.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionTurn an addressing plan into a path
  2. 2
    ExplanationEnter the mode for the job
  3. 3
    ExampleAddress and enable the transit port
  4. 4
    ChallengeRead the status before adding routes
  5. 5
    ConnectionRoute two VLANs over one cable
  6. 6
    ExamplePoint at the remote LAN
  7. 7
    ExampleProvide the way back
  8. 8
    TipUse the correct static form
  9. 9
    ChallengeChoose an exact summary
  10. 10
    ExplanationUse a default for one exit
  11. 11
    ExampleMake the alternative float
  12. 12
    ChallengeBack up a learned route
  13. 13
    ChallengeA failed neighbor beyond a switch
  14. 14
    RecapVerify failure and restoration
3

Choose a protocol for the routing job

10 steps
Compare the information protocols exchange, their path measures, and the networks where each approach fits.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionWhat should a routing protocol accomplish?
  2. 2
    ExplanationAllow time for convergence
  3. 3
    AnalogyReports or a shared map
  4. 4
    ExplanationPut autonomous systems on the boundary
  5. 5
    ChallengeCan fewer hops be slower?
  6. 6
    ExplanationRIP and EIGRP
  7. 7
    ConnectionOSPF and IS-IS
  8. 8
    ExplanationBGP chooses policy-preferred routes
  9. 9
    ChallengeChoose an inside and an outside approach
  10. 10
    RecapCompare like with like
4

Bring up OSPF and follow the evidence

17 steps
Build neighbors, calculate costs, handle shared-link elections, and trace configuration faults to the right stage.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionFrom interfaces to installed routes
  2. 2
    ExplanationKeep the three tables separate
  3. 3
    ExampleSelect a router ID
  4. 4
    ExplanationMove from Hello to Full
  5. 5
    ChallengeLocate a synchronization fault
  6. 6
    ExampleAdd the full default-reference cost
  7. 7
    ExampleMake faster links distinguishable
  8. 8
    ExplanationOrganize a broadcast segment
  9. 9
    ExampleElect the DR and BDR
  10. 10
    ChallengeA stronger router joins late
  11. 11
    TipUse point-to-point on both ends
  12. 12
    ExampleEnable IPv4 OSPF on the transit
  13. 13
    ExampleAdvertise a LAN without host neighbors
  14. 14
    ConnectionCarry the same process into IPv6
  15. 15
    ChallengeA default that is not advertised
  16. 16
    ChallengeFull neighbors, missing remote prefix
  17. 17
    RecapFollow the stage that failed
5

Follow and configure a translated connection

12 steps
Compare NAT types, trace PAT replies, and configure source selection and interface roles.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionTwo views of the same host
  2. 2
    ExplanationName the address views
  3. 3
    ConnectionChoose how public addresses are used
  4. 4
    ExampleOpen two connections from the same port
  5. 5
    ExampleTranslate the reply back
  6. 6
    ChallengePool or shared address?
  7. 7
    ExampleMark inside and outside
  8. 8
    ExampleUse the outside interface for PAT
  9. 9
    ExamplePublish one inside service
  10. 10
    TipRead use as well as mappings
  11. 11
    ChallengeTranslation exists but replies do not arrive
  12. 12
    RecapTrace the full translated path
6

Move the gateway role after a failure

12 steps
Follow virtual addressing, calculate a tracking change, and interpret protocol roles and status.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionMake the first hop resilient
  2. 2
    ExampleGive hosts a shared gateway
  3. 3
    ExplanationMove the virtual MAC
  4. 4
    ExampleNotice an uplink failure
  5. 5
    ChallengeA decrement that only ties
  6. 6
    ExplanationCompare HSRP and VRRP defaults
  7. 7
    ExampleConfigure matching HSRP identities
  8. 8
    ExampleRead the active and standby columns
  9. 9
    ChallengeHealthy Hellos, unexpected standby
  10. 10
    ConnectionShare one subnet with GLBP
  11. 11
    ChallengeGood group roles, failed clients
  12. 12
    RecapCheck identity, preference, and onward reachability

Network Routing practice questions

50 Practice Questions in 5 sets

Set 1: Apply route, OSPF, and translation rules10 Practice Questions

Question 1 of 10

Cisco R1 has an installed static 10.72.0.0/16 (AD 1). OSPF offers 10.72.6.0/24 (AD 110, cost 90) and RIP offers that same /24 (AD 120, metric 2). What source supplies the route used for 10.72.6.19?
  1. The static /16.
  2. RIP’s /24.
  3. OSPF’s /24.
  4. The static and OSPF routes equally.
Show answerHide answer
Answer: C
OSPF beats RIP for the same /24 because AD 110 is lower than 120; their metrics use different scales. The OSPF /24 and static /16 can both be installed. Forwarding to .6.19 then uses the longer /24, despite the static route’s lower AD.

Question 2 of 10

A router must send 2001:db8:64::/64 through neighbor fe80::9 on G0/0/2. What complete static command identifies that path?
  1. ipv6 route 2001:db8:64::/64 GigabitEthernet0/0/2 fe80::9
  2. ipv6 route 2001:db8:64::/64 fe80::9
  3. ipv6 route 2001:db8:64::/128 GigabitEthernet0/0/2 fe80::9
  4. ipv6 route ::/0 GigabitEthernet0/0/2 fe80::9
Show answerHide answer
Answer: A
The destination remains the requested /64, and the link-local next hop must be tied to its outgoing interface. The same fe80::9 could exist on another link, so the address alone is insufficient. A /128 would reach one address and ::/0 would create a default, changing the requested scope.

Question 3 of 10

What is the IPv6 prefix for a default route?
  1. ::/128
  2. fe80::/10
  3. 2001:db8::/32
  4. ::/0
Show answerHide answer
Answer: D
The zero-length prefix ::/0 matches every IPv6 address, making it the default. Longest prefix match uses it only when no more specific installed route contains the destination. ::/128 contains a single address, so it cannot act as a default for arbitrary remote destinations.

Question 4 of 10

An organization with its own public address space connects to two providers and needs control over routes exchanged with them. What protocol serves those provider peerings?
  1. Internal OSPF.
  2. External BGP.
  3. Internal EIGRP.
  4. RIPv2.
Show answerHide answer
Answer: B
External BGP exchanges routes between separately administered autonomous systems and supports policy-based choices. OSPF can still serve the organization’s internal network, but it does not replace BGP’s inter-AS provider peerings. Two physical provider links alone do not turn an IGP into an exterior routing protocol.

Question 5 of 10

All routers use a 1 Gbps OSPF reference bandwidth. Path A has two 100 Mbps transit links and a 1 Gbps destination-LAN interface. Path B has one 10 Mbps transit link and that same LAN interface. What path and cost win?
  1. Path A, cost 21.
  2. Path A, cost 20.
  3. Path B, cost 11.
  4. Path B, cost 101.
Show answerHide answer
Answer: A
Each 100 Mbps interface costs 10 and the 1 Gbps LAN costs 1, so A totals 10+10+1=21. B costs 100+1=101. Choosing 20 omits the destination-LAN interface; choosing the one-transit-link path would apply hop count instead of OSPF cost.

Question 6 of 10

An OSPF neighbor remains in ExStart after Hellos succeed. The area, timers, IDs, and authentication settings are correct. What interface setting should you compare next?
  1. OSPF process number.
  2. MTU.
  3. HSRP group number.
  4. NAT pool netmask.
Show answerHide answer
Answer: B
ExStart begins the database exchange, and an MTU mismatch commonly prevents that exchange from progressing. The successful Hellos do not establish that the database synchronization requirements are met. OSPF process IDs are local and may differ, so making those numbers equal does not address this likely cause.

Question 7 of 10

In inside source NAT, what term names the public address representing an inside host to the outside network?
  1. Inside local.
  2. Outside local.
  3. Inside global.
  4. Outside global.
Show answerHide answer
Answer: C
Inside global names the outside representation of the inside host. Inside local names that same host’s real inside address, commonly from private space. Outside global refers to the external host’s real address, so it describes a different host rather than the public identity assigned to the inside host.

Question 8 of 10

A NAT rule uses ip nat inside source list 7 pool EDGE. One host consumes each pool address, but the design needs many hosts to share them. What keyword is missing?
  1. passive-interface
  2. preempt
  3. link-local
  4. overload
Show answerHide answer
Answer: D
Adding overload enables PAT, allowing multiple inside hosts to share the pool’s addresses through session identifiers such as ports. Without it, this rule performs dynamic one-to-one NAT and each mapped host holds a public address. preempt controls gateway-role takeover and does not change translation capacity.

Question 9 of 10

A company adds two HSRP routers with VIP 192.168.83.1. Clients still use R1’s real address 192.168.83.2 as gateway. R1 fails and R2 becomes active. Why do the clients still lose remote access?
  1. R2 must inherit R1’s real interface address.
  2. Their gateway still names R1’s real address.
  3. The group must install a second client default.
  4. The clients must learn OSPF before failover.
Show answerHide answer
Answer: B
HSRP moves responsibility for the shared VIP and virtual MAC; these clients are sending to a different address. Their gateway configuration must use 192.168.83.1 to benefit from that shared identity. R2 becoming active does not make it inherit R1’s separate real interface address.

Question 10 of 10

HSRP status shows R1 active at priority 95 and R2 standby at 120. R2’s preemption column is blank. Both receive Hellos. What explains R2’s standby role?
  1. Its priority is too high to participate.
  2. Its router ID is lower than R1’s.
  3. It cannot preempt the working active router.
  4. Its hold timer must already have expired.
Show answerHide answer
Answer: C
HSRP preemption is off by default, so a higher-priority router can remain standby while the active router continues working. A priority of 120 is valid and preferable to 95 in an election, but priority alone does not displace an incumbent. Router ID is an OSPF election input, not the HSRP takeover rule here.
Set 2: Trace packets and read the first configuration10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A laptop at 192.168.44.18/24 sends to 192.168.45.30. Its gateway is 192.168.44.1. Whose MAC address belongs in the first Ethernet frame’s destination field?
  1. The remote host’s interface MAC.
  2. The gateway’s LAN-interface MAC.
  3. The laptop’s own interface MAC.
  4. The gateway’s provider-interface MAC.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

What does 70 mean in O 172.20.6.0/24 [110/70] via 10.8.0.2?
  1. The administrative distance.
  2. The prefix length.
  3. The age in seconds.
  4. The OSPF path cost.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Installed routes are 172.22.0.0/16 via A, 172.22.8.0/23 via B, 172.22.9.128/25 via C, and a default via D. Where does 172.22.9.90 go?
  1. Via B.
  2. Via A.
  3. Via C.
  4. Via D.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

An addressed router port shows administratively down/down. What interface command enables it?
  1. ipv6 unicast-routing
  2. copy running-config startup-config
  3. no shutdown
  4. encapsulation dot1Q 40
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

R-A’s LAN is 10.61.0.0/24 and R-B’s LAN is 10.62.0.0/24. Their transit addresses are R-A 192.0.2.17/30 and R-B 192.0.2.18/30. R-A already reaches R-B’s LAN. What route does R-B need for replies?
  1. ip route 10.62.0.0 255.255.255.0 192.0.2.17
  2. ip route 10.61.0.0 255.255.255.0 192.0.2.18
  3. ip route 10.61.0.0 255.255.255.0 192.0.2.17
  4. ip route 10.61.0.0 255.255.255.252 192.0.2.17
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

After a link failure, routers finish updating and again agree on reachable paths. What state has the network reached?
  1. Equal-cost multipath.
  2. Convergence.
  3. Address translation.
  4. Route summarization.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

An OSPF path has outgoing interface costs 8 and 12 on transit links, then 4 onto the destination LAN. What route cost is installed?
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

At a fresh broadcast-segment election, routers have (priority, ID): A (1, 10.0.0.8), B (50, 10.0.0.2), C (50, 10.0.0.7), D (0, 10.0.0.9). Who becomes DR?
  1. Router A.
  2. Router B.
  3. Router D.
  4. Router C.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A dynamic NAT pool has four public addresses and no overload. Four inside hosts hold mappings. A fifth host begins traffic before any mapping expires. What happens to its traffic?
  1. It shares an existing public mapping.
  2. It cannot obtain a pool mapping.
  3. It replaces the oldest active mapping.
  4. It receives a static public mapping.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

R1 is HSRP active at priority 125; R2 is standby at 110 with preemption enabled. R1 tracks its uplink with decrement 10. The uplink fails but R1 keeps sending Hellos. What happens?
  1. R1 stays active at priority 115.
  2. R2 takes over at priority 110.
  3. R1 stops sending gateway Hellos.
  4. R2 takes over with priority 120.
Show answerHide answer

Save this lesson to see this answer.

Set 3: Check configurations across the packet path10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A packet starts with TTL 9 and crosses three forwarding routers without NAT. What TTL reaches the destination host?
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A Cisco table contains C 192.168.76.0/24 ... Gi0/1 and L 192.168.76.1/32 ... Gi0/1. How is a packet addressed to 192.168.76.1 handled?
  1. It is sent to another host on the LAN.
  2. It is delivered to the router itself.
  3. It is sent to the default next hop.
  4. It is dropped as an unknown host.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A router holds 2001:db8:4500::/48 via A, 2001:db8:4500:80::/60 via B, 2001:db8:4500:8a::/64 via C, and ::/0 via D. What next hop serves 2001:db8:4500:8f::5?
  1. B.
  2. A.
  3. C.
  4. D.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

On a router trunk, subinterface G0/0/1.70 has encapsulation dot1Q 17 and address 192.168.17.1/24. What tagged VLAN does it serve?
  1. VLAN 70.
  2. VLAN 1.
  3. VLAN 17.
  4. VLAN 170.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

OSPF supplies 10.86.0.0/16 with Cisco AD 110. An administrator adds a usable static route to that same prefix with distance 105, intending a backup. What must change?
  1. Raise the static AD above 110.
  2. Lower the static AD below 105.
  3. Change the static destination to /24.
  4. Change the OSPF cost above 110.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

What information lets a link-state router calculate paths from a shared network map?
  1. A neighbor’s reported hop counts.
  2. An ordered list of AS numbers.
  3. Manually set default gateways.
  4. Link descriptions in its LSDB.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

R1 is established DR and R2 established BDR on a broadcast segment. R3 joins with higher priority than both. R1 later fails. Who becomes DR?
  1. R1.
  2. R2.
  3. R3.
  4. The highest-ID DROTHER.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

OSPF advertises a user LAN but must not form neighbors with hosts on that LAN. What process setting meets both needs?
  1. Remove the LAN from OSPF participation.
  2. Make the transit interface passive.
  3. Make the LAN-facing interface passive.
  4. Set the LAN interface priority to zero.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Inside sources are 10.93.4.0/24. NAT roles, outside routing, and PAT syntax are correct, but the NAT ACL permits only 10.93.5.0 0.0.0.255. No translations appear for inside users. What correction addresses the stated fault?
  1. Select 10.93.4.0 255.255.255.0 in the NAT ACL.
  2. Swap the inside and outside interface roles.
  3. Replace overload with a static default route.
  4. Select 10.93.4.0 0.0.0.255 in the NAT ACL.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A network needs an open-standard gateway redundancy protocol supported by different vendors. What protocol fits?
  1. VRRP.
  2. HSRP.
  3. GLBP.
  4. EIGRP.
Show answerHide answer

Save this lesson to see this answer.

Set 4: Diagnose failures and misleading status10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Traceroute shows R1, then two silent hops, then the destination. What can you conclude about those silent hops?
  1. They forwarded probes without returning visible replies.
  2. They dropped all packets sent through them.
  3. They had no usable route to the destination.
  4. They were bypassed because TTL stopped decreasing.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A Cisco table shows 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks above several entries. What does that line represent?
  1. A connected route for the whole /8.
  2. A summary route with an implicit next hop.
  3. A heading grouping the entries below.
  4. A default route covering private addresses.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

IPv6 addresses are configured and both interfaces are up/up, but the router has no ipv6 unicast-routing command. What global change enables IPv6 forwarding?
  1. no shutdown
  2. ip default-gateway 192.0.2.1
  3. copy startup-config running-config
  4. ipv6 unicast-routing
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A branch needs one summary for 10.104.12.0/24 through 10.104.15.0/24, all reached through 192.0.2.34. What exact summary command fits?
  1. ip route 10.104.12.0 255.255.254.0 192.0.2.34
  2. ip route 10.104.12.0 255.255.252.0 192.0.2.34
  3. ip route 10.104.8.0 255.255.252.0 192.0.2.34
  4. ip route 10.104.8.0 255.255.248.0 192.0.2.34
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A Cisco router learns the same /24 from internal EIGRP and OSPF at default distances. Both are usable. Which source is installed?
  1. OSPF.
  2. Internal EIGRP.
  3. Both as equal-cost paths.
  4. Whichever update arrived first.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A router has a 100 Mbps OSPF reference. Path A has two 1 Gbps transit links plus a 1 Gbps destination LAN. Path B has one 100 Mbps transit link plus that LAN. What does OSPF choose?
  1. Path A at cost 3.
  2. Path A at cost 0.3.
  3. Path B at cost 2.
  4. Both paths at cost 1.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Two routers are Full on an Ethernet link, but expected routes across it are missing. One end is OSPF broadcast and the other point-to-point. What configuration change addresses that mismatch?
  1. Use the same OSPF network type at both ends.
  2. Give both routers the same router ID.
  3. Force both interfaces to become DR.
  4. Make both transit interfaces passive.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A PAT entry pairs inside global 203.0.113.77:62002 with inside local 10.118.2.9:62000. Where is a matching server reply to the public endpoint delivered after reverse translation?
  1. 10.118.2.9:62002
  2. 203.0.113.77:62000
  3. 203.0.113.77:62002
  4. 10.118.2.9:62000
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A NAT router correctly maps server 10.166.3.20 to 203.0.113.96. Its provider neighbor reaches the NAT router at 192.0.2.66, but has only 203.0.113.64/27 routed there and no other matching route for the mapped address. What additional provider route enables outside delivery to this one mapped address?
  1. ip route 203.0.113.96 255.255.255.255 10.166.3.20
  2. ip route 203.0.113.64 255.255.255.224 192.0.2.66
  3. ip route 203.0.113.96 255.255.255.255 192.0.2.66
  4. ip route 10.166.3.20 255.255.255.255 192.0.2.66
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

R2 takes over an HSRP VIP and virtual MAC after R1 fails. What network update helps traffic reach R2’s switch port?
  1. A DHCP lease replacing every host gateway.
  2. A gratuitous ARP sent during takeover.
  3. An OSPF update sent by every host.
  4. A new physical MAC assigned to each client.
Show answerHide answer

Save this lesson to see this answer.

Set 5: Combine route choice with recovery decisions10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A Cisco router has OSPF 10.130.8.0/24 at AD 110, a usable static for that prefix at AD 125, and an installed static 10.130.0.0/16 at AD 1. OSPF withdraws the /24. What path serves 10.130.8.63 next?
  1. The static /16.
  2. The floating static /24.
  3. The withdrawn OSPF /24.
  4. Both static prefixes equally.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A primary static next hop sits beyond an Ethernet switch. The neighbor fails, but the local interface and recursive route remain up. A usable floating backup covers the same prefix. What change would make failover respond to this onward-path failure?
  1. Lower the backup AD so it waits behind the installed primary.
  2. Make the backup more specific while keeping its higher AD.
  3. Track onward reachability and remove the primary when it fails.
  4. Keep the primary installed but increase its path metric.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A table has default 0.0.0.0/0 through the provider and installed 192.168.155.0/24 through headquarters. What next hop serves 192.168.155.86?
  1. Headquarters.
  2. The provider.
  3. Both next hops equally.
  4. No next hop; private traffic is dropped.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A Cisco router learns the same /24 through OSPF and eBGP at default distances. OSPF selects a 1 Gbps path; BGP policy selects a 100 Mbps path. Both are usable. What path is installed, and why?
  1. The OSPF path, because its physical bandwidth is higher.
  2. The OSPF path, because 110 takes preference over 20.
  3. Both paths, because each protocol selected its best path.
  4. The BGP path, because AD 20 wins despite its slower link.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

RIPv2 reports a destination metric of 16. How is that destination treated?
  1. Reachable through 16 routers.
  2. Reachable with equal-cost sharing.
  3. Reachable only through a default gateway.
  4. Unreachable.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

Two OSPFv3 routers on Ethernet use process IDs 1 and 8, different global IPv6 prefixes, and unique router IDs. Their MTUs are 1500 and 1400 bytes. Area, timers, network type, and authentication agree; neighbors stay in Exchange. What change addresses the fault?
  1. Match global prefixes and retain the current MTUs.
  2. Match the MTUs and retain the legitimate ID and prefix differences.
  3. Match process IDs and retain the current MTUs.
  4. Match router IDs and retain the current MTUs.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

An edge router has default-information originate in OSPF, but no default installed. Internal routers receive other OSPF routes but no default. The design should advertise an exit only while one is usable. What should be restored?
  1. A usable default in the edge router’s table.
  2. The always keyword regardless of exit reachability.
  3. An identical OSPF process ID on every router.
  4. A passive setting on every transit interface.
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A NAT configuration uses an ACL to select inside source addresses. A source does not match the ACL. What does that NAT ACL result mean?
  1. The packet is blocked by an interface security rule.
  2. The source receives a static public address instead.
  3. The source is not selected for that translation.
  4. The source bypasses all routing-table checks.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Two Cisco routers should share traffic for hosts in one subnet using one VIP, with different hosts receiving different virtual MACs. What protocol mechanism fits?
  1. GLBP with an AVG and multiple AVFs.
  2. HSRP with two active routers per group.
  3. VRRP with two forwarding backups.
  4. OSPF with a DR assigning virtual MACs.
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A primary route is 10.148.0.0/16. A proposed backup is 10.148.7.0/24 at higher AD, and both next hops are usable. How does traffic to 10.148.7.28 behave while the primary remains installed?
  1. It waits for the /16 to be withdrawn.
  2. It uses the proposed backup /24 immediately.
  3. It shares equally between both prefixes.
  4. It follows the /16 because its AD is lower.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

89 Key Terms, each with its definition

A

Active virtual forwarder
An active virtual forwarder is a GLBP router that forwards traffic sent to its assigned virtual MAC, sharing one group’s load.
A host assigned one AVF’s MAC sends its gateway frames to that forwarder while another host can use a different AVF.
Active virtual gateway
The active virtual gateway is GLBP’s coordinator that answers ARP for the VIP using virtual MAC addresses assigned to forwarders.
The AVG can steer different hosts toward different AVFs by returning their respective virtual MAC addresses.
Administrative distance
Administrative distance is a local source-preference value used when several sources offer the same prefix; lower values are preferred.
At Cisco defaults, a usable static /24 displaces an OSPF route to that identical /24.
Autonomous system
An autonomous system is a network or group of networks managed under one administration and routing policy, identified online by an AS number.
An enterprise can exchange routes with a provider in a different autonomous system through external BGP.

B

Backup designated router
The backup designated router is the OSPF router ready to become DR if the current DR fails on a shared broadcast segment.
When the DR fails, the established BDR is promoted before the remaining routers choose a new BDR.
BGP
BGP is a path-vector protocol that exchanges routes over TCP 179 and selects paths through attributes and routing policy.
An organization with two providers can use BGP to control route exchanges at its autonomous-system boundaries.
Broadcast domain
A broadcast domain is the set of interfaces reached by a Layer 2 broadcast; routers separate these domains between networks.
An ARP request on one office LAN stays on that LAN instead of passing through its router to another LAN.

C

Carrier-grade NAT
Carrier-grade NAT is provider-operated IPv4 translation that can place customer connections behind another shared public-address mapping.
A customer router’s outside address in 100.64.0.0/10 can indicate another translation layer upstream.
Classless routing
Classless routing includes prefix lengths in route information, supporting variable-length subnet masks and route summaries.
RIPv2 can describe different subnet lengths, while the older RIPv1 did not include masks in its updates.
Command-line interface
A command-line interface accepts typed commands for device monitoring and configuration, with modes controlling the available actions.
The prompt R1(config-if)# shows that a command will change the selected interface’s settings.
Connected route
A connected route reaches the subnet of an addressed interface that is operational and is removed when that connection goes down.
An up/up interface at 10.0.12.1/30 contributes a connected route for 10.0.12.0/30.
Control plane
The control plane is the router function that learns and selects routes from connected interfaces, configuration, and routing protocols.
An OSPF update changes a route through control-plane work before packets use the new forwarding path.
Convergence
Convergence is the return to a consistent, correct routing view after a change, once affected routers have updated their information.
Traffic can be disrupted between detecting a failed link and finishing the route updates across the network.

D

Data plane
The data plane is the router function that forwards packets according to selected routes and the outgoing link’s requirements.
Removing an incoming frame and building the outgoing frame are parts of forwarding a particular packet.
Dead interval
The Dead interval is the time OSPF waits without a neighbor’s Hello before declaring that neighbor down and recalculating routes.
With the usual 40-second Dead interval, a neighbor that stops sending Hellos is not removed instantly.
Default gateway
A default gateway is the router a host uses as its first hop when an IP destination lies outside the host’s own subnet.
A host at 192.168.4.20/24 can use 192.168.4.1 to reach a remote 192.168.5.0/24 network.
Default origination
OSPF default origination advertises a default route to other routers, normally requiring an installed default on the advertising router.
An edge router without a default advertises none through ordinary default-information originate.
Default route
A default route is a zero-length prefix that matches every destination and is used when no matching longer prefix is installed.
A single-exit office can send unknown IPv4 networks through 0.0.0.0/0 toward its provider.
Designated router
An OSPF designated router coordinates flooding and full adjacencies on a broadcast segment and originates its Type 2 network LSA.
The DR can change after a failure, but a late higher-priority router does not preempt the established role.
Distance-vector routing
Distance-vector routing learns a destination’s reported distance and next-hop direction from neighbors without sharing a full topology map.
RIP can prefer one slow hop to two fast hops because its distance is measured by router count.
DROTHER
A DROTHER is an OSPF router that is neither DR nor BDR on a broadcast segment and becomes fully adjacent to those two routers.
Two DROTHERs can stay in 2-Way with each other while the segment’s OSPF operation is healthy.
Dynamic NAT
Dynamic NAT allocates temporary one-to-one mappings from an address pool, with one public address per concurrently mapped inside host.
Six pool addresses without overload cannot provide simultaneous mappings for seven different inside hosts.

E

EIGRP
EIGRP is an advanced distance-vector protocol developed by Cisco that normally measures paths using bandwidth and total delay.
A qualifying feasible successor can let an EIGRP router replace a failed path quickly.
Equal-cost multipath
Equal-cost multipath allows several equal-metric paths to a prefix to be installed and share traffic within the device’s path limit.
Two OSPF next hops with the same cost can both appear for one destination network.
Exit interface
An exit interface is the local router interface used to transmit a packet onto the next link in its selected route.
An IPv6 route via fe80::2 includes the exit interface to identify the correct link-local neighbor.
External BGP
External BGP is a BGP peering between routers in different autonomous systems, used to exchange inter-AS reachability information.
A provider and its customer can peer through eBGP even if their internal IGP designs differ.

F

Feasible successor
A feasible successor is an EIGRP backup path that meets the protocol’s loop-free qualification and can support fast recovery.
If no alternative qualifies, a router cannot simply assume every second next hop is a ready backup.
First-hop redundancy protocol
A first-hop redundancy protocol coordinates routers sharing a virtual gateway identity so another router can forward after a failure.
Hosts use the shared VIP while the group chooses which router handles their off-subnet traffic.
Floating static route
A floating static route backs up the same prefix with a higher administrative distance, becoming preferred after primary-route removal.
A static distance of 130 can wait behind a Cisco OSPF route with its default distance of 110.
Fully specified route
A fully specified static route names both the outgoing interface and the next-hop address, identifying the link and its receiver.
An IPv6 static using fe80::2 must include its interface because link-local addresses can recur on other links.

G

Gateway of last resort
The gateway of last resort is the next hop provided by an installed default route for otherwise unmatched destinations.
If no specific entry covers a public destination, the router can send it to its gateway of last resort.
GLBP
GLBP is Cisco’s Gateway Load Balancing Protocol, distributing hosts across several virtual forwarders within a single gateway group.
Different ARP replies for one VIP can direct different hosts to different forwarding routers.
Gratuitous ARP
A gratuitous ARP is an unsolicited ARP announcement used during gateway takeover to help update where the virtual MAC is reached.
The switch learns the virtual MAC on the new active router’s port after an HSRP switchover announcement.

H

Hello interval
The Hello interval is the time between OSPF neighbor-discovery messages; neighbors on a link need matching interval settings.
Broadcast and point-to-point OSPF interfaces default to sending a Hello every 10 seconds.
Host route
A host route is the most specific prefix, covering exactly one IPv4 address with /32 or one IPv6 address with /128.
A /32 route can send one server’s traffic through a different next hop from the rest of its LAN.
HSRP
HSRP is Cisco’s Hot Standby Router Protocol, providing active and standby routers for a shared virtual default gateway.
At default settings, the active sends Hellos every 3 seconds and preemption is disabled.

I

Inside global
An inside-global address represents an inside host to the outside network and is usually publicly routed for internet communication.
The provider must deliver replies for the inside-global address to the router performing the translation.
Inside local
An inside-local address is the real address of an inside host, usually from private space, before its outside representation is applied.
A translation can pair inside local 192.168.1.11 with inside global 203.0.113.2.
Inside NAT interface
An inside NAT interface faces the internal side of a translation boundary and is marked with ip nat inside on Cisco IOS.
An office router marks its user-LAN port inside and its provider-facing port outside.
Interior gateway protocol
An interior gateway protocol exchanges routing information within one autonomous system, supporting its internal reachability.
OSPF can connect an organization’s internal sites while BGP handles exchanges with external providers.
IS-IS
IS-IS is an open-standard link-state interior protocol, common in provider networks, whose messages run directly over the data-link layer.
A large provider can use IS-IS internally while exchanging external internet routes with BGP.

L

Link-state advertisement
A link-state advertisement describes topology information distributed by OSPF so routers can maintain their databases and calculate paths.
Every router originates a Type 1 router LSA, while a broadcast segment’s DR originates a Type 2 network LSA.
Link-state database
A link-state database stores topology advertisements that a link-state router uses to calculate its paths through an area.
Full OSPF neighbors have completed database synchronization, even if another source supplies a particular route.
Link-state routing
Link-state routing distributes descriptions of links so routers can build a topology database and calculate paths from their own positions.
OSPF routers in one synchronized area share its topology information but can use different next hops.
Local route
A local route is a host route identifying an address on the router itself, so matching packets can be handled locally.
Cisco shows L 10.0.12.1/32 for a router whose own IPv4 address on a transit link is 10.0.12.1.
Longest prefix match
Longest prefix match selects the installed route with the most network bits among the prefixes containing a packet’s destination.
A matching /25 sends traffic along its path even when a broader static /16 has a lower AD.

M

Metric
A routing metric measures a path according to one protocol’s rules, allowing that protocol to compare paths to the same prefix.
RIP hop count and OSPF cost use different scales, so their raw values cannot rank the two sources.

N

NAT pool
A NAT pool is a configured range of addresses available for dynamic mappings, optionally shared through PAT with overload.
The pool from 203.0.113.9 through .14 contains six host addresses in 203.0.113.8/29.
NAT source ACL
A NAT source ACL is an access list used to select sources for translation, separate from an ACL applied as an interface filter.
A permit matching the office subnet means translate those sources, not grant them a firewall permission.
Network address translation
Network address translation rewrites IP addresses between inside and outside networks and records mappings so replies can be translated back.
An inside private IPv4 host can appear to an internet server under a different, publicly routed address.
Next hop
A next hop is the neighboring router address to which a router sends a packet as the next step toward its destination.
A static route can name transit neighbor 10.0.12.2 even though the final server is several networks away.

O

Object tracking
Object tracking connects a monitored condition to a routing or redundancy action, such as withdrawing a route after failed probes.
Tracking can remove a static primary when a far router fails but the local Ethernet port stays up.
OSPF
OSPF is an open-standard link-state IGP that calculates shortest paths from topology advertisements and uses cost to measure routes.
A multivendor enterprise can run OSPFv2 for IPv4 and OSPFv3 for IPv6 reachability.
OSPF interface priority
OSPF interface priority ranks DR/BDR candidates on a segment; the highest value wins a fresh election and zero prevents election.
Two priority-50 candidates use router ID to break their tie, but a priority-zero router is ineligible.
OSPF network type
An OSPF network type determines link behavior such as neighbor organization and whether the link elects a designated router.
A two-router Ethernet link can be configured point-to-point at both ends to avoid the broadcast election.
OSPF process ID
An OSPF process ID is a local configuration identifier for a routing process and does not need to match between neighboring routers.
R1 can use process 1 and R2 process 7 while both place their shared interfaces in area 0.
OSPFv3
OSPFv3 is the OSPF version used here for IPv6, forming neighbors through link-local addresses while retaining 32-bit router IDs.
Two same-link OSPFv3 neighbors do not compare global IPv6 prefixes as an adjacency requirement.
Outside global
An outside-global address is the outside host’s real address, as assigned in its own network, independent of the inside host’s mapping.
An external server at 198.51.100.80 keeps that outside-global address while inside clients use PAT.
Outside local
An outside-local address is the outside host’s address as it appears to devices on the inside of the translation boundary.
In ordinary inside source NAT, the external server has the same outside-local and outside-global address.
Outside NAT interface
An outside NAT interface faces the external side of a translation boundary and is marked with ip nat outside on Cisco IOS.
Swapping the interface roles prevents the intended inside-source translation from being applied correctly.

P

Passive interface
An OSPF passive interface advertises its subnet through the process but sends no Hellos and forms no neighbors on that interface.
A user-facing LAN can remain advertised without inviting OSPF adjacencies with attached hosts.
Path-vector routing
Path-vector routing carries path information with advertised prefixes, allowing loop checks and policy-based choices between autonomous systems.
A BGP router rejects a route whose AS path already contains its own autonomous system number.
Port address translation
Port address translation shares public addresses among inside hosts using session identifiers such as TCP or UDP ports and ICMP query IDs.
Two clients using the same local source port can receive different public ports for replies to find them.
Port forwarding
Port forwarding maps a fixed public address and service port to an inside address and port, also called static PAT.
A public TCP 443 endpoint can publish an inside web service without mapping every port of that server.
Preemption
Preemption allows a preferred higher-priority router to take the active gateway role from a lower-priority router that is still working.
A recovered HSRP router with priority 110 stays standby behind priority 100 if it cannot preempt.
Prefix
An IP prefix combines an address with a length that identifies its network bits and therefore the range of addresses it covers.
The prefix 10.7.0.0/16 covers more addresses than the contained prefix 10.7.4.0/24.

R

Recursive lookup
A recursive lookup resolves a route’s next-hop address through another route to determine a usable outgoing interface.
A connected prefix covering a static route’s neighbor address can resolve that address to the correct Ethernet port.
Reference bandwidth
OSPF reference bandwidth is the configured speed used to calculate interface cost by dividing it by the interface’s bandwidth.
A 10 Gbps reference gives a 1 Gbps interface cost 10, distinguishing it from a 100 Mbps interface.
Return route
A return route provides the path a reply packet needs to reach the original sender; it is independent of the request’s route.
A server can receive a ping request yet fail to return the reply if its router lacks the sender’s LAN route.
RIP
RIP is a distance-vector protocol using router hop count, with 15 as the largest reachable metric and 16 meaning unreachable.
A small hop count can still describe a slow path because RIP does not choose routes by link bandwidth.
Route preference
Route preference expresses which route source a device trusts for one prefix, using a vendor’s values and configuration.
Cisco calls its source-preference measure administrative distance; another vendor can use different defaults.
Router
A router connects different IP networks and forwards packets between them using destination IP addresses and its routing table.
An office router forwards a workstation’s packet from its LAN toward a server on a different subnet.
Router ID
An OSPF router ID is a unique 32-bit identifier, selected when the process starts and written in dotted-decimal IPv4-like form.
A router with only IPv6 addresses still needs an explicitly configured 32-bit ID for its OSPFv3 process.
Router-on-a-stick
Router-on-a-stick uses one physical 802.1Q trunk and VLAN-tagged subinterfaces to route traffic between several VLANs.
Hosts in two VLANs use different subinterface IPs as gateways while sharing the router’s physical cable.
Routing table
A routing table is a set of selected destination prefixes with the next hops or outgoing interfaces used to reach them.
A destination lookup identifies the entry the router uses for a packet to 10.7.4.19.
Running configuration
The running configuration is the router’s active set of settings, held in memory and changed immediately by configuration commands.
An interface begins using its new address before the administrator saves the configuration for the next boot.

S

Shortest path first
Shortest path first is the calculation a link-state router uses to find minimum-cost paths from its own position in the topology.
After receiving a changed link advertisement, an OSPF router reruns SPF to update affected paths.
Startup configuration
The startup configuration is the saved set of settings loaded when a router boots, separate from its currently active configuration.
Copying running configuration to startup configuration preserves a newly tested route across a restart.
Static route
A static route is an administrator-configured instruction for reaching an IP prefix through a chosen next hop or exit interface.
A branch can use a static route to a remote LAN and another router needs a return route to the branch.
Stub network
A stub network has only one onward path, making a default route a practical way to reach destinations beyond its local networks.
A branch with one headquarters link can use one default instead of individual routes for every remote LAN.
Subinterface
A subinterface is a logical division of a physical router interface that can carry its own addressing and VLAN encapsulation.
One router trunk can have separate gateway subinterfaces for tagged VLANs 10 and 20.
Summary route
A summary route represents several contiguous destination networks with one shorter, aligned prefix reached through a common path.
The summary 10.2.0.0/22 includes four /24 networks but stops before 10.2.4.0.

T

Translation table
A NAT translation table records original and translated endpoints so the router can apply the correct forward and reverse mappings.
A public port 51001 can map back to an inside host’s port 51000 for one recorded TCP connection.
TTL
Time to Live is an IPv4 counter that forwarding routers decrease, discarding a packet when it expires to limit routing loops.
A packet with TTL 1 expires at the next forwarding router and can trigger an ICMP Time Exceeded reply.

V

Virtual IP address
A virtual IP address is the shared gateway address served by a redundancy group, allowing hosts to keep one gateway setting.
In HSRP, the VIP is a separate unused LAN address rather than either router’s real interface address.
Virtual MAC address
A virtual MAC address is a group-controlled Layer 2 identity used with a virtual gateway and taken over during failover.
A host’s VIP-to-virtual-MAC ARP mapping can remain valid when a different HSRP router becomes active.
VRRP
VRRP is an open-standard gateway redundancy protocol with active and backup roles, supporting both IPv4 and IPv6 in version 3.
A multivendor LAN can use VRRP for a shared gateway without depending on a Cisco proprietary protocol.
VRRP address owner
A VRRP address owner is the router whose real interface address is the virtual router’s address and whose reserved priority is 255.
Because the owner’s real interface address is the VIP, VRRP can use a real interface address as VIP, while HSRP uses a separate one.

W

Wildcard mask
A wildcard mask selects matching address bits with zeros and allows varying bits with ones, as in an OSPF network statement.
Wildcard 0.0.0.3 selects addresses in a /30 range, unlike the subnet mask 255.255.255.252.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started