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

Users can create one or more bridges on a PICA8 switch. Note that each physical port can only be added to one bridge.

User can use command 'ovs-appctl pica/show' to show valid ports.

admin@PicOS-OVS$ovs-appctl pica/show
Max Hardware Flow Entry Limitation:
    TCAM Table    : 2048
    Egress Table  : 256
    VFilter Table : 1024
    L2 Table      : 32768
    L3 Table      : 24000
Valid Interfaces On Switch P3290:
    Physical interfaces:
        ge-1/1/1(1)       ge-1/1/2(2)       ge-1/1/3(3)       ge-1/1/4(4)
        ge-1/1/5(5)       ge-1/1/6(6)       ge-1/1/7(7)       ge-1/1/8(8)
        ge-1/1/9(9)       ge-1/1/10(10)     ge-1/1/11(11)     ge-1/1/12(12)
        ge-1/1/13(13)     ge-1/1/14(14)     ge-1/1/15(15)     ge-1/1/16(16)
        ge-1/1/17(17)     ge-1/1/18(18)     ge-1/1/19(19)     ge-1/1/20(20)
        ge-1/1/21(21)     ge-1/1/22(22)     ge-1/1/23(23)     ge-1/1/24(24)
        ge-1/1/25(25)     ge-1/1/26(26)     ge-1/1/27(27)     ge-1/1/28(28)
        ge-1/1/29(29)     ge-1/1/30(30)     ge-1/1/31(31)     ge-1/1/32(32)
        ge-1/1/33(33)     ge-1/1/34(34)     ge-1/1/35(35)     ge-1/1/36(36)
        ge-1/1/37(37)     ge-1/1/38(38)     ge-1/1/39(39)     ge-1/1/40(40)
        ge-1/1/41(41)     ge-1/1/42(42)     ge-1/1/43(43)     ge-1/1/44(44)
        ge-1/1/45(45)     ge-1/1/46(46)     ge-1/1/47(47)     ge-1/1/48(48)
        te-1/1/49(49)     te-1/1/50(50)     te-1/1/51(51)     te-1/1/52(52)
    LAG   interfaces:    ae1(1025) - ae1023(2047)
    Bond  interfaces:  bond1(2049) - bond1023(3071)
    GRE   interfaces:   gre1(3073) - gre1023(4095)
    VXLAN interfaces: vxlan1(4097) - vxlan1023(5119)
    L2GRE interfaces: l2gre1(5121) - l2gre1023(6143)

Creat a Bridge

User can command "ovs-vsctl add-br <bridge> [-- set bridge br0 datapath_type=pica8]".

From PicOS2.6.5, due to the default datapath_type is pica8, so "-- set bridge br0 datapath_type=pica8" is optional.

root@PicOS-OV$ovs-vsctl add-br br0 -- set bridge br0 datapath_type=pica8
root@PicOS-OVS$ovs-vsctl add-br br1

Viewing the Bridge Settings

Use the show <bridge_name> command to view the bridge details.

root@PicOS-OVS$ovs-ofctl show br0
OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000e89a8f503d30
n_tables:1, n_buffers:256
features: capabilities:0x87, actions:0x3f
1(ge-1/1/1): addr:e8:9a:8f:50:3d:30
config: 0
state: LINK_DOWN
current: 10MB-FD COPPER AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM
advertised: 10MB-FD AUTO_PAUSE
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM
peer: 10MB-FD AUTO_PAUSE
2(ge-1/1/2): addr:e8:9a:8f:50:3d:30
config: 0
state: LINK_DOWN
current: 10MB-FD COPPER AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM
advertised: 10MB-FD AUTO_PAUSE
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM
peer: 10MB-FD AUTO_PAUSE
3(ge-1/1/3): addr:e8:9a:8f:50:3d:30
config: 0
state: LINK_DOWN
current: 10MB-FD COPPER AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM
advertised: 10MB-FD AUTO_PAUSE
supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD AUTO_NEG AUTO_PAUSE AUTO_PAUSE_ASYM
peer: 10MB-FD AUTO_PAUSE
LOCAL(br0): addr:e8:9a:8f:50:3d:30
config: PORT_DOWN
state: LINK_DOWN
current: 10MB-FD COPPER
OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
root@PicOS-OVS$
root@PicOS-OVS$
root@PicOS-OVS$ ovs-vsctl list-ports br0
ge-1/1/1
ge-1/1/2
ge-1/1/3
root@PicOS-OVS$
root@PicOS-OVS$
root@PicOS-OVS$ovs-vsctl list-ifaces br0
ge-1/1/1
ge-1/1/2
ge-1/1/3
root@PicOS-OVS$
root@PicOS-OVS$

Deleting the Bridge

To delete the bridge and its ports, use the del-port command, then the del-br <bridge_name> command.

root@PicOS-OVS$ovs-vsctl  del-port br0 ge-1/1/1
root@PicOS-OVS$ovs-vsctl  del-port br0 ge-1/1/2
root@PicOS-OVS$ovs-vsctl  del-port br0 ge-1/1/3
root@PicOS-OVS$ovs-vsctl  del-br br0

View software table flows

Normally,we view software table flows using below command without options.

admin@PicOS-OVS$ovs-ofctl dump-flows br0

And picos add a cli view to group flows into certain application categories (LLDP, VRRP, IP, Controller, Miscellaneous) or a user-configurable value from Picos 2.8.0. User can filter flows using the flow group name.

ovs-ofctl dump-flows br0 --filter=<VRRP | LLDP | IPV4 | IPV6 | CONTROLLER | MISC>

You can use one filter or more. 

For example:

admin@PicOS-OVS$ovs-ofctl dump-flows br0 --filter=VRRP,LLDP,IPV4,IPV6,CONTROLLER,MISC     
 
VRRP flows (count=1):
 flow_id=9, cookie=0x0, duration=64.268s, table=0, n_packets=n/a, n_bytes=0, priority=22016,ip,in_port=1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,nw_proto=112 actions=output:2
 
LLDP flows (count=1):
 flow_id=6, cookie=0x0, duration=92.408s, table=0, n_packets=n/a, n_bytes=0, in_port=3,dl_dst=01:80:c2:00:00:0e,dl_type=0x88cc actions=output:4
 
IPV4 flows (count=2):
 flow_id=9, cookie=0x0, duration=64.268s, table=0, n_packets=n/a, n_bytes=0, priority=22016,ip,in_port=1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,nw_proto=112 actions=output:2
 flow_id=8, cookie=0x0, duration=72.908s, table=0, n_packets=n/a, n_bytes=0, ip,in_port=2,nw_dst=192.168.100.200 actions=CONTROLLER:65535
 
IPV6 flows (count=1):
 flow_id=10, cookie=0x0, duration=57.592s, table=0, n_packets=n/a, n_bytes=0, tcp6,in_port=3 actions=CONTROLLER:65535
 
Controller flows (count=2):
 flow_id=8, cookie=0x0, duration=72.908s, table=0, n_packets=n/a, n_bytes=0, ip,in_port=2,nw_dst=192.168.100.200 actions=CONTROLLER:65535
 flow_id=10, cookie=0x0, duration=57.592s, table=0, n_packets=n/a, n_bytes=0, tcp6,in_port=3 actions=CONTROLLER:65535
 
MISC flows (count=1):
 flow_id=7, cookie=0x0, duration=80.295s, table=0, n_packets=n/a, n_bytes=0, priority=40000,in_port=3,dl_dst=01:80:c2:00:00:02,dl_type=0x8809 actions=set_field:00:00:00:00:22:33->eth_src,output:4
admin@PicOS-OVS$


Enable STP in bridge

Defaultly, STP is disabled in ovs mode. User can use following command to enable/disable STP in bridge.

ovs-vsctl set bridge <bridge> stp_enable=<true|false>

Example:

admin@PicOS-OVS$ovs-vsctl set bridge br-12 stp_enable=true 
 
admin@PicOS-OVS$ovs-ofctl show br-12
OFPT_FEATURES_REPLY (OF1.4) (xid=0x2):
dpid:0xaa5e60eb69d29cd7(12276356198467542231)
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS GROUP_STATS
OFPST_PORT_DESC reply (OF1.4) (xid=0x3):
 51(te-1/1/51): addr:60:eb:69:d2:9c:d7
     config:     0
     state:      BLOCKED
     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
 52(te-1/1/52): addr:60:eb:69:d2:9c:d7
     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
 LOCAL(br-12): addr:60:eb:69:d2:9c:d7
     config:     0
     state:      LINK_UP
     current:    10MB-FD COPPER
     supported:  10MB-FD COPPER
     speed: 10 Mbps now, 10 Mbps max
OFPT_GET_CONFIG_REPLY (OF1.4) (xid=0x5): frags=normal miss_send_len=0


Other_config about bridge

1)Configure datapath-id:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:datapath-id=0000d80aa99e14a3 

2)Human readable description of datapath:

admin@PicOS-OVS$ovs-vsctl set bridg br0 other_config:dp-desc=pica8 

3)Disable or enable in-band:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other-config:disable-in-band=true/false 

4)The flow table will be cleared or not:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:enable-flush=true/false 

5)This sets the OpenFlow queue ID that will be used by flows set up by in-band control on this bridge:

admin@PicOS-OVS$ovs-vsctl set bridg br0 other_config:in-band-queue=4

Note: in-band-queue is in range 0 to 7.

6)Configure stp:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:stp-priority=0x7800
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:stp-system-id=123456
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:stp-hello-time=10

Note:stp hello time is in range 1 to 10.

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:stp-max-age=6

Note:stp max age is in range 6 to 40.

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:stp-forward-delay=6

Notestp-forward-delay is in range 4 to 30. 

7)Specifies the number of threads for software datapaths to use for handling new flows:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:n-handler-threads=1 

8)Specifies the number of threads for software datapaths to use for revalidating flows in the Datapath:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:n-revalidator-threads=2 

9)The maximum number of seconds to retain a MAC learning entry for which no packets have been seen.

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:mac-aging-time=300 

10)The maximum number of MAC addresses to learn.

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:mac-table-size=2048

11)LLDP:

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-msg-tx-hold=4
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-msg-tx-interval=30
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-reinit-delay=2
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tx-delay=2
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-port-desc=false
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-name=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-desc=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-sys-cap=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-mgmt-addr=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-pvid=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-mac-phy=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-power-via-mdi=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-max-frame-size=true
admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:lldp-tlv-link-aggregation=true

12)Configure bridge mac address.

admin@PicOS-OVS$ovs-vsctl set bridge br0 other_config:hwaddr=22:22:22:22:22:22

 

 

 

 

  • No labels