-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathecmp_encap_split.txt
72 lines (72 loc) · 4.51 KB
/
ecmp_encap_split.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
############### SPLIT TRAFFIC across multiple SID lists with ECMP
#
# Create a group for the ecmp selector
act_prof_create_group IngressPipeImpl.ecmp_selector
#
# Create members for the ecmp selector group (last two arguments are action parameters).
# Here we assume we want to split traffic in two SID lists with a weight of 70% for the
# first and a weight of 30% for the second path. To implement this we create 10 different
# members of the group: 7 (equal between each other) represent the first path, the other
# three represent the second path. In this way, the traffic is statistically splitted
# across the two SID lists.
#
# First path -> 7 entries (70%)
#
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000100020003000400050006
#
# Second path -> 3 entries (30%)
#
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000a000b000c000d000e000f
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000a000b000c000d000e000f
act_prof_create_member IngressPipeImpl.ecmp_selector IngressPipeImpl.usid_encap_1_v4 0xfcbbbbbb000000000000000000000001 0xfcbbbbbb000a000b000c000d000e000f
#
# add the created members to the group
# act_prof_add_member_to_group <action_selector> <member handle> <group handle>
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 0 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 1 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 2 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 3 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 4 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 5 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 6 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 7 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 8 0
act_prof_add_member_to_group IngressPipeImpl.ecmp_selector 9 0
#
# add an entry to the table with the ecmp selector implementation
# table_indirect_add_with_group <table name> <[match keys]> => <group handle>
table_indirect_add_with_group IngressPipeImpl.srv6_encap_v4 0x2 1.1.1.1/32 => 0
#
############# ROUTING v6 with ECMP
#
# create a group for the routing_v6 ecmp selector
act_prof_create_group IngressPipeImpl.ip6_ecmp_selector
#
# create members for the ecmp selector group (last two arguments are action parameters)
act_prof_create_member IngressPipeImpl.ip6_ecmp_selector IngressPipeImpl.set_next_hop 22:22:22:22:22:22
act_prof_create_member IngressPipeImpl.ip6_ecmp_selector IngressPipeImpl.set_next_hop 33:33:33:33:33:33
#
# add the created members to the group
# act_prof_add_member_to_group <action_selector> <member handle> <group handle>
act_prof_add_member_to_group IngressPipeImpl.ip6_ecmp_selector 0 0
act_prof_add_member_to_group IngressPipeImpl.ip6_ecmp_selector 1 0
#
# add an entry to the table with the ecmp selector implementation
# table_indirect_add_with_group <table name> <[match keys]> => <group handle>
table_indirect_add_with_group IngressPipeImpl.routing_v6 0xfcbbbbbb000100000000000000000000/48 => 0
table_indirect_add_with_group IngressPipeImpl.routing_v6 0xfcbbbbbb000a00000000000000000000/48 => 0
#
############# UNICAST FIB TABLE
#
table_add IngressPipeImpl.unicast IngressPipeImpl.set_output_port 22:22:22:22:22:22 => 1
table_add IngressPipeImpl.unicast IngressPipeImpl.set_output_port 33:33:33:33:33:33 => 1
#
############# L2 switch mac address table
#
table_add IngressPipeImpl.l2_firewall NoAction 22:22:22:22:22:22 0