COS 561: Advanced Computer Networks

Slides:



Advertisements
Similar presentations
IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
Advertisements

Programming Protocol-Independent Packet Processors
P4 demo: a basic L2/L3 switch in 170 LOC
P4: specifying data planes
ENGINEERING WORKSHOP Compute Engineering Workshop P4: specifying data planes Mihai Budiu San Jose, March 11, 2015.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding Relates to Lab 3.
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
OpenFlow overview Joint Techs Baton Rouge. Classic Ethernet Originally a true broadcast medium Each end-system network interface card (NIC) received every.
© 2009 Cisco Systems, Inc. All rights reserved. SWITCH v1.0—4-1 Implementing Inter-VLAN Routing Deploying Multilayer Switching with Cisco Express Forwarding.
Announcements List Lab is still under construction Next session we will have paper discussion, assign papers,
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Chapter 4 Queuing, Datagrams, and Addressing
1 Internet Protocol. 2 Connectionless Network Layers Destination, source, hop count Maybe other stuff –fragmentation –options (e.g., source routing) –error.
IP Forwarding.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 7 Internet Protocol (IP) Routing.
More on Internet Routing A large portion of this lecture material comes from BGP tutorial given by Philip Smith from Cisco (ftp://ftp- eng.cisco.com/pfs/seminars/APRICOT2004.
Networks and Protocols CE Week 7b. Routing an Overview.
Coping with Link Failures in Centralized Control Plane Architecture Maulik Desai, Thyagarajan Nandagopal.
Experiences with Programmable Dataplanes Ronald van der Pol SURFnet TNC 2016, June, Prague (CZ)
Nick McKeown (Many thanks to Lisa and Lavanya) CS244 Programmable Switches Forwarding metamorphosis: fast programmable match-action processing … Pat Bosshart,
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
P4: Programming Protocol-Independent Packet Processors
Building Efficient and Reliable Software-Defined Networks
HULA: Scalable Load Balancing Using Programmable Data Planes
How I Learned to Stop Worrying About the Core and Love the Edge
Chapter 4 Network Layer All material copyright
P4 (Programming Protocol-independent Packet Processors)
Networking CS 3470, Section 1 Sarah Diesburg
How I Learned to Stop Worrying About the Core and Love the Edge
Data Center Networks and Fast and Programmable Switching Technologies
Forwarding and Routing IP Packets
IP Forwarding Covers the principles of end-to-end datagram delivery in IP networks.
Chapter 4-1 Network layer
Congestion-Aware Load Balancing at the Virtual Edge
ECE 544 Protocol Design Project 2016
IP Forwarding Relates to Lab 3.
CS 457 – Lecture 10 Internetworking and IP
IP Forwarding Relates to Lab 3.
Programmable Networks
What’s “Inside” a Router?
IP Forwarding Relates to Lab 3.
Network Core and QoS.
Packet Switch Architectures
IP Forwarding Relates to Lab 3.
Debugging P4 Programs with Vera
Rick Graziani Cabrillo College
Networking CS 3470 Sarah Diesburg
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Network Control Jennifer Rexford
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
1 Multi-Protocol Label Switching (MPLS). 2 MPLS Overview A forwarding scheme designed to speed up IP packet forwarding (RFC 3031) Idea: use a fixed length.
Network Layer: Control/data plane, addressing, routers
Programmable Switches
Project proposal: Questions to answer
Congestion-Aware Load Balancing at the Virtual Edge
Networking and Network Protocols (Part2)
2019/5/13 A Weighted ECMP Load Balancing Scheme for Data Centers Using P4 Switches Presenter:Hung-Yen Wang Authors:Peng Wang, George Trimponias, Hong Xu,
IP Forwarding Relates to Lab 3.
Networking CS 3470 Sarah Diesburg
Toward Self-Driving Networks
Toward Self-Driving Networks
2019/10/9 A Weighted ECMP Load Balancing Scheme for Data Centers Using P4 Switches Presenter:Hung-Yen Wang Authors:Jin-Li Ye, Yu-Huang Chu, Chien Chen.
Internet Protocol version 6 (IPv6)
Packet Switch Architectures
SPINE: Surveillance protection in the network Elements
Jennifer Rexford Princeton University
Network Core and QoS.
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

COS 561: Advanced Computer Networks P4 Applications Jennifer Rexford Fall 2016 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks http://www.cs.princeton.edu/courses/archive/fall16/cos561/

P4 Code Example Simple Router https://github.com/p4lang/tutorials/blob/master/ SIGCOMM_2016/heavy_hitter/p4src/heavy_hitter.p4

Simple Router Processor Switching Fabric

Simple Router Processor smac dmac nhop_ipv4 ingress port 0 smac dmac Switching Fabric egress port 3 IP Prefix Next-hop 1.2.3.0/24 2 5.6.0.0/16 3 7.0.0.0/8 4

Simple Router Parse the packet IP forwarding Update Ethernet frame Ethernet and IPv4 headers IP forwarding Longest-prefix match on destination IP address … to determine the “next hop” port for the packet Update Ethernet frame Set the source and destination MAC addresses … to correspond to the output link Updates to the IPv4 header Verify and update the IP header checksum Decrement the IP “time to live” field

Headers: Ethernet and IPv4 header_type ethernet_t { fields { dstAddr : 48; srcAddr : 48; etherType : 16; } header_type ipv4_t { fields { version : 4; ihl : 4; … ttl; protocol; hdrChecksum : 16; srcAddr : 32; dstAddr : 32; }

Parser Definition: Ethernet and IPv4 parser start { return parse_ethernet; } parser parse_ethernet { extract(ethernet); return select(latest.etherType) { 0x0800 : parse_ipv4; default: ingress; parser parse_ipv4 { extract(ipv4); return ingress;

Table Definition: IP Look-up table ipv4_lpm { reads { ipv4.dstAddr : lpm; } actions { set_nhop; _drop; size: 1024; Set nhop IP address Set egress port Decrement TTL

Control Flow control ingress { apply(ipv4_lpm); apply(forward); } Set dmac control egress { apply(send_frame); } Set smac

Prototyping New Functionality in P4 HULA Load-Sensitive Routing

Load Balancing Today Equal Cost Multi-Path (ECMP) – hashing . . . . . . … Servers Leaf Switches Spine Switches

Alternatives Proposed Central Controller HyperV Slow reaction time

Congestion-Aware Fabric HyperV Congestion-aware Load Balancing CONGA – Cisco Designed for 2-tier topologies

Programmable Data Planes Advanced switch architectures (P4 model) Programmable packet headers Stateful packet processing Applications In-band Network Telemetry (INT) HULA load balancer Examples Barefoot RMT, Intel Flexpipe, etc.

Programmable Switches: Capabilities P4 Program Compile Memory Memory Memory Memory M A m1 a1 M A m1 a1 M A m1 a1 M A m1 a1 Ingress Parser Queue Buffer Egress Deparser

Programmable Switches: Capabilities P4 Program Programmable Parsing Stateful Memory Compile Memory Memory Memory Memory M A m1 a1 M A m1 a1 M A m1 a1 M A m1 a1 Ingress Parser Queue Buffer Egress Deparser Switch Metadata

Hop-by-hop Utilization-aware Load-balancing Architecture HULA probes propagate path utilization Congestion-aware switches Each switch remembers best next hop Scalable and topology-oblivious Split elephants to mice flows (flowlets) Fine-grained load balancing

1. Probes carry path utilization Spines Probe replicates Aggregate Probe originates Let’s dig a little deeper. In HULA, the probes originate at the ToRs (through the servers or the ToRs themselves) and then are replicated on multiple paths as they travel the network. We make sure that each switch replicates only the necessary set of probes to the others so that the probe overhead is minimal. ToR

1. Probes carry path utilization P4 primitives New header format Programmable Parsing Switch metadata Spines Probe replicates Aggregate Probe originates Let’s dig a little deeper. In HULA, the probes originate at the ToRs (through the servers or the ToRs themselves) and then are replicated on multiple paths as they travel the network. We make sure that each switch replicates only the necessary set of probes to the others so that the probe overhead is minimal. ToR

1. Probes carry path utilization ToR ID = 10 Max_util = 80% S2 ToR ID = 10 Max_util = 60% ToR 10 S3 ToR 1 S1 Probe S4 ToR ID = 10 Max_util = 50%

2. Switch identifies best downstream path ToR ID = 10 Max_util = 50% S2 ToR 10 S3 ToR 1 S1 Probe Dst Best hop Path util ToR 10 S4 50% ToR 1 S2 10% … Then the switch takes the minimum from among the probe given utilization and stores it in the local routing table. The switch S1 then sends its view of the best path to the upstream switches. And the upstream switches process these probes and update their neighbours. This leads to a distance vector-style propagation of information about network utilization to all the switches. But at the same time, each switch only needs to keep track of the best next hop towards a destination. S4 Best hop table

2. Switch identifies best downstream path ToR ID = 10 Max_util = 40% S2 ToR 10 S3 ToR 1 S1 Probe Dst Best hop Path util ToR 10 S4 S3 50% 40% ToR 1 S2 10% … Then the switch takes the minimum from among the probe given utilization and stores it in the local routing table. The switch S1 then sends its view of the best path to the upstream switches. And the upstream switches process these probes and update their neighbours. This leads to a distance vector-style propagation of information about network utilization to all the switches. But at the same time, each switch only needs to keep track of the best next hop towards a destination. S4 Best hop table

3. Switches load balance flowlets ToR 10 Data S3 ToR 1 S1 Dest Best hop Path util ToR 10 S4 50% ToR 1 S2 10% … The switches then route data packets in the opposite direction by spitting flows into smaller groups of packets called flowlets. Flowlets basically are subsequences of packets in a flow separated by a large enough inter-packet gap so that when different flowlets are sent on different paths, the destination does not see packet reordering with high probability. S4 Best hop table

3. Switches load balance flowlets Flowlet table Hash flow Dest Timestamp Next hop ToR 10 1 S4 … S2 ToR 10 Data S3 ToR 1 S1 Dest Best hop Path util ToR 10 S4 50% ToR 1 S2 10% … The switches then route data packets in the opposite direction by spitting flows into smaller groups of packets called flowlets. Flowlets basically are subsequences of packets in a flow separated by a large enough inter-packet gap so that when different flowlets are sent on different paths, the destination does not see packet reordering with high probability. S4 Best hop table

3. Switches load balance flowlets P4 primitives RW access to stateful memory Comparison/arithmetic operators Flowlet table Dest Timestamp Next hop ToR 10 1 S4 … S2 ToR 10 Data S3 ToR 1 S1 Dest Best hop Path util ToR 10 S4 50% ToR 1 S2 10% … The switches then route data packets in the opposite direction by spitting flows into smaller groups of packets called flowlets. Flowlets basically are subsequences of packets in a flow separated by a large enough inter-packet gap so that when different flowlets are sent on different paths, the destination does not see packet reordering with high probability. S4 Best hop table

Discussion Load-sensitive routing Other P4 applications Abstractions for P4 programming