[ovs-discuss] Help adding ports in ovs-sandbox

Ben Pfaff blp at ovn.org
Tue Nov 14 21:03:12 UTC 2017


ovs-vswitchd running in the sandbox doesn't interact with the system at
all, so ports you create there won't appear when you run system
utilities.

On Tue, Nov 14, 2017 at 07:29:16PM +0000, Omar Ramadan wrote:
> Hello,
> 
> 
> I am using the ovs-sandbox to run ovs-vswitchd in gdb and am having some trouble adding ports to a bridge I've created. The port is added to the bridge, however the link state is down and neither the bridge nor the added port appear in the list of system interfaces. Therefore, it isn't able to process any traffic.
> 
> 
> root at magma-dev:/home/vagrant/ovs/tutorial# ovs-vsctl -V
> 
> ovs-vsctl (Open vSwitch) 2.8.0
> 
> DB Schema 7.15.0
> 
> root at magma-dev:/home/vagrant/ovs/tutorial# uname -a
> Linux magma-dev 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
> 
> 
> root at magma-dev:/home/vagrant/ovs/tutorial# ovs-vsctl add-port gtp_br0 gtp0 -- set interface gtp0 ofport_request=32768 type=gtp option:remote_ip=flow options:key=flow
> 
> 
> root at magma-dev:/home/vagrant/ovs/tutorial# ovs-ofctl show gtp_br0
> 
> OFPT_FEATURES_REPLY (xid=0x2): dpid:0000cedec4698b43
> 
> n_tables:254, n_buffers:0
> 
> capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
> 
> actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
> 
>  32768(gtp0): addr:aa:55:aa:55:00:1b
> 
>      config:     PORT_DOWN
> 
>      state:      LINK_DOWN
> 
>      speed: 0 Mbps now, 0 Mbps max
> 
>  LOCAL(gtp_br0): addr:ce:de:c4:69:8b:43
> 
>      config:     PORT_DOWN
> 
>      state:      LINK_DOWN
> 
>      speed: 0 Mbps now, 0 Mbps max
> 
> OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
> 
> 
> root at magma-dev:/home/vagrant/ovs/tutorial# ip a
> 
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
> 
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 
>     inet 127.0.0.1/8 scope host lo
> 
>        valid_lft forever preferred_lft forever
> 
>     inet6 ::1/128 scope host
> 
>        valid_lft forever preferred_lft forever
> 
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master unmanaged_br0 state UP group default qlen 1000
> 
>     link/ether 08:00:27:06:49:4f brd ff:ff:ff:ff:ff:ff
> 
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
> 
>     link/ether 08:00:27:f4:93:02 brd ff:ff:ff:ff:ff:ff
> 
>     inet 192.168.60.142/24 brd 192.168.60.255 scope global eth1
> 
>        valid_lft forever preferred_lft forever
> 
>     inet6 fe80::a00:27ff:fef4:9302/64 scope link
> 
>        valid_lft forever preferred_lft forever
> 
> 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
> 
>     link/ether 08:00:27:67:d7:c8 brd ff:ff:ff:ff:ff:ff
> 
>     inet 42.42.42.1/24 brd 42.42.42.255 scope global eth2
> 
>        valid_lft forever preferred_lft forever
> 
>     inet6 fe80::a00:27ff:fe67:d7c8/64 scope link
> 
>        valid_lft forever preferred_lft forever
> 
> 5: veth0_ovs at veth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
> 
>     link/ether a6:0a:c5:a6:f6:d9 brd ff:ff:ff:ff:ff:ff
> 
>     inet6 fe80::a40a:c5ff:fea6:f6d9/64 scope link
> 
>        valid_lft forever preferred_lft forever
> 
> 6: veth0 at veth0_ovs: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master unmanaged_br0 state UP group default qlen 1000
> 
>     link/ether 0e:62:49:8c:e8:c6 brd ff:ff:ff:ff:ff:ff
> 
> 7: unmanaged_br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
> 
>     link/ether 08:00:27:06:49:4f brd ff:ff:ff:ff:ff:ff
> 
>     inet 10.0.2.15/24 brd 10.0.2.255 scope global unmanaged_br0
> 
>        valid_lft forever preferred_lft forever
> 
>     inet6 fe80::a00:27ff:fe06:494f/64 scope link
> 
>        valid_lft forever preferred_lft forever
> 
> Thanks for the help,
> Omar
> 
> 
> 
> 
> 
> 

> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss



More information about the discuss mailing list