0

I have 2 local connected PCs. I'v created 2 VMs on PC1 and added connection through bridging using eth0 interface in dom0.

From dom0: 

#brctl addbr xenbr0
#brctl addif xenbr0 eth0
#ifconfig xenbr0 10.0.2.4
#xl create /etc/xen/dom1.cfg
#xl create /etc/xen/dom2.cfg

#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0A:35:00:22:01
          inet addr:10.0.2.1  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20a:35ff:fe00:2201/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:228 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1228 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:36193 (35.3 KiB)  TX bytes:407300 (397.7 KiB)
          Interrupt:25

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)

vif2.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:2524 (2.4 KiB)  TX bytes:2558 (2.4 KiB)

vif3.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
          inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:1212 (1.1 KiB)  TX bytes:1165 (1.1 KiB)

xenbr0    Link encap:Ethernet  HWaddr 00:0A:35:00:22:01
          inet addr:10.0.2.3  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::20a:35ff:fe00:2201/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4224 (4.1 KiB)  TX bytes:648 (648.0 B)

In the Xen cfg files I have this line "vif = [ 'script=vif-bridge, bridge=xenbr0' ]"

From domU

#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:3E:60:FC:91
          inet addr:10.0.2.6  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:94 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23886 (23.3 KiB)  TX bytes:22500 (21.9 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

After booting to guest VMs I have the following ping statuses:

  • Ping between domUs is OK.
  • Ping between domUs and PC2 is OK.
  • Ping from domU to dom0(PC1) is not OK!

Thank you for your time and help!

  • 1
    Change vif = [ 'script=vif-bridge, ridge=xenbr0' ] to vif = [ 'script=vif-bridge, bridge=xenbr0' ], you lost a b – Broco Sep 2 '16 at 11:01
  • consider upgrading your comment to an answer, @Broco – asdmin Sep 2 '16 at 14:58
  • @asdmin I would but I don't know if this was just a typo in his post or the actual cause of the problem – Broco Sep 3 '16 at 22:15
  • sorry it was a typo – skhachatryan Sep 5 '16 at 6:11
  • Also tried to ping using differ IPs for the eth0 and xenbr0 – skhachatryan Sep 5 '16 at 8:49
0

Both eth0 and xenbr0 have an IP (it's even the same IP). Get rid of the IP on eth0. Bridges are layer 2 abstractions, so you can't have layer 3 addressing on interfaces that connect to it. Keep the IP on the bridge interface, as that's the one that you put layer 3 addressing on. This is true of anything you connect to a bridge, including bonds. The end of the layer 2 stack gets the layer 3 address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.