idnits 2.17.1 draft-mahalingam-dutt-dcops-vxlan-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 99 has weird spacing: '...n among hundr...' -- The document date (January 23, 2014) is 3736 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 4601 (Obsoleted by RFC 7761) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force M. Mahalingam 3 Internet Draft Storvisor 4 Intended Status: Experimental D. Dutt 5 Expires: July 22, 2014 Cumulus Networks 6 K. Duda 7 Arista 8 P. Agarwal 9 Broadcom 10 L. Kreeger 11 Cisco 12 T. Sridhar 13 VMware 14 M. Bursell 15 Citrix 16 C. Wright 17 Red Hat 18 January 23, 2014 20 VXLAN: A Framework for Overlaying Virtualized Layer 2 Networks over 21 Layer 3 Networks 22 draft-mahalingam-dutt-dcops-vxlan-07.txt 24 Status of this Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF), its areas, and its working groups. Note that 31 other groups may also distribute working documents as Internet- 32 Drafts. 34 Internet-Drafts are draft documents valid for a maximum of six 35 months and may be updated, replaced, or obsoleted by other documents 36 at any time. It is inappropriate to use Internet-Drafts as 37 reference material or to cite them other than as "work in progress." 39 The list of current Internet-Drafts can be accessed at 40 http://www.ietf.org/ietf/1id-abstracts.txt 42 The list of Internet-Draft Shadow Directories can be accessed at 43 http://www.ietf.org/shadow.html 45 This Internet-Draft will expire on November 8, 2013. 47 Copyright Notice 49 Copyright (c) 2013 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with 57 respect to this document. 59 Abstract 61 This document describes Virtual eXtensible Local Area Network 62 (VXLAN), which is used to address the need for overlay networks 63 within virtualized data centers accommodating multiple tenants. The 64 scheme and the related protocols can be used in cloud service 65 provider and enterprise data center networks. This memo documents the 66 deployed VXLAN protocol for the benefit of the IETF community. The 67 IETF consensus on this RFC represents consensus to publish this memo, 68 and not consensus on the text itself. 70 Table of Contents 72 1. Introduction...................................................3 73 1.1. Acronyms & Definitions....................................4 74 2. Conventions used in this document..............................5 75 3. VXLAN Problem Statement........................................5 76 3.1. Limitations imposed by Spanning Tree & VLAN Ranges........5 77 3.2. Multitenant Environments..................................6 78 3.3. Inadequate Table Sizes at ToR Switch......................6 79 4. Virtual eXtensible Local Area Network (VXLAN)..................7 80 4.1. Unicast VM to VM communication............................8 81 4.2. Broadcast Communication and Mapping to Multicast..........9 82 4.3. Physical Infrastructure Requirements.....................10 83 5. VXLAN Frame Format............................................10 84 6. VXLAN Deployment Scenarios....................................16 85 6.1. Inner VLAN Tag Handling..................................19 86 7. Security Considerations.......................................19 87 8. IANA Considerations...........................................21 88 9. References....................................................21 89 9.1. Normative References.....................................21 90 9.2. Informative References...................................21 91 10. Acknowledgments..............................................22 93 1. Introduction 95 Server virtualization has placed increased demands on the physical 96 network infrastructure. A physical server now has multiple virtual 97 machines (VMs) each with its own MAC address. This requires larger 98 MAC address tables in the switched Ethernet network due to potential 99 attachment of and communication among hundreds of thousands of VMs. 101 In the case when the VMs in a data center are grouped according to 102 their Virtual LAN (VLAN, one might need thousands of VLANs to 103 partition the traffic according to the specific group that the VM 104 may belong to. The current VLAN limit of 4094 is inadequate in such 105 situations. 107 Another type of demand that is being placed on data centers is the 108 need to host multiple tenants, each with their own isolated network 109 domain. This is not economical to realize with dedicated 110 infrastructure, so network administrators opt to implement this over 111 a shared network. A common problem is that each tenant may 112 independently assign MAC addresses and VLAN IDs leading to potential 113 duplication of these on the physical network. 115 Another requirement for virtualized environments using a Layer 2 116 physical infrastructure is having the Layer 2 network scale across 117 the entire data center or even between data centers for efficient 118 allocation of compute, network and storage resources. In such 119 networks, using traditional approaches like the Spanning Tree 120 Protocol (STP) for a loop free topology can result in a large number 121 of disabled links. 123 The last scenario is the case where the network operator prefers to 124 use IP for interconnection of the physical infrastructure (e.g. to 125 achieve multipath scalability through Equal Cost Multipath (ECMP), 126 thus avoiding disabled links). Even in such environments, there is a 127 need to preserve the Layer 2 model for inter-VM communication. 129 The scenarios described above lead to a requirement for an overlay 130 network. This overlay is used to carry the MAC traffic from the 131 individual VMs in an encapsulated format over a logical "tunnel". 133 This document details a framework termed Virtual eXtensible Local 134 Area Network (VXLAN) which provides such an encapsulation scheme to 135 address the various requirements specified above. This memo 136 documents the deployed VXLAN protocol for the benefit of the IETF 137 community. The IETF consensus on this RFC represents consensus to 138 publish this memo, and not consensus on the text itself. 140 1.1. Acronyms & Definitions 142 ACL - Access Control List 144 ECMP - Equal Cost Multipath 146 IGMP - Internet Group Management Protocol 148 PIM - Protocol Independent Multicast 150 SPB - Shortest Path Bridging 152 STP - Spanning Tree Protocol 154 ToR - Top of Rack 156 TRILL - Transparent Interconnection of Lots of Links 158 VXLAN - Virtual eXtensible Local Area Network 160 VXLAN Segment - VXLAN Layer 2 overlay network over which VMs 162 communicate 164 VXLAN Overlay Network - another term for VXLAN Segment 166 VXLAN Gateway - an entity which forwards traffic between VXLAN 168 and non-VXLAN environments 170 VTEP - VXLAN Tunnel End Point - an entity which originates 171 and/or terminates VXLAN tunnels 173 VLAN - Virtual Local Area Network 175 VM - Virtual Machine 177 VNI - VXLAN Network Identifier (or VXLAN Segment ID) 179 2. Conventions used in this document 181 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 182 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 183 document are to be interpreted as described in RFC-2119 [RFC2119]. 185 3. VXLAN Problem Statement 187 This section provides further details on the areas that VXLAN is 188 intended to address. The focus is on the networking infrastructure 189 within the data center and the issues related to them. 191 3.1. Limitations imposed by Spanning Tree & VLAN Ranges 193 Current Layer 2 networks use the IEEE 802.1D Spanning Tree Protocol 194 (STP) [802.1D] to avoid loops in the network due to duplicate paths. 195 STP blocks the use of links to avoid the replication and looping of 196 frames. Some data center operators see this as a problem with Layer 197 2 networks in general since with STP they are effectively paying for 198 more ports and links than they can really use. In addition, 199 resiliency due to multipathing is not available with the STP model. 200 Newer initiatives such as TRILL [RFC6325] and SPB[802.1aq]) have 201 been proposed to help with multipathing and thus surmount some of 202 the problems with STP. STP limitations may also be avoided by 203 configuring servers within a rack to be on the same Layer 3 network 204 with switching happening at Layer 3 both within the rack and between 205 racks. However, this is incompatible with a Layer 2 model for inter- 206 VM communication. 208 Another characteristic of Layer 2 data center networks is their use 209 of Virtual LANs (VLANs) to provide broadcast isolation. A 12 bit 210 VLAN ID is used in the Ethernet data frames to divide the larger 211 Layer 2 network into multiple broadcast domains. This has served 212 well for several data centers which require fewer than 4094 VLANs. 213 With the growing adoption of virtualization, this upper limit is 214 seeing pressure. Moreover, due to STP, several data centers limit 215 the number of VLANs that could be used. In addition, requirements 216 for multitenant environments accelerate the need for larger VLAN 217 limits, as discussed in Section 3.3. 219 3.2. Multitenant Environments 221 Cloud computing involves on demand elastic provisioning of resources 222 for multi-tenant environments. The most common example of cloud 223 computing is the public cloud, where a cloud service provider offers 224 these elastic services to multiple customers/tenants over the same 225 physical infrastructure. 227 Isolation of network traffic by tenant could be done via Layer 2 or 228 Layer 3 networks. For Layer 2 networks, VLANs are often used to 229 segregate traffic - so a tenant could be identified by its own VLAN, 230 for example. Due to the large number of tenants that a cloud 231 provider might service, the 4094 VLAN limit is often inadequate. In 232 addition, there is often a need for multiple VLANs per tenant, which 233 exacerbates the issue. 235 Another use case is cross pod expansion. A pod typically consists of 236 one or more racks of servers with associated network and storage 237 connectivity. Tenants may start off on a pod and, due to expansion, 238 require servers/VMs on other pods, especially in the case when 239 tenants on the other pods are not fully utilizing all their 240 resources. This use case requires a "stretched" Layer 2 environment 241 connecting the individual servers/VMs. 243 Layer 3 networks are not a comprehensive solution for multi tenancy 244 either. Two tenants might use the same set of Layer 3 addresses 245 within their networks which requires the cloud provider to provide 246 isolation in some other form. Further, requiring all tenants to use 247 IP excludes customers relying on direct Layer 2 or non-IP Layer 3 248 protocols for inter VM communication. 250 3.3. Inadequate Table Sizes at ToR Switch 252 Today's virtualized environments place additional demands on the MAC 253 address tables of Top of Rack (ToR) switches which connect to the 254 servers. Instead of just one MAC address per server link, the ToR 255 now has to learn the MAC addresses of the individual VMs (which 256 could range in the 100s per server). This is needed because traffic 257 from/to the VMs to the rest of the physical network will traverse 258 the link between the server and the switch. A typical ToR switch 259 could connect to 24 or 48 servers depending upon the number of its 260 server facing ports. A data center might consist of several racks, 261 so each ToR switch would need to maintain an address table for the 262 communicating VMs across the various physical servers. This places a 263 much larger demand on the table capacity compared to non-virtualized 264 environments. 266 If the table overflows, the switch may stop learning new addresses 267 until idle entries age out, leading to significant flooding of 268 subsequent unknown destination frames. 270 4. Virtual eXtensible Local Area Network (VXLAN) 272 VXLAN (Virtual eXtensible Local Area Network) addresses the above 273 requirements of the Layer 2 and Layer 3 data center network 274 infrastructure in the presence of VMs in a multi-tenant environment. 275 It runs over the existing networking infrastructure and provides a 276 means to "stretch" a Layer 2 network. In short, VXLAN is a Layer 2 277 overlay scheme over a Layer 3 network. Each overlay is termed a 278 VXLAN segment. Only VMs within the same VXLAN segment can 279 communicate with each other. Each VXLAN segment is identified 280 through a 24 bit segment ID, hereafter termed the VXLAN Network 281 Identifier (VNI). This allows up to 16M VXLAN segments to coexist 282 within the same administrative domain. 284 The VNI identifies the scope of the inner MAC frame originated by 285 the individual VM. Thus, you could have overlapping MAC addresses 286 across segments but never have traffic "cross over" since the 287 traffic is isolated using the VNI. The VNI is in an outer header 288 which encapsulates the inner MAC frame originated by the VM. In the 289 following sections, the term "VXLAN segment" is used interchangeably 290 with the term "VXLAN overlay network". 292 Due to this encapsulation, VXLAN could also be termed a tunneling 293 scheme to overlay Layer 2 networks on top of Layer 3 networks. The 294 tunnels are stateless, so each frame is encapsulated according to a 295 set of rules. The end point of the tunnel (VXLAN Tunnel End Point or 296 VTEP) discussed in the following sections is located within the 297 hypervisor on the server which hosts the VM. Thus, the VNI and VXLAN 298 related tunnel/outer header encapsulation are known only to the VTEP 299 - the VM never sees it (see Figure 1). Note that it is possible that 300 VTEPs could also be on a physical switch or physical server and 301 could be implemented in software or hardware. One use case where 302 the VTEP is a physical switch is discussed in Section 6 on VXLAN 303 deployment scenarios. 305 The following sections discuss typical traffic flow scenarios in a 306 VXLAN environment using one type of control scheme - data plane 307 learning. Here, the association of VM's MAC to VTEP's IP address is 308 discovered via source address learning. Multicast is used for 309 carrying unknown destination, broadcast and multicast frames. 311 In addition to a learning based control plane, there are other 312 schemes possible for the distribution of the VTEP IP to VM MAC 313 mapping information. Options could include a central 314 authority/directory based lookup by the individual VTEPs, 315 distribution of this mapping information to the VTEPs by the central 316 authority, and so on. These are sometimes characterized as push and 317 pull models respectively. This draft will focus on the data plane 318 learning scheme as the control plane for VXLAN. 320 4.1. Unicast VM to VM communication 322 Consider a VM within a VXLAN overlay network. This VM is unaware of 323 VXLAN. To communicate with a VM on a different host, it sends a MAC 324 frame destined to the target as normal. The VTEP on the physical 325 host looks up the VNI to which this VM is associated. It then 326 determines if the destination MAC is on the same segment and if 327 there is a mapping of the destination MAC address to 328 the remote VTEP. If so, an outer header comprising an outer MAC, 329 outer IP header and VXLAN header (see Figure 1 in Section 5 for 330 frame format) are prepended to the original MAC frame. The 331 encapsulated packet is forwarded towards the remote VTEP. Upon 332 reception, the remote VTEP verifies the validity of the VNI and if 333 there is a VM on that VNI using a MAC address that matches the inner 334 destination MAC address. If so, the packet is stripped of its 335 encapsulating headers and passed on to the destination VM. The 336 destination VM never knows about the VNI or that the frame was 337 transported with a VXLAN encapsulation. 339 In addition to forwarding the packet to the destination VM, the 340 remote VTEP learns the Inner Source MAC to outer Source IP address 341 mapping. It stores this mapping in a table so that when the 342 destination VM sends a response packet, there is no need for an 343 "unknown destination" flooding of the response packet. 345 Determining the MAC address of the destination VM prior to the 346 transmission by the source VM is performed as with non-VXLAN 347 environments except as described in Section 4.2. Broadcast frames 348 are used but are encapsulated within a multicast packet, as detailed 349 in the Section 4.2. 351 4.2. Broadcast Communication and Mapping to Multicast 353 Consider the VM on the source host attempting to communicate with 354 the destination VM using IP. Assuming that they are both on the 355 same subnet, the VM sends out an ARP broadcast frame. In the non- 356 VXLAN environment, this frame would be sent out using MAC broadcast 357 across all switches carrying that VLAN. 359 With VXLAN, a header including the VXLAN VNI is inserted at the 360 beginning of the packet along with the IP header and UDP header. 361 However, this broadcast packet is sent out to the IP multicast group 362 on which that VXLAN overlay network is realized. 364 To effect this, we need to have a mapping between the VXLAN VNI and 365 the IP multicast group that it will use. This mapping is done at the 366 management layer and provided to the individual VTEPs through a 367 management channel. Using this mapping, the VTEP can provide IGMP 368 membership reports to the upstream switch/router to join/leave the 369 VXLAN related IP multicast groups as needed. This will enable 370 pruning of the leaf nodes for specific multicast traffic addresses 371 based on whether a member is available on this host using the 372 specific multicast address (see [RFC4541]). In addition, use of 373 multicast routing protocols like Protocol Independent Multicast - 374 Sparse Mode (PIM-SM see [RFC4601]) will provide efficient multicast 375 trees within the Layer 3 network. 377 The VTEP will use (*,G) joins. This is needed as the set of VXLAN 378 tunnel sources is unknown and may change often, as the VMs come 379 up/go down across different hosts. A side note here is that since 380 each VTEP can act as both the source and destination for multicast 381 packets, a protocol like PIM-bidir (see [RFC5015]) would be more 382 efficient. 384 The destination VM sends a standard ARP response using IP unicast. 385 This frame will be encapsulated back to the VTEP connecting the 386 originating VM using IP unicast VXLAN encapsulation. This is 387 possible since the mapping of the ARP response's destination MAC to 388 the VXLAN tunnel end point IP was learned earlier through the ARP 389 request. 391 Another point to note is that multicast frames and "unknown MAC 392 destination" frames are also sent using the multicast tree, similar 393 to the broadcast frames. 395 4.3. Physical Infrastructure Requirements 397 When IP multicast is used within the network infrastructure, a 398 multicast routing protocol like PIM-SM can be used by the individual 399 Layer 3 IP routers/switches within the network. This is used to 400 build efficient multicast forwarding trees so that multicast frames 401 are only sent to those hosts which have requested to receive them. 403 Similarly, there is no requirement that the actual network 404 connecting the source VM and destination VM should be a Layer 3 405 network - VXLAN can also work over Layer 2 networks. In either case, 406 efficient multicast replication within the Layer 2 network can be 407 achieved using IGMP snooping. 409 5. VXLAN Frame Format 411 The VXLAN frame format is shown below. Parsing this from the bottom 412 of the frame - above the outer frame check sequence (FCS), there is 413 an inner MAC frame with its own Ethernet header with source, 414 destination MAC addresses along with the Ethernet type plus an 415 optional VLAN. See Section 6 for further details of inner VLAN tag 416 handling. 418 The inner MAC frame is encapsulated with the following four headers 419 (starting from the innermost header): 421 O VXLAN Header: This is an 8 byte field which has: 423 o Flags (8 bits)- where the I flag MUST be set to 1 for a valid 424 VXLAN Network ID (VNI). The other 7 bits (designated "R") are 425 reserved fields and MUST be set to zero on transmit and ignored on 426 receive. 428 o VXLAN Segment ID/VXLAN Network Identifier (VNI) - this is a 24 429 bit value used to designate the individual VXLAN overlay network 430 on which the communicating VMs are situated. VMs in different 431 VXLAN overlay networks cannot communicate with each other. 433 o Reserved fields (24 bits and 8 bits) - MUST be set to zero on 434 transmit and ignored on receive. 436 O Outer UDP Header: This is the outer UDP header with a source 437 port provided by the VTEP and the destination port being a well- 438 known UDP port. IANA has assigned the value 4789 for the VXLAN UDP 439 port and this value SHOULD be used by default as the destination UDP 440 port. Some early implementations of VXLAN have used other values 441 for the destination port. To enable interoperability with these 442 implementations, the destination port SHOULD be configurable. It is 443 recommended that the source port number be calculated using a hash 444 of fields from the inner packet - one example being a hash of the 445 inner Ethernet frame`s headers. This is to enable a level of entropy 446 for ECMP/load balancing of the VM to VM traffic across the VXLAN 447 overlay. 449 The UDP checksum field SHOULD be transmitted as zero. When a packet 450 is received with a UDP checksum of zero, it MUST be accepted for 451 decapsulation. Optionally, if the encapsulating endpoint includes a 452 non-zero UDP checksum, it MUST be correctly calculated across the 453 entire packet including the IP header, UDP header, VXLAN header and 454 encapsulated MAC frame. When a decapsulating endpoint receives a 455 packet with a non-zero checksum it MAY choose to verify the checksum 456 value. If it chooses to perform such verification, and the 457 verification fails, the packet MUST be dropped. If the 458 decapsulating destination chooses not to perform the verification, 459 or performs it successfully, the packet MUST be accepted for 460 decapsulation. 462 O Outer IP Header: This is the outer IP header with the source IP 463 address indicating the IP address of the VTEP over which the 464 communicating VM (as represented by the inner source MAC address) is 465 running. The destination IP address can be a unicast or multicast 466 IP address (see Sections 4.1 and 4.2). When it is a unicast IP 467 address, it represents the IP address of the VTEP connecting the 468 communicating VM as represented by the inner destination MAC 469 address. For multicast destination IP addresses, please refer to the 470 scenarios detailed in Section 4.2. 472 O Outer Ethernet Header (example): Figure 1 is an example of an 473 inner Ethernet frame encapsulated within an outer Ethernet + IP + 474 UDP + VXLAN header. The outer destination MAC address in this frame 475 may be the address of the target VTEP or of an intermediate Layer 3 476 router. The outer VLAN tag is optional. If present, it may be used 477 for delineating VXLAN traffic on the LAN. 479 0 1 2 3 480 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 482 Outer Ethernet Header: 483 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 484 | Outer Destination MAC Address | 485 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 486 | Outer Destination MAC Address | Outer Source MAC Address | 487 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 488 | Outer Source MAC Address | 489 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 490 |OptnlEthtype = C-Tag 802.1Q | Outer.VLAN Tag Information | 491 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 492 | Ethertype = 0x0800 | 493 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 495 Outer IPv4 Header: 496 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 497 |Version| IHL |Type of Service| Total Length | 498 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 499 | Identification |Flags| Fragment Offset | 500 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 501 | Time to Live |Protocl=17(UDP)| Header Checksum | 502 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 503 | Outer Source IPv4 Address | 504 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 505 | Outer Destination IPv4 Address | 506 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 508 Outer UDP Header: 509 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 510 | Source Port = xxxx | Dest Port = VXLAN Port | 511 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 512 | UDP Length | UDP Checksum | 513 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 515 VXLAN Header: 516 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 517 |R|R|R|R|I|R|R|R| Reserved | 518 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 519 | VXLAN Network Identifier (VNI) | Reserved | 520 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 522 Inner Ethernet Header: 523 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 524 | Inner Destination MAC Address | 525 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 526 | Inner Destination MAC Address | Inner Source MAC Address | 527 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 528 | Inner Source MAC Address | 529 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 530 |OptnlEthtype = C-Tag 802.1Q | Inner.VLAN Tag Information | 531 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 533 Payload: 534 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 535 | Ethertype of Original Payload | | 536 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 537 | Original Ethernet Payload | 538 | | 539 |(Note that the original Ethernet Frame's FCS is not included) | 540 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 542 Frame Check Sequence: 543 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 544 | New FCS (Frame Check Sequence) for Outer Ethernet Frame | 545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 547 Figure 1 VXLAN Frame Format with IPv4 Outer Header 549 The frame format above shows tunneling of Ethernet frames using IPv4 550 for transport. Use of VXLAN with IPv6 transport is detailed below. 552 0 1 2 3 553 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 555 Outer Ethernet Header: 556 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 557 | Outer Destination MAC Address | 558 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 559 | Outer Destination MAC Address | Outer Source MAC Address | 560 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 561 | Outer Source MAC Address | 562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 563 |OptnlEthtype = C-Tag 802.1Q | Outer.VLAN Tag Information | 564 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 565 | Ethertype = 0x86DD | 566 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 568 Outer IPv6 Header: 569 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 570 |Version| Traffic Class | Flow Label | 571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 572 | Payload Length | NxtHdr=17(UDP)| Hop Limit | 573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 574 | | 575 + + 576 | | 577 + Outer Source IPv6 Address + 578 | | 579 + + 580 | | 581 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 582 | | 583 + + 584 | | 585 + Outer Destination IPv6 Address + 586 | | 587 + + 588 | | 589 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 591 Outer UDP Header: 592 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 593 | Source Port = xxxx | Dest Port = VXLAN Port | 594 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 595 | UDP Length | UDP Checksum | 596 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 598 VXLAN Header: 599 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 600 |R|R|R|R|I|R|R|R| Reserved | 601 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 602 | VXLAN Network Identifier (VNI) | Reserved | 603 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 605 Inner Ethernet Header: 606 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 607 | Inner Destination MAC Address | 608 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 609 | Inner Destination MAC Address | Inner Source MAC Address | 610 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 611 | Inner Source MAC Address | 612 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 613 |OptnlEthtype = C-Tag 802.1Q | Inner.VLAN Tag Information | 614 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 616 Payload: 617 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 618 | Ethertype of Original Payload | | 619 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 620 | Original Ethernet Payload | 621 | | 622 |(Note that the original Ethernet Frame's FCS is not included) | 623 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 625 Frame Check Sequence: 626 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 627 | New FCS (Frame Check Sequence) for Outer Ethernet Frame | 628 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 630 Figure 2 VXLAN Frame Format with IPv6 Outer Header 632 6. VXLAN Deployment Scenarios 634 VXLAN is typically deployed in data centers on virtualized hosts, 635 which may be spread across multiple racks. The individual racks may 636 be parts of a different Layer 3 network or they could be in a single 637 Layer 2 network. The VXLAN segments/overlay networks are overlaid on 638 top of these Layer 2 or Layer 3 networks. 640 Consider Figure 3 below depicting two virtualized servers attached 641 to a Layer 3 infrastructure. The servers could be on the same rack, 642 or on different racks or potentially across data centers within the 643 same administrative domain. There are 4 VXLAN overlay networks 644 identified by the VNIs 22, 34, 74 and 98. Consider the case of VM1-1 645 in Server 1 and VM2-4 on Server 2 which are on the same VXLAN 646 overlay network identified by VNI 22. The VMs do not know about the 647 overlay networks and transport method since the encapsulation and 648 decapsulation happen transparently at the VTEPs on Servers 1 and 2. 649 The other overlay networks and the corresponding VMs are: VM1-2 on 650 Server 1 and VM2-1 on Server 2 both on VNI 34, VM1-3 on Server 1 and 651 VM2-2 on Server 2 on VNI 74, and finally VM1-4 on Server 1 and VM2-3 652 on Server 2 on VNI 98. 654 +------------+-------------+ 655 | Server 1 | 656 | +----+----+ +----+----+ | 657 | |VM1-1 | |VM1-2 | | 658 | |VNI 22 | |VNI 34 | | 659 | | | | | | 660 | +---------+ +---------+ | 661 | | 662 | +----+----+ +----+----+ | 663 | |VM1-3 | |VM1-4 | | 664 | |VNI 74 | |VNI 98 | | 665 | | | | | | 666 | +---------+ +---------+ | 667 | Hypervisor VTEP (IP1) | 668 +--------------------------+ 669 | 670 | 671 | 672 | +-------------+ 673 | | Layer 3 | 674 |---| Network | 675 | | 676 +-------------+ 677 | 678 | 679 +-----------+ 680 | 681 | 682 +------------+-------------+ 683 | Server 2 | 684 | +----+----+ +----+----+ | 685 | |VM2-1 | |VM2-2 | | 686 | |VNI 34 | |VNI 74 | | 687 | | | | | | 688 | +---------+ +---------+ | 689 | | 690 | +----+----+ +----+----+ | 691 | |VM2-3 | |VM2-4 | | 692 | |VNI 98 | |VNI 22 | | 693 | | | | | | 694 | +---------+ +---------+ | 695 | Hypervisor VTEP (IP2) | 696 +--------------------------+ 698 Figure 3 VXLAN Deployment - VTEPs across a Layer 3 Network 700 One deployment scenario is where the tunnel termination point is a 701 physical server which understands VXLAN. Another scenario is where 702 nodes on a VXLAN overlay network need to communicate with nodes on 703 legacy networks which could be VLAN based. These nodes may be 704 physical nodes or virtual machines. To enable this communication, a 705 network can include VXLAN gateways (see Figure 4 below with a switch 706 acting as a VXLAN gateway) which forward traffic between VXLAN and 707 non-VXLAN environments. 709 Consider Figure 4 for the following discussion. For incoming frames 710 on the VXLAN connected interface, the gateway strips out the VXLAN 711 header and forwards to a physical port based on the destination MAC 712 address of the inner Ethernet frame. Decapsulated frames with the 713 inner VLAN ID SHOULD be discarded unless configured explicitly to be 714 passed on to the non-VXLAN interface. In the reverse direction, 715 incoming frames for the non-VXLAN interfaces are mapped to a 716 specific VXLAN overlay network based on the VLAN ID in the frame. 717 Unless configured explicitly to be passed on in the encapsulated 718 VXLAN frame, this VLAN ID is removed before the frame is 719 encapsulated for VXLAN. 721 These gateways which provide VXLAN tunnel termination functions 722 could be ToR/access switches or switches higher up in the data 723 center network topology - e.g. core or even WAN edge devices. The 724 last case (WAN edge) could involve a Provider Edge (PE) router which 725 terminates VXLAN tunnels in a hybrid cloud environment. Note that in 726 all these instances, the gateway functionality could be implemented 727 in software or hardware. 729 +---+-----+---+ +---+-----+---+ 730 | Server 1 | | Non VXLAN | 731 (VXLAN enabled)<-----+ +---->| server | 732 +-------------+ | | +-------------+ 733 | | 734 +---+-----+---+ | | +---+-----+---+ 735 |Server 2 | | | | Non VXLAN | 736 (VXLAN enabled)<-----+ +---+-----+---+ +---->| server | 737 +-------------+ | |Switch acting| | +-------------+ 738 |---| as VXLAN |-----| 739 +---+-----+---+ | | Gateway | 740 | Server 3 | | +-------------+ 741 (VXLAN enabled)<-----+ 742 +-------------+ | 743 | 744 +---+-----+---+ | 745 | Server 4 | | 746 (VXLAN enabled)<-----+ 747 +-------------+ 748 Figure 4 VXLAN Deployment - VXLAN Gateway 750 6.1. Inner VLAN Tag Handling 752 Inner VLAN Tag Handling in VTEP and VXLAN Gateway should conform to 753 the following: 755 Decapsulated VXLAN frames with the inner VLAN tag SHOULD be 756 discarded unless configured otherwise. On the encapsulation side, a 757 VTEP SHOULD NOT include an inner VLAN tag on tunnel packets unless 758 configured otherwise. When a VLAN-tagged packet is a candidate for 759 VXLAN tunneling, the encapsulating VTEP SHOULD strip the VLAN tag 760 unless configured otherwise. 762 7. Security Considerations 764 Traditionally, layer 2 networks can only be attacked from 'within' 765 by rogue endpoints - either by having inappropriate access to a LAN 766 and snooping on traffic or by injecting spoofed packets to 'take 767 over' another MAC address or by flooding and causing denial of 768 service. A MAC-over-IP mechanism for delivering Layer 2 traffic 769 significantly extends this attack surface. This can happen by rogues 770 injecting themselves into the network by subscribing to one or more 771 multicast groups that carry broadcast traffic for VXLAN segments and 772 also by sourcing MAC-over-UDP frames into the transport network to 773 inject spurious traffic, possibly to hijack MAC addresses. 775 This document does not, at this time, incorporate specific measures 776 against such attacks, relying instead on other traditional 777 mechanisms layered on top of IP. This section, instead, sketches out 778 some possible approaches to security in the VXLAN environment. 780 Traditional Layer 2 attacks by rogue end points can be mitigated by 781 limiting the management and administrative scope of who deploys and 782 manages VMs/gateways in a VXLAN environment. In addition, such 783 administrative measures may be augmented by schemes like 802.1X for 784 admission control of individual end points. Also, the use of the 785 UDP based encapsulation of VXLAN enables configuration and use of 786 the 5 tuple based ACLs (Access Control Lists) functionality in 787 physical switches. 789 Tunneled traffic over the IP network can be secured with traditional 790 security mechanisms like IPsec that authenticate and optionally 791 encrypt VXLAN traffic. This will, of course, need to be coupled with 792 an authentication infrastructure for authorized endpoints to obtain 793 and distribute credentials. 795 VXLAN overlay networks are designated and operated over the existing 796 LAN infrastructure. To ensure that VXLAN end points and their VTEPs 797 are authorized on the LAN, it is recommended that a VLAN be 798 designated for VXLAN traffic and the servers/VTEPs send VXLAN 799 traffic over this VLAN to provide a measure of security. 801 In addition, VXLAN requires proper mapping of VNIs and VM membership 802 in these overlay networks. It is expected that this mapping be done 803 and communicated to the management entity on the VTEP and the 804 gateways using existing secure methods. 806 8. IANA Considerations 808 A well-known UDP port (4789) has been assigned by the IANA Service 809 Name and Transport Protocol Port Number Registry for VXLAN. See 810 Section 5 for discussion of the port number. 812 9. References 814 9.1. Normative References 816 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 817 Requirement Levels", BCP 14, RFC 2119, March 1997. 819 9.2. Informative References 821 [802.1D] "Standard for Local and Metropolitan Area Networks/ 822 Media Access Control (MAC) Bridges, IEEE P802.1D-2004". 824 [RFC4601] Fenner, B., Handley, M., Holbrook, H., and Kouvelas, I., 825 "Protocol Independent Multicast - Sparse Mode (PIM-SM): Protocol 826 Specification", RFC 4601, August 2006. 828 [RFC5015] Handley, M., Kouvelas, I., Speakman, T., and Vicisano, L., 829 "Bidirectional Protocol Independent Multicast (BIDIR-PIM)", RFC 830 5015, October 2007. 832 [RFC4541] Christensen, M., Kimball, K., and Solensky, F., 833 "Considerations for Internet Group Management Protocol (IGMP) 834 and Multicast Listener Discovery (MLD) Snooping Switches", RFC 4541, 835 May 2006. 837 [RFC6325] Perlman, R., Eastlake, D., Dutt, D., Gai, S., and A. 838 Ghanwani, "RBridges: Base Protocol Specification", RFC 6325, July 839 2011. 841 [802.1aq] "Standard for Local and Metropolitan Area Networks / 842 Virtual Bridged Local Area Networks / Amendment20: Shortest 843 Path Bridging, IEEE P802.1aq-2012". 845 10. Acknowledgments 847 The authors wish to thank Ajit Sanzgiri for contributions to the 848 Security Considerations section and editorial inputs, Joseph Cheng, 849 Margaret Petrus, Milin Desai, Nial de Barra, Jeff Mandin and Siva 850 Kollipara for their editorial reviews, inputs and comments. 852 Authors' Addresses 854 Mallik Mahalingam 855 Storvisor 856 333 W.El Camino Real 857 Sunnyvale, CA 94087 859 Email: mallik_mahalingam@yahoo.com 861 Dinesh G. Dutt 862 Cumulus Networks 863 140C S.Whisman Road 864 Mountain View, CA 94041 866 Email: ddutt.ietf@hobbesdutt.com 868 Kenneth Duda 869 Arista Networks 870 5470 Great America Parkway 871 Santa Clara, CA 95054 873 Email: kduda@aristanetworks.com 875 Puneet Agarwal 876 Broadcom Corporation 877 3151 Zanker Road 878 San Jose, CA 95134 880 Email: pagarwal@broadcom.com 881 Lawrence Kreeger 882 Cisco Systems, Inc. 883 170 W. Tasman Avenue 884 Palo Alto, CA 94304 886 Email: kreeger@cisco.com 888 T. Sridhar 889 VMware Inc. 890 3401 Hillview 891 Palo Alto, CA 94304 893 Email: tsridhar@vmware.com 895 Mike Bursell 896 Citrix Systems Research & Development Ltd. 897 Building 101 898 Cambridge Science Park 899 Milton Road 900 Cambridge CB4 0FY 901 United Kingdom 903 Email: mike.bursell@citrix.com 905 Chris Wright 906 Red Hat Inc. 907 1801 Varsity Drive 908 Raleigh, NC 27606 910 Email: chrisw@redhat.com