How To Make A Network More Efficient

Similar documents
Internet Protocols Fall Lectures 7-8 Andreas Terzis

8.2 The Internet Protocol

Network layer: Overview. Network layer functions IP Routing and forwarding

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Chapter 4 Network Layer

Lecture Computer Networks

Introduction to LAN/WAN. Network Layer (part II)

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

IP addressing and forwarding Network layer

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Internetworking and Internet-1. Global Addresses

IP Addressing Introductory material.

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Future Internet Technologies

Lecture 12: Link-state Routing"

Internet Control Protocols Reading: Chapter 3

Transport and Network Layer

Lecture 8. IP Fundamentals

Introduction to TCP/IP

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Network Layer: Network Layer and IP Protocol

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

The Internet. Internet Technologies and Applications

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

IP - The Internet Protocol

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Ethernet. Ethernet. Network Devices

CS 348: Computer Networks. - IP addressing; 21 st Aug Instructor: Sridhar Iyer IIT Bombay

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

IP address format: Dotted decimal notation:

IP Subnetting and Addressing

Variable length subnetting

04 Internet Protocol (IP)

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

RARP: Reverse Address Resolution Protocol

Chapter 4 Network Layer

Technical Support Information Belkin internal use only

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

IP Addressing. IP Addresses. Introductory material.

Guide to TCP/IP, Third Edition. Chapter 2: IP Addressing and Related Topics

Internet Protocol Address

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Traffic Shaping: Leaky Bucket Algorithm

Computer Networks. Main Functions

Scalable Prefix Matching for Internet Packet Forwarding

Quality of Service (QoS)) in IP networks

Answers to Sample Questions on Network Layer

10CS64: COMPUTER NETWORKS - II

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

Chapter 5: Sample Questions, Problems and Solutions Bölüm 5: Örnek Sorular, Problemler ve Çözümleri Örnek Sorular (Sample Questions):

(Refer Slide Time: 02:17)

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

We Are HERE! Subne\ng

ICS 351: Today's plan

CS 78 Computer Networks. Internet Protocol (IP) our focus. The Network Layer. Interplay between routing and forwarding

Exam 1 Review Questions

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Introduction to IP v6

Lecture 16: Quality of Service. CSE 123: Computer Networks Stefan Savage

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Savera Tanwir. Internet Protocol

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Router and Routing Basics

VLAN und MPLS, Firewall und NAT,

CS514: Intermediate Course in Computer Systems

Network Security TCP/IP Refresher

CS335 Sample Questions for Exam #2

Subnetting,Supernetting, VLSM & CIDR

Layer 3 Routing User s Manual

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

20. Switched Local Area Networks

MPLS is the enabling technology for the New Broadband (IP) Public Network

Internet Protocols. Addressing & Services. Updated:

IP Routing Configuring Static Routes

IP Addressing A Simplified Tutorial

QoS Parameters. Quality of Service in the Internet. Traffic Shaping: Congestion Control. Keeping the QoS

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

Advanced IP Addressing

ProCurve Networking IPv6 The Next Generation of Networking

Internet Quality of Service

SUBNETS, CIDR, AND CLASSLESS ADDRESSING

Internet Addresses (You should read Chapter 4 in Forouzan)

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

iseries TCP/IP routing and workload balancing

Introduction. Internet Address Depletion and CIDR. Introduction. Introduction

Internet Peering, IPv6, and NATs. Mike Freedman V Networks

Transcription:

Lecture 3: Packet Forwarding" CSE 222A: Computer Communication Networks Alex C. Snoeren Thanks: Mike Freedman & Amin Vahdat

Lecture 3 Overview" Paper reviews Packet Forwarding IP Addressing Subnetting/CIDR Data-plane processing NAT Middle boxes CSE 222A Lecture 3: Packet Forwarding" 2

Paper review tips" Demonstrate you understood the paper Don t just give short synopses Analogies/examples are good ways to demonstrate thought Understand the context of the paper Where/when was it published? By whom? Think outside of the box We selected good papers Shortcomings are likely to lie outside of their stated scope We re looking for implications they didn t state What impact did/could this paper have beyond the goals listed specifically in the paper CSE 222A Lecture 3: Packet Forwarding" 3

CSE 222A Lecture 2: Layering & End-to-End" 4

Motivation" Goal: efficiently deliver packets between arbitrary hosts in the network Key concerns: scalability, performance, robustness Key techniques: Hierarchical design» Learn enough to do part of the job, hand task off to someone else» e.g., one technique for inter-domain routing, another for intra-domain Soft state» Learn all the information you need to perform routing» State info not for correctness, just performance optimizations CSE 222A Lecture 3: Packet Forwarding" 6

Forwarding Options" Source routing (Myrinet) Packet carries path Table of global addresses (IP) Stateless routers Table of virtual circuits (ATM) Small headers, small tables How do hosts/switches learn optimal network routes? Given packet header, how to determine forwarding port Topic for Thursday CSE 222A Lecture 3: Packet Forwarding" 7

Comparison" Source routing Global addresses Virtual circuits Header size worst OK ~ large best addrs Router none # of hosts # of circuits table size (prefixes) Forward best Prefix Pretty good overhead matching Setup none none High overhead Error recovery Tell all hosts Tell all routers Tear down circuit and reroute CSE 222A Lecture 3: Packet Forwarding" 8

Packet Forwarding" Control plane computes a forwarding table Maps destination address(es) to an output link Handling an incoming packet Match: destination address Action: direct the packet to the chosen output link Switching fabric Directs packet from input link to output link Processor Switching Fabric CSE 222A Lecture 3: Packet Forwarding" 9

Switch: Match on MAC" MAC addresses are location independent Assigned by the vendor of the interface card Cannot be aggregated across hosts in the LAN mac1! mac2! mac3!...! host host host host mac5! switch host mac4! mac1 mac2 mac3 mac4 mac5 Implemented using a hash table or a content addressable memory.! CSE 222A Lecture 3: Packet Forwarding" 10

IP Routers: Match on IP Prefix" IP addresses grouped into common subnets Allocated by ICANN, regional registries, ISPs, and within individual organizations Variable-length prefix identified by a mask length 1.2.3.4! 1.2.3.7! 1.2.3.156! 5.6.7.8! 5.6.7.9! 5.6.7.212!...! host host host...! host host host LAN 1! LAN 2! 1.2.3.0/24! 5.6.7.0/24! router router router WAN! WAN! Prefixes may be nested.! Routers identify the longest matching prefix.! forwarding table! CSE 222A Lecture 3: Packet Forwarding" 11

Address Resolution Protocol" IP forwarding tables: one entry per network not host Thus, routes designed to get packets to proper network Network needs to take over from there to get to proper host Address resolution protocol (ARP) translates IP addresses to link-level addresses (e.g., Ethernet addr) Broadcast request over network for IPèlink-level mapping Maintain local cache (with timeout)?? To 152.3.140.5 Ethernet CSE 222A Lecture 3: Packet Forwarding" 12

ARP example" (152.3.145.240) (152.3.140.5) Broadcast: Anyone know the Ethernet address for 152.3.140.5? Ethernet Reply: Yes, I m at 08-00-2b-18-bc-65 Packet arrives for host on Same physical network Ethernet CSE 222A Lecture 3: Packet Forwarding" 13

Internet: Hierarchical Routing" Internet composed of many autonomous systems (AS s) Correspond to administrative domains Each AS can choose its own routing algorithm Routing Information Protocol (RIP) used originally Part of BSD distribution, distance vector Open Shortest Path First (OSPF) currently most popular Link state protocol w/authentication, basic load balancing Border Gateway Protocol (BGP) for routing between AS s Default: shortest number of AS s in path Sys admins can express policy control Use AS x in preference to AS y CSE 222A Lecture 3: Packet Forwarding" 14

IP: The Internet Protocol" Service mode: best effort No guarantees about reliable, in-order, or error-free delivery Enables IP to run over anything Version HLen TOS Length Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Options (variable) Pad (variable) Data CSE 222A Lecture 3: Packet Forwarding" 15

Fragmentation and Reassembly" Problem: networks have different maximum transmission units (MTUs) Ethernet: 1500 bytes, FDDI: 4500 bytes, etc. Communicating hosts may be on networks w/similar MTUs But smaller MTU somewhere in the middle of the network To maintain uniform host-to-host communication, IP must fragment and then reassemble packets on endto-end basis Hosts pick MTU of local network Fragmentation takes place at routers that forward packets along links with smaller MTU Input on 1500-byte MTU link, output on 500-byte MTU link CSE 222A Lecture 3: Packet Forwarding" 16

IP Address Allocation" Originally (classfull addrs), 4 address classes A : 0 7 bit network 24 bit host (1M each) B : 10 14 bit network 16 bit host (64K) C : 110 21 bit network 8 bit host (255) D : 1110 28 bit multicast group # Assign net # centrally, host # locally E.g., assign UCSD a class B address CSE 222A Lecture 3: Packet Forwarding" 17

IP Address Issues" We can run out 4B IP addresses We ll run out faster if sparsely allocated Rigid structure causes internal fragmenting E.g., assign a class C address to site with 2 computers Waste 99% of assigned address space Need address aggregation to keep tables small 2 million class C networks Entry per network in IP forwarding tables Scalability? CSE 222A Lecture 3: Packet Forwarding" 18

19

Efficient IP Address Allocation" Subnets Split net addresses between multiple sites Supernets Assign adjacent net addresses to same organization Classless routing (CIDR) Combine routing table entries whenever all nodes with same prefix share same hop Hardware support for fast prefix lookup CSE 222A Lecture 3: Packet Forwarding" 20

CIDR" Classless Interdomain Routing (CIDR) Balances entries in forwarding tables with need to efficiently distribute IP address space Example: site that requires 16 class-c IP addresses Use 16 contiguous class C addrs, e.g., 192.4.16-192.4.31 Top 20 bits are identical Have created something between a class B and class C addr Classless Need routing protocols to recognize CIDR BGP-4 sends updates in form <length,value> (e.g., where length is 20 for above example). CSE 222A Lecture 3: Packet Forwarding" 21

Network Address Translation" Allows multiple machines to be assigned same IPV4 addr NAT separates internal from external hosts Hosts only need internally unique address NAT translates each packet Multiplex small set of externally unique addresses among active connections internal IP -> dynamically allocated ext. IP What if NAT crashes? Interaction with security? CSE 222A Lecture 3: Packet Forwarding" 22

Network Address Translation" 10.0.0.1! 138.76.29.7! NAT outside 10.0.0.2! inside CSE 222A Lecture 3: Packet Forwarding" 23

Mapping Addresses and Ports" Remap IP addresses and TCP/UDP port numbers Addresses: between end-host and NAT addresses Port numbers: to ensure each connection is unique Create table entries as packets arrive Src 10.0.0.1, SPort 1024, Dest 1.2.3.4, DPort 80» Map to Src 138.76.29.7, Sport 1024, Dest 1.2.3.4, Dport 80 Src 10.0.0.2, SPort 1024, Dest 1.2.3.4, DPort 80» Map to Src 138.76.29.7, Sport 1025, Dest 1.2.3.4, Dport 80 Challenges When to remove the entries Running services behind a NAT What if both ends of a connection are behind NATs CSE 222A Lecture 3: Packet Forwarding" 24

A Generic Switch Fabric" Data Hdr Header Processing Lookup Address Update Header 1 1 Queue Packet Address Table Buffer Memory Data Hdr Header Processing Lookup Address Update Header 2 2 Queue Packet Address Table Buffer Memory Data Hdr Header Processing Lookup Address Update Header N N Queue Packet Address Table Buffer Memory CSE 222A Lecture 3: Packet Forwarding" 25

Buffering" Drop-tail FIFO queue Packets served in the order they arrive and dropped if queue is full Random Early Detection (RED) When the buffer is nearly full drop or mark some packets to signal congestion Multiple classes of traffic Separate FIFO queue for each flow or traffic class with a link scheduler to arbitrate between them CSE 222A Lecture 3: Packet Forwarding" 26

Link Scheduling" Strict priority Assign an explicit rank to the queues and serve the highest-priority backlogged queue Weighted fair scheduling Interleave packets from different queues in proportion to weights 50% red, 25% blue, 25% green! CSE 222A Lecture 3: Packet Forwarding" 27

Traffic Shaping" Force traffic to conform with a profile To avoid congesting downstream resources To enforce a contract with the customer Leaky-bucket shaping Can send at rate r and intermittently burst Parameters: token rate r and bucket depth d Tokens arrive (rate r)! packets! tokens! Max # of tokens! (d tokens)! A leaky-bucket shaper for each flow or traffic class! CSE 222A Lecture 3: Packet Forwarding" 28

Traffic Classification/Marking" Mark a packet to influence handling downstream Early Congestion Notification (ECN) flag Type-of-Service (ToS) bits Ways to set the ToS bits End host sets the bits based on the application» But, then the network must trust (or bill!) the end host Network sets the bits based on traffic classes» But, then the network needs to know how to classify packets Identifying traffic classes Packet classification based on the five tuple Rate limits, with separate mark for out of profile traffic CSE 222A Lecture 3: Packet Forwarding" 29

Generalized Data Plane" Streaming algorithms that act on packets Matching on some bits, taking a simple action at behest of control and management plane Wide range of functionality Forwarding Access control Mapping header fields Traffic monitoring Buffering and marking Shaping and scheduling CSE 222A Lecture 3: Packet Forwarding" 30

Middle Boxes" Router Forward on destination IP address Access control on the five tuple Link scheduling and marking Monitoring traffic Deep packet inspection Switch Forward on destination MAC address Firewall NAT Access control on five tuple (and more) Mapping addresses and port numbers Shaper Classify packets Shape or schedule Packet sniffer Monitoring traffic CSE 222A Lecture 3: Packet Forwarding" 31

Programmable Data Plane" Programmable data plane Arbitrary customized packet-handling functionality Building a new data plane, or extending existing one Speed is important Data plane in hardware or in the kernel Streaming algorithms the handle packets as they arrive Two open platforms Click: software data plane in user space or the kernel NetFPGA: hardware data plane based on FPGAs Lots of ongoing research activity CSE 222A Lecture 3: Packet Forwarding" 32

OpenFlow" Match Match on a subset of bits in the packet header E.g., key header fields (addresses, port numbers, etc.) Well-suited to capitalize on TCAM hardware Action Perform a simple action on the matching packet E.g., forward, flood, drop, rewrite, count, etc. Controller Software that installs rules and reads counts... and handles packets the switch cannot handle CSE 222A Lecture 3: Packet Forwarding" 33

Future of IP" Is IP really an indirection layer? Mobility Overlay networks Peer to peer networks Application-layer routing NAT Perhaps an IP address becomes a convenient intermediate handle for performing the next lookup? CSE 222A Lecture 3: Packet Forwarding" 34

For Next Class " Read P&D Chapter 4 Read and review Paxson 97 (Changed since the beginning of the term) Keep thinking about term project ideas/groups Groups and ideas due next week CSE 222A Lecture 3: Packet Forwarding" 35