-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht1-s1-commands.txt
32 lines (22 loc) · 1.01 KB
/
t1-s1-commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#dmac, forward | hdr.ethernet.dstAddr, standard_metadata.ingress_port => egressSpec_t port
table_add dmac forward 00:00:0a:00:00:01 2 => 1
table_add dmac forward 00:00:0a:00:00:02 1 => 2
table_add dmac forward 00:00:0a:00:00:03 4 => 3
table_add dmac forward 00:00:0a:00:00:04 3 => 4
#define broadcasting port groups
mc_node_create 0 1 2
mc_node_create 1 3 4
#associate node group with mcast group
mc_mgrp_create 1
mc_node_associate 1 0
mc_mgrp_create 2
mc_node_associate 2 1
#select_mcast_grp, set_mcast_grp | standard_metadata.ingress_port => bit<16> mcast_grp
table_add select_mcast_grp set_mcast_grp 1 => 1
table_add select_mcast_grp set_mcast_grp 2 => 1
table_add select_mcast_grp set_mcast_grp 3 => 2
table_add select_mcast_grp set_mcast_grp 4 => 2
#tcp_syn_match, get_syn_packetTime | hdr.tcp.syn, standard_metadata.ingress_port
table_add tcp_syn_match computeSynHashAndTime 1 1 => 1
#tcp_ack_match, get_ack_packetTime | hdr.tcp.ack, standard_metadata.ingress_port
table_add tcp_ack_match computeAckHashAndTime 1 1 => 1