All of lore.kernel.org
 help / color / mirror / Atom feed
* ipv6 addresses on vifX.Y interfaces and bridges
@ 2008-01-06 22:26 James Harper
  2008-01-06 22:36 ` Daniel P. Berrange
  0 siblings, 1 reply; 6+ messages in thread
From: James Harper @ 2008-01-06 22:26 UTC (permalink / raw)
  To: xen-devel

The network scripts appear to set noarp on all the vifX.Y and xen-brX
interfaces, but I also need to remove the IPv6 address and stop the
interfaces participating in autoconfiguration...

Has anyone done this already?

Thanks

James

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

* Re: ipv6 addresses on vifX.Y interfaces and bridges
  2008-01-06 22:26 ipv6 addresses on vifX.Y interfaces and bridges James Harper
@ 2008-01-06 22:36 ` Daniel P. Berrange
  2008-01-06 22:44   ` James Harper
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2008-01-06 22:36 UTC (permalink / raw)
  To: James Harper; +Cc: xen-devel

On Mon, Jan 07, 2008 at 09:26:43AM +1100, James Harper wrote:
> The network scripts appear to set noarp on all the vifX.Y and xen-brX
> interfaces, but I also need to remove the IPv6 address and stop the
> interfaces participating in autoconfiguration...
> 
> Has anyone done this already?

You don't need to remove the link-local IPv6 addresses, they are harmless.
The key is to stop auto-conf taking place on the bridge. The way todo
this is to set the mtu of the bridge to something tiny (eg 68) before
bringing the interface up, and then once it is up, restore the mtu to
its normal 1500. 

This was previously merged in xen-unstable, in 13364

diff -r c71fe03f086f -r c2fd75d7e2b7 tools/examples/xen-network-common.sh
--- a/tools/examples/xen-network-common.sh      Fri Jan 12 15:19:23 2007 +0000
+++ b/tools/examples/xen-network-common.sh      Fri Jan 12 15:23:07 2007 +0000
@@ -117,7 +117,12 @@ create_bridge () {
         ip link set ${bridge} arp off
         ip link set ${bridge} multicast off
     fi
+
+    # A small MTU disables IPv6 (and therefore IPv6 addrconf).
+    mtu=$(ip link show ${bridge} | sed -n 's/.* mtu \([0-9]\+\).*/\1/p')
+    ip link set ${bridge} mtu 68
     ip link set ${bridge} up
+    ip link set ${bridge} mtu ${mtu:-1500}
 }
 
 # Usage: add_to_bridge bridge dev


But for some reason got chopped out in changeset 15203

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

* RE: ipv6 addresses on vifX.Y interfaces and bridges
  2008-01-06 22:36 ` Daniel P. Berrange
@ 2008-01-06 22:44   ` James Harper
  2008-01-06 22:48     ` Daniel P. Berrange
  0 siblings, 1 reply; 6+ messages in thread
From: James Harper @ 2008-01-06 22:44 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: xen-devel

> On Mon, Jan 07, 2008 at 09:26:43AM +1100, James Harper wrote:
> > The network scripts appear to set noarp on all the vifX.Y and
xen-brX
> > interfaces, but I also need to remove the IPv6 address and stop the
> > interfaces participating in autoconfiguration...
> >
> > Has anyone done this already?
> 
> You don't need to remove the link-local IPv6 addresses, they are
harmless.
> The key is to stop auto-conf taking place on the bridge. The way todo
> this is to set the mtu of the bridge to something tiny (eg 68) before
> bringing the interface up, and then once it is up, restore the mtu to
> its normal 1500.
> 
> This was previously merged in xen-unstable, in 13364
> 

That sounds a bit kludgy... wouldn't it be better to make use of
/proc/sys/net/ipv6/<interface>/autoconf and/or .../accept_ra?

Wouldn't the bridge just autoconf next time an ra is sent once its mtu
is back up to 1500?

Thanks

James

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

* Re: ipv6 addresses on vifX.Y interfaces and bridges
  2008-01-06 22:44   ` James Harper
@ 2008-01-06 22:48     ` Daniel P. Berrange
  2008-01-07  1:10       ` Ralph Passgang
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2008-01-06 22:48 UTC (permalink / raw)
  To: James Harper; +Cc: xen-devel

On Mon, Jan 07, 2008 at 09:44:09AM +1100, James Harper wrote:
> > On Mon, Jan 07, 2008 at 09:26:43AM +1100, James Harper wrote:
> > > The network scripts appear to set noarp on all the vifX.Y and
> xen-brX
> > > interfaces, but I also need to remove the IPv6 address and stop the
> > > interfaces participating in autoconfiguration...
> > >
> > > Has anyone done this already?
> > 
> > You don't need to remove the link-local IPv6 addresses, they are
> harmless.
> > The key is to stop auto-conf taking place on the bridge. The way todo
> > this is to set the mtu of the bridge to something tiny (eg 68) before
> > bringing the interface up, and then once it is up, restore the mtu to
> > its normal 1500.
> > 
> > This was previously merged in xen-unstable, in 13364
> 
> That sounds a bit kludgy... wouldn't it be better to make use of
> /proc/sys/net/ipv6/<interface>/autoconf and/or .../accept_ra?

Would have to ask Herbert about that - when he wrote the patch this was
the only reliable way of selectively disabling Ipv6 on the bridge, but
not other eth devices.

> Wouldn't the bridge just autoconf next time an ra is sent once its mtu
> is back up to 1500?

No, because the low MTU means it never gets assigned a link-local address
and thus has no way to parcitipate in ipv6 autoconf thereafter.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

* Re: ipv6 addresses on vifX.Y interfaces and bridges
  2008-01-06 22:48     ` Daniel P. Berrange
@ 2008-01-07  1:10       ` Ralph Passgang
  2008-01-08  7:45         ` RelocationProtocol? tgh
  0 siblings, 1 reply; 6+ messages in thread
From: Ralph Passgang @ 2008-01-07  1:10 UTC (permalink / raw)
  To: xen-devel

Am Sonntag, 6. Januar 2008 23:48:13 schrieb Daniel P. Berrange:
> On Mon, Jan 07, 2008 at 09:44:09AM +1100, James Harper wrote:
> > > On Mon, Jan 07, 2008 at 09:26:43AM +1100, James Harper wrote:
> > > > The network scripts appear to set noarp on all the vifX.Y and
> >
> > xen-brX
> >
> > > > interfaces, but I also need to remove the IPv6 address and stop the
> > > > interfaces participating in autoconfiguration...
> > > >
> > > > Has anyone done this already?
> > >
> > > You don't need to remove the link-local IPv6 addresses, they are
> >
> > harmless.
> >
> > > The key is to stop auto-conf taking place on the bridge. The way todo
> > > this is to set the mtu of the bridge to something tiny (eg 68) before
> > > bringing the interface up, and then once it is up, restore the mtu to
> > > its normal 1500.
> > >
> > > This was previously merged in xen-unstable, in 13364
> >
> > That sounds a bit kludgy... wouldn't it be better to make use of
> > /proc/sys/net/ipv6/<interface>/autoconf and/or .../accept_ra?
>
> Would have to ask Herbert about that - when he wrote the patch this was
> the only reliable way of selectively disabling Ipv6 on the bridge, but
> not other eth devices.
>
> > Wouldn't the bridge just autoconf next time an ra is sent once its mtu
> > is back up to 1500?
>
> No, because the low MTU means it never gets assigned a link-local address
> and thus has no way to parcitipate in ipv6 autoconf thereafter.

But it's a dirty hack, isn't it?
what about just using the ip tool to get rid of the ipv6 address after the 
interface has been configured?

"ip -6 addr flush dev ethX" (or whatever device) should do the trick... :)

it removes any global or local address on the interface and prevents any 
further autoconfiguration.

> Dan.

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

* RelocationProtocol?
  2008-01-07  1:10       ` Ralph Passgang
@ 2008-01-08  7:45         ` tgh
  0 siblings, 0 replies; 6+ messages in thread
From: tgh @ 2008-01-08  7:45 UTC (permalink / raw)
  To: xen-devel

hi
  what does RelocationProtocol do, or what is the function of 
relocationserver?

Thanks in advance

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

end of thread, other threads:[~2008-01-08  7:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 22:26 ipv6 addresses on vifX.Y interfaces and bridges James Harper
2008-01-06 22:36 ` Daniel P. Berrange
2008-01-06 22:44   ` James Harper
2008-01-06 22:48     ` Daniel P. Berrange
2008-01-07  1:10       ` Ralph Passgang
2008-01-08  7:45         ` RelocationProtocol? tgh

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.