blob: 7a1f8a666d7035386652b60b50ac11dcc6b263e7 [file] [log] [blame]
Zack Williams553a3632019-08-09 17:14:43 -07001Architecture and Design
2***********************
Charles Chan33bac082019-09-12 01:07:51 -07003
Charles Chan6613eac2019-09-17 15:42:48 -07004Overview
5--------
6
7.. image:: images/arch-overview.png
8 :width: 1000px
9
10Trellis operates as a **hybrid L2/L3 fabric**.
11
12As a **pure (or classic) SDN** solution, Trellis **does not use any of the traditional control protocols** typically found in networking, a non-exhaustive list of which includes:
13STP, MSTP, RSTP, LACP, MLAG, PIM, IGMP, OSPF, IS-IS, Trill, RSVP, LDP and BGP.
14
15Instead, Trellis **uses an SDN Controller (ONOS) decoupled from the data-plane hardware to directly program ASIC forwarding tables using OpenFlow and with OF-DPA**,
16an open-API from Broadcom running on the switches.
17
18In this design, a set of applications running on ONOS implement all the fabric functionality and features,
19such as **Ethernet switching**, **IP routing**, **multicast**, **DHCP Relay**, **pseudowires** and more.
20
21.. note::
22 You can learn more about Trellis features and design concepts by visiting the `Project Website <https://opennetworking.org/trellis>`_ and
23 reading the `Platform Brief <https://www.opennetworking.org/wp-content/uploads/2019/09/TrellisPlatformBrief.pdf>`_.
24
25
Charles Chan33bac082019-09-12 01:07:51 -070026Introduction to OF-DPA Pipeline
27-------------------------------
28
29In this design note, we are going to explain the design choices we have made and how we got around OF-DPA (OpenFlow Data Plane Abstraction) pipeline restrictions to implement the features we need.
30We will start from explaining the OFDPA flow tables and group tables we use.
31Fig. 1 shows the simplified OFDPA pipeline overview.
32
33.. image:: images/arch-ofdpa.png
34 :width: 1000px
35
36Fig. 1 Simplified OF-DPA pipeline overview
37
38
39Flow Tables
40-----------
41
42VLAN Table
43^^^^^^^^^^
44.. note::
45 The **VLAN Flow Table (id=10)** is used for IEEE 801.Q VLAN assignment and filtering to specify how VLANs are to be handled on a particular port.
46 **All packets must have an associated VLAN id in order to be processed by subsequent tables**.
47
48 **Table miss**: goto **ACL table**.
49
50According to OFDPA spec, we need to assign a VLAN ID even for untagged packets.
51Each untagged packet will be tagged with an **internal VLAN** when being handled by VLAN table.
52The internal VLAN will be popped when the packet is sent to a output port or controller.
53The internal VLAN is assigned according to the subnet configuration of the input port.
54Packets coming from ports that do not have subnet configured (e.g. the spine facing ports) will be tagged with VLAN ID **4094**.
55
56The internal VLAN is also used to determine the subnet when a packet needs to be flooded to all ports in the same subnet. (See L2 Broadcast section for detail.)
57
58
59Termination MAC Table
60^^^^^^^^^^^^^^^^^^^^^
61.. note::
62 The **Termination MAC (TMAC) Flow Table (id=20)** determines whether to do bridging or routing on a packet.
63 It identifies routed packets their destination MAC, VLAN, and Ethertype.
64 Routed packet rule types use a Goto-Table instruction to indicate that the next table is one of the routing tables.
65
66 **Table miss**: goto **Bridging table**.
67
68In this table, we determine which table the packet should go to by checking the destination MAC address and the Ethernet type of the packet.
69
70- if dst_mac = router MAC and eth_type = ip, goto **unicast routing** table
71- if dst_mac = router MAC and eth_type = mpls, goto **MPLS table**
72- if dst_mac = multicast MAC (01:00:5F:00:00:00/FF:FF:FF:80:00:00), goto **multicast routing** table
73- none of above, goto **bridging table**
74
75
76MPLS Tables
77^^^^^^^^^^^
78.. note::
79 The MPLS pipeline can support three **MPLS Flow Tables, MPLS Table 0 (id=23), MPLS Table 1 (id=24) and MPLS Table 2 (id=25)**.
80 An MPLS Flow Table lookup matches the label in the outermost MPLS shim header in the packets.
81
82 - MPLS Table 0 is only used to pop a protection label on platforms that support this table, or to detect an MPLS- TP Section OAM PDU.
83 - MPLS Table 1 and MPLS Table 2 can be used for all label operations.
84 - MPLS Table 1 and MPLS Table 2 are synchronized flow tables and updating one updates the other
85
86 **Table miss**: goto **ACL table**.
87
88We only use MPLS Table 1 (id=24) in current design.
89MPLS packets are matched by the MPLS label.
90The packet will go to **L3 interface group** with MPLS label being popped and further go to destination leaf switch.
91
92
93Unicast Routing Table
94^^^^^^^^^^^^^^^^^^^^^
95.. note::
96 The **Unicast Routing Flow Table (id=30)** supports routing for potentially large numbers of IPv4 and IPv6 flow entries using the hardware L3 tables.
97
98 **Table miss**: goto **ACL table**.
99
100In this table, we determine where to output a packet by checking its **destination IP (unicast)** address.
101
102- if dst_ip locates at a **remote switch**, the packet will go to an **L3 ECMP group**, be tagged with MPLS label, and further go to a spine switch
103- if dst_ip locates at the **same switch**, the packet will go to an **L3 interface group** and further go to a host
104
105Note that the priority of flow entries in this table is sorted by prefix length.
106Longer prefix (/32) will have higher priority than shorter prefix (/0).
107
108
109Multicast Routing Table
110^^^^^^^^^^^^^^^^^^^^^^^
111.. note::
112 The **Multicast Routing Flow Table (id=40)** supports routing for IPv4 and IPv6 multicast packets.
113
114 **Table miss**: goto **ACL table**.
115
116Flow entries in this table always match the **destination IP (multicast)**.
117Matched packets will go to an **L3 multicast group** and further go to the next switch or host.
118
119
120Bridging Table
121^^^^^^^^^^^^^^
122.. note::
123 The **Bridging Flow Table (id=50)** supports Ethernet packet switching for potentially large numbers of flow entries using the hardware L2 tables.
124 The Bridging Flow Table forwards either based on VLAN (normal switched packets) or Tunnel id (isolated forwarding domain packets),
125 with the Tunnel id metadata field used to distinguish different flow table entry types by range assignment.
126
127 **Table miss**: goto **ACL table**.
128
129In this table, we match the **VLAN ID** and the **destination MAC address** and determine where the packet should be forwarded to.
130
131- if the destination MAC can be matched, the packet will go to the **L2 interface group** and further sent to the destination host.
132- if the destination MAC can not be matched, the packet will go to the **L2 flood group** and further flooded to the same subnet.
133 Since we cannot match IP in bridging table, we use the VLAN ID to determine which subnet this packet should be flooded to.
134 The VLAN ID can be either (1) the internal VLAN assigned to untagged packets in VLAN table or (2) the VLAN ID that comes with tagged packets.
135
136
137Policy ACL Table
138^^^^^^^^^^^^^^^^
139.. note::
140 The Policy ACL Flow Table supports wide, multi-field matching.
141 Most fields can be wildcard matched, and relative priority must be specified in all flow entry modification API calls.
142 This is the preferred table for matching BPDU and ARP packets. It also provides the Metering instruction.
143
144 **Table miss**: **do nothing**.
145 The packet will be forwarded using the output or group in the action set, if any.
146 If the action set does not have a group or output action the packet is dropped.
147
148In ACL table we trap **ARP**, **LLDP**, **BDDP**, **DHCP** and send those packets to the **controller**.
149
150
151Group Tables
152------------
153
154L3 ECMP Group
155^^^^^^^^^^^^^
156.. note::
157 OF-DPA L3 ECMP group entries are of OpenFlow type **SELECT**.
158 For IP routing the action buckets reference the OF-DPA **L3 Unicast group** entries that are members of the multipath group for ECMP forwarding.
159
160 An OF-DPA L3 ECMP Group entry can also be used in a Provider Edge Router.
161 In this packet flow it can chain to either an **MPLS L3 Label** group entry or to an **MPLS Fast Failover** group entry.
162
163 An OF-DPA L3 ECMP Group entry can be specified as a routing target instead of an OF-DPA L3 Unicast Group entry. Selection of an action bucket for forwarding a particular packet is hardware-specific.
164
165
166MPLS Label Group
167^^^^^^^^^^^^^^^^
168.. note::
169 MPLS Label Group entries are of OpenFlow **INDIRECT** type.
170 There are four MPLS label Group entry subtypes, all with similar structure.
171 These can be used in different configurations to **push up to three labels** for tunnel initiation or LSR swap.
172
173
174MPLS Interface Group
175^^^^^^^^^^^^^^^^^^^^
176.. note::
177 MPLS Interface Group Entry is of OpenFlow type **INDIRECT**.
178 It is used to **set the outgoing L2 header** to reach the next hop label switch router or provider edge router.
179
180We use **L3 ECMP** group to randomly pick one spine switch when we need to route a packet from leaves to spines.
181
182We point each bucket to an **MPLS Label** Group in which the MPLS labels are pushed to the packets to realize Segment Routing mechanism.
183(More specifically, we use the subtype 2 **MPLS L3 VPN Label**).
184
185We then point an MPLS Label Group points to an **MPLS Interface** Group in which the destination MAC is set to the next hop (spine router).
186
187Finally, the packet will goto an **L2 Interface** Group and being sent to the output port that goes to the spine router.
188Detail of how segment routing is implemented will be explained in the L3 unicast section below.
189
190
191L3 Unicast Group
192^^^^^^^^^^^^^^^^
193.. note::
194 OF-DPA L3 Unicast group entries are of OpenFlow **INDIRECT** type.
195 L3 Unicast group entries are used to supply the routing next hop and output interface for packet forwarding.
196 To properly route a packet from either the Routing Flow Table or the Policy ACL Flow Table, the forwarding flow entry must reference an L3 Unicast Group entry.
197
198 All packets must have a VLAN tag.
199 **A chained L2 Interface group entry must be in the same VLAN as assigned by the L3 Unicast Group** entry.
200
201We use L3 Unicast Group to rewrite the **source MAC**, **destination MAC** and **VLAN ID** when routing is needed.
202
203
204L3 Multicast Group
205^^^^^^^^^^^^^^^^^^
206.. note::
207 OF-DPA L3 Multicast group entries are of OpenFlow **ALL** type.
208 The action buckets describe the interfaces to which multicast packet replicas are forwarded.
209 Note that:
210
211 - Chained OF-DPA **L2 Interface** Group entries must be in the **same VLAN** as the OF-DPA **L3 Multicast** group entry. However,
212
213 - Chained OF-DPA **L3 Interface** Group entries must be in **different VLANs** from the OF-DPA **L3 Multicast** Group entry, **and from each other**.
214
215We use L3 multicast group to replicate multicast packets when necessary.
216It is also possible that L3 multicast group consists of only one bucket when replication is not needed.
217Detail of how multicast is implemented will be explained in the L3 multicast section below.
218
219
220L2 Interface Group
221^^^^^^^^^^^^^^^^^^
222.. note::
223 L2 Interface Group entries are of OpenFlow **INDIRECT** type, with a single action bucket.
224 OF-DPA L2 Interface group entries are used for egress VLAN filtering and tagging.
225 If a specific set of VLANs is allowed on a port, appropriate group entries must be defined for the VLAN and port combinations.
226
227 Note: OF-DPA uses the L2 Interface group declaration to configure the port VLAN filtering behavior.
228 This approach was taken since OpenFlow does not support configuring VLANs on physical ports.
229
230
231L2 Flood Group
232^^^^^^^^^^^^^^
233.. note::
234 L2 Flood Group entries are used by VLAN Flow Table wildcard (destination location forwarding, or DLF) rules.
235 Like OF-DPA L2 Multicast group entry types they are of OpenFlow **ALL** type.
236 The action buckets each encode an output port.
237 Each OF-DPA L2 Flood Group entry bucket forwards a replica to an output port, except for packet IN_PORT.
238
239 All of the OF-DPA L2 Interface Group entries referenced by the OF-DPA Flood Group entry,
240 and the OF- DPA Flood Group entry itself, must be in the **same VLAN**.
241
242 Note: There can only be **one OF-DPA L2 Flood Group** entry defined **per VLAN**.
243
244
245L2 Unicast
246----------
247
248.. image:: images/arch-l2u.png
249 :width: 800px
250
251Fig. 2: L2 unicast
252
253.. image:: images/arch-l2u-pipeline.png
254 :width: 1000px
255
256Fig. 3: Simplified L2 unicast pipeline
257
258The L2 unicast mechanism is designed to support **intra-rack (intra-subnet)** communication when the destination host is **known**.
259
260Pipeline Walkthrough - L2 Unicast
261^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262- **VLAN Table**: An untagged packet will be assigned an internal VLAN ID according to the input port and the subnet configured on the input port. Packets of the same subnet will have the same internal VLAN ID.
263- **TMAC Table**: Since the destination MAC of a L2 unicast packet is not the MAC of leaf router, the packet will miss the TMAC table and goes to the bridging table.
264- **Bridging Table**: If the destination MAC is learnt, there will be a flow entry matching that destination MAC and pointing to an L2 interface group.
265- **ACL Table**: IP packets will miss the ACL table and the L2 interface group will be executed.
266 L2 Interface Group: The internal assigned VLAN will be popped before the packet is sent to the output port.
267
268
269L2 Broadcast
270------------
271
272.. image:: images/arch-l2f.png
273 :width: 800px
274
275Fig. 4: L2 broadcast
276
277.. image:: images/arch-l2f-pipeline.png
278 :width: 1000px
279
280Fig. 5: Simplified L2 broadcast pipeline
281
282Pipeline Walkthrough - L2 Broadcast
283^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
284- **VLAN Table**: (same as L2 unicast)
285- **TMAC Table**: (same as L2 unicast)
286- **Bridging Table**: If the destination MAC is not learnt,
287 there will NOT be a flow entry matching that destination MAC.
288 It will then fallback to a lower priority entry that matches the VLAN (subnet) and point to an L2 flood group.
289- **ACL Table**: IP packets will miss the ACL table and the L2 flood group will be executed.
290- **L2 Flood Group**: Consists of all L2 interface groups related to this VLAN (subnet).
291- **L2 Interface Group**: The internal assigned VLAN will be popped before the packet is sent to the output port.
292
293
294ARP
295---
296
297.. image:: images/arch-arp-pipeline.png
298 :width: 1000px
299
300Fig. 6: Simplified ARP pipeline
301
302All ARP packets will be forwarded according to the bridging pipeline.
303In addition, a **copy of the ARP packet will be sent to the controller**.
304
305- Controller will use the ARP packets for **learning purpose and update host store** accordingly.
306- Controller only **replies** an ARP request if the request is trying to **resolve an interface address configured on the switch edge port**.
307
308
309Pipeline Walkthrough - ARP
310^^^^^^^^^^^^^^^^^^^^^^^^^^
311It is similar to L2 broadcast. Except ARP packets will be matched by a special ACL table entry and being copied to the controller.
312
313
314L3 Unicast
315----------
316
317.. image:: images/arch-l3u.png
318 :width: 800px
319
320Fig. 7: L3 unicxast
321
322.. image:: images/arch-l3u-src-pipeline.png
323 :width: 1000px
324
325Fig. 8 Simplified L3 unicast pipeline - source leaf
326
327Pipeline Walkthrough - Source Leaf Switch
328^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
329- **VLAN Table**: An untagged packet will be assigned an internal VLAN ID according to the input port and the subnet configured on the input port. Packets of the same subnet will have the same internal VLAN ID.
330- **TMAC Table**: Since the destination MAC of a L3 unicast packet is the MAC of leaf router and the ethernet type is IPv4, the packet will match the TMAC table and go to the unicast routing table.
331- **Unicast Routing Table**: In this table we will lookup the destination IP of the packet and point the packet to corresponding L3 ECMP group
332- **ACL Table**: IP packets will miss the ACL table and the L3 ECMP group will be executed.
333- **L3 ECMP Group**: Hashes on 5 tuple to pick a spine switch and goto the MPLS Label Group.
334- **MPLS Label Group**: Push the MPLS label corresponding to the destination leaf switch and goto the MPLS Interface Group.
335- **MPLS Interface Group**: Set source MAC address, destination MAC address, VLAN ID and goto the L2 Interface Group.
336- **L2 Interface Group**: The internal assigned VLAN will be popped before the packet is sent to the output port that goes to the spine.
337
338.. image:: images/arch-l3u-transit-pipeline.png
339 :width: 1000px
340
341Fig. 9 Simplified L3 unicast pipeline - spine
342
343Pipeline Walkthrough - Spine Switch
344^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
345- **VLAN Table**: An untagged packet will be assigned an internal VLAN ID according to the input port and the subnet configured on the input port. Packets of the same subnet will have the same internal VLAN ID.
346- **TMAC Table**: Since the destination MAC of a L3 unicast packet is the MAC of spine router and the ethernet type is MPLS, the packet will match the TMAC table and go to the MPLS table.
347- **MPLS Table**: In this table we will lookup the MPLS label of the packet, figure out the destination leaf switch, pop the MPLS label and point to L3 ECMP Group.
348- **ACL Table**: IP packets will miss the ACL table and the MPLS interface group will be executed.
349- **L3 ECMP Group**: Hash to pick a link (if there are multiple links) to the destination leaf and goto the L3 Interface Group.
350- **MPLS Interface Group**: Set source MAC address, destination MAC address, VLAN ID and goto the L2 Interface Group.
351- **L2 Interface Group**: The internal assigned VLAN will be popped before the packet is sent to the output port that goes to the destination leaf switch.
352
353.. image:: images/arch-l3u-dst-pipeline.png
354 :width: 1000px
355
356Fig. 10 Simplified L3 unicast pipeline - destination leaf
357
358Pipeline Walkthrough - Destination Leaf Switch
359^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
360- **VLAN Table**: An untagged packet will be assigned an internal VLAN ID according to the input port and the subnet configured on the input port. Packets of the same subnet will have the same internal VLAN ID.
361- **TMAC Table**: Since the destination MAC of a L3 unicast packet is the MAC of leaf router and the ethernet type is IPv4, the packet will match the TMAC table and go to the unicast routing table.
362- **Unicast Routing Table**: In this table we will lookup the destination IP of the packet and point the packet to corresponding L3 Unicast Group.
363- **ACL Table**: IP packets will miss the ACL table and the L3 Unicast Group will be executed.
364- **L3 Unicast Group**: Set source MAC address, destination MAC address, VLAN ID and goto the L2 Interface Group.
365- **L2 Interface Group**: The internal assigned VLAN will be popped before the packet is sent to the output port that goes to the destination leaf switch.
366
367
368The L3 unicast mechanism is designed to support inter-rack(inter-subnet) untagged communication when the destination host is known.
369
370Path Calculation and Failover - Unicast
371^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
372Coming soon...
373
374
375L3 Multicast
376------------
377
378.. image:: images/arch-l3m.png
379 :width: 800px
380
381Fig. 11 L3 multicast
382
383.. image:: images/arch-l3m-pipeline.png
384 :width: 1000px
385
386Fig.12 Simplified L3 multicast pipeline
387
388The L3 multicast mechanism is designed to support use cases such as IPTV. The multicast traffic comes in from the upstream router, replicated by the leaf-spine switches, send to multiple OLTs and eventually get to the subscribers.
389
390.. note::
391 We would like to support different combinations of ingress/egress VLAN, including
392
393 - untagged in -> untagged out
394 - untagged in -> tagged out
395 - tagged in -> untagged out
396 - tagged in -> same tagged out
397 - tagged in -> different tagged out
398
399 However, due to the above-mentioned OFDPA restrictions,
400
401 - It is NOT possible to chain L3 multicast group to L2 interface group directly if we want to change the VLAN ID
402 - It is NOT possible to change VLAN ID by chaining L3 multicast group to L3 interface group since all output ports should have the same VLAN
403 but the spec requires chained L3 interface group to have different VLAN ID from each other.
404
405 That means, if we need to change VLAN ID, we need to change it before the packets get into the multicast routing table.
406 The only viable solution is changing the VLAN ID in the VLAN table.
407 We change the VLAN tag on the ingress switch (i.e. the switch that connects to the upstream router) when necessary.
408 On transit (spine) and egress (destination leaf) switches, output VLAN tag will remain the same as input VLAN tag.
409
410Pipeline Walkthrough - Ingress Leaf Switch
411^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
412
413.. csv-table:: Table 1. All Possible VLAN Combinations on Ingress Switch
414 :file: tables/arch-mcast-ingress.csv
415 :widths: 2, 5, 5, 10, 10, 5
416 :header-rows: 1
417
418.. note::
419 In the presence of ``vlan-untagged`` configuration on the ingress port of the ingress switch, the ``vlan-untagged`` will be used instead of 4094.
420 The reason is that we cannot distinguish unicast and multicast traffic in that case, and therefore must assign the same VLAN to the packet.
421 The VLAN will anyway get popped in L2IG in this case.
422
423Table 1 shows all possible VLAN combinations on the ingress switches and how the packet is processed through the pipeline.
424We take the second case **untagged -> tagged 200** as an example to explain more details.
425
426- **VLAN Table**: An untagged packet will be assigned the **egress VLAN ID**.
427- **TMAC Table**: Since the destination MAC of a L2 unicast packet is a multicast MAC address, the packet will match the TMAC table and goes to the multicast routing table.
428- **Multicast Routing Table**: In this table we will lookup the multicast group (destination multicast IP) and point the packet to the corresponding L3 multicast group.
429- **ACL Table**: Multicast packets will miss the ACL table and the L3 multicast group will be executed.
430- **L3 Multicast Group**: The packet will be matched by **egress VLAN ID** and forwarded to multiple L2 interface groups that map to output ports.
431- **L2 Interface Group**: The egress VLAN will be kept in this case and the packet will be sent to the output port that goes to the transit spine switch.
432
433
434Pipeline Walkthrough - Transit Spine Switch and Egress Leaf Switch
435^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
436
437.. csv-table:: Table 2. All Possible VLAN Combinations on Transit/Egress Switch
438 :file: tables/arch-mcast-transit-egress.csv
439 :widths: 2, 5, 5, 10, 10, 5
440 :header-rows: 1
441
442Table 2 shows all possible VLAN combinations on the transit/egress switches and how the packet is processed through the pipeline.
443Note that we have already changed the VLAN tag to the desired egress VLAN on the ingress switch.
444Therefore, there are only two cases on the transit/egress switches - either keep it untagged or keep it tagged. We take the first case **untagged -> untagged** as an example to explain more details.
445
446- **VLAN Table**: An untagged packet will be assigned an **internal VLAN ID** according to the input port and the subnet configured on the input port. Packets of the same subnet will have the same internal VLAN ID.
447- **TMAC Table**: (same as ingress switch)
448- **Multicast Routing Table**: (same as ingress switch)
449- **ACL Table**: (same as ingress switch)
450- **L3 Multicast Group**: The packet will be matched by **internal VLAN ID** and forwarded to multiple L2 interface groups that map to output ports.
451- **L2 Interface Group**: The egress VLAN will be popped in this case and the packet will be sent to the output port that goes to the egress leaf switch.
452
453Path Calculation and Failover - Multicast
454^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
455Coming soon...
456
457
458VLAN Cross Connect
459------------------
460
461.. image:: images/arch-xconnect.png
462 :width: 800px
463
464Fig. 13 VLAN cross connect
465
466.. image:: images/arch-xconnect-pipeline.png
467 :width: 1000px
468
469Fig. 14 Simplified VLAN cross connect pipeline
470
471VLAN Cross Connect is originally designed to support Q-in-Q packets between OLTs and BNGs.
472The cross connect pair consists of two output ports.
473Whatever packet comes in on one port with specific VLAN tag will be sent to the other port.
474
475.. note::
476 It can only cross connects **two ports on the same switch**.
477 :doc:`Pseudowire <configuration/pseudowire>` is required to connect ports across different switches.
478
479We use L2 Flood Group to implement VLAN Cross Connect.
480The L2 Flood Group for cross connect only consists of two ports.
481The input port will be removed before flooding according to the spec and thus create exactly the desire behavior of cross connect.
482
483Pipeline Walkthrough - Cross Connect
484^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
485- **VLAN Table**: When a tagged packet comes in, we no longer need to assign the internal VLAN.
486 The original VLAN will be carried through the entire pipeline.
487- **TMAC Table**: Since the VLAN will not match any internal VLAN assigned to untagged packets,
488 the packet will miss the TMAC table and goes to the bridging table.
489- **Bridging Table**: The packet will hit the flow rule that match the cross connect VLAN ID and
490 being sent to corresponding L2 Flood Group.
491- **ACL Table**: IP packets will miss the ACL table and the L2 flood group will be executed.
492- **L2 Flood Group**: Consists of two L2 interface groups related to this cross connect VLAN.
493 L2 Interface Group: The original VLAN will NOT be popped before the packet is sent to the output port.
494
495
496vRouter
497-------
498
499.. image:: images/arch-vr.png
500 :width: 800px
501
502Fig. 15 vRouter
503
504The Trellis fabric needs to be connected to the external world via the vRouter functionality.
505**In the networking industry, the term vRouter implies a "router in a VM". This is not the case in Trellis**.
506Trellis vRouter is NOT a software router.
507**Only the control plane of the router, i.e routing protocols, runs in a VM**.
508We use the Quagga routing protocol suite as the control plane for vRouter.
509
510The **vRouter data plane is entirely in hardware**.
511Essentially the entire hardware fabric serves as the (distributed) data plane for vRouter.
512
513The **external router views the entire Trellis fabric as a single router**.
514
515.. image:: images/arch-vr-overview.png
516
517.. image:: images/arch-vr-logical.png
518
519.. note::
520 Dual external routers is also supported for redundancy. Visit :doc:`External Connectivity <configuration/dual-homing>` for details.
521
522Pipeline Walkthrough - vRouter
523^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
524The pipeline is exactly as same as L3 unicast. We just install additional flow rules in the unicast routing table on each leaf routers.
525
526
527Learn More
528----------
529.. tip::
530 Most of our design discussion and meeting notes are kept in `Google Drive <https://drive.google.com/drive/folders/0Bz9dNKPVvtgsR0M5R0hWSHlfZ0U>`_.
531 If you are wondering why features are designed and implemented in a certain way, you may find the answers there.