Skip to content

Commit 2b381de

Browse files
committed
doc: document how to add a default route
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 1c76cfe commit 2b381de

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

doc/routing.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ The standard IETF model for static routes reside under the `static`
2727
control plane protocol. For our examples we use the instance name
2828
`default`, you can use any name.
2929

30+
The most common case when using a static IP setup is adding a default
31+
route (i.e., the default gateway):
32+
33+
<pre class="cli"><code>admin@example:/> <b>configure</b>
34+
admin@example:/config/> <b>edit routing control-plane-protocol static name default ipv4</b>
35+
admin@example:/config/routing/…/ipv4/> <b>set route 0.0.0.0/0 next-hop next-hop-address 192.168.1.1</b>
36+
admin@example:/config/routing/…/ipv4/> <b>leave</b>
37+
admin@example:/>
38+
</code></pre>
39+
3040
For a route with destination 192.168.200.0/24 via 192.168.1.1:
3141

3242
<pre class="cli"><code>admin@example:/> <b>configure</b>
@@ -53,6 +63,17 @@ admin@example:/>
5363

5464
## IPv6 Static routes
5565

66+
Default route via an IPv6 gateway:
67+
68+
<pre class="cli"><code>admin@example:/> <b>configure</b>
69+
admin@example:/config/> <b>edit routing control-plane-protocol static name default ipv6</b>
70+
admin@example:/config/routing/…/ipv6/> <b>set route ::/0 next-hop next-hop-address 2001:db8:3c4d:1::1</b>
71+
admin@example:/config/routing/…/ipv6/> <b>leave</b>
72+
admin@example:/>
73+
</code></pre>
74+
75+
For a route with destination 2001:db8:3c4d:200::/64 via 2001:db8:3c4d:1::1:
76+
5677
<pre class="cli"><code>admin@example:/> <b>configure</b>
5778
admin@example:/config/> <b>edit routing control-plane-protocol static name default ipv6</b>
5879
admin@example:/config/routing/…/ipv6/> <b>set route 2001:db8:3c4d:200::/64 next-hop next-hop-address 2001:db8:3c4d:1::1</b>

0 commit comments

Comments
 (0)