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