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