ovs-vsctl add-port

To create a new port on the bridge from the network device of the same name, use the ovs-vsctl add-port command. 

Syntax

ovs-vsctl [options] [--may-existadd-port bridge port [args]

Parameters

optionsSee the output of ovs-vsctl --help command, also reproduced here.
--may-exist

Without the --may-exist option, attempting to create a port that exists is an error. With the --may-exist option, this command does nothing if the port already exists in the bridge and is not a bonded port.

bridgeBridge name.
portPort name.
args

Optional arguments configure additional parameters for the port. For example, tag=9 would make the port an access port for VLAN 9. The syntax is the same as that for the ovs-vsctl set port command.

Examples

The following example adds the ge-1/1/1 port to bridge br0:

admin@Switch$ovs-vsctl add-port br0 ge-1/1/1
 

Add Bond Ports

PicOS support bond multiple ports as in_port or output, and this virtual port will not influnce each physical port forwarding packets.

Examples

Bonding port ge-1/1/1 ~ ge-1/1/4 as one port.

// add ports
ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8
ovs-vsctl add-port br0 ge-1/1/1 vlan_mode=trunk tag=1 -- set Interface ge-1/1/1 type=pica8
ovs-vsctl add-port br0 ge-1/1/2 vlan_mode=trunk tag=1 -- set Interface ge-1/1/2 type=pica8
ovs-vsctl add-port br0 ge-1/1/3 vlan_mode=trunk tag=1 -- set Interface ge-1/1/3 type=pica8
ovs-vsctl add-port br0 ge-1/1/4 vlan_mode=trunk tag=1 -- set Interface ge-1/1/4 type=pica8

// add bond ports
ovs-vsctl add-port br0 bond1 -- set Interface bond1 type=pica8_bond
ovs-vsctl set Interface bond1 options:members=ge-1/1/2,ge-1/1/3,ge-1/1/4

// add flows
ovs-ofctl add-flow br0 in_port=2049,actions=1
ovs-ofctl add-flow br0 in_port=1,actions=2049

Copyright © 2024 Pica8 Inc. All Rights Reserved.