wlan0 picks up address intended for ppp0 at startup.
When my machine boots the last line in the stanza for my wireless
interface has:
up pppd call vpn
This all works beautifully with ipv4 but with IPv6 I have an oddity:
This is what is configured at boot:
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.4.2 P-t-P:192.168.4.1 Mask:255.255.255.255
inet6 addr: fe80::d442:531e:9cb0:3167/10 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:18925 errors:1 dropped:0 overruns:0 frame:0
TX packets:75470 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1574788 (1.5 MiB) TX bytes:109438726 (104.3 MiB)
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.3.4 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: 2001:8b0:bfcd:1000:xxxx:xxff:fexx:xxxx/64 Scope:Global
inet6 addr: 2001:8b0:bfcd:3:xxxx:xxff:fexx:xxxx/64 Scope:Global
inet6 addr: fe80::xxxx:xxff:fexx:xxxx/64 Scope:Link
inet6 addr: 2001:8b0:bfcd:1000:157:3c5d:93d9:6eb3/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51678 errors:0 dropped:0 overruns:0 frame:0
TX packets:83340 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5144162 (4.9 MiB) TX bytes:120327429 (114.7 MiB)
This is mostly right except that I don't understand why the
2001:8b0:bfcd:1000::/64 addresses have gone on wlan0
This is the radvd stanza for ppp0:
interface ppp0
{
IgnoreIfMissing on;
UnicastOnly on;
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
prefix 2001:8b0:bfcd:1000::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
If I remove that then this /64 is (as expected) not setup and the wlan0
interface just has 2001:8b0:bfcd:3::/64 addresses.
If I take down wlan0 and bring it up again then things look better:
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.4.2 P-t-P:192.168.4.1 Mask:255.255.255.255
inet6 addr: 2001:8b0:bfcd:1000:9fe:d3a5:7d1:e809/64 Scope:Global
inet6 addr: fe80::9fe:d3a5:7d1:e809/10 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:11 errors:1 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:428 (428.0 B) TX bytes:154 (154.0 B)
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.3.4 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: 2001:8b0:bfcd:3:xxxx:xxff:fexx:xxxx/64 Scope:Global
inet6 addr: fe80::xxxx:xxff:fexx:xxxx/64 Scope:Link
inet6 addr: 2001:8b0:bfcd:3:6893:c666:efe6:c14c/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9197 (8.9 KiB) TX bytes:9387 (9.1 KiB)
But I still get an oddity that I don't understand:
# ping6 einstein -I ppp0 -c 1
PING einstein(einstein.home.woodall.me.uk) from 2001:8b0:bfcd:3:6893:c666:efe6:c14c ppp0: 56 data bytes
64 bytes from einstein.home.woodall.me.uk: icmp_seq=1 ttl=63 time=1.30 ms
why has it picked the address on wlan0 for the send instead of the one
on ppp0?
# ip -6 addrlabel
prefix ::1/128 label 0
prefix ::/96 label 3
prefix ::ffff:0.0.0.0/96 label 4
prefix 2001::/32 label 6
prefix 2001:10::/28 label 7
prefix 2002::/16 label 2
prefix fc00::/7 label 5
prefix ::/0 label 1
There's nothing there that seems to favour one over the other so I'd
assume it would pick one on the interface.
(changing the ppp0 /64 to ...:1:... instead of ...:1000:... and it still
picks the wlan0 interface - so it doesn't appear to be picking the
lowest numbered address)
I'm very new to ipv6 so I might be doing something very silly and in a
very convoluted way. One thing in particular that I haven't yet worked
out how to do is to assign the ppp address based on the login. For ipv4
I do that in chap-secrets but for ipv6 it seems tied to the ppp
interface on the server and so I've configured through radvd.
If any global IP can be selected for any interface then I might do
better only having ipv6 on the ppp interface if there's no ipv6 on the
wlan interface.
Once I understand this properly I can start thinking about how to
reconstruct my network and firewall rules to work with ipv6 instead of
ipv4.
Tim.
--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.
http://www.woodall.me.uk/
Reply to: