4: Network Layer4a-1 13: Intro to IP and ICMP Last Modified: 11/9/2015 7:16:06 PM.

Slides:



Advertisements
Similar presentations
Discussion Monday ( ). ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live.
Advertisements

CSE 461: IP/ICMP and the Network Layer. Next Topic  Focus:  How do we build large networks?  Introduction to the Network layer  Internetworks  Service.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
8-1 Last time □ Network layer ♦ Introduction forwarding vs. routing ♦ Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
Internet Control Message Protocol (ICMP)
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
IP Addressing: introduction
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
1 Internet Control Message Protocol (ICMP) RIZWAN REHMAN CCS, DU.
IP Routing, Format, Fragmentation Chapters 20-21, 23.
Computer Networks The Network Layer
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
12 – IP, NAT, ICMP, IPv6 Network Layer.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
1 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing.
4: Network Layer4a-1 Routing in the Internet r The Global Internet consists of Autonomous Systems (AS) interconnected with each other: m Stub AS: small.
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
IPv4 Fragmentation, PMTU Discovery and NAT
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
The Internet Network layer
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Lecture 21: Network Primer 7/9/2003 CSCE 590 Summer 2003.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Network Layer session 1 TELE3118: Network Technologies Week 5: Network Layer Forwarding, Features Some slides have been taken from: r Computer.
4: Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Introduction to Networks
12 – IP, NAT, ICMP, IPv6 Network Layer.
Internet Control Message Protocol (ICMP)
Computer Communication Networks
Internet Control Message Protocol (ICMP)
Chapter 4: Network Layer
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
CS 457 – Lecture 10 Internetworking and IP
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Some slides have been taken from:
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Wide Area Networks and Internet CT1403
Overview The Internet (IP) Protocol Datagram format IP fragmentation
ITIS 6167/8167: Network and Information Security
Fred Kuhns Applied Research Laboratory
32 bit destination IP address
Presentation transcript:

4: Network Layer4a-1 13: Intro to IP and ICMP Last Modified: 11/9/2015 7:16:06 PM

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

4: Network Layer4a-3 IP Header r Total length field (16 bits) m Length in bytes m Max Total length = bytes m Max Data = –Header Length r Can you really send that much? m Link layer might not be enough to handle that much; Various link layer technologies have different limits m As pass over various link layers, IP datagram will be fragmented if necessary m Total length field will change when fragmented

4: Network Layer4a-4 IP Header: Fragmentation r Fields to manage fragmentation m Identification (16 bits) “Unique ID” for datagram Original spec said transport layer would set Usually set to value of variable in IP layer that is incremented by one for each datagram sent from that host (regardless of destination) Would wrap every datagrams m Flags ( 3 bits) 1 bit used to say whether there are more fragments following this one in the original datagram 1 bit used to say “do not fragment” (drop and send error message back to source if need to fragment) m Fragment Offset (13 bits) Give offset of data in this fragment into original datagram

4: Network Layer4a-5 IP Fragmentation & Reassembly r network links have MTU (max.transfer size) - largest possible link-level frame. m different link types, different MTUs m Ex. Ethernet maximum is 1500 bytes, FDDI maximum is 4500 bytes r large IP datagram divided (“fragmented”) within net m “reassembled” only at final destination (even if pass over other links that could handle larger datagram) m May be fragmented multiple times m One fragment dropped => entire datagram dropped fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

4: Network Layer4a-6 IP Fragmentation and Reassembly ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =1480 fragflag =1 length =1500 ID =x offset =2960 fragflag =0 length =1040 One large datagram becomes several smaller datagrams Note: TCP/UDP header with port numbers etc only in 1 st fragment

4: Network Layer4a-7 Alternatives to Fragmentation? r IP wants to be able to run anywhere: Make packet size as small as the minimum packet size anywhere along a route m Detection? Evolution? Wasted Bandwidth! r Look before you leap r During connection establishment, receiver may specify a max segment size (MSS) m To avoid overhead of fragmentation and reassembly, hosts often send a series of probe packets to determine the smallest MTU along a route m This is called path MTU discovery.

4: Network Layer4a-8 Path MTU Discovery:TCP r If doing Path MTU Discovery, start with minimum of receiver’s specified MSS or local MTU and set the Don’t Fragment Bit r If ICMP message received indicating that fragmentation was required, then segment size will be reduced r Periodically (every 10 min or so), TCP will try a higher segment size up to the receiver’s MSS to see if new route is being used that would allow larger segments r Not all implementations support this

4: Network Layer4a-9 Path MTU Discovery: UDP r Not like TCP where sender sends stream in chunks as they see fit and receiver reads in chunks as they see fit r With UDP, the size of the UDP packet is much more visible to the application r May send with DF bit off r May send with DF bit on and if get ICMP messages then IP on host may fragment before sent but not exposed to application layer to encourage smaller amounts of data sent r Again not all implementations support

4: Network Layer4a-10 Path MTU Discovery r Look in Ethereal at TCP segments, will see Do Not Fragment Bit is set m If on Ethernet, don’t usually see adjustment m Ethernet has one of the smaller MTUs so never get an ICMP error saying needs to be smaller m If sent from local network with larger MTU might see this activity

4: Network Layer4a-11 IP Header: TTL r Time-to-live field / TTL (8 bits) m Initialized by sender; decremented at each hop m If reaches zero, datagram dropped m Limits total number of hops from source to destination ( = 255) m Prevents things like infinite routing loops m Usually set to 32 or 64 m Used by traceroute (more later)

4: Network Layer4a-12 IP Header: Protocol r Identifies which upper layer protocol to which IP should pass the data r 8 bits: = 255 max number protocols m 1= ICMP m 2= IGMP m 6 = TCP m 17 = UDP m : Unassigned r Who do you think assigns these numbers? m numbers

4: Network Layer4a-13 IP Header r Header Checksum m Calculated over IP header m 16-bit one’s complement m When change TTL, checksum updated r Source and destination IP addresses r Options: variable length m Security options m Record route/timestamp (alternative to traceroute) m Loose (strict? )source routing - source can say path it would datagram to take; routers need not support m Options must end on 32 bit boundary – pad of 0 if necessary

4: Network Layer4a-14 Network Byte Order r Big endian byte ordering m For 4 bytes in each 32 bit value, bytes are transmitted in order (0-7 first, 8-15 second) r That might seem to only make sense but some machines are Little Endian m Bytes in 32 bit value transmit in opposite order r Little Endian machines must convert (even if two little endian machines are communicating)

4: Network Layer4a-15 IP addresses: how to get one? One more time Hosts (host portion): r hard-coded by system admin in a file r DHCP: Dynamic Host Configuration Protocol: dynamically get address: “plug-and-play” m host broadcasts “DHCP discover” msg m DHCP server responds with “DHCP offer” msg m host requests IP address: “DHCP request” msg m DHCP server sends address: “DHCP ack” msg

4: Network Layer4a-16 DHCP r Dynamic Host Configuration Protocol r Automated configuration of IP addresses r Relieves burdens of system administrators - major factor in lifetime cost of computer systems! r DHCP server hands out IP addresses to hosts in a administrative domain r Runs over UDP

4: Network Layer4a-17 Finding the DHCP server? r Certainly wouldn’t be big improvement if had to configure each host with address of DHCP server! r Hosts send special DHCPDISCOVER message to the special IP address r This is a special IP broadcast address and all other nodes on that network will receive

4: Network Layer4a-18 DHCP server on every network? r If there is a DHCP server on the local network to receive the broadcast, then it can respond the host with its IP address, its default router, etc. r Alternatively, can have a DHCP relay agent on each network that knows the address of the DHCP server and will forward the DHCPDISCOVER message

4: Network Layer4a-19 Leases r DHCP doesn’t *give* each client an IP address, just lease them for a while r Benefit: IP addresses aren’t reserved by clients not currently connected to the network r Clients can keep their address by renewing their leases

4: Network Layer4a-20 ICMP: Internet Control Message Protocol r used by hosts, routers, gateways to communication network-level information like error notification or querying network conditions r network-layer “above” IP: m ICMP msgs carried in IP datagrams r ICMP message: type, code plus first 8 bytes of IP datagram causing error Contents depends on type 8-bit type 8-bit code 16-bit checksum ICMP Message Format

4: Network Layer4a-21 ICMP: Internet Control Message Protocol r Error conditions m unreachable host, network, port, protocol m echo request/reply (used by ping) m Need to fragment and can’t; TTL expired m Source Quench r Query/Response m Ping m Address mask request/reply m Timestamp request/reply m Reply echos identifier from query so they can be matched Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header

4: Network Layer4a-22 ICMP: Used in Routing r ICMP used for router discovery and router announcments r ICMP used for “redirection” m Telling source that it sent a datagram through an inefficient path m Knows it is inefficient if it sends it out the same interface it came in on r More on routing soon

4: Network Layer4a-23 Cascading ICMP messages? r To avoid “broadcast storms” of ICMP messages r Do not send an ICMP message in response to: m Datagram sent to special IP addresses (broadcast, multicast, loopback,..) m Fragment other than the first m Other ICMP error messages

4: Network Layer4a-24 ping r Sends ICMP echo request to a host and looks for ICMP echo reply (like locating ship with sonar) r Used to measure RTT r Most implementations support ping directly in the kernel; no “ping server” r Try tracing ping with Ethereal m Ping host on same LAN m Ping host across Internet (drops, duplication, larger variance in RTT) m Ping loopback vs ethernet interface m Ping of broadcast addresses (get ICMP replies from everyone in that network)

4: Network Layer4a-25 traceroute /tracert r Uses UDP, Relies on TTL + ICMP r Send series of IP datagrams with increasing TTL fields m Source sets TTL =1, will get an ICMP TTL expires message from the first hop m Source sets TTL=2, will get an ICMP TTL expires message from second hop r Essential tool for exploring network core r Trace route servers;Triangulating the Internet (?) r Limitations m Subsequent datagrams may take different paths r Ping –R (record route IP option)