[libvirt-users] Questions on using bridge for KVM on ubuntu 13.10

Peng Yu pengyu.ut at gmail.com
Tue Mar 11 19:15:38 UTC 2014


Hi,

I have being try to connect a virtual machine to the outside through a
bridge on the host.

The following shows that I have a bridge. And I'm able to start a guest.

pengy at rigel:~$ brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.c81f66e29049    no        em4
br1        8000.c81f66e29045    no        bond0
virbr0        8000.000000000000    yes

pengy at rigel:/mnt/nfs/pengy/kvm$ virsh create saiph_installed.xml
Domain saiph created from saiph_installed.xml


pengy at rigel:/mnt/nfs/pengy/kvm$ brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.c81f66e29049    no        em4
                            vnet0
br1        8000.c81f66e29045    no        bond0
virbr0        8000.000000000000    yes

I assigned the static ip address (given my our network administrator)
to the guest. But I am not able to connect anywhere outside from the
guest (175.91.244.74). Do you know what might cause the problem? How
to connect the outside network from the guest? Thanks.

pengy at rigel:/mnt/nfs/pengy/kvm$ ssh 175.91.244.74
pengy at 175.91.244.74's password:
Welcome to Ubuntu 13.10 (GNU/Linux 3.11.0-12-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Mar 11 14:04:07 CDT 2014

  System load:  0.0              Processes:           76
  Usage of /:   78.0% of 999MB   Users logged in:     0
  Memory usage: 1%               IP address for eth0: 175.91.244.74
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

0 packages can be updated.
0 updates are security updates.

Last login: Tue Mar 11 14:04:07 2014
pengy at saiph:~$ ping www.google.com
^C
pengy at saiph:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:aa:00:f0:51
          inet addr:175.91.244.74  Bcast:175.91.247.255  Mask:255.255.248.0
          inet6 addr: fe80::5054:aaff:fe00:f051/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6720 errors:0 dropped:24 overruns:0 frame:0
          TX packets:213 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:513702 (513.7 KB)  TX bytes:20976 (20.9 KB)

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)


BTW, I'm albe to follow some of the instructions at

http://wiki.libvirt.org/page/Networking#Debian.2FUbuntu_Bridging

But it is not clear to what the followings are for.

net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0


 *** Sample rc.local file ***
 /sbin/sysctl -p /etc/sysctl.conf
 iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS
--clamp-mss-to-pmtu
 exit 0

To verify that the changes have taken affect, please run

 tail /proc/sys/net/bridge/*
 iptables -L  FORWARD





-- 
Regards,
Peng




More information about the libvirt-users mailing list