Bug 319121

Summary: kernel: peth0: received packet with own address as source address
Product: Red Hat Enterprise Linux 5 Reporter: Shane Bradley <sbradley>
Component: xenAssignee: Herbert Xu <herbert.xu>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: jbastian, jwest, pbonzini, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=339
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-26 09:52:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch that was found on xensource
none
packet capture none

Description Shane Bradley 2007-10-04 19:38:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5) Gecko/20070718 Fedora/2.0.0.5-1.fc7 Firefox/2.0.0.5 pango-text

Description of problem:
ot@cluster2-2 ~]# tail /var/log/messages.1 | grep peth0
Sep 30 04:01:58 cluster2-2 kernel: peth0: received packet with  own address as source address
Sep 30 04:02:13 cluster2-2 kernel: peth0: received packet with  own address as source address
Sep 30 04:02:28 cluster2-2 kernel: peth0: received packet with  own address as source address

The above error message is sent. There is a fix that is on the xen website.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=339

I have tested the patch and it appears to work.
http://bugzilla.xensource.com/bugzilla/attachment.cgi?id=535&action=view

cd /etc/xen/scripts
wget http://bugzilla.xensource.com/bugzilla/attachment.cgi?id=535&action=view
patch <context.diff



Version-Release number of selected component (if applicable):
xen-libs-3.0.3-25.0.4.el5
kernel-xen-2.6.18-8.1.14.el5
xen-3.0.3-25.0.4.el5
kmod-gfs-xen-0.1.16-5.2.6.18_8.1.14.el5
xen-libs-3.0.3-25.0.3.el5, kmod-gfs-xen-0.1.16-5.2.6.18_8.1.14.el5,xen-3.0.3-25.0.4.el5,kernel-xen-2.6.18-8.1.14.el5,   

How reproducible:
Always


Steps to Reproduce:
1.Create two rhel5 domain-0 machines
2.Boot into rhel5 kernel-xen 
3.tail -f /var/log/messages | grep peth0

The way I recreated it is with a rhel5 cluster hosting xen images. I applied the above patch and it solved the issue.

Actual Results:
/dev/console will start getting this message sent to messages and console.



Expected Results:
Message is expected, but should not occur.

Additional info:

Comment 1 Shane Bradley 2007-10-04 19:39:36 UTC
Created attachment 216281 [details]
patch that was found on xensource

Comment 2 Jeff Bastian 2007-10-11 20:09:29 UTC
The patch looks like a step in the right direction, but it still requires some
manual effort from the sys admin.  If there are multiple dom0 systems on a
subnet, the sys admin must edit /etc/xen/scripts/network-bridge and make sure
$macid is unique for the subnet.  It would be nice if the network-bridge found a
unique MAC address automatically.

Comment 3 Daniel Berrangé 2007-10-11 20:25:33 UTC
This patch should not be neccessary. 

The way Xen networking is setup gives you 4 devices in dom0

  - peth0 - the physical device
  - xenbr0 - the bridge device
  - vif0.0 - a Xen virtual device
  - eth0   - a Xen virtual device

The Xen network scripts setup routing so that the default route is 'eth0'. peth0
and vif0.0 are in the bridge, and eth0 is connected to vif0.0. The guest NICs
are also connected to xenbr0.

All traffic going out from the dom0 host originates from 'eth0', which takes
over the MAC address of your real physical NIC. Thus it should not matter that
peth0 has a mac of FE:FF:FF:FF:FF:FF, because it is not the device from which
dom0 network traffic is being routed. 

So there's two possibilities

 - Your network config is screwed up
 - An application has explicitly set itself up to send packets from peth0,
instead of eth0.

As a first step attach the output of the following commands:

 - ifconfig -a
 - route -n
 - brctl show



Comment 4 Jeff Bastian 2007-10-11 21:18:10 UTC
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:13:72:F9:0F:3F  
          inet addr:10.10.1.135  Bcast:10.10.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:72ff:fef9:f3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:303 errors:0 dropped:0 overruns:0 frame:0
          TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:34863 (34.0 KiB)  TX bytes:16012 (15.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

peth0     Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:298 errors:0 dropped:0 overruns:0 frame:0
          TX packets:86 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:35434 (34.6 KiB)  TX bytes:16272 (15.8 KiB)
          Interrupt:16 Memory:f8000000-f8012100 

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

veth1     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

veth2     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

veth3     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

vif0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:89 errors:0 dropped:0 overruns:0 frame:0
          TX packets:303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16416 (16.0 KiB)  TX bytes:34863 (34.0 KiB)

vif0.1    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

vif0.2    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

vif0.3    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:8894 (8.6 KiB)

xenbr0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:264 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:30078 (29.3 KiB)  TX bytes:0 (0.0 b)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.1.0       0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         10.10.1.254     0.0.0.0         UG    0      0        0 eth0

# brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.000000000000       no
xenbr0          8000.feffffffffff       no              peth0
                                                        vif0.0



Comment 5 Herbert Xu 2007-10-12 13:13:59 UTC
The ifconfig output indicates that this is a regression of #216504 after the
merge to Xen 3.1.0 where we actually ended up losing the said patch even touhg
it's in upstream 3.1.0.

However the version number in the original report is before the merge.  Are you
two on the same machine?

For Jeff, please try the patch in #216504 and see if it helps (you'll need to
reboot after applying the patch).  If it doesn't, please post the ifconfig
output again.

Thanks,

Comment 7 Jeff Bastian 2007-10-12 15:26:53 UTC
BTW, I'm running the 20071011 nightly build of RHEL 5.1 Beta.  It has
xen-3.0.3-41.el5 on the system, and the /etc/xen/scripts/xen-network-common.sh
script did NOT have the patch applied to set the mtu to 68.

I applied the patch and rebooted, however, I'm still getting the errors.

Here is the latest ifconfig output:

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:13:72:F9:0F:3F  
          inet addr:10.10.1.135  Bcast:10.10.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:72ff:fef9:f3f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1151 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:122395 (119.5 KiB)  TX bytes:15860 (15.4 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

peth0     Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:1137 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:125587 (122.6 KiB)  TX bytes:15640 (15.2 KiB)
          Interrupt:16 Memory:f8000000-f8012100 

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

veth1     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

veth2     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

veth3     Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

vif0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:87 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1151 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:16264 (15.8 KiB)  TX bytes:122395 (119.5 KiB)

vif0.1    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

vif0.2    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

vif0.3    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:9306 (9.0 KiB)

xenbr0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:1110 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:105517 (103.0 KiB)  TX bytes:0 (0.0 b)

Comment 9 Herbert Xu 2007-10-12 15:34:46 UTC
Unfortunately as long as there is at least one buggy box on the network you'll
get the error.  So you need to patch every box on the broadcast LAN to have an
effect :)

Also, the patch in #216504 only fixes half of the bogus packets.  The same thing
needs to be done on peth0 to completely stop the bogus packets.  I'll send an
updated patch.

Comment 11 Herbert Xu 2007-10-15 13:48:11 UTC
Correction, we don't get bogus packets from peth0 either due to a kernel patch
from Xen.  Could you please do a tcpdump on the box that's seeing the bogus
packets to find out what they are?

The packets would be coming from a different box.  Unfortunately it won't be
trivial to find out which box they're coming from as they all have the same
source address :)

Comment 12 Jeff Bastian 2007-10-23 17:22:45 UTC
Created attachment 235281 [details]
packet capture

Attached is a packet capture from peth0 on the machine.  There's not a lot of
network activity, but one machine is continually arp'ing for an IP address
that's not on the system's subnet...  There must be another machine in the lab
that's not configured correctly.

Comment 13 Herbert Xu 2007-10-24 05:39:24 UTC
OK so it's not even IPv6.  Yes that does look like a misconfigured box.  So the
solution here is to find it and fix it :)

Changing the MAC on this box would just be a work-around since the misconfigured
box could eventually get the same upgrade and might still end up with the same
address anyway.

Thanks.

Comment 14 Paolo Bonzini 2011-05-18 16:26:34 UTC

*** This bug has been marked as a duplicate of bug 509789 ***