VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN...

34
Distributed Virtual Routing for VLAN backed networks on OVN Ankur Sharma Nutanix Inc.

Transcript of VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN...

Page 1: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

Distributed Virtual Routing for VLAN backed networks on OVN

Ankur Sharma

Nutanix Inc.

Page 2: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

2

Outline

Introduction

Challenges

OVN Enhancements

Comparison with overlay DVR

Current Status

Future Work

Page 3: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

INTRODUCTION

Page 4: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

4

Distributed Virtual Router (DVR)

Router instance running in compute nodes (Hypervisors).

Provides functionality of gateway to virtual machines/containers.

Distributed in fashion.○ Same router instance runs on multiple hypervisors.

Example, “logical router” in OVN.

INTRODUCTIONLayer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 5: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

5

VLAN backed DVR

Virtual layer 2 switches are on VLAN networks.○ Not on overlay.○ Traffic is not encapsulated.

INTRODUCTIONLayer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 6: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

VLAN ORANGE

VLAN BLACK

VLAN GREEN

DVR

PHYSICAL ROUTER

ls1

ls2

ls-corp

INTRODUCTIONLayer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 7: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

INTRODUCTIONLayer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

VLAN ORANGE

VLAN BLACK

VLAN GREEN

DVR

Hypervisor

Page 8: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

CHALLENGES

Page 9: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

9

DVR Based○ Because of distributed nature of the router.

OVN Based○ Because of OVN way of doing things.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 10: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

10

DVR Based

Continuous mac move of logical router port macs.○ Logical router ports are distributed across hypervisors.

○ Packets with logical router port MAC address as source MAC will come from multiple chassis.

○ Will cause mac moves on Top of the Rack (TOR) switch.■ As a security measure packets could be dropped.■ As a security measure corresponding TOR switch port could be blocked.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 11: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

VLAN ORANGE

VLAN BLACK

VLAN GREEN

PHYSICAL ROUTER

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

LRP_ORANGE LRP_BLACK

LRP_GREEN

VM1 VM2

VM3

Page 12: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

12

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

VM1 VM2 VM3

VM1 ---> VM3 VM2 ---> VM3

Source mac == LRP_BLACKVlan == VLAN_BLACK

Source mac == LRP_BLACKVlan == VLAN_BLACK

Page 13: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

13

OVN Based

ARP replies from VIFs destined to router ports not sent on wire.○ By design, ovn consumes it and populates mac binding table.○ Not sending on wire, would mean that VM mac is not learnt by TOR.○ TOR will always end up broadcasting the traffic with destination mac that of the VM.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 14: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

14

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

VM1 VM2

VM1 VM2

I C M PDest IP == VM2_IP ARP_REQ for VM2_IP

ARP_RESP

ICMPDest IP == VM2_IP

DEST_MAC == VM2_MAC

1 2

3

4

1

2

3

4 4 4

Page 15: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

15

OVN Based

North-South traffic without NAT.○ For VLAN backed networks, NATing north bound traffic is not must.○ OVN lacks “proper” support for this case.

Dependency on encap header.○ SNAT design relies on metadata carried in geneve encap header.○ Process only egress pipeline on destination chassis.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

Page 16: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

OVN ENHANCEMENT

Page 17: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

17

LAYER 2

No changes needed in this area.

We will leverage on “localnet” ports to send vlan tagged traffic on wire.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

Page 18: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

18

Router Port Mac Move Handling

Configure unique MAC(s) on every chassis.○ For example, “ovn-chassis-mac-mappings = physnet:aa:bb:cc:dd:ee:ff”○ We will refer to this mac as “chassis mac”.

ovn-controller programs flow to replace router port mac with chassis mac before sending traffic to physical network.

○ table=65, priority=150○ Matches if egress port is localnet port○ For example: chassis_mac = “aa:bb:cc:dd:ee:ff”, router_port_mac = “00:00:01:01:02:04”

cookie=0x0, duration=30.226s, table=65, n_packets=0, n_bytes=0, idle_age=30, priority=150,reg15=0x5,metadata=0x2, dl_src=00:00:01:01:02:04 actions=mod_dl_src:aa:bb:cc:dd:ee:ff,output:30,mod_vlan_vid:118

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

Page 19: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

19

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

VM1 VM2 VM3

VM1 ---> VM3 VM2 ---> VM3

Source mac == CHASSIS_1_MACVlan == VLAN_BLACK

Source mac == CHASSIS_2_MACVlan == VLAN_BLACK

OVNCHANGES

Page 20: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

20

ARP replies to router port

ovn-controller will process the ARP response to router port.

Additionally, it will generate reverse ARP (RARP) packet to be sent on wire.○ Contingent that logical switch is of type VLAN.○ TOR will learn VM’s mac through this packet.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

Page 21: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

21

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

VM1 VM2

VM1 VM2

I C M PDest IP == VM2_IP ARP_REQ for VM2_IP

ARP_RESP

ICMPDest IP == VM2_IP

1 2

3

4

1

2

3

4

OVNCHANGES

34

Page 22: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

22

North-South Traffic

We will rely on gateway-chassis to resolve ARP for Router Port.○ Gateway chassis means a single chassis will become entry point for all the “outside” traffic.○ This router port IP will be advertised as next hop for logical networks behind DVR.

Advertise router port mac using GARP when a chassis becomes active gateway chassis.

From wire, ARP will be resolved only for router port which has gateway chassis attached.○ This ARP will be resolved ONLY on the gateway chassis.

Source MAC does not get replaced on gateway chassis.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

Page 23: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

VLAN ORANGE

VLAN BLACK

VLAN GREEN

DVR

PHYSICAL ROUTER

ls1

ls2

ls-corp

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

OVNCHANGES

Page 24: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

24

North-South Traffic

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

VM2

123

VLAN ORANGE

VLAN GREEN

VM1

OVNCHANGES

Page 25: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

25

Network Address Translation (NAT)

Redirect the packet to gateway chassis, using router port mac as dest mac.

Packet enters router pipeline “again” on gateway chassis.○ Without encap, there is no way to force packet to just egress pipeline of router.

NATed packet goes on wire.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

OVNCHANGES

Page 26: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

26

NAT

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

VM2

21

VLAN ORANGE

VLAN GREEN

VM1

OVNCHANGES

Page 27: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

COMPARISONWITH OVERLAY DVR

Page 28: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

28

LAYER 2 PIPELINE● Ingress pipeline executed again on destination chassis.

○ In the absence of encap, no way to enforce only egress pipeline execution on destination chassis.

LAYER 3 E-W PIPELINE● No changes in L3 pipeline.

○ Router pipeline executed only on source chassis.

LAYER 3 N-S PIPELINE (NO NAT)● Traffic originating from OVN chassis will not go to gateway chassis.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

COMPAREWITH

OVERLAY

OVNCHANGES

Page 29: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

29

LAYER 3 N-S PIPELINE (NAT)● Router ingress pipeline executed again on gateway chassis.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

OVNCHANGES

COMPAREWITH

OVERLAY

OVNCHANGES

Page 30: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

CURRENT STATUS

Page 31: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

31

COMPAREWITH

OVERLAY

Proof of concept internally done and tested.

Proposal discussed with community.○ https://mail.openvswitch.org/pipermail/ovs-dev/2018-October/353066.html

Some patches out for review.

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

COMPAREWITH

OVERLAY

CURRENT STATUS

OVNCHANGES

Page 32: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

FUTURE WORK

Page 33: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

33

COMPAREWITH

OVERLAY

ARP Probing/Ageing○ Advertise VM macs to TOR, periodically.○ Or age out VMs mac periodically.○ Both timers should be configurable.

DHCP Relay

Equal Cost Multi Path Routing (ECMP)

INTRODUCTION CHALLENGES Layer 2Layer 3

East-WestLayer 3

East-WestLayer 3

North-South

Pending Tasks

+Issues

COMPAREWITH

OVERLAY

CURRENT STATUS

FUTUREWORK

OVNCHANGES

Page 34: VLAN backed networks on OVN · Ankur Sharma Nutanix Inc. 2 Outline Introduction Challenges OVN Enhancements Comparison with overlay DVR Current Status Future Work. INTRODUCTION. 4

Questions