All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: ARP problems in -testing?
@ 2005-01-17 14:08 Tim Durack
  2005-01-17 14:12 ` Fwd: " Tim Durack
  0 siblings, 1 reply; 22+ messages in thread
From: Tim Durack @ 2005-01-17 14:08 UTC (permalink / raw)
  To: xen-devel

There are four types of MAC addresses:

Globally Unique
*0-**-**-**-**-**
*4-**-**-**-**-**
*8-**-**-**-**-**
*C-**-**-**-**-**

Locally Administered
*2-**-**-**-**-**
*6-**-**-**-**-**
*A-**-**-**-**-**
*E-**-**-**-**-**

Multicast
*1-**-**-**-**-**
*3-**-**-**-**-**
*5-**-**-**-**-**
*7-**-**-**-**-**
*9-**-**-**-**-**
*B-**-**-**-**-**
*D-**-**-**-**-**
*F-**-**-**-**-**

Broadcast
FF-FF-FF-FF-FF-FF (Could be considered an all-stations multicast)

Locally administered addresses can be considered private ethernet:

(LAA) are MAC addresses which have the second least significant bit
(LSB) of the first octect is set to '1' (for example, 'xxxxxx1x'. LAA
enable administrators to assign MAC addresses using their own scheme.
When an LAA is assigned, it overrides the in-memory copy of the Global
address during driver initialization. So the burned-in address on the
Ethernet adapter is never actually changed, only the in-memory copy.
LAA create the possibility of assigning duplicate MAC addresses, which
makes for some very interesting network problems. Fortunately, they
are rarely used in Ethernet environments, but are fairly popular in
Token Ring networks.


The Xen addresses are in the LAA range, so scheme wise you are safe to
do whatever you want with them.

Alternatively XenSource could spring for an OUI or IAB, not really
that expensive:

    The OUI is $1,650.00 (US); the IAB is $550.00 (US)

IAB = Individual Address Block, 12 bits of address space instead of 24.

Tim:>


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: ARP problems in -testing?
@ 2005-01-17  1:41 Ian Pratt
  0 siblings, 0 replies; 22+ messages in thread
From: Ian Pratt @ 2005-01-17  1:41 UTC (permalink / raw)
  To: Adam Sulmicki
  Cc: Felipe Alfaro Solana, Derrik Pates, Jan Kundrát, xen-devel,
	Keir Fraser, Ron Watkins

> ah, cool. it makes me wonder though.
> 
> in the IP the 10.x.x.x and 192.168.x.x are reserved for private use?
> is there such MAC address space reserved as well?
> 
> looking a bit around the web I was unable to find such guideliness.

>From xen/xm/create.py: 

def randomMAC():
    """Generate a random MAC address.

    Uses OUI (Organizationally Unique Identifier) AA:00:00, an
    unassigned one that used to belong to DEC. The OUI list is
    available at 'standards.ieee.org'.

    The remaining 3 fields are random, with the first bit of the first
    random field set 0.

    @return: MAC address string
    """
    random.seed()
    mac = [ 0xaa, 0x00, 0x00,
            random.randint(0x00, 0x7f),
            random.randint(0x00, 0xff),
            random.randint(0x00, 0xff) ]
    return ':'.join(map(lambda x: "%02x" % x, mac))


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: ARP problems in -testing?
@ 2005-01-17  1:23 Ian Pratt
  2005-01-17  2:03 ` Adam Sulmicki
  0 siblings, 1 reply; 22+ messages in thread
From: Ian Pratt @ 2005-01-17  1:23 UTC (permalink / raw)
  To: Adam Sulmicki, Felipe Alfaro Solana
  Cc: Derrik Pates, Jan Kundrát, xen-devel, Keir Fraser,
	Ron Watkins

 > >
> > 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 following will work, though has obvious limitations (256 domains):
vif = [ 'mac=XX:XX:XX:XX:%02x:XX' % vmid ]

The netback vif needs a MAC addr too, and this is picked as the frontend's MAC addr+1. This was probably a bad choice as people tend to pick consecutive MAC addrs for their domains. We should probably move the front/back bit to a mor esignificant bit.

Hence, the above vif= line sets vmid into the 2nd octet.

Ian



Ian


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: ARP problems in -testing?
@ 2005-01-16 17:46 Ian Pratt
  2005-01-16 18:33 ` Ron Watkins
  0 siblings, 1 reply; 22+ messages in thread
From: Ian Pratt @ 2005-01-16 17:46 UTC (permalink / raw)
  To: Ron Watkins, xen-devel

> 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 may be an issue with the bridge, though its hard to see why its
causing you problems and not anyone else. 

If you ping the guest domain from dom0, do you see arp requests arriving
inside the guest domain?  The bridge won't learn the guest's MAC address
until the guest sends its first packet. This shouldn't be a problem as
the incoming ARP should be a broadcast packet, and hence get forwarded
anyway.

What happens if you use a routed setup as per Keir's recent checkin?

Cheers,
Ian


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* ARP problems in -testing?
@ 2005-01-16 16:42 Ron Watkins
  2005-01-16 18:30 ` Felipe Alfaro Solana
  0 siblings, 1 reply; 22+ messages in thread
From: Ron Watkins @ 2005-01-16 16:42 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2005-01-17 14:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-17 14:08 ARP problems in -testing? Tim Durack
2005-01-17 14:12 ` Fwd: " Tim Durack
  -- strict thread matches above, loose matches on Subject: below --
2005-01-17  1:41 Ian Pratt
2005-01-17  1:23 Ian Pratt
2005-01-17  2:03 ` Adam Sulmicki
2005-01-16 17:46 Ian Pratt
2005-01-16 18:33 ` Ron Watkins
2005-01-16 18:51   ` Ron Watkins
2005-01-16 16:42 Ron Watkins
2005-01-16 18:30 ` Felipe Alfaro Solana
2005-01-16 18:49   ` Ron Watkins
2005-01-16 19:18     ` Jan Kundrát
2005-01-16 20:11       ` Keir Fraser
2005-01-17  0:27         ` Derrik Pates
2005-01-17  0:58           ` Felipe Alfaro Solana
2005-01-17  1:33             ` Adam Sulmicki
2005-01-17 13:41             ` Keir Fraser
2005-01-17 14:27               ` Felipe Alfaro Solana
2005-01-17 10:39           ` Ron Watkins
2005-01-17 11:14             ` Keir Fraser
2005-01-16 22:44       ` Felipe Alfaro Solana
2005-01-16 22:39     ` Felipe Alfaro Solana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.