Static routes — egress-interface form (point-to-point)
- Routing
- Beginner
- 8 min
- 2 steps
- Cisco IOS-style
Same hub-and-spoke topology as static-routes-basic, but a different shape of static route: instead of an IP next-hop, name the egress interface. Valid on point-to-point links; the FIB sends the packet straight out the interface and ARPs for the destination on the wire.
Open this lab in your browser →
Free · no install · no account
Scenario
ip route accepts two next-hop forms: | Form | Example | When to use | | --- | --- | --- | | IP next-hop | ip route 10.0.2.0 255.255.255.252 10.0.1.1 | Multi-access links, recursive lookups | | Egress interface | ip route 10.0.2.0 255.255.255.252 Gi0/0 | Point-to-point links and tunnels | The egress-interface form is shorter and avoids a recursive FIB lookup — the router knows immediately which interface to send the packet out, and ARPs for the *destination* IP on that interface. That's safe on a /30 P2P link because there's exactly one peer. On a multi-access link (/24 Ethernet with many hosts) it's *unsafe* — the router would proxy-ARP for every destination, generating a CAM-table entry per remote host. In this lab S1 is connected to H (the hub) on a /30 link via Gi0/0. You'll configure a static route to S2's subnet using the egress-interface form.
Topology
4 × router · Cisco IOS-style
Hub— routerSpoke1— routerSpoke2— routerSpoke3— router
What you will do
On
S1, configure a static route to10.0.2.0/30(S2's subnet) usingGi0/0as the egress interface.Verify with
show ip routeonS1. The new entry should appear under theS(static) source.
Open this lab in your browser →
More labs on this topic
- Syntax delta — static route (Extreme EXOS)Beginner · 4 min
- Syntax delta — static route (Cisco IOS)Beginner · 4 min
- Syntax delta — static route (Juniper Junos)Beginner · 5 min
- Syntax delta — static route (VyOS)Beginner · 5 min
- Static routes — fix hub-and-spokeBeginner · 12 min
- EIGRP: AS 100 across a three-router chainIntermediate · 14 min
This lab in other languages
Statische Routen — Egress-Interface-Form (Point-to-Point)Rutas estáticas — forma de interfaz de salida (point-to-point)Rotas estáticas — forma de interface de saída (point-to-point)Routes statiques — forme d'interface de sortie (point-to-point)Static routes — egress-interface रूप (point-to-point)静态路由 — egress-interface 形式(point-to-point)Rotte statiche — forma di interfaccia di uscita (point-to-point)静的ルート — 出力インターフェイス形式(point-to-point)정적 경로 — egress-interface 형태 (point-to-point)Статические маршруты — форма с выходным интерфейсом (point-to-point)Statik rotalar — çıkış arayüzü biçimi (point-to-point)Tuyến tĩnh — dạng interface đi ra (point-to-point)