COMP/ELEC 429/556 Introduction to Computer Networks

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

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

Internetworking Part 2

ECE 158A: Lecture 7. Fall 2015

Network Layer: Control/data plane, addressing, routers

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

CS4700/5700: Network fundamentals

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Communications Software. CSE 123b. CSE 123b. Spring Lecture 2: Internet architecture and. Internetworking. Stefan Savage

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

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Introduction to Internetworking

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

ECE 4450:427/527 - Computer Networks Spring 2017

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

Elements of Networks

Chapter Motivation For Internetworking

Vorlesung Kommunikationsnetze

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

CH. 3 IP FORWARDING AND ROUTING

Introduction to Internetworking

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

Basic Internetworking (IP)

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

CS244a: An Introduction to Computer Networks

IPv4. Christian Grothoff.

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

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

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

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

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

Network layer: Overview. Network Layer Functions

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

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

Network Layer: Internet Protocol

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

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

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

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

The Internet Protocol (IP)

Administrivia CSC458 Lecture 4 Bridging LANs and IP. Last Time. This Time -- Switching (a.k.a. Bridging)

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca Instructor: Nicholas DeMarinis

Inter-networking. Problem. 3&4-Internetworking.key - September 20, LAN s are great but. We want to connect them together. ...

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

CIS 551 / TCOM 401 Computer and Network Security. Spring 2006 Lecture 16

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

Internet Protocol (IP)

Internetworking Part 2

CS118 Discussion, Week 6. Taqi

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

IP - The Internet Protocol

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

Network Layer/IP Protocols

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Communication Systems DHCP

INTERNET SYSTEM. Internet Protocol. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Large Scale Networking

EEC-484/584 Computer Networks

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

Introduction. IP Datagrams. Internet Service Paradigm. Routers and Routing Tables. Datagram Forwarding. Example Internet and Conceptual Routing Table

Design Considerations : Computer Networking. Outline. Challenge 1: Address Formats. Challenge. How to determine split of functionality

Internetworking Terms. Internet Structure. Internet Structure. Chapter 15&16 Internetworking. Internetwork Structure & Terms

Computer Networking. IP Packets, IPv6 & NAT. Some Slides from Internet

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

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

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat no true in practice. administrative autonomy

Lecture 3: Packet Forwarding

Goal of Today s Lecture. EE 122: Designing IP. The Internet Hourglass. Our Story So Far (Context) Our Story So Far (Context), Con t

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

ET4254 Communications and Networking 1

CS610 Computer Network Final Term Papers Solved MCQs with reference by Virtualians Social Network

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

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8

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

COMP/ELEC 429 Introduction to Computer Networks

CS 455 Internet Architecture, Page 3 ffl By 1985, the ARPANET was heavily used and congested; the National Science Foundation (NSF) initiated the NSFN

COMP/ELEC 429/556 Introduction to Computer Networks

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

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

Ch.7 Internet Protocol: Connectionless Datagram Delivery (IPv4, IPv6)

COMP/ELEC 429/556 Introduction to Computer Networks

IPv6: An Introduction

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

ECE 435 Network Engineering Lecture 12

End-to-End Communication

TSIN02 - Internetworking

Chapter 19 Network Layer: Logical Addressing

Data & Computer Communication

EEC-684/584 Computer Networks

Lecture 9: Internetworking

IP Addressing Week 6. Module : Computer Networks Lecturer: Lucy White Office : 324

Overview. Internetworking and Reliable Transmission. CSE 561 Lecture 3, Spring David Wetherall. Internetworking. Reliable Transmission

Router Architecture Overview

TCP/IP THE TCP/IP ARCHITECTURE

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

TCP/IP and the OSI Model

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

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

Transcription:

COMP/ELEC 429/556 Introduction to Computer Networks Let s Build a Scalable Global Network - IP Some slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 1

Some Perspectives We started with the simplest kind of networks i.e. broadcast networks Explored access control problems and solutions Explored their performance and range limitations Therefore they are Local Area Network (LAN) We tried to relieve these limitations by bridging Explored how Ethernet bridges can transparently link up Ethernet segments, thereby enlarging the network Don t forget bridged Ethernet still needs to maintain the broadcast network abstraction Explored address learning as a way to reduce cross-bridge traffic Explored spanning tree protocol as a way to make packet flooding safe T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 2

We Have Reached a Road Block Cannot build a global network using Ethernet bridges Forwarding table explosion imagine telephone numbers are randomly assigned and don t have country/area codes Inefficiency of spanning tree protocol and restricted forwarding root bridge is the bottleneck Inefficiency/danger of flooding Additionally, a global network should allow heterogeneous technologies (e.g. Aloha Net, Ethernet, ARPANET, 4G LTE, Wi-Fi, Bluetooth, etc) T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 3

Design Philosophy of the DARPA Internet Protocols by David D. Clark (1988) Fundamental Goal: An effective technique for multiplexed utilization of existing interconnected networks. Secondary Goals: 1. Internet communication must continue despite loss of networks or gateways 2. The Internet must support multiple types of communications service 3. The Internet architecture must accommodate a variety of networks 4. The Internet architecture must permit distributed management of its resources 5. The Internet architecture must be cost effective 6. The Internet architecture must permit host attachment with a low level of effort 7. The resources used in the Internet architecture must be accountable T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 4

New Word: Internetwork Multiple incompatible LANs can be physically connected by specialized computers called routers. Routers provide inter-operability The connected networks are called an internetwork. The Internet is one (very big & successful) example of an internetwork host! Ethernet router! router! router! ATM host! router! router! router! Ethernet T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 5

Structure of Internet host! Ethernet router! router! router! ATM host! router! router! router! Ethernet Ad hoc interconnection of networks No topological restriction Vastly different router & link capacities Send packets from source to destination by hopping through networks Router connects one network to another Different packets may take different routes T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 6

Internet Protocol (IP) Provides Interoperability Host Host App Router App IP IP IP Ethernet Ethernet Aloha Bridge Wireless channel Aloha T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 7

Issues in Designing an Internetwork How do I designate a distant host? Addressing / naming How do I send information to a distant host? Underlying service model What gets sent? How fast will it go? What happens if it doesn t get there? Routing Challenges Scalability Ensure ability to grow to worldwide scale Robustness Ensure loss of individual router/network has little global impact Heterogeneity Packet may pass through variety of different networks T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 8

Datagram Each packet self-contained IP Service Model All information needed to get to destination No advance setup or connection maintenance No performance or reliability guarantee IPv4 Packet! Format! 0" 4" 8" 12" 16" 19" 24" 28" 31" ver-" sion" HLen" TOS" Length" Ident" Flags! Offset" TTL" Protocol" Checksum" Source Address" Destination Address" Options (if any)" Header! T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 9

IP Header Fields: Word 1 0" 4" 8" 12" 16" 19" 24" 28" 31" ver-" sion" HLen! TOS" Length" Identifier" Flags! Offset" TTL" Protocol" Checksum" Source Address" Destination Address" Options (if any)" Version: IP Version 4 for IPv4 HLen: Header Length 32-bit words (typically 5) TOS: Type of Service Priority information Length: Packet Length Bytes (including header) Header format can change with versions First byte identifies version Length field limits packets to 65,535 bytes T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 10

IP Header Fields: Word 2 0" 4" 8" 12" 16" 19" 24" 28" 31" ver-" sion" HLen! TOS" Length" Identifier" Flags! Offset" TTL" Protocol" Checksum" Source Address" Destination Address" Options (if any)" Each fragment carries copy of IP header Identifier Unique identifier for original datagram Typically, source increments counter every time sends packet Flags (3 bits) Offset All information required for delivery to destination All fragments comprising original datagram have same identifier Offsets indicate positions within datagram M flag: This is not the last fragment Byte position of first byte in fragment 8 Byte position must be multiple of 8 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 11

IP Header Fields: Word 3 0" 4" 8" 12" 16" 19" 24" 28" 31" ver-" sion" HLen! TOS" Length" Identifier" Flags! Offset" TTL" Protocol" Checksum" Source Address" Destination Address" Options (if any)" TTL: time to live Decrement by one at each intermediate router Prevent looping forever Protocol Protocol of the Data E.g. TCP (6), UDP (17) Checksum Of IP header Protocol field (encodes TCP, UDP, etc.) used for demultiplexing Checksum re-computed at each router Why? TTL field is used in the traceroute tool T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 12

IP Header Fields: Words 4&5 0" 4" 8" 12" 16" 19" 24" 28" 31" ver-" sion" HLen! TOS" Length" Identifier" Flags! Offset" TTL" Protocol" Checksum" Source Address 32-bit IP address of sender Destination Address 32-bit IP address of destination Source Address" Destination Address" Options (if any)" Like the addresses on an envelope In principle, globally unique identification of sender & receiver T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 13

IPv4: 32-bit addresses IP Addressing Typically written in dotted decimal format E.g., 128.42.198.135 Each number is the decimal representation of a byte Big-Endian Order 0" 8" 16" 24" 31" 128 42 198 135 80 2a c6 87 1000 0000 0010 1010 1100 0110 1000 0111 Decimal! Hexadecimal! Binary! T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 14

Possible Addressing Schemes Flat e.g., In an Ethernet, every host identified by its 48-bit MAC address Router would need entry for every host in the world Too big Too hard to maintain as hosts come & go Hierarchical Address broken into segments of increasing specificity 713 (Houston) 348 (Rice area) 2000 (Particular phone) Route to general region and then work toward specific destination As people and organizations shift, only update affected routing tables T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 15

IP Addressing and Forwarding Routing Table Requirement For every possible destination IP address, give next hop Nearly 2 32 (4.3 x 10 9 ) possibilities! Hierarchical Addressing Scheme network host Address split into network ID and host ID All packets to given network follow same route Until they reach destination network T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 16

How to split an address into network and host parts? Evolved over time Began with designating different address classes Class A, B, C Different classes imply different network/host split Unfortunately proved too inflexible Today, an explicit prefix length is used to designate how network/host split e.g. 128.42.0.0/16 (netmask 255.255.0.0) T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 17

Classless Interdomain Routing CIDR, pronounced cider Arbitrary Split Between Network & Host IDs Specify either by mask (below) or prefix length (16) 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 network host E.g., Rice s original set of IP addresses can be specified as 128.42.0.0 with netmask 255.255.0.0 128.42.0.0/16 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 18

Routing Table Entry Examples Address Prefix Length Third Byte Next Hop 207.46.0.0 19 0-31 R1 207.46.32.0 19 32-63 R2 207.46.64.0 19 64-95 R3 207.46.128.0 18 128-191 R4 207.46.192.0 18 192-255 R5 This column does not exist in the real routing table, it s here just to make it more clear. Note hole in table: Nothing covers third byte 96 127 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 19

What If We Have This? Address Prefix Length Third Byte Next Hop 207.46.0.0 19 0-31 R1 207.46.32.0 19 32-63 R1 207.46.64.0 19 64-95 R1 207.46.128.0 18 128-191 R4 207.46.192.0 18 192-255 R5 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 20

207.46.0.0 Visualizing 207.46.0.0/16... 207.46.0.0/19 R1 207.46.32.0/19 R1 207.46.64.0/19 R1 207.46.128.0/18 R4 207.46.192.0/18 R5 207.46.255.255 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 21

Aggregate Entries to Compress Table Address Prefix Length Third Byte Next Hop 207.46.0.0 19 0-31 R1 207.46.32.0 19 32-63 R1 207.46.64.0 19 64-95 R1 207.46.128.0 18 128-191 R4 207.46.192.0 18 192-255 R5 Key requirement: Same routing behavior for all active addresses after aggregation Address Prefix Length Third Byte Next Hop 207.46.0.0 17 0-127 R1 207.46.128.0 18 128-191 R4 207.46.192.0 18 192-255 R5 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 22

What about this? Address Prefix Length Third Byte Next Hop 207.46.0.0 17 0-127 R1 207.46.128.0 18 128-191 R1 207.46.192.0 18 192-255 R5 Address Prefix Length Third Byte Next Hop 207.46.0.0 16 0-255 R1 207.46.192.0 18 192-255 R5 Same routing behavior for all active addresses? Yes if router performs longest prefix matching T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 23

Longest Prefix Matching Address Pattern Subnet Mask Next Hop 128.42.222.0 255.255.255.0 R1 128.42.128.0 255.255.128.0 R2 18.0.0.0 255.0.0.0 R3 0.0.0.0 0.0.0.0 R4 128.42.0.0 255.255.0.0 R5 Address 128.42.222.198 matches 4 entries Longest Prefix Match Select entry with longest sequence of 1 s in mask Most specific case T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 24

Size of Complete Routing Table Source: www.cidr-report.org T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 25

Remember This? limitation in older Cisco routers. These routers have a default limit of 512K routing entries T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 26

Class A Original IP Address Classes (Obsolete today) e.g. MIT: 18.7.22.69 Class B e.g. Rice: 128.42.129.23 Class C 7! 24! 0 network host e.g. adsl-216-63-78-18.dsl.hstntx.swbell.net: 216.63.78.18 Classes D, E, F 14! 16! 10 network host 21! 8! 110 network host Not commonly used D for multicast service (more later in the course) First octet: 1 126! First octet: 128 191! First octet: 192 223! T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 27

Implications Class Count Hosts A 2 7-2 = 126 (0 & 127 reserved) 2 24-2 = 16,777,214 (all 0s, all 1s reserved) B 2 14 = 16,398 2 16-2 = 65,534 C 2 21 = 2,097,512 2 8-2 = 254 Total 2,114,036 (all 0s, all 1s reserved) (all 0s, all 1s reserved) Partitioning too Coarse No local organization needs 16.7 million hosts Large organization likely to be geographically distributed Many organizations must make do with multiple class C s Too many different Network IDs Routing tables may have 2.1 million entries T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 28

Important Concepts Hierarchical addressing critical for scalable system Don t require everyone to know everyone else Reduces amount of updating when something changes Non-uniform hierarchy useful for heterogeneous networks Class-based addressing too coarse CIDR helps Implementation Challenge Longest prefix matching more difficult to implement and to make fast than exact matching T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 29

Remainder of this set of slides are for your reference only. They will not be needed for assignments. T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 30

IP Fragmentation host! router! MTU = 2000! router! MTU = 1500! host! MTU = 4000! Every Network has Own Maximum Transmission Unit (MTU) Largest IP datagram it can carry within its own packet frame E.g., Ethernet is 1500 bytes Don t know MTUs of all intermediate networks in advance IP Solution When hit network with small MTU, fragment packets Might get further fragmentation as proceed farther Reassemble at the destination If any fragment disappears, delete entire packet T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 31

IP Header Fields: Word 2 0" 4" 8" 12" 16" 19" 24" 28" 31" ver-" sion" HLen! TOS" Length" Identifier" Flags! Offset" TTL" Protocol" Checksum" Source Address" Destination Address" Options (if any)" Each fragment carries copy of IP header Identifier Unique identifier for original datagram Typically, source increments counter every time sends packet Flags (3 bits) Offset All information required for delivery to destination All fragments comprising original datagram have same identifier Offsets indicate positions within datagram M flag: This is not the last fragment Byte position of first byte in fragment 8 Byte position must be multiple of 8 T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 32

IP Fragmentation Example #1 host! MTU = 4000! router! Length = 3820, M=0! Header" T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 33

IP Fragmentation Example #2 router! MTU = 2000! router! Length = 3820, M=0! Header" Length = 2000, M=1, Offset = 0! Header" 3800 bytes! 1980 bytes! Length = 1840, M=0, Offset = 1980! Offset must be a multiple of 8, but ignored in these examples for simplicity Header" 1820 bytes! T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 34

IP Fragmentation Example #3 Length = 1500, M=1, Offset = 0! router! MTU = 1500! host! Header" Length = 2000, M=1, Offset = 0! Header" 1480 bytes! Length = 520, M=1, Offset = 1480! Header" 1980 bytes! Length = 1500, M=1, Offset = 1980! 500 bytes! Length = 1840, M=0, Offset = 1980! Header" 1820 bytes! Header" 1480 bytes! Header" Length = 360, M=0, Offset = 3460! 340 bytes! T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 35

Length = 1500, M=1, Offset = 0! IP Reassembly Header" Length = 520, M=1, Offset = 1480! Header" Length = 1500, M=1, Offset = 1980! Header" Length = 360, M=0, Offset = 3460! Header" Performed at final destination Fragment with M=0 determines overall length Challenges Fragments might arrive out-of-order Don t know how much memory required until receive final fragment Some fragments may be duplicated Keep only one copy Some fragments may never arrive After a while, give up entire process Significant memory management issues T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 36

Frag. & Reassembly Concepts Demonstrates many Internet concepts Decentralized Every network can choose MTU Connectionless datagram protocol Each (fragment of) packet contains full routing information Fragments can proceed independently and along different routes Fail by dropping packet Destination can give up on reassembly No need to signal sender that failure occurred Keep most work at endpoints Reassembly T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 37

Frag. & Reassembly Reality Reassembly fairly expensive and hurts performance Copying, memory allocation Want to avoid MTU discovery protocol Protocol to determine MTU along route Send packets with don t fragment flag set Keep decreasing message lengths until packets get through May get a can t fragment error message from router which contains the correct MTU Assumes every packet will follow same route Routes tend to change slowly over time Common theme in system design Fragmentation is handled as a special case by slower general processor in router Assure correctness by implementing complete protocol Optimize common cases to avoid full complexity T. S. Eugene Ng eugeneng at cs.rice.edu Rice University 38