Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] Set second IP on bridge
@ 2008-04-23 19:08 Koen Vermeer
  0 siblings, 0 replies; 5+ messages in thread
From: Koen Vermeer @ 2008-04-23 19:08 UTC (permalink / raw)
  To: bridge

Hi,

I am connected through one ethernet interface to a network on which two
subnets are available. One is in the 192.168.11.0 range, the other in
the 172.31.1.0 range. On the first one, I have a static IP, on the
second on, I obtain one by DHCP. Without bridging, I can set this up by
using eth0 and eth0:1.

Now, for virtualization, I want to set up a bridge on my one ethernet
interface. I can do this just fine, and end up with (let's say) br0.
Then, I can set an IP address to br0. But what I want to do is set two
IP addresses. I have been unable to do so thus far. Trying to use br0:1
didn't produce anything useful.

So, before trying further with br0:1 or something similar, I was
wondering whether what I like to do is actually possible. If it is, am I
on the right track? If it isn't, is there some other way to work around
this?

Best,
Koen


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

* [Bridge] Set second IP on bridge
@ 2008-04-23 21:22 Koen Vermeer
  2008-04-23 22:59 ` Malcolm Scott
  0 siblings, 1 reply; 5+ messages in thread
From: Koen Vermeer @ 2008-04-23 21:22 UTC (permalink / raw)
  To: bridge

[I posted this before subscribing; I couldn't find it in the archives
after a few hours, so I'm trying again now. Apologies if it reaches the
list twice!]

Hi,

I am connected through one ethernet interface to a network on which two
subnets are available. One is in the 192.168.11.0 range, the other in
the 172.31.1.0 range. On the first one, I have a static IP, on the
second on, I obtain one by DHCP. Without bridging, I can set this up by
using eth0 and eth0:1.

Now, for virtualization, I want to set up a bridge on my one ethernet
interface. I can do this just fine, and end up with (let's say) br0.
Then, I can set an IP address to br0. But what I want to do is set two
IP addresses. I have been unable to do so thus far. Trying to use br0:1
didn't produce anything useful.

So, before trying further with br0:1 or something similar, I was
wondering whether what I like to do is actually possible. If it is, am I
on the right track? If it isn't, is there some other way to work around
this?

Best,
Koen


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

* Re: [Bridge] Set second IP on bridge
  2008-04-23 21:22 [Bridge] Set second IP on bridge Koen Vermeer
@ 2008-04-23 22:59 ` Malcolm Scott
  2008-04-24 10:49   ` Koen Vermeer
  0 siblings, 1 reply; 5+ messages in thread
From: Malcolm Scott @ 2008-04-23 22:59 UTC (permalink / raw)
  To: Koen Vermeer; +Cc: bridge

At 23:22 today, Koen Vermeer wrote:

> Now, for virtualization, I want to set up a bridge on my one ethernet
> interface. I can do this just fine, and end up with (let's say) br0.
> Then, I can set an IP address to br0. But what I want to do is set two
> IP addresses. I have been unable to do so thus far. Trying to use br0:1
> didn't produce anything useful.

That should work.  What happens?

You can also try "ip address add (...) dev br0" to avoid the old-style 
subinterfaces.

-- 
Malcolm Scott
Research Assistant
University of Cambridge Computer Laboratory


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

* Re: [Bridge] Set second IP on bridge
  2008-04-23 22:59 ` Malcolm Scott
@ 2008-04-24 10:49   ` Koen Vermeer
  2008-04-28 20:02     ` Malcolm Scott
  0 siblings, 1 reply; 5+ messages in thread
From: Koen Vermeer @ 2008-04-24 10:49 UTC (permalink / raw)
  To: Malcolm Scott; +Cc: bridge

On Wed, 2008-04-23 at 23:59 +0100, Malcolm Scott wrote: 
> > Now, for virtualization, I want to set up a bridge on my one ethernet
> > interface. I can do this just fine, and end up with (let's say) br0.
> > Then, I can set an IP address to br0. But what I want to do is set two
> > IP addresses. I have been unable to do so thus far. Trying to use br0:1
> > didn't produce anything useful.
> That should work.  What happens?
> You can also try "ip address add (...) dev br0" to avoid the old-style 
> subinterfaces.

Thanks for the quick reply! I tried again today, and it suddenly works
just fine. I may have messed up my network settings earlier, and the
reboot might have fixed that. It now works with both 'ifconfig
br0:1 ...' and 'ip addr add ... dev br0'.

I'm still strugling to get this incorporated in my
Debian /etc/network/interfaces file, but I guess that's off-topic here.
In case it isn't, or if you know the right place to ask about that,
please let me know.

Thanks for the help!

Best,
Koen Vermeer


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

* Re: [Bridge] Set second IP on bridge
  2008-04-24 10:49   ` Koen Vermeer
@ 2008-04-28 20:02     ` Malcolm Scott
  0 siblings, 0 replies; 5+ messages in thread
From: Malcolm Scott @ 2008-04-28 20:02 UTC (permalink / raw)
  To: Koen Vermeer; +Cc: bridge

On Thu, 24 Apr 2008, Koen Vermeer wrote:

> I'm still strugling to get this incorporated in my
> Debian /etc/network/interfaces file, but I guess that's off-topic here.
> In case it isn't, or if you know the right place to ask about that,
> please let me know.

This should work:

auto br0:1
iface br0:1 inet static
   address ...
   netmask ...

(after your definition for br0)

Or alternatively

auto br0
iface br0 inet (...)
   ...
   up ip address add ... dev $IFACE
   down ip address del ... dev $IFACE

-- 
Malcolm Scott
Research Assistant
University of Cambridge Computer Laboratory


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

end of thread, other threads:[~2008-04-28 20:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 21:22 [Bridge] Set second IP on bridge Koen Vermeer
2008-04-23 22:59 ` Malcolm Scott
2008-04-24 10:49   ` Koen Vermeer
2008-04-28 20:02     ` Malcolm Scott
  -- strict thread matches above, loose matches on Subject: below --
2008-04-23 19:08 Koen Vermeer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox