Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 1 | Pseudowire |
| 2 | ========== |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 3 | In Trellis, we assign different subnets to hosts that attach to different edge |
| 4 | (leaf) switches. These hosts communicate over IP when traversing the spine |
| 5 | switches, meaning that the layer-2 header is not preserved across |
| 6 | transportation. However, in some use cases it is beneficial for hosts that |
| 7 | connect to different leaves to be able to talk directly over L2 and also belong |
| 8 | to the same IP subnet. |
| 9 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 10 | We implemented Pseudowire (PW) in Trellis to fulfill this requirement. |
| 11 | |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 12 | Pseudowires create tunnels between different connection points that transport |
| 13 | L2 traffic between them. |
| 14 | |
| 15 | Pseudowires can handle single-tagged/double-tagged traffic and are able to |
| 16 | modify the VLAN tags in some cases. |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 17 | |
| 18 | .. note:: |
| 19 | Pseudowires are only supported on OF-DPA hardware switches. |
| 20 | |
| 21 | Managing pseudowires via REST |
| 22 | ----------------------------- |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 23 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 24 | You can find the REST API documentation at ``http://${ONOS-IP}:8181/onos/v1/docs``. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 25 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 26 | Please click the drop down list and select Segment Routing Server. |
| 27 | |
Charles Chan | 20fabfb | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 28 | .. image:: ../images/config-pw-rest.png |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 29 | :width: 700px |
| 30 | |
| 31 | We 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 Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 39 | Below is an example configuration for a single pseudowire, which transfers L2 |
| 40 | double tagged traffic from cp1 to cp2 and also changes the outer VLAN tag of |
| 41 | the packets. |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 42 | |
| 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 Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 59 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 60 | - ``cP2``: Second connection point of PW |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 61 | |
| 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 66 | - ``cP2InnerTag / cp2OuterTag``: The expected inner and outer VLAN tags for ``cp2``. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 67 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 68 | - ``mode``: Pseudowire mode - RAW and TAGGED. Only RAW mode is supported in Trellis. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 69 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 70 | - ``sdTag``: Service delimiting tag, only meaningful when in TAGGED mode. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 71 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 72 | - ``pwLabel``: Unique pseudowire label. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 73 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 74 | - ``pwId``: ID of the pseudowire. |
| 75 | |
| 76 | The 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 | |
| 83 | with 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 | |
| 116 | Managing pseudowires via CLI |
| 117 | ---------------------------- |
| 118 | |
| 119 | To 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 | |
| 136 | To list existing pseudowires: |
| 137 | |
| 138 | .. code-block:: text |
| 139 | |
| 140 | onos> sr-pw-list |
| 141 | |
| 142 | To remove a pseudowire: |
| 143 | |
| 144 | .. code-block:: text |
| 145 | |
| 146 | onos> sr-pw-remove 42 |
| 147 | |
| 148 | |
| 149 | Type of pseudowires |
| 150 | ------------------- |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 151 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 152 | - **Leaf - Leaf** : As explained above we support leaf - leaf pseudowires. |
| 153 | |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 154 | - **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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 159 | |
| 160 | - Multi-stage |
| 161 | |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 162 | - **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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 168 | |
| 169 | |
| 170 | Common errors |
| 171 | ------------- |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 172 | |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 173 | If your pseudowires do not work make sure you have done the following in the |
| 174 | host side: |
| 175 | |
| 176 | - Disabled VLAN offloading in the VM interfaces and also in the compute node |
| 177 | interfaces. |
| 178 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 179 | - Set the compute node interfaces and the VM interfaces at promiscuous mode. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 180 | |
| 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 187 | |
| 188 | |
| 189 | Restrictions |
| 190 | ------------ |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 191 | |
| 192 | We list now some restrictions of pseudowire support, some of them stem from the |
| 193 | implementation while others from switch hardware constraints. |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 194 | |
| 195 | - We only support pseudowires with the same type of tagged traffic at each end. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 196 | 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 203 | |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 204 | - 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 207 | |
| 208 | Implementation limits |
| 209 | --------------------- |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 210 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 211 | - **Link failures**: We partially support link failures. |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 212 | 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 219 | We plan to address this in the next release. |
| 220 | |
Zack Williams | 40dfc97 | 2020-06-23 14:12:46 -0700 | [diff] [blame^] | 221 | - **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. |