blob: 09b3917f50c6cfce9e820074e599052a3d0d0536 [file] [log] [blame]
Charles Chan9e5c6172019-09-07 11:24:54 -07001Pseudowire
2==========
Zack Williamsd63d35b2020-06-23 14:12:46 -07003In Trellis, we assign different subnets to hosts that attach to different edge
4(leaf) switches. These hosts communicate over IP when traversing the spine
5switches, meaning that the layer-2 header is not preserved across
6transportation. However, in some use cases it is beneficial for hosts that
7connect to different leaves to be able to talk directly over L2 and also belong
8to the same IP subnet.
9
Charles Chan9e5c6172019-09-07 11:24:54 -070010We implemented Pseudowire (PW) in Trellis to fulfill this requirement.
11
Zack Williamsd63d35b2020-06-23 14:12:46 -070012Pseudowires create tunnels between different connection points that transport
13L2 traffic between them.
14
15Pseudowires can handle single-tagged/double-tagged traffic and are able to
16modify the VLAN tags in some cases.
Charles Chan9e5c6172019-09-07 11:24:54 -070017
18.. note::
19 Pseudowires are only supported on OF-DPA hardware switches.
20
21Managing pseudowires via REST
22-----------------------------
Zack Williamsd63d35b2020-06-23 14:12:46 -070023
Charles Chan9e5c6172019-09-07 11:24:54 -070024You can find the REST API documentation at ``http://${ONOS-IP}:8181/onos/v1/docs``.
Zack Williamsd63d35b2020-06-23 14:12:46 -070025
Charles Chan9e5c6172019-09-07 11:24:54 -070026Please click the drop down list and select Segment Routing Server.
27
Charles Chan20fabfb2019-09-07 11:24:54 -070028.. image:: ../images/config-pw-rest.png
Charles Chan9e5c6172019-09-07 11:24:54 -070029 :width: 700px
30
31We configure and implement PWs through the dedicated REST API.
32
33.. code-block:: console
34
35 $ curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://${ONOS-IP}:8181/onos/segmentrouting/pseudowire/ -d@pseudowire.json
36 $ curl --user onos:rocks -X GET -H 'Content-Type:application/json' http://${ONOS-IP}:8181/onos/segmentrouting/pseudowire/ -d@pseudowire.json
37 $ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json' http://${ONOS-IP}:8181/onos/segmentrouting/pseudowire/ -d@pseudowire.json
38
Zack Williamsd63d35b2020-06-23 14:12:46 -070039Below is an example configuration for a single pseudowire, which transfers L2
40double tagged traffic from cp1 to cp2 and also changes the outer VLAN tag of
41the packets.
Charles Chan9e5c6172019-09-07 11:24:54 -070042
43.. code-block:: json
44
45 {
46 "pwId" : 42,
47 "cP1": "of:0000000000000205/25",
48 "cP2": "of:0000000000000206/33",
49 "cP1InnerTag": "101",
50 "cP1OuterTag": "110",
51 "cP2InnerTag": "101",
52 "cP2OuterTag": "111",
53 "mode": "RAW",
54 "sdTag": "",
55 "pwLabel": "1572"
56 }
57
58- ``cP1``: First connection point of PW
Zack Williamsd63d35b2020-06-23 14:12:46 -070059
Charles Chan9e5c6172019-09-07 11:24:54 -070060- ``cP2``: Second connection point of PW
Zack Williamsd63d35b2020-06-23 14:12:46 -070061
62- ``cP1InnerTag / cp1OuterTag``: The expected inner and outer VLAN tags for
63 ``cp1``. If you only want to use a single incoming tag, use the innerTag, and
64 use ``None`` for the outerTag.
65
Charles Chan9e5c6172019-09-07 11:24:54 -070066- ``cP2InnerTag / cp2OuterTag``: The expected inner and outer VLAN tags for ``cp2``.
Zack Williamsd63d35b2020-06-23 14:12:46 -070067
Charles Chan9e5c6172019-09-07 11:24:54 -070068- ``mode``: Pseudowire mode - RAW and TAGGED. Only RAW mode is supported in Trellis.
Zack Williamsd63d35b2020-06-23 14:12:46 -070069
Charles Chan9e5c6172019-09-07 11:24:54 -070070- ``sdTag``: Service delimiting tag, only meaningful when in TAGGED mode.
Zack Williamsd63d35b2020-06-23 14:12:46 -070071
Charles Chan9e5c6172019-09-07 11:24:54 -070072- ``pwLabel``: Unique pseudowire label.
Zack Williamsd63d35b2020-06-23 14:12:46 -070073
Charles Chan9e5c6172019-09-07 11:24:54 -070074- ``pwId``: ID of the pseudowire.
75
76The REST API also supports bulk addition and removal of pseudowire.
77
78.. code-block:: console
79
80 $ curl --user onos:rocks -X POST -H 'Content-Type:application/json'http://<controller-ip>:8181/onos/segmentrouting/pseudowire/bulk -d@pseudowires.json
81 $ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json'http://<controller-ip>:8181/onos/segmentrouting/pseudowire/bulk -d@pseudowires.json
82
83with the following example configuration:
84
85.. code-block:: json
86
87 {
88 "pseudowires": [{
89 "pwId": 43,
90 "cP1": "of:0000000000000227/15",
91 "cP2": "of:0000000000000205/33",
92 "cP1InnerTag": "101",
93 "cP1OuterTag": "",
94 "cP2InnerTag": "101",
95 "cP2OuterTag": "",
96 "mode": "RAW",
97 "sdTag": "",
98 "pwLabel": "2572"
99 },
100 {
101 "pwId": 42,
102 "cP1": "of:0000000000000201/12",
103 "cP2": "of:0000000000000204/12",
104 "cP1InnerTag": "101",
105 "cP1OuterTag": "",
106 "cP2InnerTag": "101",
107 "cP2OuterTag": "",
108 "mode": "RAW",
109 "sdTag": "",
110 "pwLabel": "1572"
111 }
112 ]
113 }
114
115
116Managing pseudowires via CLI
117----------------------------
118
119To add a pseudowire:
120
121.. code-block:: text
122
123 onos> sr-pw-add --help
124 DESCRIPTION
125 onos:sr-pw-add
126
127 Add a pseudowire to the network configuration, if it already exists update it.
128
129 SYNTAX
130 onos:sr-pw-add [options] pwId pwLabel mode sDTag cP1 cP1InnerVlan cP1OuterVlan cP2 cP2InnerVlan cP2OuterVlan
131
132 <omitted>
133
134 onos> sr-pw-add 42 1000 RAW None of:0000000000000204/12 100 10 of:0000000000000205/12 100 40
135
136To list existing pseudowires:
137
138.. code-block:: text
139
140 onos> sr-pw-list
141
142To remove a pseudowire:
143
144.. code-block:: text
145
146 onos> sr-pw-remove 42
147
148
149Type of pseudowires
150-------------------
Zack Williamsd63d35b2020-06-23 14:12:46 -0700151
Charles Chan9e5c6172019-09-07 11:24:54 -0700152- **Leaf - Leaf** : As explained above we support leaf - leaf pseudowires.
153
Zack Williamsd63d35b2020-06-23 14:12:46 -0700154- **Spine - Leaf** : We further support leaf to spine pseudowires, where one
155 termination point resides in a spine switch rather than a leaf switch.
156 Please note that the encapsulated traffic for these types of pseudowires is
157 carried **tagged** between leaf and spines, the reason for this is due to
158 some hardware limitation. The **reserved transport VLAN is 4093**.
Charles Chan9e5c6172019-09-07 11:24:54 -0700159
160- Multi-stage
161
Zack Williamsd63d35b2020-06-23 14:12:46 -0700162 - **Leaf - Spine-1 - Spine-2**: Where Spine-1 and Spine-2 are interconnected
163 between them and are part of distinct topologies.
164
165 - **Leaf_1 - Spine_1 - Spine_2 - Leaf_2**: Where leaf-1 and leaf-2 are part
166 of different fabric topologies which are interconnected between them
167 between two spines.
Charles Chan9e5c6172019-09-07 11:24:54 -0700168
169
170Common errors
171-------------
Charles Chan9e5c6172019-09-07 11:24:54 -0700172
Zack Williamsd63d35b2020-06-23 14:12:46 -0700173If your pseudowires do not work make sure you have done the following in the
174host side:
175
176- Disabled VLAN offloading in the VM interfaces and also in the compute node
177 interfaces.
178
Charles Chan9e5c6172019-09-07 11:24:54 -0700179- Set the compute node interfaces and the VM interfaces at promiscuous mode.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700180
181- In general, do the above for all the interfaces and bridges participated in
182 the topology (either in a VM or physical server).
183
184- Before programming pseudowires make sure that the topology is completely up
185 and running and also the configuration is added to the controller and the
186 fabric is in an operational state.
Charles Chan9e5c6172019-09-07 11:24:54 -0700187
188
189Restrictions
190------------
Zack Williamsd63d35b2020-06-23 14:12:46 -0700191
192We list now some restrictions of pseudowire support, some of them stem from the
193implementation while others from switch hardware constraints.
Charles Chan9e5c6172019-09-07 11:24:54 -0700194
195- We only support pseudowires with the same type of tagged traffic at each end.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700196 For example, if cP1 handles single tagged traffic then cP2 must handle single
197 tagged traffic (same applies for single tagged and double tagged traffic).
198 However, for pseudowires with single tagged traffic we support changing the
199 tag, and for pseudowires with double tagged traffic we support changing the
200 outer tag. We would like to support more use cases, however we are limited
201 by hardware pipeline restrictions. In the future, and if needed, we might
202 address this by using the egress tables of OF-DPA.
Charles Chan9e5c6172019-09-07 11:24:54 -0700203
Zack Williamsd63d35b2020-06-23 14:12:46 -0700204- As of now, we only support RAW mode. We will support also TAGGED mode in the
205 future if needed by any use case. Since, we only support RAW mode the
206 ``sdTag`` must always be empty or None.
Charles Chan9e5c6172019-09-07 11:24:54 -0700207
208Implementation limits
209---------------------
Zack Williamsd63d35b2020-06-23 14:12:46 -0700210
Charles Chan9e5c6172019-09-07 11:24:54 -0700211- **Link failures**: We partially support link failures.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700212 Specifically, our PW implementation does not properly handle link failures
213 when the link involved is the one used for pseudowire traffic at the spine
214 switches towards a leaf switch.
215
216 This is due to an OF-DPA limitation which does not allow the use of MPLS ECMP
217 groups in the spine.
218
Charles Chan9e5c6172019-09-07 11:24:54 -0700219 We plan to address this in the next release.
220
Zack Williamsd63d35b2020-06-23 14:12:46 -0700221- **Device failures**: We do not handle device failures currently, on a device
222 failure please remove and re-install the pseudowire. We will address this
223 soon.