IPv6 · Topic 1 of 3
IPv6 Addressing, Static Routes and Verification
Learn Junos IPv6 for the JN0-364: family inet6, link-local addresses, neighbor discovery, static routes in inet6.0 and the commands to verify IPv6.
- 5 min
- IPv6 needs
family inet6on each unit; Junos then adds a fe80 link-local address. - IPv6 routes live in inet6.0; static preference is 5, as for IPv4.
- Static syntax:
set routing-options rib inet6.0 static route <prefix> next-hop <address>.
What it is
A Junos router routes IPv6 once a logical interface has family inet6 with an address. IPv6 routes are kept in the inet6.0 table, separate from IPv4 routes in inet.0, and the same route preferences apply: a static route is preference 5 whether it is IPv4 or IPv6.
IPv6 static routes work like IPv4 static routes, with one difference: they are configured under the inet6.0 routing table. Most IPv6 problems on the exam come from a missing family inet6, a link-local next hop without an interface, or a filter that blocks ICMPv6.
How it works
Interface addressing
user@R1# set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:12::1/64
user@R1# set interfaces lo0 unit 0 family inet6 address 2001:db8:ffff::1/128
As soon as family inet6 is on a unit, Junos also creates a link-local address (fe80::/64) for it, built from the interface MAC address in EUI-64 format. Routing protocols such as OSPFv3 use link-local addresses as neighbor addresses and next hops.
The eui-64 option builds the host part of a global address from the MAC address:
user@R1# set interfaces ge-0/0/1 unit 0 family inet6 address 2001:db8:13::/64 eui-64
| Address type | Prefix | Use |
|---|---|---|
| Global unicast | 2000::/3 | Routable addresses, such as 2001:db8::/32 in examples |
| Link-local | fe80::/10 | One link only; protocol neighbors and next hops |
| Unique local | fc00::/7 | Private use inside a network |
| Multicast | ff00::/8 | Replaces broadcast; for example ff02::1 all nodes, ff02::2 all routers |
| Loopback | ::1/128 | The host itself |
Neighbor discovery
IPv6 has no ARP. Neighbor Discovery (ND) uses ICMPv6 messages instead.
| Message | Purpose |
|---|---|
| Neighbor solicitation | Asks for the MAC address of an IPv6 address; also detects duplicate addresses |
| Neighbor advertisement | Answers with the MAC address |
| Router solicitation | A host asks routers to announce themselves |
| Router advertisement | A router announces prefixes and itself as a default gateway |
A Junos router does not send router advertisements unless you configure them:
user@R1# set protocols router-advertisement interface ge-0/0/2.0 prefix 2001:db8:100::/64
Static routes
IPv6 static routes go under rib inet6.0:
user@R1# set routing-options rib inet6.0 static route ::/0 next-hop 2001:db8:12::2
user@R1# set routing-options rib inet6.0 static route 2001:db8:50::/48 discard
A link-local next hop is valid on every link, so Junos cannot tell which interface to use. Use qualified-next-hop with the interface:
user@R1# set routing-options rib inet6.0 static route 2001:db8:60::/48 qualified-next-hop fe80::2 interface ge-0/0/0.0
The same options as IPv4 apply: discard, reject, preference, qualified-next-hop for a floating backup, and resolve for a next hop that is not directly connected.
Monitoring commands
| Command | Shows |
|---|---|
show interfaces terse | Each unit's inet6 addresses, including the fe80 link-local |
show route table inet6.0 | All IPv6 routes |
show route 2001:db8:60::/48 exact | One IPv6 route |
show ipv6 neighbors | The IPv6 neighbor cache, the ND equivalent of the ARP table |
show ipv6 router-advertisement | Router advertisements sent and received |
ping 2001:db8:12::2 | ICMPv6 echo; ping inet6 forces IPv6 for a host name |
traceroute 2001:db8:60::1 | Path to an IPv6 destination |
user@R1> show route table inet6.0 protocol static
inet6.0: 9 destinations, 10 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
::/0 *[Static/5] 00:05:41
> to 2001:db8:12::2 via ge-0/0/0.0
Troubleshooting checklist
| Symptom | Likely cause |
|---|---|
No inet6 address in show interfaces terse | family inet6 missing on the unit |
| Static route hidden | Next hop not on a connected subnet, or a link-local next hop without qualified-next-hop ... interface |
Neighbors never appear in show ipv6 neighbors | A firewall filter blocks ICMPv6, which ND needs |
| Hosts get no address or default gateway | Router advertisements not configured |
When an IPv6 filter is applied to an interface, make sure it accepts ICMPv6 neighbor solicitation and advertisement. Blocking them breaks IPv6 on the link just as blocking ARP would break IPv4.
Common mistakes
Configuring IPv6 static routes at the top of routing-options static. That level is for IPv4 (inet.0). IPv6 static routes go under routing-options rib inet6.0 static.
Using a link-local next hop with plain next-hop. The interface must be named, so use qualified-next-hop fe80::2 interface ge-0/0/0.0.
Looking for IPv6 routes in inet.0. They are in inet6.0.
Expecting router advertisements by default. Junos sends them only for interfaces under protocols router-advertisement.
IPv6 routers do not fragment packets in transit. A packet larger than the next link's MTU is dropped and an ICMPv6 Packet Too Big message is sent back, so MTU mismatches show up as failures for large packets only.
What to remember for the exam
- IPv6 needs
family inet6on each unit; Junos then adds a fe80 link-local address. - IPv6 routes live in inet6.0; static preference is 5, as for IPv4.
- Static syntax:
set routing-options rib inet6.0 static route <prefix> next-hop <address>. - Link-local next hops need
qualified-next-hop <address> interface <name>. - ND uses ICMPv6 and replaces ARP; check it with
show ipv6 neighbors. - Router advertisements need
protocols router-advertisement. - Verify with
show interfaces terse,show route table inet6.0andping.
Check yourself
Where is an IPv6 static default route configured on Junos?
Under
routing-options rib inet6.0 static route ::/0, with a next hop.A static route uses next hop fe80::2 with no interface. Why is it not active?
A link-local address exists on every link, so the interface must be given with
qualified-next-hop fe80::2 interface <name>.Which command shows the IPv6 equivalent of the ARP table?
show ipv6 neighbors.
Topic 1 of 3 in IPv6
Test yourself on IPv6
The full Juniper JNCIS-SP JN0-364 question bank has 860 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.