Below is the routing table after adding the default route in OpenWRT
root@OpenWrt:~# route -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
24fe:34:927:af:91:f8:a6:51b5%35/128 ::%35 UC 0016 eth0
24fe:34:927:af::%35/64 ::%35 U 25610 eth0
fe80::%35/64 ::%35 U 25600 eth0
::%35/0 fe80::d6ee:71f:fe5e:71f2%35 UG 102420 eth0
::%35/0 ::%35 !n -1110957 lo
::1%35/128 ::%35 Un 01568 lo
240e:34:927:af::%35/128 ::%35 Un 010 lo
240e:34:927:af:e82a:ff:fed6:3371%35/128 ::%35 Un 0117348 lo
fe80::%35/128 ::%35 Un 010 lo
fe80::e80a:66ff:f1d6:3371%35/128 ::%35 Un 012859 lo
ff02::1%35/128 ::%35 UC 001273 eth0
ff02::16%35/128 ::%35 UC 00163 eth0
ff00::%35/8 ::%35 U 25620 eth0
::%35/0 ::%35 !n -1110957 lo
A device’s routing table must have at least one default route [default gateway] pointing to the upper-level router; otherwise, it can only communicate within the local area network and cannot communicate externally.
Explanation of Routing Table Fields
Destination
The destination network or target host.
When the Destination is default (::%35/0), it indicates that this is the default gateway, and all data is sent to this gateway (here it is fe80::d6ee:71f:fe5e:71f2%35).
Next hop
The gateway address, fe80::d6ee:71f:fe5e:71f2%35 indicates that the Destination corresponding to this record is in the same subnet as the local machine, and communication does not require going through a gateway (two hosts in the same local area network can communicate without going through a gateway).
The number after %35 indicates the interface identifier, which is equivalent to the network card number.
Genmask is the network mask for the Destination field, e.g., /64, /128.
Flags
U (Up): This flag indicates that the route entry is active, meaning that the path is available.
G (Gateway): Indicates that the specified route target is a gateway (i.e., the next hop address), rather than a directly connected target host.
H (Host): Indicates that the target address is a host (a single IP address), rather than a subnet.
D (Dynamic): Indicates that the route is dynamically generated, usually added to the routing table by some routing protocol.
M (Modified): This flag is usually used with D, indicating that the route has been modified for some reason.
L (Link): Indicates that the route is a local interface (loopback) address, typically used for local loopback testing.
A (AnyCast): Indicates that the route is an anycast address, where multiple targets have the same IP address.
R (Reject): Indicates that the route entry is rejected, and packets will be discarded and not forwarded.
! (Blackhole): Similar to the R flag, indicates that the route entry is a blackhole route, and packets are silently discarded.
d (Dynamic Interface): Indicates that the route entry is associated with a dynamic interface, usually obtained via DHCP or SLAAC.
C (Cache): Indicates that the route entry was dynamically learned by sending packets and then cached.
S (Static): Indicates that the route is statically added, rather than learned through a dynamic routing protocol.
Metric
The routing distance, which is the number of hops required to reach the specified network, is necessary for setting up large local area networks and wide area networks (not used in the Linux kernel); routes are matched first by the smallest number.
Ref
The reference count of the route entry (not used in the Linux kernel).
Use
The number of times this route entry has been looked up by the routing software.
Iface
The name of the network interface, such as eth0; it indicates which network interface is used to reach this subnet. That is, the eth0 network card, and the lo loopback route.
Common IPv6 Routing Table Operations
Set IPv6 Default Gateway:
ip -6 route add default via XXXXXXXX
This command sets the address following XXXX as the default gateway.
Set IPv6 Static Route:
ip -6 route add IPV6 address/mask via gateway address dev network interface name
IPv6 Route Tracing:
traceroute6 XXXXXXX
IPv6 Ping:
ping6 XXXXXXX
ping -6 XXXXXX
IPv6 Routing Table:
route -A inet6