blob: 1de2a3527084959a4af733179121d255d614bd00 [file] [log] [blame]
Charles Chan9e5c6172019-09-07 11:24:54 -07001Bridging and Unicast Routing
2============================
3
Charles Chan33bac082019-09-12 01:07:51 -07004.. attention::
5 - VLAN **4090** is reserved for :doc:`pseudowire <configuration/pseudowire>` transport
6 - VLAN **4094** is reserved for unconfigured ports (e.g. spine facing ports)
7
Charles Chan9e5c6172019-09-07 11:24:54 -07008Access Ports
9------------
10The necessary but minimum configuration for an access port is simply a VLAN.
11
12.. code-block:: json
13 :linenos:
14
15 {
16 "ports" : {
17 "of:0000000000000204/12" : {
18 "interfaces" : [{
19 "name" : "serverA-intf",
20 "vlan-untagged": 10
21 }]
22 },
23 "of:0000000000000204/16" : {
24 "interfaces" : [{
25 "name" : "serverB-intf",
26 "vlan-untagged": 10
27 }]
28 }
29 }
30 }
31
32The example above shows two ports (12 and 16) on switch of:204 that have been assigned to VLAN 10 using the ``vlan-untagged`` keyword.
33It simply means that packets come in and leave out of these switches untagged,
34but internally they are assigned VLAN 10 and they belong to the bridging domain defined for VLAN 10.
35
36``name`` is used to associate the interface with a globally unique, user friendly name. It can be omitted.
37
38With the configuration shown above, the packets will always be bridged, but they cannot be routed out of the VLAN (e.g. to other subnets).
39To add the capability to route out of VLAN 10, we need to add a subnet/gateway IP (similar to `interface-vlans or SVIs in traditional networks <https://www.youtube.com/watch?v=bUXpmiJpGb0>`_).
40
41.. code-block:: json
42 :linenos:
43
44 {
45 "ports" : {
46 "of:0000000000000204/12" : {
47 "interfaces" : [{
48 "name" : "serverA-intf",
49 "ips" : [ "10.0.1.254/24"],
50 "vlan-untagged": 10
51 }]
52 },
53 "of:0000000000000204/16" : {
54 "interfaces" : [{
55 "name" : "serverB-intf",
56 "ips" : [ "10.0.1.254/24"],
57 "vlan-untagged": 10
58 }]
59 }
60 }
61 }
62
63In this example, VLAN 10 is associated with subnet ``10.0.1.0/24``, and the gateway IP for hosts in this subnet is ``10.0.1.254/32``.
64When the desire is to route out of a VLAN, this assignment is currently necessary on all ports configured in the same VLAN.
65
66.. note::
Charles Chan9e5c6172019-09-07 11:24:54 -070067 Typically we only expect a single subnet for a VLAN. Similar to traditional networks, for us, a subnet == VLAN. Different VLANs should be configured in different subnets.
68 In certain use-cases, it may be necessary to configure multiple subnets in the same VLAN. This is possible by adding more subnet/gateway IPs in the ``ips`` array.
69
Charles Chan33bac082019-09-12 01:07:51 -070070.. tip::
71 One subnet cannot be configured on multiple leaf switches.
72 We usually configure one subnet for all the ports on the same leaf switch.
Charles Chan9e5c6172019-09-07 11:24:54 -070073
74Tagged Ports
75------------
76Tagged port configuration is similar.
77
78.. code-block:: json
79 :linenos:
80
81 {
82 "ports" : {
83 "of:0000000000000204/24" : {
84 "interfaces" : [{
85 "name" : "serverA-intf",
86 "ips" : [ "10.0.2.254/24", "10.0.4.254/24" ],
87 "vlan-tagged" : [ 20, 40 ]
88 }]
89 }
90 }
91 }
92
93The configuration above for port 24 on switch of:204 shows two VLANs 20 and 40 configured on that port, with corresponding subnets and gateway IPs.
94Note that there is no specific ordering required in the ``ips`` or ``vlan-tagged`` arrays to correlate the VLANs to their corresponding subnets.
95In a future release, we will correlate VLAN and subnets configuration in a more readable way.
96
97
98Native VLAN on Tagged Ports
99---------------------------
100An additional configuration ``vlan-native`` possible on tagged ports includes the ability to specify a VLAN (and thus a bridging domain) for incoming untagged packets.
101Typically, such configuration in trunk ports in traditional networks is referred to a native VLAN.
102
103.. code-block:: json
104 :linenos:
105
106 {
107 "ports" : {
108 "of:0000000000000204/24" : {
109 "interfaces" : [ {
110 "name" : "serverA-intf",
111 "ips" : [ "10.0.2.254/24", "10.0.4.254/24", "10.0.1.254/24" ],
112 "vlan-tagged" : [ 20, 40 ],
113 "vlan-native" : 10
114 }]
115 }
116 }
117 }
118
119Note that it is also necessary to configure the subnet/gateway IP corresponding to the native VLAN if you wish to route out of that VLAN.
120
121
122Configuring interface for IPv6
123------------------------------
124It is similar to configure IPv6 routing. Simply replace the addresses in ``ips`` with IPv6 addresses. For example,
125
126.. code-block:: json
127 :linenos:
128
129 {
130 "ports" : {
131 "of:0000000000000204/24" : {
132 "interfaces" : [ {
133 "name" : "serverA-intf",
134 "ips" : [ "10.0.2.254/24", "2000::1ff/120" ],
135 "vlan-tagged" : [ 20, 40 ]
136 }]
137 }
138 }
139 }
140
141
Charles Chan8d3ae672019-09-07 22:07:22 -0700142IPv6 Router Advertisement
143-------------------------
144
145Router Advertisement overview
146^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147Router advertisement application is for enabling **Router Advertisement** and **Router Solicitation** functionalities supported by IPv6 routers.
148More details are available in `RFC 4861 <https://tools.ietf.org/html/rfc4861>`_.
149
150Application identifies which IPv6 interfaces are currently configured in the system and it will try to send out **unsolicited Router Advertisement** (RA) messages from these interfaces.
151Each such RA message will have two mandatory options named **Source link-layer address** and **MTU**.
152Additional RA option **prefix** can be enabled using component configuration **raGlobalPrefixConfStatus**.
153
154Application also processes **Router Solicitations** (RS) sent from hosts. Upon receiving RS on a particular interface application stops RA transmission in that interface and immediately sends RA targeted to the solicited host. After that application continues unsolicited RA transmission on that interface.
155
156Activate and configure RA
157^^^^^^^^^^^^^^^^^^^^^^^^^
158RA application can be activated from CLI by running
159
160.. code-block:: console
161
162 onos> app activate routeradvertisement
163
164Behavior of RA application is controlled by ONOS component configuration subsystem and following are possible configuration options.
165
166- ``raThreadDelay``: Delay between consecutive RA transmissions
167- ``raPoolSize``: Capacity of thread pool to be used for RA transmissions
168- ``raFlagMbitStatus``: RA flag Managed address configuration enabled/disabled
169- ``raFlagObitStatus``: RA flag Other configuration enabled/disabled
170- ``raOptionPrefixStatus``: RA Option prefix is enabled/disabled. Router prefixes will be available in RA only if this flag is true
171- ``raGlobalPrefixConfStatus``: Enable switch level global prefix configuration.
172 Once raGlobalPrefixConfStatus is enabled, RA prefix option is generated from port configuration of device, see for more details.
173
174Prefix details are picked up from network interface configuration.
175RA app will filter out link-local IPs while preparing prefixes.
176For example, in following configuration, Prefix will include only **2001:0558:FF10:04C9::2:1ff/120**.
177
178.. code-block:: json
179
180 {
181 "ports": {
182 "of:0000000000000018/16": {
183 "interfaces": [{
184 "ips": [ "192.168.114.1/24", "2001:0558:FF10:04C9::2:1ff/120", "FE80::4EA8:2AFF:FE24:8E5F/120" ],
185 "vlan-untagged": "11",
186 "name": "18-15",
187 "mac": "8c:ea:1b:67:24:90"
188 }]
189 }
190 }
191 }
192
193Global prefix configuration
194^^^^^^^^^^^^^^^^^^^^^^^^^^^
195In some cases, users may want to have a set of global prefix **advertised on all edge interfaces**.
196Such prefixes can be configured in **devices** section of network configuration in the following way.
197
198.. code-block:: json
199
200 {
201 "devices": {
202 "of:0000000000000018": {
203 "routeradvertisement" : {
204 "prefixes": [ "2001:0558:FF10:04C9::3:1ff/120"]
205 }
206 }
207 }
208 }
209
210.. note::
211 When global prefix is configured, RA app will ignore any prefixes configured on switch interfaces.
212
213Notes about interface config
214----------------------------
Charles Chan9e5c6172019-09-07 11:24:54 -0700215There is no need to configure ports on switches that are meant to connect to other switches.
216The VLAN (untagged or tagged) configuration is only meant for ports that are connected to hosts (edge ports).
217
Charles Chan20fabfb2019-09-07 11:24:54 -0700218.. image:: ../images/config-vlan.png
Charles Chan9e5c6172019-09-07 11:24:54 -0700219
220Furthermore, note that the same VLAN can be configured on multiple ToRs - e.g. vlan 20 in the figure above.
221However this does not mean that the ports are in the same bridging domain, because in the fabric, the communication between ToRs is through a routed network. '
222In other words, a host on VLAN 20 (untagged or tagged) connected to one ToR can communicate with another host on VLAN 20 (untagged or tagged) connected to a different ToR,
223but the MAC addresses will change as the traffic goes through a routed network.
224
225Please do not use this feature to connect switches in unsupported topologies as shown in the example below.
226The fabric is not designed to be one big Ethernet fabric. The bridging domain is restricted to within one ToR.
227If the bridging domain is extended across two ToRs directly linked to each other, there is a chance of loops.
228In other words, the ToRs/Leafs are not standalone 802.1Q bridges, and should not be used as such.
229
Charles Chan20fabfb2019-09-07 11:24:54 -0700230.. image:: ../images/config-vlan-invalid.png