@@ -4,10 +4,10 @@ In this exercise, you will implement a form of load balancing based on
4
4
a simple version of Equal-Cost Multipath Forwarding. The switch you
5
5
will implement will use two tables to forward packets to one of two
6
6
destination hosts at random. The first table will use a hash function
7
- (applied to a 5-tuple consisting of the source and destination
8
- IP addresses, IP protocol, and source and destination TCP ports)
9
- to select one of two hosts. The second table will use the
10
- computed hash value to forward the packet to the selected host.
7
+ (applied to a 5-tuple consisting of the source and destination IP
8
+ addresses, IP protocol, and source and destination TCP ports) to
9
+ select one of two hosts. The second table will use the computed hash
10
+ value to forward the packet to the selected host.
11
11
12
12
> ** Spoiler alert:** There is a reference solution in the ` solution `
13
13
> sub-directory. Feel free to compare your implementation to the
@@ -63,16 +63,9 @@ control plane. When a rule matches a packet, its action is invoked
63
63
with parameters supplied by the control plane as part of the rule.
64
64
65
65
In this exercise, the control plane logic has already been
66
- implemented. As part of bringing up the Mininet instance, the
67
- ` make ` script will install packet-processing rules in the tables of
68
- each switch. These are defined in the ` s1-commands.txt ` file.
69
-
70
- ** Important:** A P4 program also defines the interface between the
71
- switch pipeline and control plane. The ` s1-commands.txt ` file contains
72
- a list of commands for the BMv2 switch API. These commands refer to
73
- specific tables, keys, and actions by name, and any changes in the P4
74
- program that add or rename tables, keys, or actions will need to be
75
- reflected in these command files.
66
+ implemented. As part of bringing up the Mininet instance, the ` make `
67
+ script will install packet-processing rules in the tables of each
68
+ switch. These are defined in the ` sX-runtime.json ` files.
76
69
77
70
## Step 2: Implement Load Balancing
78
71
@@ -105,9 +98,6 @@ Follow the instructions from Step 1. This time, your message from
105
98
` h1 ` should be delivered to ` h2 ` or ` h3 ` . If you send several
106
99
messages, some should be received by each server.
107
100
108
- ### Food for thought
109
-
110
-
111
101
### Troubleshooting
112
102
113
103
There are several ways that problems might manifest:
@@ -116,10 +106,10 @@ There are several ways that problems might manifest:
116
106
report the error emitted from the compiler and stop.
117
107
118
108
2 . ` load_balance.p4 ` compiles but does not support the control plane
119
- rules in the ` sX-commands.txt ` files that ` make ` tries to install
120
- using the BMv2 CLI . In this case, ` make ` will log the CLI tool output
121
- in the ` logs ` directory. Use these error messages to fix your ` load_balance.p4 `
122
- implementation.
109
+ rules in the ` sX-runtime.json ` files that ` make ` tries to install
110
+ using the Python controller . In this case, ` make ` will log the
111
+ controller output in the ` logs ` directory. Use the error messages to
112
+ fix your ` load_balance.p4 ` implementation.
123
113
124
114
3 . ` load_balance.p4 ` compiles, and the control plane rules are
125
115
installed, but the switch does not process packets in the desired way.
@@ -139,4 +129,4 @@ mn -c
139
129
140
130
## Next Steps
141
131
142
- Congratulations, your implementation works!
132
+ Congratulations, your implementation works and you have finished the tutorial!
0 commit comments