# Xen 3.1.2 problems with ethernet bridge

## Weaselweb

Hello,

I wanted to install Xen on my server. Compiling xen-sources worked, but after starting /etc/init.d/xend my network setup is broken.

here are some infos:

/etc/conf.d/net

```

config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255"

        "192.168.10.11 netmask 255.255.255.0 brd 192.168.10.255"

)

routes_eth0=( "default gw 192.168.0.1" )

```

`ifconfig` before starting xend

```

eth0      Protokoll:Ethernet  Hardware Adresse 00:1A:92:5A:14:09

          inet Adresse:192.168.0.2  Bcast:192.168.0.255  Maske:255.255.255.0

          inet6 Adresse: fe80::21a:92ff:fe5a:1409/64 Gültigkeitsbereich:Verbindung

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:34 errors:0 dropped:0 overruns:0 frame:0

          TX packets:325 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:1000

          RX bytes:2979 (2.9 Kb)  TX bytes:23836 (23.2 Kb)

          Interrupt:11 Basisadresse:0xc000

lo        Protokoll:Lokale Schleife

          inet Adresse:127.0.0.1  Maske:255.0.0.0

          inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:74 errors:0 dropped:0 overruns:0 frame:0

          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:5982 (5.8 Kb)  TX bytes:5982 (5.8 Kb)

```

`ifconfig` before starting xend

```

lo        Protokoll:Lokale Schleife

          inet Adresse:127.0.0.1  Maske:255.0.0.0

          inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:74 errors:0 dropped:0 overruns:0 frame:0

          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:5982 (5.8 Kb)  TX bytes:5982 (5.8 Kb)

peth0     Protokoll:Ethernet  Hardware Adresse FE:FF:FF:FF:FF:FF

          inet6 Adresse: fe80::fcff:ffff:feff:ffff/64 Gültigkeitsbereich:Verbindung

          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1

          RX packets:41 errors:0 dropped:0 overruns:0 frame:0

          TX packets:327 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:1000

          RX bytes:3399 (3.3 Kb)  TX bytes:23976 (23.4 Kb)

          Interrupt:11 Basisadresse:0xc000

vif0.0    Protokoll:Ethernet  Hardware Adresse FE:FF:FF:FF:FF:FF

          inet6 Adresse: fe80::fcff:ffff:feff:ffff/64 Gültigkeitsbereich:Verbindung

          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:0 (0.0 b)  TX bytes:320 (320.0 b)

xenbr0    Protokoll:Ethernet  Hardware Adresse FE:FF:FF:FF:FF:FF

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:3 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:138 (138.0 b)  TX bytes:90 (90.0 b)

xendbr    Protokoll:Ethernet  Hardware Adresse 00:00:00:00:00:00

          inet6 Adresse: fe80::200:ff:fe00:0/64 Gültigkeitsbereich:Verbindung

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          Kollisionen:0 Sendewarteschlangenlänge:0

          RX bytes:0 (0.0 b)  TX bytes:398 (398.0 b)

```

As you can see, no interface get a IP address.

`brctl show`:

```

bridge name     bridge id               STP enabled     interfaces

xenbr0          8000.feffffffffff       no              vif0.0

                                                        peth0

xendbr          8000.000000000000       no

```

So, anybody with an idea whats wrong here and how to fix it? I want to setup a bridged ethernet, so each DomU has full network access.

Greetings

Weaselweb

----------

## Weaselweb

Mh, looks like i found it.

I removed my second IP for eth0, seems like xen scripts cant handle multiple IPs per interface. Does someone know how to handle xen with multiple IPs on one interface?

Looks like i have to add a DomU which then uses the second IP.

----------

## Petronios

https://bugs.gentoo.org/show_bug.cgi?id=111684

----------

## cazze

@ weaselweb

Hi,

strange that you have xenbr0, peth0 etc already before starting xend, as xend is making those interfaces. Or am i wrong here?

Another thing, didn't you had problems with the ipv6 address on your eth0? after starting eth0, did you had a valid ipv6 address on your eth0?

----------

## Weaselweb

 *cazze wrote:*   

> strange that you have xenbr0, peth0 etc already before starting xend, as xend is making those interfaces. Or am i wrong here?

 

I think you got it just wrong.

 *cazze wrote:*   

> 
> 
> Another thing, didn't you had problems with the ipv6 address on your eth0? after starting eth0, did you had a valid ipv6 address on your eth0?

 

AFAIR I had problems at first, but i changed a line in network-bridge, so it just uses the line from ifconfig where "inet " (notice the blank space) is stated, which ignores ipv6 address. But ATM i don't really use ipv6, i have a tunnel, but this is just on my server, no client is connected to ipv6.

----------

## cazze

 *Quote:*   

> cazze wrote:
> 
> strange that you have xenbr0, peth0 etc already before starting xend, as xend is making those interfaces. Or am i wrong here?
> 
> I think you got it just wrong. 

 

Can you explain me which part of your boot sequence is making them then?

I thought it was the /etc/xen/scripts/network-bridge script who was making them, declared in /etc/xen/xend-config.sxp to be used by xend!

----------

## Weaselweb

 *cazze wrote:*   

> Can you explain me which part of your boot sequence is making them then?
> 
> I thought it was the /etc/xen/scripts/network-bridge script who was making them, declared in /etc/xen/xend-config.sxp to be used by xend!

 

Maybe I got you wrong now. This bridge is created by the xen-init-script which uses /etc/xen/scripts/network-bridge

What i have to test is the behavior with a global ipv6 on eth0 at system startup. The link-layer is always created.

----------

## Weaselweb

 *cazze wrote:*   

> Another thing, didn't you had problems with the ipv6 address on your eth0? after starting eth0, did you had a valid ipv6 address on your eth0?

 

You were right. Configuring ipv6 before starting xend doesn't work. I have to set up my ip in /etc/conf.d/local.start to get an ipv6 after starting xend.

----------

