Configuring ports in bridge

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
root@PicOS-OVS$

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
root@PicOS-OVS$

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
root@PicOS-OVS$

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):
dpid:0x1c488cea1b174fc4(2038033768489897924)
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS GROUP_STATS
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

Introduction

Forwarding Error Correction (FEC) is a technique used for controlling errors in data transmission over unreliable or noisy communication channels. The sender sends the data together with a certain redundant error correction code. When the data is received at the receiver’s end, it is checked according to the error correction code. If an error is found, the receiver recognizes it and corrects the error without data retransmission.

The FEC function can be applied to 100G, 40G and 25G ports of the switch and works only when all of the three following conditions are matched:

  • FEC function is enabled on both ends of the link.
  • Optical modules are plugged in.
  • Interface rate is auto or at the default value, i.g. 100G optical port works at 100Gb/s.

PICOS offers FEC algorithm RS-FEC (CL91) on 100G port and FEC BASE-R (CL74) on 40G port.

For 25G port, PICOS offers two different FEC algorithms on different switch platforms:

Trident 3, Maverick2, Helix5 and Tomahawk 2 platform switches support RS-FEC (CL108) mode, Tomahawk+/Tomahawk platform switches support BASE-R (CL74) mode.

NOTE:

The port can link up only when the FEC configurations and the FEC algorithm mode on both ends of the link are the same.

Configuration Example

root@PicOS-OVS$ ovs-vsctl add-port br0 xe-1/1/1 -- set Interface xe-1/1/1 type=pica8 options:use_fec=true
root@PicOS-OVS$
root@PicOS-OVS$ ovs-vsctl add-port br0 xe-1/1/1 -- set Interface xe-1/1/1 type=pica8 options:use_fec=false
root@PicOS-OVS$

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 

STP:

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

2)LACP:

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

3)LFS:

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

4)Tpid

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

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

5)Access-vport

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

7)Tunnel:

Gre:

admin@PicOS-OVS$ovs-vsctl add-port br0 gre1 -- set Interface gre1 type=pica8_gre options:remote_ip=10.10.60.10 options:local_ip=10.10.61.10 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

L2gre:

admin@PicOS-OVS$ovs-vsctl add-port br0 l2gre1 -- set interface l2gre1 type=pica8_l2gre options:remote_ip=10.10.61.10 options:local_ip=10.10.60.10 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

vxlan:

admin@PicOS-OVS$ovs-vsctl add-port br0 vxlan1 -- set interface vxlan1 type=pica8_vxlan options:remote_ip=10.10.10.1 options:local_ip=10.10.10.2 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

 8)Bond:

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

9)Lag:

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


11)PTP

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


Interface other_config

Cfm:

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


Configuring the Duplex Mode of Optical Port as Auto-negotiation Mode

Notes:

  • Currently, duplex mode for optical port is only available for the 10 optical port when its port rate set to 1G.
  • Duplex mode for optical port currently only supports to configure as auto, i.e. auto-negotiation mode.


admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 options:link_speed=1G
admin@PicOS-OVS$ovs−vsctl set Interface te-1/1/1 options:duplex=auto


Configuring Port Breakout

Notes:

You need to restart or reboot the system to make the setting take effect when performing port breakout operation.


The following command configures port breakout for port with number 49.

admin@PICOS:~$ ovs-vsctl set-port-breakout 49 true
  Port 49 has been set breakout=true!
  Please reboot for the change to take effect!
admin@PICOS:~$ sudo systemctl restart picos


The following command disables port breakout for port with number 49.

admin@PICOS:~$ ovs-vsctl set-port-breakout 49 false
  Port 49 has been set breakout=false!
  Please reboot for the change to take effect!
admin@PICOS:~$ sudo systemctl restart picos



Copyright © 2024 Pica8 Inc. All Rights Reserved.