Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

Adding ports in bridge 

Adding access port

In the example below, the user creates a bridge named br0, using the set bridge command. With the add-port command, add access ports, ge-1/1/1 and ge-1/1/2, to br0. The default PVID for both ports is 1.

root@PicOS-OVS$ovs-vsctl add-br br0
root@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/1 vlan_mode=access tag=1 -- set Interface ge-1/1/1 type=pica8
root@PicOS-OVS$ovs-vsctl add-port br0 ge-1/1/2 vlan_mode=access tag=1 -- set Interface ge-1/1/2 type=pica8

If the user wants to allow use of a DAC line, user should enable DAC.

root@PicOS-OVS$ovs-vsctl add-port br0 te-1/1/49 vlan_mode=access tag=1 -- set Interface te-1/1/49 type=pica8 options:is_dac=true

Adding Trunk Port

PicOS supports 802.1Q trunk ports (since PicOS 2.1). Each port has a default VLAN-ID; and by default, the VLAN-ID is 1. If user wants a port to belong to more than one VLAN, use the vlan mode=trunk command. When user specifies one port to a trunk port (tag=1), this port is the trunk port, the PVID is the tag number, and this port belongs to all the other VLANs (2-4094).

In the example below, the user specifies the VLAN mode to equal trunk, and then specifies the VLANs in the trunks:

root@PicOS-OVS$ ovs-vsctl add-port br0 ge-1/1/4 vlan_mode=trunk tag=1 trunks=1000 -- set Interface ge-1/1/4 type=pica8

Setting the Port Link Speed

The trunk port can carry all VLANs if the user does not specify the trunks field, as shown below.

root@PicOS-OVS$ ovs-vsctl add-port br0 te-1/1/49 vlan_mode=access tag=1 -- set Interface te-1/1/49 type=pica8 options:link_speed=1G

Modify port ofport

PicOS support modify port ofport,for example,modify ofport of te-1/1/69 from 69 to 190.

admin@PICOS-OVS$ovs-vsctl set interface te-1/1/69 ofport_request=190
admin@PICOS-OVS$ovs-ofctl show br0
OFPT_FEATURES_REPLY (OF1.4) (xid=0x2):
n_tables:254, n_buffers:256
OFPST_PORT_DESC reply (OF1.4) (xid=0x3):
70(te-1/1/70): addr:8c:ea:1b:17:4f:c4
config: 0
state: LINK_UP
current: 10GB-FD FIBER
advertised: 1GB-FD 10GB-FD FIBER
supported: 1GB-FD 10GB-FD FIBER AUTO_NEG
speed: 10000 Mbps now, 10000 Mbps max
190(te-1/1/69): addr:8c:ea:1b:17:4f:c4
config: 0
state: LINK_UP
current: 10GB-FD FIBER
advertised: 1GB-FD 10GB-FD FIBER
supported: 1GB-FD 10GB-FD FIBER AUTO_NEG
speed: 10000 Mbps now, 10000 Mbps max

Setting FEC in port

PicOS Tomahalk switch support enable fec in port.

Users can enable or disable forward error correction on ports. Fec works if the follow conditions are satisfied at the same time.

  • 100G modules plugged in
  • not  breakout into 4 ports
  • speed auto or 100Gb/s
root@PicOS-OVS$ ovs-vsctl add-port br0 he-1/1/1 -- set Interface he-1/1/1 type=pica8 options:use_fec=true
root@PicOS-OVS$ ovs-vsctl add-port br0 he-1/1/1 -- set Interface he-1/1/1 type=pica8 options:use_fec=false

Add Bond Ports

PicOS supports bond multiple ports as in_port or output, and this virtual port does not influence each physical port's forwarding packets. That mean the physical port which adds in bond port also can be configured as lag/gre/l2gre/vxlan and others.

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

// add portsovs-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


Port other_config 


admin@PicOS-OVS$ovs-vsctl set port te-1/1/1 other_config:stp-path-cost=10
admin@PicOS-OVS$ovs-vsctl set port te-1/1/1 other_config:stp-port-num=20
admin@PicOS-OVS$ovs-vsctl set port te-1/1/1 other_config:stp-port-priority=255


Interface options 

1)Interface options:

admin@PicOS-OVS$ovs-vsctl set interface te-1/1/1 options:link_speed=1G

Note:speed value support to configure 40G,100G,25G,10G,1G,100M,10M and auto.

admin@PicOS-OVS$ovs-vsctl set interface te-1/1/1 options:mtu=1500
admin@PicOS-OVS$ovs-vsctl set Interface te-1/1/1 options:flow_ctl=tx_rx

Note:flow control value support tx,rx,tx_rx and none.

admin@PicOS-OVS$ovs-vsctl set interface he-1/1/1 options:use_fec=true


admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:lag_type=lacp
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:members=ge-1/1/1,ge-1/1/2
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:lacp-system-id=00:11:11:11:11:11
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:lacp-time=fast | slow
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:lacp-system-priority=32768
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:lacp-mode=active | passive
admin@PicOS-OVS$ovs-vsctl -- set Interface te-1/1/1 options:lacp-port-id=2
admin@PicOS-OVS$ovs-vsctl -- set Interface te-1/1/1 options:lacp-port-priority=32768
admin@PicOS-OVS$ovs-vsctl -- set Interface te-1/1/1 options:lacp-aggregation-key=0


admin@PicOS-OVS$ovs-vsctl set Interface te-1/1/1 options:link-fault-signaling=ignore-none

Note:it support ignore-none, ignore-local, ignore-remote and ignore-both.

admin@PicOS-OVS$ovs-vsctl set Interface te-1/1/1 options:up-mode=true


admin@PicOS-OVS$ovs-vsctl set interface te-1/1/1 options:tpid=0x8100

Note:tpid support 0x8100,0x88a8,0x9100 and 0x9200.


admin@PicOS-OVS$ovs-vsctl set interface te-1/1/1 options:access-vport=true

Note:default value is false.

6)Loop the traffic which out from switch back to switch again.

admin@PicOS-OVS$ovs-vsctl set interface te-1/1/1 options:loopback=true



admin@PicOS-OVS$ovs-vsctl add-port br0 gre1 -- set Interface gre1 type=pica8_gre options:remote_ip= options:local_ip= options:vlan=1 options:src_mac=00:11:11:11:11:11 options:dst_mac=00:22:22:22:22:22 options:egress_port=te-1/1/1


admin@PicOS-OVS$ovs-vsctl add-port br0 l2gre1 -- set interface l2gre1 type=pica8_l2gre options:remote_ip= options:local_ip= options:vlan=199 options:l2gre_key=1234 options:src_mac=C8:0A:A9:49:1A:99 options:dst_mac=00:00:00:11:11:11 options:egress_port=te-1/1/1


admin@PicOS-OVS$ovs-vsctl add-port br0 vxlan1 -- set interface vxlan1 type=pica8_vxlan options:remote_ip= options:local_ip= options:vlan=1 options:vnid=1122867 options:udp_dst_port=4789  options:src_mac=22:22:22:22:22:22  options:dst_mac=22:11:11:11:11:11  options:egress_port=te-1/1/1


admin@PicOS-OVS$ovs-vsctl set Interface bond1 options:members=te-1/1/1,te-1/1/2


admin@PicOS-OVS$ovs-vsctl set Interface ae1 options:lag_selected_min=1
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:lag_type=static
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=dl_dst
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=dl_src_dst
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=dl_src
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=nw_dst
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=nw_src_dst
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=nw_src
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=resilient
admin@PicOS-OVS$ovs-vsctl -- set Interface ae1 options:hash-mapping=advance

Note:default hash mapping is dl_src_dst.

10) Enable CDR function:

admin@PICOS-OVS$ovs-vsctl set interface te-1/1/1 options:cdr-admin-state=true/false

dmin@PICOS-OVS$ovs-vsctl setnterface te-1/1/1 options:cdr-admin-state=true


admin@PicOS-OVS$ovs-vsctl set interface te-1/1/2 options:ptp-mode=e2etransparent

admin@PICOS-OVS$ovs-vsctl set interface te-1/1/1 options:cdr-admin-state=true

Interface other_config


admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_extended=true
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_demand=true
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_interval=10000
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_ccm_vlan=2000
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_ccm_vlan=random
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_ccm_pcp=7
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 other_config:cfm_opstate=up/down






  • No labels