ARP problems in -testing?
I'm seeing something rather unusual that I thought might be an ARP problem, but further testing appears to have ruled that out.
Scenario: slave domains with random ARP addresses. On a fresh start of a domain, it is unreachable from outside. Pinging from Domain 0 to the slave domain work fine, but changes nothing.
Here's the interesting part: pinging from the slave domain to any external host, including Domain 0, also works... and immediately 'unsticks' the net connection, so that everything works as I expect it to.
This seems to happen with or without my firewalling rules. (I disable the antispoof section of the 'network' script, so that the firewall rules there don't interfere with mine.)
My initial theory was that it's an ARP problem. I thought the outbound packet was being bridged properly to the outside world, the router saw the arp address, and started working. But this does not appear to be correct. If I add a secondary IP to the eth0 inside the virtual domain, I do indeed see arp requests and arp replies.
When it is in 'stuck' mode, running a tcpdump from the SLAVE domain shows the echo requests arriving: [ips changed to protect the morally questionable]:
16:36:54.694003 IP 24.0.0.10 > 69.0.0.76: icmp 40: echo request seq 2344
But there are no replies issued. After I ping the outside world, which instantly 'wakes up' the connection:
16:38:57.212284 IP 24.0.0.10 > 69.0.0.76: icmp 40: echo request seq 11816 16:38:57.212314 IP 69.0.0.76 > 24.0.0.10: icmp 40: echo reply seq 11816
This is from a brand-new download today, btw.
I am really mystified. Any suggestions?
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 5 lines · Ron Watkins
I'm seeing something rather unusual that I thought might be an ARP problem, but further testing appears to have ruled that out.
Scenario: slave domains with random ARP addresses. On a fresh start of a domain, it is unreachable from outside. Pinging from Domain 0 to the slave domain work fine, but changes nothing.
Here's the interesting part: pinging from the slave domain to any external host, including Domain 0, also works... and immediately 'unsticks' the net connection, so that everything works as I expect it to.
I'm experiencing this problem too... The workaround I'm using is to include a "ping -c2 some_outside_IP" inside the init scripts of the slave xenU domain, and it works, but it's an ugly hack.
Quoted 3 lines
This seems to happen with or without my firewalling rules. (I disable the antispoof section of the 'network' script, so that the firewall rules there don't interfere with mine.)
My initial theory was that it's an ARP problem. I thought the outbound packet was being bridged properly to the outside world, the router saw the arp address, and started working. But this does not appear to be correct. If I add a secondary IP to the eth0 inside the virtual domain, I do indeed see arp requests and arp replies.
I don't know what the problem is, but running tcpdump inside the slave U domain, shows that packets are received by then xenU kernel, but no packets are sent back from the xenU kernel in response. Weird. However, pinging some external host from the xenU domain, seems to resolve this misterious problem.
Quoted 10 lines
When it is in 'stuck' mode, running a tcpdump from the SLAVE domain shows the echo requests arriving: [ips changed to protect the morally questionable]:
16:36:54.694003 IP 24.0.0.10 > 69.0.0.76: icmp 40: echo request seq 2344
But there are no replies issued. After I ping the outside world, which instantly 'wakes up' the connection:
16:38:57.212284 IP 24.0.0.10 > 69.0.0.76: icmp 40: echo request seq 11816 16:38:57.212314 IP 69.0.0.76 > 24.0.0.10: icmp 40: echo reply seq 11816
This is from a brand-new download today, btw.
Yep! I run bk pull every day or so from xeno-unstable.
Quoted 1 line
I am really mystified. Any suggestions?
It seems we are having the same problems :-)
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Yep, that is precisely what I am seeing, and I was considering doing the exact same workaround. Glad it's not just me!
Next question is, why isn't this happening to everyone? What kind of hardware are you running? Mine is colocated and I don't own it, so I can't just look at the manuals. I'm running the e100 driver, and I'll paste the output from lspci at the end of the message.
<<RON>>
lspci output:
0000:00:00.0 Host bridge: Intel Corp. 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02) 0000:00:02.0 VGA compatible controller: Intel Corp. 82865G Integrated Graphics Device (rev 02) 0000:00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1 (rev 02) 0000:00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2 (rev 02) 0000:00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02) 0000:00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #4 (rev 02) 0000:00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) 0000:00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Bridge (rev 02) 0000:00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) Serial ATA 150 Storage Controller (rev 02) 0000:00:1f.3 SMBus: Intel Corp. 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02) 0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02) 0000:01:08.0 Ethernet controller: Intel Corp. 82562EZ 10/100 Ethernet Controller (rev 02)
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 1 line · Ron Watkins
Next question is, why isn't this happening to everyone?
What MAC address have you assigned to the domU's interface? Isn't it something reserved for broadcasts?
-jkt
Signature · 8 lines
cd /local/pub && more beer > /dev/mouth ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 7 lines
Quoted 1 line · Ron Watkins
Next question is, why isn't this happening to everyone?
What MAC address have you assigned to the domU's interface? Isn't it something reserved for broadcasts?
-jkt
The MAC addresses from the tcpdump log look sane. The problem must lie elsewhere.
-- Keir
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 2 lines · Keir Fraser
The MAC addresses from the tcpdump log look sane. The problem must lie elsewhere.
I just tried this on a dedicated server located at thePlanet in Texas; I think this is an issue that combines the following:
- No MAC address specified causes a random MAC address to be selected
at domain create time
- The upstream router has a local ARP cache
- The host system's ARP cache for addresses on the virtual NIC for
the instance is blown out when the virtual interface disappears when the domain is destroyed
This seems to explain why tcpdump shows packets going to the VM's IP, but TCP sessions and ICMP packets don't get a response - the switch still knows the "old" MAC address, but the first outbound packet to the outside world implicitly eradicates the old ARP-cache entry. I don't think this is Xen's fault at all, just a property of the implementation of ARP resolution. I just happened to notice that the MAC shown in incoming packets didn't match the current MAC address (based on ifconfig's output), so this is my current theory on what's happening.
Signature · 8 lines
Derrik Pates [email protected] ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 8 lines · Derrik Pates
Quoted 2 lines · Keir Fraser
The MAC addresses from the tcpdump log look sane. The problem must lie elsewhere.
I just tried this on a dedicated server located at thePlanet in Texas; I think this is an issue that combines the following:
- No MAC address specified causes a random MAC address to be
selected at domain create time
Well, I can confirm this was the culprit of my problems: Xen was selecting random MAC addresses at startup. I have fixed the problem by manually and statically setting a predefined MAC address in the domain config file:
vif = [ 'mac=XX:XX:XX:XX:XX:XX' ]
Now, the MAC address is always the same and thus I don't need the ugly ping hack. Thanks.
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 10 lines
Quoted 4 lines
I just tried this on a dedicated server located at thePlanet in Texas; I think this is an issue that combines the following:
- No MAC address specified causes a random MAC address to be selected at
domain create timeWell, I can confirm this was the culprit of my problems: Xen was selecting random MAC addresses at startup. I have fixed the problem by manually and statically setting a predefined MAC address in the domain config file:
vif = [ 'mac=XX:XX:XX:XX:XX:XX' ]
Now, the MAC address is always the same and thus I don't need the ugly ping hack.
this is good, but if I start multiple domains, like this
xm create vm4-bproc vmid=1
xm create vm4-bproc vmid=2
xm create vm4-bproc vmid=3
xm create vm4-bproc vmid=4
then I'll end up with 4 copies of the same mac. Is there some way to tie mac generation to vmid ?
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 15 lines
Quoted 9 lines
Quoted 2 lines · Keir Fraser
The MAC addresses from the tcpdump log look sane. The problem must lie elsewhere.
I just tried this on a dedicated server located at thePlanet in Texas; I think this is an issue that combines the following:
- No MAC address specified causes a random MAC address to be
selected at domain create timeWell, I can confirm this was the culprit of my problems: Xen was selecting random MAC addresses at startup. I have fixed the problem by manually and statically setting a predefined MAC address in the domain config file:
Quoted 5 lines
vif = [ 'mac=XX:XX:XX:XX:XX:XX' ]
Now, the MAC address is always the same and thus I don't need the ugly ping hack.
Thanks.
I've fixed the netfront driver to send an unsolicited ARP reply whenever an IP address gets brought up on it. This fix is in the -testing and -unstable trees, and will end up in the forthcoming 2.0.4 stable release.
Perhaps someone could build the repository, return to using random MAC addresses, and confirm that the problem has gone away?
Thanks,
Keir
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 11 lines · Keir Fraser
Quoted 10 lines
Well, I can confirm this was the culprit of my problems: Xen was selecting random MAC addresses at startup. I have fixed the problem by manually and statically setting a predefined MAC address in the domain config file:
vif = [ 'mac=XX:XX:XX:XX:XX:XX' ]
Now, the MAC address is always the same and thus I don't need the ugly ping hack.
Thanks.
Quoted 7 lines
I've fixed the netfront driver to send an unsolicited ARP reply whenever an IP address gets brought up on it. This fix is in the -testing and -unstable trees, and will end up in the forthcoming 2.0.4 stable release.
Perhaps someone could build the repository, return to using random MAC addresses, and confirm that the problem has gone away?
I will be away for 8 hours, but will test those changes ASAP... Thanks!
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
I. Am. An. Idiot.
Thanks, Derrick.
<<RON>>
----- Original Message ----- From: "Derrik Pates" <[email protected]>
To: "Keir Fraser" <[email protected]>
Cc: "Jan Kundrát" <[email protected]>; "Ron Watkins" <[email protected]>; <[email protected]>
Sent: Sunday, January 16, 2005 7:27 PM
Subject: Re: [Xen-devel] ARP problems in -testing?
Quoted 6 lines
Quoted 2 lines · Keir Fraser
The MAC addresses from the tcpdump log look sane. The problem must lie elsewhere.
I just tried this on a dedicated server located at thePlanet in Texas; I think this is an issue that combines the following:
Quoted 22 lines
- No MAC address specified causes a random MAC address to be selected at
domain create time
- The upstream router has a local ARP cache
- The host system's ARP cache for addresses on the virtual NIC for the
instance is blown out when the virtual interface disappears when the domain is destroyedThis seems to explain why tcpdump shows packets going to the VM's IP, but TCP sessions and ICMP packets don't get a response - the switch still knows the "old" MAC address, but the first outbound packet to the outside world implicitly eradicates the old ARP-cache entry. I don't think this is Xen's fault at all, just a property of the implementation of ARP resolution. I just happened to notice that the MAC shown in incoming packets didn't match the current MAC address (based on ifconfig's output), so this is my current theory on what's happening.
Signature · 12 lines
Derrik Pates [email protected] ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Xen-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 10 lines
I just tried this on a dedicated server located at thePlanet in Texas; I think this is an issue that combines the following:
- No MAC address specified causes a random MAC address to be selected at
domain create time
- The upstream router has a local ARP cache
- The host system's ARP cache for addresses on the virtual NIC for the
instance is blown out when the virtual interface disappears when the domain is destroyed
Quoted 8 lines
This seems to explain why tcpdump shows packets going to the VM's IP, but TCP sessions and ICMP packets don't get a response - the switch still knows the "old" MAC address, but the first outbound packet to the outside world implicitly eradicates the old ARP-cache entry. I don't think this is Xen's fault at all, just a property of the implementation of ARP resolution. I just happened to notice that the MAC shown in incoming packets didn't match the current MAC address (based on ifconfig's output), so this is my current theory on what's happening.
Thanks for the detailed answer -- I've added it to the Xen FAQ
(http://www.cl.cam.ac.uk/netos/xen/faq.html). I guessed it would probably be something like this...
Cheers,
Keir
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 4 lines · Jan Kundrát
Quoted 1 line · Ron Watkins
Next question is, why isn't this happening to everyone?
What MAC address have you assigned to the domU's interface? Isn't it something reserved for broadcasts?
Don't know how to change that...
However, I see the xenU kernel is invoked with a somewhat funny command line:
# cat /proc/cmdline ip=192.168.0.130:1.2.3.4::::eth0:off root=/dev/sda1 ro
Here's the xenU config file:
kernel = "/boot/vmlinuz-2.6.10-xenU"
memory = 100
name = "Debian"
nics = 1
ip = "192.168.0.130"
disk = [ 'file:/path/to/file,sda1,w' ]
root = "/dev/sda1 ro
Where's 1.2.3.4 coming from?
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Quoted 1 line · Ron Watkins
Next question is, why isn't this happening to everyone? What kind of hardware are you running? Mine is colocated and I don't own it, so I can't just look at the manuals. I'm running the e100 driver, and I'll paste the output from lspci at the end of the message.
I'm running Xen unstable on a Pentium IV with a 3Com 3c59x (eth0) and a Realtek RTL8139 (eth1). I have configured Xen to attach xen-br0 to interface eth1.
# /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:04:75:75:97:65
inet addr:192.168.0.2 Bcast:192.168.0.127
Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:524791 errors:0 dropped:0 overruns:0 frame:0
TX packets:311542 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:705155122 (672.4 MiB) TX bytes:22699822 (21.6 MiB)
Interrupt:20 Base address:0xa400eth1 Link encap:Ethernet HWaddr 00:02:44:7B:B9:53
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1548286 errors:0 dropped:0 overruns:0 frame:0
TX packets:768111 errors:0 dropped:0 overruns:0 carrier:0
collisions:14416 txqueuelen:1000
RX bytes:1242525048 (1.1 GiB) TX bytes:408321930 (389.4 MiB)
Interrupt:18lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1028 errors:0 dropped:0 overruns:0 frame:0 TX packets:1028 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0
RX bytes:105464 (102.9 KiB) TX bytes:105464 (102.9 KiB)
vif1.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:768111 errors:0 dropped:0 overruns:0 frame:0
TX packets:726411 errors:0 dropped:116 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:406930344 (388.0 MiB) TX bytes:515444106 (491.5 MiB)xen-br0 Link encap:Ethernet HWaddr 00:02:44:7B:B9:53
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:106 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0
RX bytes:4858 (4.7 KiB) TX bytes:0 (0.0 b)
# lspci 00:00.0 Host bridge: Intel Corp. 82845 845 (Brookdale) Chipset Host Bridge (rev 11) 00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 05) 00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 05) 00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 05) 00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 05) 00:1f.5 Multimedia audio controller: Intel Corp. 82801BA/BAM AC'97 Audio (rev 05) 01:01.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE] 02:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 02:0c.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 30)
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt