I use some completely virtual networks inside my DomU''s. In Dom0 I want to have the following in /etc/network/interfaces: auto br-wan iface br-wan inet static address x.y.z.254 netmask 255.255.255.0 bridge_maxwait 0 bridge_ports none up ip addr add 2002:xy:xfe:3::1/64 dev $IFACE but of course when the br-wan interface comes up, it has no mac address because it has no ports yet to inherit a mac address from. I am working around it for now by using a dummy interface: auto br-wan iface br-wan inet static address x.y.z.254 netmask 255.255.255.0 bridge_maxwait 0 bridge_ports dummy1 bridge_hw 00:1a:4b:eb:ee:7c up ip addr add 2002:xy:zfe:3::1/64 dev $IFACE but is there a better way? The dummy module in the kernel needs a parameter passed to it to set the number of dummy interfaces, and if I ever need to increase it I have to unload and reload it which means downing all the bridge interfaces that use it. Not really what I want. It''s just occurred to me while writing this that I could vlan the dummy interface and just use the one interface but still... seems a bit of a kludge. Thanks James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-27 05:49 UTC
Re: [Xen-users] bridge interface with (initially) no ports
On Sat, Jun 27, 2009 at 9:50 AM, James Harper<james.harper@bendigoit.com.au> wrote:> I use some completely virtual networks inside my DomU''s. In Dom0 I want > to have the following in /etc/network/interfaces: > > auto br-wan > iface br-wan inet static > address x.y.z.254 > netmask 255.255.255.0 > bridge_maxwait 0 > bridge_ports none > up ip addr add 2002:xy:xfe:3::1/64 dev $IFACE > > but of course when the br-wan interface comes up, it has no mac address > because it has no ports yet to inherit a mac address from.Here''s what I get on my Ubuntu # brctl addbr br-test1 # ip link show br-test1 12: br-test1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether ea:32:77:5d:2d:f7 brd ff:ff:ff:ff:ff:ff it has a mac address by default. Even if it doesn''t have a mac address, you should be able to assign one # ip link set br-test1 addr 00:16:3e:00:00:01 # ip link show br-test1 12: br-test1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN link/ether 00:16:3e:00:00:01 brd ff:ff:ff:ff:ff:ff -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ferenc Wagner
2009-Jun-27 09:56 UTC
[Xen-users] Re: bridge interface with (initially) no ports
"James Harper" <james.harper@bendigoit.com.au> writes:> auto br-wan > iface br-wan inet static > address x.y.z.254 > netmask 255.255.255.0hwaddress ether xx:xx:xx:xx:xx:xx> bridge_maxwait 0 > bridge_ports none > up ip addr add 2002:xy:xfe:3::1/64 dev $IFACE > > but of course when the br-wan interface comes up, it has no mac address > because it has no ports yet to inherit a mac address from.Try adding the line above. -- Feri. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James Harper
2009-Jun-27 10:12 UTC
RE: [Xen-users] Re: bridge interface with (initially) no ports
> > > auto br-wan > > iface br-wan inet static > > address x.y.z.254 > > netmask 255.255.255.0 > hwaddress ether xx:xx:xx:xx:xx:xx > > bridge_maxwait 0 > > bridge_ports none > > up ip addr add 2002:xy:xfe:3::1/64 dev $IFACE > > > > but of course when the br-wan interface comes up, it has no macaddress> > because it has no ports yet to inherit a mac address from. > > Try adding the line above.SIOCSIFHWADDR: Cannot assign requested address I can''t set a hardware address on a bridge, that''s the whole problem. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ferenc Wagner
2009-Jun-29 17:25 UTC
[Xen-users] Re: bridge interface with (initially) no ports
"James Harper" <james.harper@bendigoit.com.au> writes:>>> auto br-wan >>> iface br-wan inet static >>> address x.y.z.254 >>> netmask 255.255.255.0 >> hwaddress ether xx:xx:xx:xx:xx:xx >>> bridge_maxwait 0 >>> bridge_ports none >>> up ip addr add 2002:xy:xfe:3::1/64 dev $IFACE >>> >>> but of course when the br-wan interface comes up, it has no mac >>> address because it has no ports yet to inherit a mac address from. >> >> Try adding the line above. > > SIOCSIFHWADDR: Cannot assign requested address > > I can''t set a hardware address on a bridge, that''s the whole problem.Maybe you want to assign a multicast address. Ensure that the first octet is even (ie. 11:22:33:44:55:66 won''t work, 12:22:33:44:55:66 should). This works for me. -- Feri. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James Harper
2009-Jun-29 22:58 UTC
RE: [Xen-users] Re: bridge interface with (initially) no ports
> "James Harper" <james.harper@bendigoit.com.au> writes: > > >>> auto br-wan > >>> iface br-wan inet static > >>> address x.y.z.254 > >>> netmask 255.255.255.0 > >> hwaddress ether xx:xx:xx:xx:xx:xx > >>> bridge_maxwait 0 > >>> bridge_ports none > >>> up ip addr add 2002:xy:xfe:3::1/64 dev $IFACE > >>> > >>> but of course when the br-wan interface comes up, it has no mac > >>> address because it has no ports yet to inherit a mac address from. > >> > >> Try adding the line above. > > > > SIOCSIFHWADDR: Cannot assign requested address > > > > I can''t set a hardware address on a bridge, that''s the wholeproblem.> > Maybe you want to assign a multicast address. Ensure that the first > octet is even (ie. 11:22:33:44:55:66 won''t work, 12:22:33:44:55:66 > should). This works for me.I have been using 00:00:01:02:03:04 James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users