[ovs-discuss] Command to get port name and port id mapping

Justin Pettit jpettit at nicira.com
Tue Jun 30 16:53:45 UTC 2015


It's in quite a few places.  The way people usually get it is from the "ofport" column of the Interface table in the database.  You can see it by running "ovs-vsctl list interface".  You can also run "ovs-appctl dpif/show" which will show you both the OpenFlow port number as well as the datapath one.  Another option is with "ovs-ofctl dump-ports br-int".

--Justin


> On Jun 30, 2015, at 9:48 AM, Xuemei Liu <lxuemei3000 at gmail.com> wrote:
> 
> Hi, 
> 
> I want to generate forwarding rules for ovs, and need to get the port id (0, 1, ...) at the ovs from the port name (eth0, ...).  I tried ovs-vsctl show, ovs-dpctl show, but they don't show the port id. Could anyone tell me the commands to implement this task?
> 
> Thanks,
> Xuemei Liu
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss




More information about the discuss mailing list