doc:appunti:net:ipv6_on_ppp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:net:ipv6_on_ppp [2024/07/05 11:11] – [Configuring hosts in the LAN] niccolo | doc:appunti:net:ipv6_on_ppp [2024/07/05 15:37] (current) – [Troubleshooting IPv6 problems] niccolo | ||
---|---|---|---|
Line 546: | Line 546: | ||
To give a **persistent addresses** to the client, take note of the DUID received by the server and put it into a **host** section of the server configuration **dhcp6s.conf** (see above). The DUID is composed of a 64 bit random string and the MAC address of the client' | To give a **persistent addresses** to the client, take note of the DUID received by the server and put it into a **host** section of the server configuration **dhcp6s.conf** (see above). The DUID is composed of a 64 bit random string and the MAC address of the client' | ||
- | |||
- | **WARNING**: | ||
- | |||
- | < | ||
- | IP6 fe80:: | ||
- | IP6 fe80:: | ||
- | 2a01: | ||
- | </ | ||
- | |||
- | So the default gateway on the client is OK (check it with **ip -6 route show**), but the source address is set to the **link scope** address instead of the **global** one. | ||
- | |||
- | FIXME How to solve? | ||
FIXME: What to do to protect LAN hosts from the internet? | FIXME: What to do to protect LAN hosts from the internet? | ||
Line 587: | Line 575: | ||
^ FF02:: | ^ FF02:: | ||
^ FF02:: | ^ FF02:: | ||
+ | |||
+ | |||
+ | ===== Troubleshooting IPv6 problems ===== | ||
+ | |||
+ | In general, to troubleshoot any networking issue, you use the **ping** command to check if the remote address is responding: | ||
+ | |||
+ | < | ||
+ | # ping -6 2a01: | ||
+ | </ | ||
+ | |||
+ | In some cases it is useful also to **ping your own addresses** (you can have more than one). Discover all of them with: | ||
+ | |||
+ | < | ||
+ | # ip -6 address show dev enp0s7 | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | 2: enp0s7: < | ||
+ | inet6 2a02: | ||
+ | | ||
+ | inet6 2a02: | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
+ | </ | ||
+ | |||
+ | In the example above the interface have two **global** scope addresses, one assigned via DHCPv6 and the other obtained via SLAAC. The first one has the **dadfailed** flag, which means that the **duplicate address detection** has detected a conflict in the network. This means that the IP address in question will not be used as the source address and it does not even respond to a self-ping. | ||
+ | |||
+ | If you have only one global IP address which is **dadfailed**, | ||
+ | |||
+ | < | ||
+ | # ip -6 route show | ||
+ | 2a02: | ||
+ | 2a02: | ||
+ | fe80::/64 dev enp0s7 proto kernel metric 256 pref medium | ||
+ | default via fe80:: | ||
+ | </ | ||
+ | |||
+ | **NOTICE**: The default router can be reached via its **link** scope address (as seen above) or via its **global** scope address: both can be used. | ||
+ | |||
+ | If you sniff the ping request on the router, you can see the problem more clearly: | ||
+ | |||
+ | < | ||
+ | # tcpdump -i eth0 -n ' | ||
+ | ... | ||
+ | IP6 fe80:: | ||
+ | id 56698, seq 1, length 64 | ||
+ | IP6 fe80:: | ||
+ | beyond scope 2a01: | ||
+ | </ | ||
+ | |||
+ | The client uses its link scope address as source address, which causes the **beyond scope** error. You can confirm this problem on the client using the '' | ||
+ | |||
+ | |||
+ | < | ||
+ | # ip -6 route get 2a01: | ||
+ | 2a01: | ||
+ | via 2a02: | ||
+ | dev enp0s7 | ||
+ | src fe80:: | ||
+ | metric 1024 pref medium | ||
+ | </ | ||
+ | |||
+ | You can compare the result when you have at least one working global IP address: | ||
+ | |||
+ | < | ||
+ | # ip -6 route get 2a01: | ||
+ | 2a01: | ||
+ | via fe80:: | ||
+ | dev enp0s7 proto ra | ||
+ | src 2a02: | ||
+ | metric 1024 hoplimit 64 pref medium | ||
+ | </ | ||
+ | |||
+ | In the first case the **src** address is the **link scope** one, not suitable for routing. In the second case it is the one received via SLAAC, which has a **global scope** and indeed it is working. Notice that the address of the router (shown as the **via** address) is not releveant, even the //link scope// one does work. | ||
+ | |||
===== Web References ===== | ===== Web References ===== |
doc/appunti/net/ipv6_on_ppp.1720170719.txt.gz · Last modified: 2024/07/05 11:11 by niccolo