[SLOF] [PATCH 0/6] net-snk: More IPv6 fixes and improvements
Alexey Kardashevskiy
aik at ozlabs.ru
Fri Jan 15 15:55:26 AEDT 2016
On 01/14/2016 08:21 PM, Thomas Huth wrote:
> On 14.01.2016 09:18, Alexey Kardashevskiy wrote:
> [...]
>> For my tests I have a virtual bridge which is not connected anywhere,
>> and 3 guests:
>>
>> 1. "dhcpv6" guest, fc23, one interface, attached to bridge#1, static IP
>> (fd00:4149:4b00::1), running dmasq with DHCP on and TFTP off, with RA
>> and everything.
>>
>> 2. "tftp" guest, fc23, two interfaces - one is attached to bridge#1 and
>> received IPv6 via DHCP (fd00:4149:4b00::bc), another interface is not
>> attached anywhere and has a static IP (d00:4149:4b01::1); this guest is
>> also running dnsmasq but DHCP is off there and TFTP is on.
>>
>> 3. test guest to boot via IPv6 (so - only SLOF, no disk image or
>> initramdisk), one interface, attached to the same bridge, it gets IP
>> over DHCP (fd00:4149:4b00:0:c041:49ff:fe4b:5 - which is quite weird but
>> ok) and it receives TFTP image name via dhcp6 and tries downloading it
>> but fails.
>> dnsmasq.conf:
>> dhcp-option=option6:59,tftp://[fd00:4149:4b01::1]/image.aiktest0
>>
>>
>> If I move TFTP from 2 to 1 (i.e. from fd00:4149:4b01::1 to
>> fd00:4149:4b00::1), then SLOF can download the image and boot.
>>
>> I tried pinging fd00:4149:4b01::1 from guest#3 (booted it from a disk
>> image, received fd00:4149:4b00::bd from dhcp), it worked so routing
>> works fine (I added a route and enabled forwarding on guest#1).
>
> Sounds like all guests are connected to the same network (bridge 1)? So
> I think no routing is involved here at all, just the TFTP server is
> different from the DHCPv6 server? Something like this:
>
> +------+ +--------+
> | | +---------+ | |
> | SLOF +---------+ bridge1 +----------+ DHCPv6 |
> | | +----+----+ | &radvd |
> +------+ | +--------+
> |
> +------+----+
> | |
> | TFTP |
> | |
> +-----------+
>
> For testing routing, I think you'd rather need to set up routing on the
> radvd server for example:
>
> +------+ +--------+
> | | +---------+ | |
> | SLOF +---------+ bridge1 +----------+ DHCPv6 |
> | | +----+----+ | |
> +------+ | +--------+
> |
> +------+-----+ +-------+
> | | | |
> | radvd +----+ TFTP |
> | | | |
> +------------+ +-------+
Yeah, realized it after I send my mail :-/
>
>
> Anyway, can you download a file via TFTP from 2 when 3 is booted into
> Linux (using a normal TFTP client program)? ... just to make sure that
> TFTP really works from 2 and is not blocked by a firewall on 2 or
> something similar.
>
>> It seems that SLOF just fails to use the default route. The code is
>> there, just needs some debugging...
>
> Could you either use wireshark on 1 and 2 to log the network traffic, or
> try the new filter-dump [1] on 3 to get a dump with the packets from
> SLOF? ... then we could see whether SLOF gets the destination MAC
> addresses right when sending packets to the TFTP server.
>
> Thomas
>
> [1] See http://comments.gmane.org/gmane.comp.emulators.qemu/368614 for
> an example how to use it.
New config! All guests are cloned from the same image and have "dyn45"
name, ignore this :)
1. guest#1 - bridges br0, br1, br2 (br0 is for management, ipv4, can be
ignored here).
-netdev bridge,id=id3,br=br0,helper=/home/aik/qemu-bridge-helper \
-device virtio-net-pci,id=id4,netdev=id3,mac=C0:41:49:4b:00:00 \
-netdev bridge,id=id5,br=br1,helper=/home/aik/qemu-bridge-helper \
-device virtio-net-pci,id=id6,netdev=id5,mac=C0:41:49:4b:00:3c \
-netdev bridge,id=id7,br=br2,helper=/home/aik/qemu-bridge-helper \
-device virtio-net-pci,id=id8,netdev=id7,mac=C0:41:49:4b:00:3d \
enp0s0: 10.61.191.0 -< management, ignore.
enp0s1: fd00:4149:4b01::1/static <- DHCPv6 + TFTPv6 are running here
fe80::c241:49ff:fe4b:3c <- autogenerated address
enp0s2: fd00:4149:4b02::1/static
fe80::c241:49ff:fe4b:3d <- autogenerated address
[root at dyn45 ~]# ip -6 route
fd00:4149:4b01::/64 dev enp0s1 proto kernel metric 256 pref medium
fd00:4149:4b02::/64 dev enp0s2 proto kernel metric 256 pref medium
fe80::/64 dev enp0s0 proto kernel metric 256 pref medium
fe80::/64 dev enp0s1 proto kernel metric 256 pref medium
fe80::/64 dev enp0s2 proto kernel metric 256 pref medium
I also did:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
2. guest#2 - bridge br2:
-netdev bridge,id=id3,br=br2,helper=/home/aik/qemu-bridge-helper \
-device virtio-net-pci,id=id4,netdev=id3,mac=C0:41:49:4b:00:32
enp0s0: fd00:4149:4b02::2/static <- another TFTPv6 is here
[root at dyn45 ~]# ip -6 route
fd00:4149:4b01::/64 via fd00:4149:4b02::1 dev enp0s0 metric 1024 pref medium
fd00:4149:4b02::/64 dev enp0s0 proto kernel metric 256 pref medium
fe80::/64 dev enp0s0 proto kernel metric 256 pref medium
3. guest#3 - bridge br1:
-netdev bridge,id=id3,br=br1,helper=/home/aik/qemu-bridge-helper \
-device virtio-net-pci,id=id4,netdev=id3,mac=C0:41:49:4b:00:05 \
When running Fedora:
enp0s0: fe80::c241:49ff:fe4b:5 <- autogenerated address
fd00:4149:4b01::bc <- assigned by DHCP
I hope this is correct now.
==============================================
Now to the tests.
Guest#3 with Fedora23:
Received fd00:4149:4b01::bc from DHCPv6 and downloaded the image from both
tftp servers; below are examples of downloading from guest#2 (once) and
guest#1 (twice, using both interfaces):
[root at dyn45 ~]# tftp -v6 fd00:4149:4b02::2 -c get /image.aiktest0
Connected to fd00:4149:4b02::2 (fd00:4149:4b02::2), port 69
getting from fd00:4149:4b02::2:/image.aiktest0 to image.aiktest0 [netascii]
Received 8672165 bytes in 7.8 seconds [8884095 bit/s]
[root at dyn45 ~]# tftp -v6 fd00:4149:4b02::1 -c get /image.aiktest0
Connected to fd00:4149:4b02::1 (fd00:4149:4b02::1), port 69
getting from fd00:4149:4b02::1:/image.aiktest0 to image.aiktest0 [netascii]
Received 8672165 bytes in 3.5 seconds [19733977 bit/s]
[root at dyn45 ~]# tftp -v6 fd00:4149:4b01::1 -c get /image.aiktest0
Connected to fd00:4149:4b01::1 (fd00:4149:4b01::1), port 69
getting from fd00:4149:4b01::1:/image.aiktest0 to image.aiktest0 [netascii]
Received 8672165 bytes in 3.7 seconds [18775644 bit/s]
[root at dyn45 ~]# ip -6 route
fd00:4149:4b01::bc dev enp0s0 proto kernel metric 256 expires 3549sec
pref medium
fd00:4149:4b01::/64 dev enp0s0 proto ra metric 100 pref medium
fe80::/64 dev enp0s0 proto kernel metric 256 pref medium
default via fe80::c241:49ff:fe4b:3c dev enp0s0 proto static metric
100pref medium
Guest#3 with SLOF:
0 > load net:ipv6,fd00:4149:4b01::1,image.aiktest0,fd00:4149:4b01::bc
Trying to load: from:
/pci at 800000020000000/ethernet at 0:ipv6,fd00:4149:4b01::1,image.aiktest0,fd00:4149:4b01::bc
...
Initializing NIC
Reading MAC address from device: c0:41:49:4b:00:05
Using IPv6 address: fd00:4149:4b01::bc
Requesting file "image.aiktest0" via TFTP from fd00:4149:4b01::1
Receiving data: 8444 KBytes
TFTP: Received image.aiktest0 (8444 KBytes)
Successfully loaded
ok
0 > load net:ipv6,fd00:4149:4b02::2,image.aiktest0,fd00:4149:4b01::bc
Trying to load: from:
/pci at 800000020000000/ethernet at 0:ipv6,fd00:4149:4b02::2,image.aiktest0,fd00:4149:4b01::bc
...
Initializing NIC
Reading MAC address from device: c0:41:49:4b:00:05
Using IPv6 address: fd00:4149:4b01::bc
Requesting file "image.aiktest0" via TFTP from fd00:4149:4b02::2
Receiving data: 0 KBytes
E3015 (net) TFTP error occurred after missing 1 responses
E3407: Load failed
0 > load
net:ipv6,fd00:4149:4b02::2,image.aiktest0,fd00:4149:4b01::bc,fd00:4149:4b01::1
Trying to load: from:
/pci at 800000020000000/ethernet at 0:ipv6,fd00:4149:4b02::2,image.aiktest0,fd00:4149:4b01::bc,fd00:4149:4b01::1
...
Initializing NIC
Reading MAC address from device: c0:41:49:4b:00:05
Using IPv6 address: fd00:4149:4b01::bc
Requesting file "image.aiktest0" via TFTP from fd00:4149:4b02::2
Receiving data: 0 KBytes
E3015 (net) TFTP error occurred after missing 1 responses
E3407: Load failed
0 > load
net:ipv6,fd00:4149:4b02::2,image.aiktest0,fd00:4149:4b01::bc,fe80::c241:49ff:fe4b:3c
Trying to load: from:
/pci at 800000020000000/ethernet at 0:ipv6,fd00:4149:4b02::2,image.aiktest0,fd00:4149:4b01::bc,fe80::c241:49ff:fe4b:3c
...
Initializing NIC
Reading MAC address from device: c0:41:49:4b:00:05
Using IPv6 address: fd00:4149:4b01::bc
Requesting file "image.aiktest0" via TFTP from fd00:4149:4b02::2
Receiving data: 0 KBytes
E3015 (net) TFTP error occurred after missing 1 responses
E3407: Load failed
=======================================
SLOF can only reach fd00:4149:4b01::1 but not fd00:4149:4b02::2. In all
failed cases, "tcpdump host fd00:4149:4b01::bc" on guest#2 (TFTP) does not
show a thing and does show a lot when guest#2 running fedora is doing tftp.
This is what is happening in guest#1 when SLOF is trying fd00:4149:4b02::2:
[root at dyn45 ~]# tcpdump -npi enp0s1 host fd00:4149:4b01::bc
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s1, link-type EN10MB (Ethernet), capture size 262144 bytes
23:40:04.547454 IP6 fd00:4149:4b01::bc > ff02::2: ICMP6, router
solicitation, length 16
23:40:04.548020 IP6 fd00:4149:4b01::1 > fd00:4149:4b01::bc: ICMP6, router
advertisement, length 88
23:40:09.551749 IP6 fe80::c241:49ff:fe4b:3c > fd00:4149:4b01::bc: ICMP6,
neighbor solicitation, who has fd00:4149:4b01::bc, length 32
23:40:10.551748 IP6 fe80::c241:49ff:fe4b:3c > fd00:4149:4b01::bc: ICMP6,
neighbor solicitation, who has fd00:4149:4b01::bc, length 32
23:40:11.551745 IP6 fe80::c241:49ff:fe4b:3c > fd00:4149:4b01::bc: ICMP6,
neighbor solicitation, who has fd00:4149:4b01::bc, length 32
[and it stops here]
This is what is happening in guest#1 when SLOF is trying fd00:4149:4b01::1:
[root at dyn45 ~]# tcpdump -npi enp0s1 host fd00:4149:4b01::bc
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s1, link-type EN10MB (Ethernet), capture size 262144 bytes
23:45:29.569776 IP6 fd00:4149:4b01::bc > ff02::2: ICMP6, router
solicitation, length 16
23:45:29.570044 IP6 fd00:4149:4b01::bc > ff02::1:ff4b:3c: ICMP6, neighbor
solicitation, who has fe80::c241:49ff:fe4b:3c, length 32
23:45:29.570091 IP6 fe80::c241:49ff:fe4b:3c > fd00:4149:4b01::bc: ICMP6,
neighbor advertisement, tgt is fe80::c241:49ff:fe4b:3c, length 32
23:45:29.570414 IP6 fd00:4149:4b01::1 > fd00:4149:4b01::bc: ICMP6, router
advertisement, length 88
23:45:29.570702 IP6 fd00:4149:4b01::bc > fe80::c241:49ff:fe4b:3c: ICMP6,
neighbor advertisement, tgt is fd00:4149:4b01::bc, length 32
23:45:30.584160 IP6 fd00:4149:4b01::bc > ff02::1:ff00:1: ICMP6, neighbor
solicitation, who has fd00:4149:4b01::1, length 32
23:45:30.584179 IP6 fd00:4149:4b01::1 > fd00:4149:4b01::bc: ICMP6, neighbor
advertisement, tgt is fd00:4149:4b01::1, length 32
23:45:30.584603 IP6 fd00:4149:4b01::bc.wizard > fd00:4149:4b01::1.tftp: 36
RRQ "image.aiktest0" octet blksize 1428
23:45:30.584696 IP6 fd00:4149:4b01::1.39414 > fd00:4149:4b01::bc.wizard:
UDP, length 15
23:45:30.585198 IP6 fd00:4149:4b01::bc.wizard > fd00:4149:4b01::1.39414:
UDP, length 4
23:45:30.585237 IP6 fd00:4149:4b01::1.39414 > fd00:4149:4b01::bc.wizard:
UDP, length 1432
23:45:30.585657 IP6 fd00:4149:4b01::bc.wizard > fd00:4149:4b01::1.39414:
UDP, length 4
[and lot lot more]
--
Alexey
More information about the SLOF
mailing list