CS 457 Lecture 11 More IP Networking. Fall 2011

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

Outline. SC/CSE 3213 Winter Sebastian Magierowski York University. ICMP ARP DHCP NAT (not a control protocol) L9: Control Protocols

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

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

Network layer: Overview. Network Layer Functions

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

Master Course Computer Networks IN2097

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

Transla'ng Addresses. Goals of Today s Lecture

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

ECE 4450:427/527 - Computer Networks Spring 2017

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

Network Layer: Internet Protocol

Goals of Today s Lecture. Transla'ng Addresses. Separa'ng Names and IP Addresses. Separa'ng IP and MAC Addresses

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

Network Layer (4): ICMP

ICS 451: Today's plan

internet technologies and standards

Router Architecture Overview

Internet Control Message Protocol (ICMP)

(ICMP), RFC

Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

Chapter 4: Network Layer

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

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

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Missing pieces + Putting the pieces together

Introduction to Internetworking

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

CMPE 80N: Introduction to Networking and the Internet

CSCD58 WINTER 2018 WEEK 6 - NETWORK LAYER PART 1. Brian Harrington. February 13, University of Toronto Scarborough

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Internet Protocols (chapter 18)

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

The Internetworking Problem. Internetworking. A Translation-based Solution

Internet Control Message Protocol (ICMP), RFC 792. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

TCP/IP Networking. Training Details. About Training. About Training. What You'll Learn. Training Time : 9 Hours. Capacity : 12

Computer Networking Introduction

ICS 351: Networking Protocols

CS 3516: Advanced Computer Networks

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

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

1-1. Switching Networks (Fall 2010) EE 586 Communication and. October 25, Lecture 24

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

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

Missing pieces + Putting the pieces together

Network Layer PREPARED BY AHMED ABDEL-RAOUF

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

IPv4. Christian Grothoff.

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

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

TSIN02 - Internetworking

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

Information Network Systems The network layer. Stephan Sigg

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

MESSAGES error-reporting messages and query messages. problems processes IP packet specific information

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local

Network Layer: DHCP, ICMP, NAT, IPv6

Course Contents. The TCP/IP protocol Stack

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

Link layer: introduction

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

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

Problems of IP. Unreliable connectionless service. Cannot acquire status information from routers and other hosts

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

CSEP 561 Internetworking. David Wetherall

Different Layers Lecture 20

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

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

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

Supporting Protocols and Technologies in TCP/IP Suites

Internet Technology 3/23/2016

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

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

Shortest Path First Example

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

CS 348 Computer Networks. IP and Routing. Indian Institute of Technology, Bombay

Networking Potpourri: Plug-n-Play, Next Gen

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

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Internet Protocol (IP)

HY 335 Φροντιστήριο 8 ο

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose

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

Cisco CCNA Basic IP Routing Part I

Agenda. Forwarding (after a little more addressing) Follow-up from last time. Dealing with Address Scarcity. Sharing a Block of Addresses

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

TDTS06: computer Networks

CS 3516: Computer Networks

Internet protocols: ICMP, ARP, DHCP

CSC 401 Data and Computer Communications 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.

Principles behind data link layer services:

IP Protocols. ALTTC/Oct

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

Using ICMP to Troubleshoot TCP/IP Networks

internet technologies and standards

Transcription:

CS 457 Lecture 11 More IP Networking Fall 2011

IP datagram format IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to 32 bits head. type of ver len service 16-bit identifier flgs time to upper live layer length fragment offset Internet checksum 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, typically a TCP or UDP segment) total datagram length (bytes) for fragmentation/ reassembly E.g. timestamp, record route taken, specify list of routers to visit.

IP Address and 24-bit Subnet Mask Address! 12 34 158 5 00001100 00100010 10011110 00000101 11111111 11111111 11111111 00000000 Mask! 255 255 255 0

Scalability Improved Number related hosts from a common subnet 1.2.3.0/24 on the left LAN 5.6.7.0/24 on the right LAN 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! router! router! router! WAN! WAN! LAN 2! 1.2.3.0/24 5.6.7.0/24 forwarding table!

Easy to Add New Hosts No need to update the routers E.g., adding a new host 5.6.7.213 on the right Doesn t require adding a new forwarding entry 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! 1.2.3.0/24 5.6.7.0/24 router! router! router! WAN! WAN! LAN 2! host! 5.6.7.213 forwarding table!

Avoiding Manual Configuration Address Resolution Protocol (ARP) Learn mapping between IP address and MAC address Dynamic Host Configuration Protocol (DHCP) End host learns IP address, DNS servers, and gateway??? 1.2.3.7 1.2.3.156 host! host!...! DNS! host! host!...! DNS! 1.2.3.0/24 5.6.7.0/24 1.2.3.19 router! router! router!

Key Ideas in ARP and DHCP Broadcasting: when in doubt, shout! Broadcast query to all hosts in the local-area-network when you don t know how to identify the right one Caching: remember the past for a while Store the information you learn to reduce overhead Remember your own address & other host s addresses Soft state: eventually forget the past Associate a time-to-live field with the information and either refresh or discard the information Key for robustness in the face of unpredictable change

Broadcasting Broadcasting: sending to everyone Special destination address: FF-FF-FF-FF-FF-FF All adapters on the LAN receive the packet Delivering a broadcast packet Easy on a shared media Like shouting in a room everyone can hear you E.g., Ethernet, wireless, and satellite links

MAC Address vs. IP Address MAC addresses Hard-coded in read-only memory when adaptor is built Like a social security number Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76) Portable, and can stay the same as the host moves Used to get packet between interfaces on same network IP addresses Configured, or learned dynamically Like a postal mailing address Hierarchical name space of 32 bits (e.g., 12.178.66.9) Not portable, and depends on where the host is attached Used to get a packet to destination IP subnet

Sending Packets Over a Link IP packet! 1.2.3.53 1.2.3.156 1.2.3.53 1.2.3.156 host! host!...! Web! router! Adaptors only understand MAC addresses Translate the destination IP address to MAC address Encapsulate the IP packet inside a link-level frame

Finding Ether Address: Address Resolution (ARP) Broadcast: who knows the Ethernet address for 128.82.138.2? (gateway address) Ethernet Broadcast: I do, it is 08-00-2c-19-dc-45 Ethernet

Address Resolution Protocol (ARP) Table Every node maintains an ARP table <IP address, MAC address> pair Consult the table when sending a packet Map destination IP address to destination MAC address Encapsulate and transmit the data packet But, what if the IP address is not in the table? Sender broadcasts: Who has IP address 1.2.3.156? Receiver responds: MAC addr 58-23-D7-FA-20-B0 Sender caches the result in its ARP table No need for network administrator to get involved

Example: A Sending Packet to B How does host A send an IP packet to host B? A R B A sends packet to R, and R sends packet to B.!

Host A Sends Through R Host A constructs an IP packet to send to B Source 111.111.111.111, destination 222.222.222.222 Host A has a gateway router R Used to reach destinations outside of 111.111.111.0/24 Address 111.111.111.110 for R learned via DHCP A R B

Host A Sends Packet Through R Host A learns the MAC address of R s interface ARP request: broadcast request for 111.111.111.110 ARP response: R responds with E6-E9-00-17-BB-4B Host A encapsulates the packet and sends to R A R B

R Forwards a Packet Router R s adaptor receives the packet R extracts the IP packet from the Ethernet frame R sees the IP packet is destined to 222.222.222.222 Router R consults its forwarding table Packet matches 222.222.222.0/24 via other adaptor A R B

R Sends Packet to B Router R s learns the MAC address of host B ARP request: broadcast request for 222.222.222.222 ARP response: B responds with 49-BD-D2-C7-56-2A Router R encapsulates the packet and sends to B A R B

Dynamic Host Configuration Protocol (DHCP) Host doesn t have an IP address yet So, host doesn t know what source address to use Host doesn t know who to ask for an IP address So, host doesn t know what destination address to use Solution: shout to discover a server who can help Broadcast a server-discovery message Server sends a reply offering an address host! host!...! host! DHCP server!

DHCP at an End Host What IP address the host should use? What local Domain Name System server to use? How to send packets to remote destinations? How to ensure incoming packets arrive???? 1.2.3.7 1.2.3.156 host! host!...! DNS! host! host!...! DNS! 1.2.3.0/24 5.6.7.0/24 1.2.3.19 router! router! router!

Dynamic Host Configuration Protocol DHCP discover! (broadcast)! arriving client! DHCP offer! DHCP server! 233.1.2.5! DHCP request! (broadcast)! DHCP ACK!

Response from the DHCP Server DHCP offer message from the server Configuration parameters (proposed IP address, mask, gateway router, DNS server,...) Lease time (the time the information remains valid) Multiple servers may respond Multiple servers on the same broadcast media Each may respond with an offer The client can decide which offer to accept Accepting one of the offers Client sends a DHCP request echoing the parameters The DHCP server responds with an ACK to confirm and the other servers see they were not chosen

Deciding What IP Address to Offer Server as centralized configuration database All parameters are statically configured in the server E.g., a dedicated IP address for each MAC address Avoids complexity of configuring hosts directly while still having a permanent IP address per host Or, dynamic assignment of IP addresses Server maintains a pool of available addresses and assigns them to hosts on demand Leads to less configuration complexity and more efficient use of the pool of addresses Though, it is harder to track the same host over time

Soft State: Refresh or Forget Why is a lease time necessary? Client can release the IP address (DHCP RELEASE) E.g., ipconfig /release at the DOS prompt E.g., clean shutdown of the computer But, the host might not release the address E.g., the host crashes (blue screen of death!) E.g., buggy client software And you don t want the address to be allocated forever Performance trade-offs Short lease time: returns inactive addresses quickly Long lease time: avoids overhead of frequent renewals

Error Reporting Examples of errors a router may see Router doesn t know where to forward a packet Packet s time-to-live field expires Router doesn t really need to respond Best effort means never having to say you re sorry So, IP could conceivably just silently drop packets But, silent failures are really hard to diagnose IP includes basic feedback about network problems Internet Control Message Protocol (ICMP)

Internet Control Message Protocol (ICMP) ICMP runs on top of IP Though still viewed as an integral part of IP Diagnostics Triggered when an IP packet encounters a problem E.g., time exceeded or destination unreachable ICMP packet sent back to the source IP address Includes the error information (e.g., type and code) and an excerpt of the original data packet for identification Source host receives the ICMP packet And inspects the excerpt of the packet (e.g., protocol and ports) to identify which socket should receive the error

Example: Time Exceeded Host sends an IP packet Each router decrements the time-to-live field If time-to-live field reaches 0 Router generates an ICMP message Sends a time exceeded message back to the source 1.2.3.7 host! host!...! DNS! 5.6.7.156 host! host!...! DNS! Time exceeded router! router! router! 8.9.10.11

Traceroute: Exploiting Time Exceeded Time-To-Live field in IP packet header Source sends a packet with a TTL of n Each router along the path decrements the TTL TTL exceeded sent when TTL reaches 0 Traceroute tool exploits this TTL behavior TTL=1 Time exceeded source TTL=2 destination Send packets with TTL=1, 2, and record source of time exceeded message

Ping: Echo and Reply ICMP includes a simple echo function Sending node sends an ICMP echo message Receiving node sends an ICMP echo reply Ping tool Tests the connectivity with a remote host by sending regularly spaced echo commands and measuring the delay until receiving the reply Pinging a host ping www.cs.colostate.edu or ping 129.82.45.114 Used to test if a machine is reachable and alive (However, some nodes have ICMP disabled )

What s Next Read Chapter 1, 2, 3, and 4.1-4.3 Next Lecture Topics from Chapter 4.2 and 4.3 Routing Homework Due Thursday in recitation Project 2 You should be working on Project 2!