Thursday, November 20, 2014

OVS Setup on Juno network node


[root@juno1 ~(keystone_admin)]# ip netns exec qrouter-1cf08ea2-959f-4206-b2f1-a9b4708399c1 ifconfig
lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 0  (Local Loopback)
        RX packets 12  bytes 1008 (1008.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1008 (1008.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qg-7b037650-10: flags=4163  mtu 1500
        inet 192.168.1.173  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f816:3eff:fee5:de97  prefixlen 64  scopeid 0x20
        ether fa:16:3e:e5:de:97  txqueuelen 0  (Ethernet)
        RX packets 45149  bytes 46211483 (44.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21438  bytes 4059759 (3.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

qr-17ddee14-9f: flags=4163  mtu 1500
        inet 50.0.0.1  netmask 255.255.255.0  broadcast 50.0.0.255
        inet6 fe80::f816:3eff:fe6f:a8e7  prefixlen 64  scopeid 0x20
        ether fa:16:3e:6f:a8:e7  txqueuelen 0  (Ethernet)
        RX packets 30107  bytes 4574015 (4.3 MiB)
        RX errors 0  dropped 5  overruns 0  frame 0
        TX packets 38725  bytes 44984619 (42.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


[root@juno1 ~(keystone_admin)]# ip netns exec qdhcp-45577666-657d-4f75-a3ab-9bc232f15203 ifconfig
lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 0  (Local Loopback)
        RX packets 16270  bytes 781242 (762.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16270  bytes 781242 (762.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tap7a12f9b0-a4: flags=4163  mtu 1500
        inet 50.0.0.11  netmask 255.255.255.0  broadcast 50.0.0.255
        inet6 fe80::f816:3eff:fe29:fef1  prefixlen 64  scopeid 0x20
        ether fa:16:3e:29:fe:f1  txqueuelen 0  (Ethernet)
        RX packets 4664  bytes 267057 (260.7 KiB)
        RX errors 0  dropped 5  overruns 0  frame 0
        TX packets 21948  bytes 1352385 (1.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 


################################
Getting ifconfig
################################

[root@juno1 ~(keystone_admin)]# ifconfig
br-ex: flags=4163  mtu 1500
        inet 192.168.1.127  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::222:15ff:fe63:e4e2  prefixlen 64  scopeid 0x20
        ether 00:22:15:63:e4:e2  txqueuelen 0  (Ethernet)
        RX packets 3411331  bytes 548241709 (522.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3171333  bytes 1172191351 (1.0 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp2s0: flags=4163  mtu 1500
        inet6 fe80::222:15ff:fe63:e4e2  prefixlen 64  scopeid 0x20
        ether 00:22:15:63:e4:e2  txqueuelen 1000  (Ethernet)
        RX packets 3448839  bytes 593192446 (565.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3192798  bytes 1176251503 (1.0 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17 

enp5s1: flags=4163  mtu 1500
        inet 192.168.0.127  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2e0:53ff:fe13:174c  prefixlen 64  scopeid 0x20
        ether 00:e0:53:13:17:4c  txqueuelen 1000  (Ethernet)
        RX packets 22472  bytes 5191240 (4.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 59792  bytes 48604605 (46.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 0  (Local Loopback)
        RX packets 5627133  bytes 1136824718 (1.0 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5627133  bytes 1136824718 (1.0 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:30:a6:39  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

################################
 Now verifying OVS configuration :
################################

[root@juno1 ~(keystone_admin)]# ovs-vsctl show
f2113bd0-c4ca-4c4b-af16-928ff03e53da
    Bridge br-int
        fail_mode: secure
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port int-br-ex
            Interface int-br-ex
                type: patch
                options: {peer=phy-br-ex}
        Port "tap3f570ba8-a1"
            tag: 2
            Interface "tap3f570ba8-a1"
                type: internal
        Port "tapba3a2dd7-73"
            tag: 3
            Interface "tapba3a2dd7-73"
                type: internal
        Port "qr-00d5c709-9a"
            tag: 3
            Interface "qr-00d5c709-9a"
                type: internal
        Port "tap7a12f9b0-a4"   <=====  port of br-int ( tap-interface of qdhcp-
            tag: 1                                                                          -namespce )
            Interface "tap7a12f9b0-a4"
                type: internal
        Port "tapb593041a-c7"
            tag: 4095
            Interface "tapb593041a-c7"
                type: internal
        Port "qr-17ddee14-9f"    <====== port of br-int
            tag: 1
            Interface "qr-17ddee14-9f"
                type: internal
        Port "qr-5bbf9169-4b"
            tag: 4
            Interface "qr-5bbf9169-4b"
                type: internal
        Port br-int
            Interface br-int
                type: internal
    Bridge br-tun
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port "vxlan-c0a80089"
            Interface "vxlan-c0a80089"
                type: vxlan
                options: {df_default="true", in_key=flow, local_ip="192.168.0.127", out_key=flow, remote_ip="192.168.0.137"}
        Port br-tun
            Interface br-tun
                type: internal
    Bridge br-ex
        Port "qg-d3e929c6-ba"
            Interface "qg-d3e929c6-ba"
                type: internal
        Port phy-br-ex
            Interface phy-br-ex
                type: patch
                options: {peer=int-br-ex}
        Port "qg-7b037650-10"   <====== port of br-ex
            Interface "qg-7b037650-10"
                type: internal
        Port "enp2s0" <=========== port of br-ex
            Interface "enp2s0"
        Port "qg-fd2baf63-9e"
            Interface "qg-fd2baf63-9e"
                type: internal
        Port br-ex
            Interface br-ex
                type: internal
        Port "qg-38b0f41d-21"
            Interface "qg-38b0f41d-21"
                type: internal
    ovs_version: "2.1.3"