Hi,

I new to OpenVSwitch. I have removed the libvirt bridge virbr0.
I installed it from git and then start it using

# ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock
--remote=db:Open_vSwitch,manager_options --pidfile --detach
# ovs-vsctl --no-wait init
# ovs-vswitchd --pidfile --detach

then I configured the bridge:

# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 em1
# ifconfig em1 0.0.0.0
# ifconfig br0 <ip> netmask <mask>
# ip route del default dev em1
# ip route add default dev br0

# ovs-vsctl show
667ae087-8a68-47e3-ba17-406fc2df42bc
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "em1"
            Interface "em1"


then I created ifup-br0 and ifdown-br0 as documentated.

When I start up a guest sytem as
# qemu-kvm vdisk.img  -m 3072 -net nic,macaddr=00:11:22:EE:EE:EE -net
tap,script=ifup-br0,downscript=ifdown-br0

I can see the tap device

# ovs-vsctl show
667ae087-8a68-47e3-ba17-406fc2df42bc
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "tap0"
            Interface "tap0"
        Port "em1"
            Interface "em1"
# ifconfig -a
br0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet ++.++.++.++  netmask 255.255.240.0  broadcast ++.++.++.++
        inet6 fe80::1ec1:deff:fe65:6fee  prefixlen 64  scopeid 0x20<link>
        ether 1c:c1:de:65:6f:ee  txqueuelen 0  (Ethernet)
        RX packets 286290  bytes 54385389 (51.8 MiB)
        RX errors 0  dropped 284  overruns 0  frame 0
        TX packets 20230  bytes 3545570 (3.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::1ec1:deff:fe65:6fee  prefixlen 64  scopeid 0x20<link>
        ether 1c:c1:de:65:6f:ee  txqueuelen 1000  (Ethernet)
        RX packets 307970  bytes 58277898 (55.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21322  bytes 3835886 (3.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0xf3000000-f3020000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 12  bytes 1090 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1090 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::78c9:85ff:fe1f:3e27  prefixlen 64  scopeid 0x20<link>
        ether 7a:c9:85:1f:3e:27  txqueuelen 500  (Ethernet)
        RX packets 5  bytes 670 (670.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 624  bytes 75288 (73.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

and inside the guest:

# ovs-vsctl show
667ae087-8a68-47e3-ba17-406fc2df42bc
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "tap0"
            Interface "tap0"
        Port "em1"
            Interface "em1"
[root@aopcach arindam]# ifconfig -a
br0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet 158.109.65.21  netmask 255.255.240.0  broadcast 158.109.79.255
        inet6 fe80::1ec1:deff:fe65:6fee  prefixlen 64  scopeid 0x20<link>
        ether 1c:c1:de:65:6f:ee  txqueuelen 0  (Ethernet)
        RX packets 286290  bytes 54385389 (51.8 MiB)
        RX errors 0  dropped 284  overruns 0  frame 0
        TX packets 20230  bytes 3545570 (3.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::1ec1:deff:fe65:6fee  prefixlen 64  scopeid 0x20<link>
        ether 1c:c1:de:65:6f:ee  txqueuelen 1000  (Ethernet)
        RX packets 307970  bytes 58277898 (55.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21322  bytes 3835886 (3.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0xf3000000-f3020000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 12  bytes 1090 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1090 (1.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::78c9:85ff:fe1f:3e27  prefixlen 64  scopeid 0x20<link>
        ether 7a:c9:85:1f:3e:27  txqueuelen 500  (Ethernet)
        RX packets 5  bytes 670 (670.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 624  bytes 75288 (73.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


But the tap device or the guest do not have any ip address. How to assign
the ip addresses?

Thanks,
Arindam
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to