From cdd56e6a2d8c781a250d4e992dbf017f857bbbe6 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 4 Mar 2026 14:28:08 +0100 Subject: [PATCH] doc: document how to add a default route Signed-off-by: Joachim Wiberg --- doc/routing.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/routing.md b/doc/routing.md index 13573b45..e6b0b97b 100644 --- a/doc/routing.md +++ b/doc/routing.md @@ -27,6 +27,16 @@ The standard IETF model for static routes reside under the `static` control plane protocol. For our examples we use the instance name `default`, you can use any name. +The most common case when using a static IP setup is adding a default +route (i.e., the default gateway): + +
admin@example:/> configure
+admin@example:/config/> edit routing control-plane-protocol static name default ipv4
+admin@example:/config/routing/…/ipv4/> set route 0.0.0.0/0 next-hop next-hop-address 192.168.1.1
+admin@example:/config/routing/…/ipv4/> leave
+admin@example:/>
+
+ For a route with destination 192.168.200.0/24 via 192.168.1.1:
admin@example:/> configure
@@ -53,6 +63,17 @@ admin@example:/>
 
 ## IPv6 Static routes
 
+Default route via an IPv6 gateway:
+
+
admin@example:/> configure
+admin@example:/config/> edit routing control-plane-protocol static name default ipv6
+admin@example:/config/routing/…/ipv6/> set route ::/0 next-hop next-hop-address 2001:db8:3c4d:1::1
+admin@example:/config/routing/…/ipv6/> leave
+admin@example:/>
+
+ +For a route with destination 2001:db8:3c4d:200::/64 via 2001:db8:3c4d:1::1: +
admin@example:/> configure
 admin@example:/config/> edit routing control-plane-protocol static name default ipv6
 admin@example:/config/routing/…/ipv6/> set route 2001:db8:3c4d:200::/64 next-hop next-hop-address 2001:db8:3c4d:1::1