Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

            goto_table:60 (optional)
            write_actions(necessary): L3 Multicast group,DEC_NW_TTL

 default flows in multicast routing table

  • priority:32768

  • match fields:[ ]

  • instructions:   

            goto_table:policy table(table_id is 60)

...

Code Block
ovs-vsctl set-ttp-enable true
ovs-vsctl set-ttp-file vz_etech_ttp_v0.3.json
ovs-vsctl show-ttp
sudo /etc/init.d/picossystemctl restart picos

(2)configure bridge and port

...

Then ge-1/1/2 will transmit the packets with vlan 200,src mac is 88:88:88:00:00:00,ge-1/1/3 will transmit the packets is src mac is 44:44:44:00:00:00,vlan is 300

Example 2: IPv4 Multicast (l2 multicast) 

(1)enable TTP and add bridge and port first.

...

Then ge-1/1/2 will transmit the packets which are the sane with the packets from ge-1/1/1.

 Example 3: IPv6 Multicast(l3 multicast)

(1) enable TTP and add port and bridge.

(2)add group

l2 interface group:

Code Block
ovs-ofctl add-group br0 group_id=1,type=indirect,bucket=output:2
ovs-ofctl add-group br0 group_id=5,type=indirect,bucket=output:3

l3 multicast interface group:

Code Block
ovs-ofctl add-group br0 group_id=2,type=indirect,bucket=set_field:88:88:88:00:00:00-\>dl_src,set_field:200-\>vlan_vid,group:1
ovs-ofctl add-group br0 group_id=6,type=indirect,bucket=set_field:44:44:44:00:00:00-\>dl_src,set_field:300-\>vlan_vid,group:5

l3 multicast group:

Code Block
ovs-ofctl add-group br0 group_id=3,type=all,bucket=group:2,bucket=group:6

(3) add flow

Code Block
ovs-ofctl add-flow br0 table=40,priority=32768,dl_type=0x86dd,dl_vlan=10,ipv6_src=2000::1,ipv6_dst=ff00::1,actions=write_actions\(group:3,dec_nw_ttl\),goto_table:60

(4)Check the hardware flow

Code Block
admin@PicOS-OVS$ovs-appctl pica/dump-flows
Multicast Routing Table: (Total 1 flows)
 ID=5040 ipv6,dl_vlan=10,ipv6_src=2000::1,ipv6_dst=ff00::1, actions:group(id=3,all,n=2,b0(live,group(id=2,indirect,n=1,b0(live,set(dl_src=88:88:88:00:00:00),set(vlan_vid=200),group(id=1,indirect,n=1,b0(live,output:2))))),b1(live,group(id=6,indirect,n=1,b0(live,set(dl_src=44:44:44:00:00:00),set(vlan_vid=300),group(id=5,indirect,n=1,b0(live,output:3)))))),goto(Policy ACL Table)

(5)send ipv6 mutlicast packets

send ipv6 packets with dst mac 33:33:33:00:00:01,vlan is 10,ipv6 src address is 2000::1,ipv6 dst address is ff00::1

Then ge-1/1/2 will transmit the packets with source mac 88:88:88:00:00:00,vlan is 200,ge-1/1/3 will transmit the packets with dst mac is 33:33:33:00:00:01,src mac is 44:44:44:00:00:00, vlan is 300.

Example 4: IPv6 Multicast (l2 multicast)

(1) enable TTP and add bridge and port

(2)add groups

l2 interface group:

Code Block
ovs-ofctl add-group br0 group_id=1,type=indirect,bucket=output:2
ovs-ofctl add-group br0 group_id=2,type=indirect,bucket=output:3

l3 multicast group:

Code Block
ovs-ofctl add-group br0 group_id=3,type=all,bucket=group:1,bucket=group:2

(3)add flow

Code Block
ovs-ofctl add-flow br0 table=40,priority=32768,dl_type=0x86dd,dl_vlan=10,ipv6_src=2000::1,ipv6_dst=ff00::1,actions=write_actions\(group:3,dec_nw_ttl\),goto_table:60

(4)check the hardware flow

Code Block
admin@PicOS-OVS$ovs-appctl pica/dump-flows
Multicast Routing Table: (Total 1 flows)
 ID=1 ipv6,dl_vlan=10,ipv6_src=2000::1,ipv6_dst=ff00::1, actions:group(id=3,all,n=2,b0(group(id=1,indirect,n=1,b0(output:2))),b1(live,group(id=2,indirect,n=1,b0(live,output:3)))),goto(Policy ACL Table)

(5)send ipv6 packets

send ipv6 packets with dst mac 33:33:33:00:00:01,src mac is 22:11:11:11:11:11,vlan is 10,ipv6 src address is 2000::1,ipv6 dst address is ff00::1

Then ge-1/1/2 and ge-1/1/3 will transmit the packets with source mac 22:11:11:11:11:11,vlan is 10.