How to configure Junos ipv6 default route
IPv6 traffic is classified as “inet6” family in Junos routing operating system. The default routing table holding ipv6 routes is named
inet6.0.
IPv4 default route is formed of four 0 octets with a zero mask: 0.0.0.0/0 or 0/0 in Junos. In the same manner, rhe IPv6 default route expressed as sixteen 0 octets expressed by a zero subnet mask. But all sixteen bytes can be compressed into two consecutive colons - ::/0.
Check IPv6 prefixes/routes in Junos
Code:
admin@R1> show route table inet6.0
inet6.0: 13 destinations, 15 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2008:f234:ffff::1/128
*[Direct/0] 1w6d 03:54:29
> via lo0.0
2008:f234:ffff::ffff/128
*[Direct/0] 1w6d 03:54:29
> via lo0.0
…
Check if ipv6 default route exists
Code:
admin@R1> show route table inet6.0 ::/0 exact
admin@R1>
Configure IPv6 default route
Code:
admin@R1> configure
Entering configuration mode
[edit]
admin@R1# set routing-options rib inet6.0 static route ::/0 next-hop 2008:f234:ffff::e:0
[edit]
admin@R1# commit
commit complete
[edit]
admin@R1# run show route table inet6.0 ::/0 exact
inet6.0: 14 destinations, 16 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
::/0 *[Static/5] 00:00:03
> to 2008:f234:ffff::e:0 via ge-0/0/4.0
Same as IPv4 routes, IPv6 have three minimum arguments: prefix, mask and next hop. One thing to note is that IPV6 routes have to be defined in “rib inet6.0” under “routing-options”.