All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
IPv6 strange problem with source address selection
Trying to get IPv6 running on a Qemu VLAN. Rather new to IPv6. There are two VMs on this VLAN and it is not used for anything else. IPv4 works fine, on the VLAN.
Added fd00::1/64 and fd00::2/64 as addresses to interface eth1 (one on each machine). Eth1 is the VLAN.
Added both MAC addresses to each machine manually using ip -6 neigh. It shows correctly when running ip -6 neigh.
Now I ping6 fd00::1/64 from the ::2 machine.
Strangely, ::1 is selected as the source address!
ip addrlabel
has an entry prefix fc00::/7 label 5
. It also has prefix ::1/128 label 0
as the first entry.
Tried changing the fc00::/7
entry to add dev eth1
, but still ::1 is selected as the source address.
I don't get how ::1 could win, as ::1 is a Scope:Host address and the fd00::/64 subnets are Scope:Global.
Any ideas on how to troubleshoot this?
Comments
Aaaaah, solved. Adding the addresses with the
nodad
option makes ping work. But bgpd isn't happy about things yet.Update: Just fixed bgpd config. Now finally dual-stack bgpd working.
Boy, they really made a mess of IPv6, didn't they o_O ...
"They"? It's you who seem to overcomplicate this. Why "add MAC addresses manually with ip -6 neigh", usually you just add an IP on an interface with a correct netmask, and it works. If not, then your network is not operating correctly on L2 (bridging/multicast/etc).
Because for some reason they eliminated ARP, and I wasn't clear to me how else one node is going to know the MAC for the other.
Edit: I realized of course that one is supposed to run a daemon of some kind (radvd?) but I didn't want to do that because you just shouldn't need something DHCP-like for a network of two VMs.
MAC addresses are learnt via ipv6 neighbor discovery. radvd is only needed if you want to autoconfigure ipv6 addresses. If you are going to manually give ipv6 addresses there is no need for radvd.
By the way i suggest you go here - https://ipv6.he.net/certification/ and register. Then try to take the tests. You will even get a nice free t-shirt if you complete all the tests.
That's true ... I just ran a test with the
ip -6 neigh
steps commented out and everything works fine. But apparently one still needs to usenodad
when adding the addresses, otherwise things do not work fine at all.So the
ip -6 neigh
thing was just the first thing that came to mind, and indeed not an accurate guess as to what might be wrong.Added to list of things to do "soon".
DAD is "duplicate address detection". Are you sure you aren't trying to add the same IP on both machines somewhere?
Maybe just post all of these steps that you do to set up the networking.
Yes, they were unique (::1 vs ::2). The addrs showed as
tentative
dadfailed
inip -6 addr
, which gave me the idea to trynodad
.Well, it's working now, but if you are curious, or have advice on improving things so it works without
nodad
, here is the networking-related stuff being run:1) boot ubuntu livecd 15.04 amd64 in each qemu. qemus share a vlan with distinct assigned mac to each. the vlan is not connected to anything else. each VM has its own separate -net user stack as well to be able to install packages.
2) press try ubuntu button
3) open terminal, the following steps done by a script on a squashfs:
4)
killall -w NetworkManager
5)
killall -w dnsmasq
6) put
nameserver 8.8.8.8
in/etc/resolv.conf
7)
dhclient on eth0 &
(eth0 is the non-vlan -net user interface to get normal Internet, this gets 10.0.2.15/255.255.255.0 as per Qemu default)8)
sysctl -w net.ipv6.conf.eth1.disable_ipv6=0
9)
ip -6 addr add fc00::1/64 dev eth1 nodad
(or ::2 for the second VM)A)
ifconfig eth1 10.1.0.1 netmask 255.255.0.0
(or .2 for the second VM)