Skip to content

Instantly share code, notes, and snippets.

@etnt
Created January 7, 2013 14:20
Show Gist options
  • Save etnt/4475308 to your computer and use it in GitHub Desktop.
Save etnt/4475308 to your computer and use it in GitHub Desktop.
I've created a bridge with two internal ports (with IP's set) and set a controller. With netcat I'm able to communicate between the two ports although no controller is running (yet). Why? I was expecting they would be unable to communicate until my controller is running and set things up...
$ sudo ovs-vsctl show
ce811cee-69c8-4123-87a4-8132a5f77b28
Bridge "br0-loc"
Controller "tcp:127.0.0.1"
fail_mode: secure
Port "a10"
Interface "a10"
type: internal
Port "veth1"
Interface "veth1"
Port "b10"
Interface "b10"
type: internal
Port "br0-loc"
Interface "br0-loc"
type: internal
Port "b11"
Interface "b11"
type: internal
Port "a11"
Interface "a11"
type: internal
Bridge "br0-eth0"
Port "veth0"
Interface "veth0"
Port "br0-eth0"
Interface "br0-eth0"
type: internal
Port "eth0"
Interface "eth0"
ovs_version: "1.4.3"
$ sudo ip a ls
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether d4:be:d9:98:59:7c brd ff:ff:ff:ff:ff:ff
inet6 fe80::d6be:d9ff:fe98:597c/64 scope link
valid_lft forever preferred_lft forever
12: br0-eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether d4:be:d9:98:59:7c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.162/24 brd 192.168.1.255 scope global br0-eth0
inet6 fe80::d6be:d9ff:fe98:597c/64 scope link
valid_lft forever preferred_lft forever
13: br0-loc: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 12:3f:3b:90:fa:41 brd ff:ff:ff:ff:ff:ff
14: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 62:ad:be:f6:49:e0 brd ff:ff:ff:ff:ff:ff
15: veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 7e:ff:76:e6:9b:c4 brd ff:ff:ff:ff:ff:ff
19: a10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether c2:01:96:63:68:80 brd ff:ff:ff:ff:ff:ff
inet 10.1.0.10/24 brd 10.1.0.255 scope global a10
inet6 fe80::c001:96ff:fe63:6880/64 scope link
valid_lft forever preferred_lft forever
20: a11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 72:47:c4:48:30:64 brd ff:ff:ff:ff:ff:ff
inet 10.1.0.11/24 brd 10.1.0.255 scope global a11
inet6 fe80::7047:c4ff:fe48:3064/64 scope link
valid_lft forever preferred_lft forever
21: b10: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 76:1e:44:b4:ea:df brd ff:ff:ff:ff:ff:ff
22: b11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether f6:6d:9f:23:1a:bf brd ff:ff:ff:ff:ff:ff
23: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 82:3f:b0:9e:31:e7 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 br0-eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0-eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
# Server
$ nc -l 10.1.0.10 9999
# Client
$ nc -s 10.1.0.11 10.1.0.10 9999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment