ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Similar documents
ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ECPE / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Vorlesung Kommunikationsnetze

Network Layer: Control/data plane, addressing, routers

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

internet technologies and standards

CSCI Computer Networks Fall 2016

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Network layer: Overview. Network Layer Functions

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Lecture 8. Network Layer (cont d) Network Layer 1-1

Internetworking Part 2

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Chapter 4: Network Layer

cs144 Midterm Review Fall 2010

COMP/ELEC 429/556 Introduction to Computer Networks

TSIN02 - Internetworking

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Networks. an overview. dr. C. P. J. Koymans. Informatics Institute University of Amsterdam. February 4, 2008

Network Layer: Internet Protocol

Network Layer PREPARED BY AHMED ABDEL-RAOUF

COMP211 Chapter 4 Network Layer: The Data Plane

Introduction to Internetworking

Router Architecture Overview

Internet Protocol (IP)

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

Internet Protocols (chapter 18)

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

IP - The Internet Protocol

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

ECE 4450:427/527 - Computer Networks Spring 2017

CS 3516: Advanced Computer Networks

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

ECE 158A: Lecture 7. Fall 2015

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I

IPv4. Christian Grothoff.

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

CHAPTER-2 IP CONCEPTS

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

Where we are in the Course

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

TSIN02 - Internetworking

ET4254 Communications and Networking 1

Position of IP and other network-layer protocols in TCP/IP protocol suite

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

internet technologies and standards

The Interconnection Structure of. The Internet. EECC694 - Shaaban

CS 457 Lecture 11 More IP Networking. Fall 2011

Aside: Interaction with Link Layer Computer Networking. Caching ARP Entries. ARP Cache Example

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

Module 7 Internet And Internet Protocol Suite

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

CSC 401 Data and Computer Communications Networks

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

CS4450. Computer Networks: Architecture and Protocols. Lecture 13 THE Internet Protocol. Spring 2018 Rachit Agarwal

Introduction to Internetworking

Network Layer/IP Protocols

II. Principles of Computer Communications Network and Transport Layer

CSC 401 Data and Computer Communications Networks

Master Course Computer Networks IN2097

CSC 4900 Computer Networks: Network Layer

Lecture 10: Addressing

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Lecture 16: Network Layer Overview, Internet Protocol

L10: Simple Internetworking. Hui Chen, Ph.D. Department of Engineering & Computer Science Virginia State University Petersburg, VA 23806

SEN366 (SEN374) (Introduction to) Computer Networks

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

Chapter Motivation For Internetworking

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

Recap. Recap. Internetworking. First mile problem. Internet. End Users. Last mile problem. Direct link networks Packet switching.

TCP/IP Protocol Suite

ECE 461 Internetworking Fall Quiz 1

IP: Addressing, ARP, Routing

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

Internet. Organization Addresses TCP/IP Protocol stack Forwarding. 1. Use of a globally unique address space based on Internet Addresses

CS244a: An Introduction to Computer Networks

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

Transcription:

ELEC / COMP 177 Fall 2016 Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Presentation 2 Security/Privacy Presentations Nov 3 rd, Nov 10 th, Nov 15 th Upload slides to Canvas by midnight on day before presentation 2

3

Most computer systems use Ethernet networking Ethernet provides facilities to Locate computers Forward packets directly Prevent loops What are the drawbacks of Ethernet for global communication? 4

Locating computers Do we really want to broadcast across the Internet? Preventing loops Do we really want to rebuild an Internet-wide spanning tree whenever the topology changes? Do we really want packets to live forever if loops remain? Unreachable computers What happens if the destination is unreachable? I.e., it doesn t exist, is turned off, is broken, 5

Datagram Each packet is individually routed Packets may be fragmented or duplicated Due to underlying networks Connectionless No guarantee of delivery in sequence Unreliable No guarantee of delivery No guarantee of integrity of data Best effort Only drop packets when necessary No time guarantee for delivery 6

1 byte 1 byte 1 byte 1 byte Version HdrLen Type of Service Total Length Identification Flags Fragment Offset Time-To-Live Protocol Header Checksum Source IP Address Destination IP Address Options and padding (optional) Payload 7

1 byte 1 byte 1 byte 1 byte Version HdrLen Type of Service Total Length Identification Flags Fragment Offset Time-To-Live Protocol Header Checksum Source IP Address Destination IP Address Options and padding (optional) IPv4 or IPv6 Also other, uncommon, options 8

1 byte 1 byte 1 byte 1 byte Version HdrLen Type of Service Total Length Identification Flags Fragment Offset Time-To-Live Protocol Header Checksum Source IP Address Destination IP Address Options and padding (optional) Hop count decrement each hop Discard datagrams with zero TTL 9

Sender sets a TTL value for each datagram Each router decrements the TTL When the TTL reaches 0 The router drops the datagram The router sends an ICMP error (more later) to the sender Effectively a maximum hop count Why is this useful / necessary? 10

1 byte 1 byte 1 byte 1 byte Version HdrLen Type of Service Total Length Identification Flags Fragment Offset Time-To-Live Protocol Header Checksum Source IP Address Destination IP Address Options and padding (optional) What is encapsulated in this IP datagram? 1 = ICMP, 6 = TCP, 17 = UDP, etc 11

1 byte 1 byte 1 byte 1 byte Version HdrLen Type of Service Total Length Identification Flags Fragment Offset Time-To-Live Protocol Header Checksum Source IP Address Destination IP Address Options and padding (optional) IP address of source and destination 12

Destination MAC Address Destination MAC Address Source MAC Address Source MAC Address Type (0x0800) Total Length Version HdrLen Type of Service Identification Flags Fragment Offset Time-To-Live Protocol Header Checksum Source IP Address Destination IP Address Options and Padding Source IP Address Destination IP Address Options and Padding Payload Payload Ethernet CRC 13

LAN #1 IP: 1 A B Switched Ethernet packets can only navigate within their LAN, not the entire (global?) network (Lan #2) LAN #3 I J C Ethernet Switch D E Router H F (Lan #4) G K Ethernet Switch L (1) A (1) transmits to L (2) using IP. Ethernet frame destination is router IP: 2 (3) Router uses IP protocol to forward data. Eth: update src/dst/crc IP: update TTL/checksum Frame: Frame: EDA (E) ESA (A) 0x0800 IPDA (2) IPSA (1) EDA (L) ESA (G) 0x0800 IPDA (2) IPSA (1) (2) Switch forwards frame to router (4) Switch forwards frame to destination 14

15

IP version 4 addresses are 32-bits Version 6 address are 128 bits Every network interface has at least one IP address A computer might have 2 or more IP addresses A router has many IP addresses These addresses can be assigned statically or dynamically IP addresses are always in big-endian byte order (network byte order) True in general for any integer transferred in a packet header from one machine to another E.g., the port number used to identify a TCP connection 16

IPv4 addresses are usually displayed in dotted decimal notation Each byte represented by decimal value Bytes are separated by a period IP address 0x8002C2F2 = 128.2.194.242 IP addresses are hierarchical Address is composed of a network ID and a host ID www.pacific.edu: 138.9.110.12 17

IPv4 Address space (originally) divided into classes: Class A Class B Class C Class D Class E 0 1 2 3 8 16 24 31 0 Net ID Host ID 1 0 1 1 0 Net ID Net ID 1 1 1 0 Multicast address 1 1 1 1 Special IP addresses Loop-back address: 127.0.0.1 Unrouted (private) IP addresses: 10.0.0.0 10.255.255.255 172.16.0.0 172.31.255.255 192.168.0.0 192.168.255.255 Host ID Reserved for experiments Host ID 2 24 hosts! 2 16 hosts! 2 8 hosts! 18

http://xkcd.com/742/ 19

Divide the network within an organization Basically consider one Class B network to be a collection of many smaller networks Size of smaller networks can be selected by the organization (don t have to be Class C sized networks) Internet routers don t need to know about subnetting within an organization Just route their traffic to the organization 20

Company s Class B Network: 2 14 16 10 Network ID Host ID Building 1 Network: 2 12 10 Network ID 0001 Host ID Subnet ID (20) Department 4 network in Building 1: 2 9 10 Network ID 0001 100 Host ID Floor 13 network in Building 6: Subnet ID (23) 2 7 10 Network ID 0110 01101 Host ID Subnet ID (25) 21

Can recursively subnet addresses down to as fine a granularity as you want Almost Minimum-sized subnet has 4 addresses Address 00 names the subnet Address 01 and 10 names hosts Address 11 is the broadcast IP address Subnet sizes don t have to be the same One building divided by department, one by floor Department/floor subnets not the same size 22

A.B.C.D/X IP address of the subnet (with 0 s in all host ID bits) X = number of bits in the subnet network address Examples: 17.0.0.0/8 Apple s entire class A address space 17.2.3.0/24 A class C sized subnet in Apple s network Alternatively represented by subnet IP and a bit mask (netmask) 17.0.0.0/255.0.0.0 17.2.3.0/255.255.255.0 23

Subnets don t have to have physical meaning Although easier to keep track of if they do Good subnet assignment simplifies routing for internal routers All traffic for building 1 goes through this port All traffic for department 3 goes through that port 24

Address classes were too rigid Class C is too small and Class B is too big in many situations Inefficient use of address space Leads to a shortage of addresses Small organizations wanted Class B networks In case they grew to more than 255 hosts But there are only about 16,000 Class B network IDs Larger organizations wanted many Class C networks Separate network ID for each router link Every router in the Internet had to know about every network ID in every organization Leads to large address tables in every router 25

CIDR introduced in 1993 Meant to provide more flexible routing Eliminate dependences on class networks in routing Supernetting Combine multiple contiguous networks into one larger network Effectively reduces the number of entries needed in each routing table Inverse of subnetting which takes one larger network and breaks it into multiple contiguous smaller networks 26

Break up IP address space into prefixes Same idea as subnets (138.9/16) Each prefix has its own routing entry All traffic to Pacific (138.9/16) within the Internet should be routed the same way, regardless of how Pacific subnets its address space 27

Example: One ISP handles traffic for two corporate networks (129.32/16 and 129.33/16) Aggregate route to 129.32/15 for both networks External routers don t care how the ISP breaks up the network addresses internally! Only break them apart when necessary for the last (few) hops 28

Pacific builds a 4 th campus 138.9/16 needs to be routed to Pacific 138.9.8/24 needs to be routed to our satellite campus in Hawaii Do we need to break routes up? 138.9.0/20 (.0-.7) 138.9.8/24 (.8) 138.9.9/24 (.9), 138.9.10/24 (.10), 138.9.11/24 (.11) 138.9.12/22 (.12-.15) 138.9.16/20 (.16-.31) 138.9.32/19 (.32-.63) 138.9.64/18 (.64-.127) 138.9.128/17 (.128-.255) 29

2.200.192/24 2.32.12/24 2.200/16 2/8 18/8 138.9.8/24 138.9/16 0 2 32-1 138.9.0.0 2 16 138.9.8.15 138.9.180.243 IP address space can be viewed as a number line Each segment represents an aggregated route Segments can overlap Look for smallest segment that matches the destination address : Longest Prefix Match 30

Allow more specific entries to supersede more general ones 138.9.8/24 Route this traffic to Hawaii 138.9/16 Route this traffic to Stockton Except for addresses that match a route with a longer prefix (i.e., 138.9.8/24) Allows significantly more route aggregation Simplifies things if companies move (physically or to another ISP) their block of IP addresses 31

CIDR makes address classes less important With CIDR, routing is based on arbitrary subdivisions of the address space Aggregate routes into largest possible group Use longer prefixes to deal with exceptions Routing Routers use longest prefix matching to determine routes No longer deal with exact matches on class network IDs 32

33

34

Ingress Links Egress Links? 35

Ingress Links Egress Links Select Egress Select Egress Select Egress Select Egress 36

Key Modules Network Interface Packet processing Packet buffering Packet switching Processing and buffering can be centralized or decentralized Control Processor Forwarding Engine Router Backplane Line Card Line Card Line Card Networks Packet Buffers Line Card 37

What does a router need to do? Driven by protocols Ethernet IP ARP ICMP Transport: TCP, UDP, etc. 38

Processing Buffer packet? Determine protocol (e.g., IP vs. ARP) Verify checksum, validate the packet, etc. Collect statistics? What s next in the common (valid IP packet) case? Select egress link 39

Forwarding table lookup Longest prefix match Determine next hop IP address and egress link What if no match? Is this sufficient to route the packet to an output queue? Prefix Next Hop Port 63/8 128.34.12.1 3 128.42/16 128.34.12.1 3 156.3/16 128.36.21.1 2 156.3.224/19 128.36.129.1 1 128.42.96/20 128.37.37.1 4 128.42.128/24 128.36.129.1 1 128.42.160/24 128.36.21.1 2 40

ARP table lookup Exact match on next hop IP address Determine next hop MAC address What if no match? IP MAC 128.34.12.1 0C:FF:63:82:44:01 128.36.21.1 04:32:11:44:82:60 128.36.21.18 10:44:82:82:44:07 128.37.37.37 08:82:82:44:16:32 128.34.12.14 20:33:71:28:15:70 128.36.21.42 14:93:29:22:15:28 41

Broadcast on output port Ask for MAC address of next hop IP address Wait for reply What do you do with the packet? How long should you wait? (tradeoffs?) Receive reply Update ARP table Packet continues along forwarding path 42

Does the IP address match the IP address of the interface that received the ARP request? Another system is trying to determine your MAC address Respond with the appropriate ARP reply on the same interface Should ARP requests be forwarded if they aren t for the router? 43

Select egress link Update MAC address Is it now OK to forward packet to output queue? IP packet header must be modified What needs to be modified? When should it be modified? 44

Why do packets need to be buffered? Waiting for access to a resource (lookup table, switch, etc.) Waiting for an ARP reply What happens when buffers get full? Packets have to be dropped How large do buffers need to be? Statistical multiplexing 45

ICMP Messages Notify sender of errors Common error types Host/network unreachable No ARP response Time exceeded TTL decremented to zero No route to host No entry in routing table 46

47

Forwarding Move packets from router s input to appropriate router output Forwarding table Routing Determine path (route) taken by packets from source to destination Routing algorithms Road trip analogy: Forwarding: process of getting through single interchange Routing: process of planning trip from source to destination 48

routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 Routing algorithm creates the forwarding table, which is used on a per-packet basis value in arriving packet s header 0111 1 3 2 49

H3 H1 R1 R4 R2 R3 R6 How does R2 pick the next hop to host H3? H2 R5 What if this link fails? H4 50

So far, we have assumed forwarding tables are populated statically by an administrator In reality, they are dynamically updated Faster reaction to changing network conditions What makes a good route? Low delay High bandwidth Low link utilization High link stability Low cost (cheaper to use ISP A than ISP B) 51

H1 R2 R4 R6 R1 1 1 4 2 3 R7 2 Link cost 2 R3 R5 4 2 3 R8 H2 52

H1 R2 R4 R6 R1 1 1 4 2 3 R7 2 Link cost 2 R3 R5 4 2 3 R8 H2 53

The Internet in 2003 http://www.opte.org/maps/ 54