IP Internet Protocol. Agenda. IP on everything everything on IP. TCP/IP and Internet. An internet. Request For Comments (RFC)

Similar documents
IP Internet Protocol. Agenda. TCP/IP and Internet. An internet. How is TCP/IP defined. Request For Comments (RFC)

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

IPv4. Christian Grothoff.

Introduction to Internetworking

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

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

Network layer: Overview. Network Layer Functions

TCP/IP Protocol Suite

Network Layer (4): ICMP

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

Internet Technology 3/23/2016

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Network Layer: Internet Protocol

Vorlesung Kommunikationsnetze

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 Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

Router Architecture Overview

The Interconnection Structure of. The Internet. EECC694 - Shaaban

IP: Addressing, ARP, Routing

TSIN02 - Internetworking

Chapter 4: Network Layer

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

EEC-684/584 Computer Networks

Introduction to routing in the Internet

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

Internet Protocols (chapter 18)

Introduction to routing in the Internet

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

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

The Internetworking Problem. Internetworking. A Translation-based Solution

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

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

OSI Data Link & Network Layer

Chapter 4 Network Layer

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

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

TSIN02 - Internetworking

SEN366 (SEN374) (Introduction to) Computer Networks

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

ICMP (Internet Control Message Protocol)

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

internet technologies and standards

ICS 451: Today's plan

OSI Data Link & Network Layer

Master Course Computer Networks IN2097

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

TCP/IP and the OSI Model

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

CS 457 Lecture 11 More IP Networking. Fall 2011

Internet Control Message Protocol

CSCE 463/612 Networks and Distributed Processing Spring 2018

Module 7 Internet And Internet Protocol Suite

ET4254 Communications and Networking 1

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Internet Control Message Protocol (ICMP)

OSI Data Link & Network Layer

CSEP 561 Internetworking. David Wetherall

The Internet. The Internet is an interconnected collection of netw orks.

Lecture 2: Basic routing, ARP, and basic IP

Chapter 7: IP Addressing CCENT Routing and Switching Introduction to Networks v6.0

TCP/IP Protocol Suite and IP Addressing

IP - The Internet Protocol

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

The Internet Protocol (IP)

4. Basic IP Support Protocols

Dongsoo S. Kim Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis

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

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

Prof. Shervin Shirmohammadi SITE, University of Ottawa. Internet Protocol (IP) Lecture 2: Prof. Shervin Shirmohammadi CEG

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

CHAPTER-2 IP CONCEPTS

Planning for Information Network

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

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

The Network Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

EEC-484/584 Computer Networks

(ICMP), RFC

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

Communication Systems DHCP

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

IP Protocols. ALTTC/Oct

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

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

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at

Computer Networking Introduction

Operational Security Capabilities for IP Network Infrastructure

Chapter 19 Network Layer: Logical Addressing

Internetwork Protocols

Internetworking Part 2

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

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

K2289: Using advanced tcpdump filters

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

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

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

TCP /IP Fundamentals Mr. Cantu

Information Network Systems The network layer. Stephan Sigg

Chapter 5 TCP/IP SUITE

Transcription:

Agenda IP Internet Protocol Network and Information Center Beijing University of Posts and Telecommunications Oct. 2017 TCP/IP and Internet Internet Address Internet Layer Protocols IP Protocol ICMP Protocol ARP/RARP Protocol Mobile IP TCP/IP and Internet IP on everything everything on IP Internet: a collection of inter-connected networks or autonomous systems An internet Transmission system: Leased lines, wired or wireless data communication systems,... Network equipment: routers, switches, hubs, mux, Computer: Hosts, Servers, PCs, Mobile Devices,... Software: TCP / IP protocol stack, applications... Request For Comments (RFC) Internet Draft Internet Standards All of the protocols in the TCP/IP suite are defined by documents called Requests For Comments (RFC's) Obtaining RFCs http://www.ietf.org/ http://www.mayan.cn/ia/rfc-all.zip Major Internet Protocols 1

Standard specification - some RFCs TCP / IP Protocol stack 1981 RFC0791 Internet Protocol, John Postel 1981 RFC0793 Transmission Control Protocol. J. Postel 1981 RFC0792 Internet Control Message Protocol 1981 RFC0799 Internet name domains 1981 RFC0788 Simple Mail Transfer Protocol. J. Postel. 1981 RFC0959 File Transfer Protocol. J. Postel 1986 RFC0977 Network News Transfer Protocol. B. Kantor,... 1996 RFC1945 Hypertext Transfer Protocol, T. Berners-Lee,... 1995 RFC1883 Internet Protocol, Version 6 (IPv6) Specification. S. Deering,... 2010 RFC6082 Deprecating Unicode Language Tag Characters: RFC 2482 is Historic... Data Wrapped by different layers Network layer functions Transport packet from sending to receiving hosts Network layer protocols in every host, router Three important functions Path determination Route taken by packets from source to destination Switching Move packets from router s input to appropriate route output Call setup Some network architectures require router call setup along path before data flows Service provided to the Transport layer Agenda TCP/IP and Internet Internet Address Internet Layer Protocols IP Protocol ICMP Protocol ARP/RARP Protocol Mobile IP IPv4 addressing: introduction IP address: 32-bit identifier for host, router interface Interface: connection between host, router and physical link Routers typically have multiple interfaces Host may have multiple interfaces IP addresses associated with interface, not host, router Each address is a pair (network id, host id) Network part (high order bits) Host part (low order bits) 2

3 IPv4 addressing category (Classful IP addressing) Class A 128 networks 16,777,216 hosts Class B 16,384 networks 65,536 hosts Class C 2,097,152 networks 256 hosts Class D Multicast 268,435,456 Addresses Class E Reserved 268,435,456 Addresses 0 1 0 1 1 0 Network Part 1 1 1 0 1 1 1 1 Network Part Network Part Host Part Host Part Host Part There is no need to allocate octets or bits to seperate network and host Addresses in class D and E. Class E addresses are reserved for research use only. IPv4 address notation Binary 10100001 00000000 01110100 11100001 Hex A1.00.74.E1 Dotted decimal 161.0.116.225 Decimal 2701161697 Binary & Dotted Decimal Decimal 166. 111. 4. 80 Binary 1010 0110 0110 1111 0000 0100 0101 0000 Decimal 166. 111. 4. 80 = Binary 10100110. 01101111. 00000100. 01010000 Special IP address Loopback existed in every IP stack For testing and diagnostic purposes 127.0.0.1-127.255.255.255 Local broadcast and Network broadcast FF.FF.FF.FF Used when the local subnet is unknown network.ff: 196.34.5.255, 19.255.255.255 00.00.00.00 BSD style broadcast address Network identifier Not for host network.00 196.34.5.0 Private IP address Private IP address-example RFC1918 Address Allocation for Private Internets 10.0.0.0-10.255.255.255 (10/8 prefix) 172.16.0.0-172.31.255.255 (172.16/12 prefix) 192.168.0.0-192.168.255.255 (192.168/16 prefix) Experiment or Enterprises internal use only Not routable in Internet world To save address space Private addresses can be used to address point-to-point serial links without wasting real IP addresses.

4 Subnetting Classfull addressing inefficient Each local area network has a network number A company having several LANs needs to apply for several IP address Due to the explosive growth of the Internet, the use of assigned IP addresses became too inflexible to allow easy changes to local network configurations. These changes might occur when: A new physical network is installed at a location. Growth of the number of hosts requires splitting the local network into two or more separate networks. The classful IP addressing restricts the flexibility of address allocation and may waste IP address space. Classless IP addressing Solution was to partition large networks internally into subnetworks (subnets)- classless IP addressing Typically class C (8 bit host part) sized subnets although variable length subnets used too Network Part "Subnet" Part "Real" Host Part "Effective" Host Part <network number>< host number > <network number><subnet number><host number> Classful Addressing and Classless Addressing Classful Addressing In a classful addressing scheme, division between network and host portion always take place at the octet boundaries. Classless Addressing In a classless addressing scheme, division between network and host portion can take place at arbitrary bit boundaries. NetMask Divide an IP address into subnets and specify the networks available hosts. The mask contains 1's for the bit positions in the 32-bit address which are to be used for the network and subnet parts, and 0's for the host part. Address format: a.b.c.d/x, where x is # bits in network portion of address 200.23.26.0/23 NetMask Exmaples For one B class network 166.111.0.0, netmask is 255. 255. 0. 0 Network 166. 111. 0. 0 = Address 10100110. 01101111. 00000000. 00000000 Network 11111111. 11111111. 00000000. 00000000 Mask = 255. 255. 0. 0 If we borrow 5 bits from host as subnet, netmask becomes 255. 255. 248. 0 Network 166. 111. 0. 0 = Address 10100110. 01101111. 00000000. 00000000 Network 11111111. 11111111. 11111000. 00000000 Mask = 255. 255. 248. 0 Determining Local and Remote Hosts Example 12 A Remote Local Hosts D 192.168.1.100 192.168.2.100 B E 192.168.2.100 C Subnet F Mask

5 Calculation IP address AND Network Mask=Subnetwork ID Logical ANDing Process 0 AND 0 = 0 0 AND 1 = 0 1 AND 0 = 0 1 AND 1 = 1 Example Packet Address 201.10.11.65 11001001.00001010.00001011.01000001 AND Mask 255.255.255.224 11111111.11111111.11111111.11100000 Subnetwork ID 210.10.11.64 11001001.00001010.00001011.01000000 Subnet Addressing (example 1) IP address: 11001010.01110000.00111010.01000010 (202.112.58.66) IP address: 11001010.01110000.00111010.00100011 (202.112.58.35 ) AND IP address: 10100110.01110010.00000101.00111010 (166.111.5.58) AND A is a C class network NetMask: AND202.112.58.0, 11111111.11111111.11111111.11100000 network mask is (255.255.255.224) NetMask: 11111111.11111111.11111111.11100000 (255.255.255.224) Assumption Subnet: NetMask: 11001010.01110000.00111010.01000000 11111111.11111111.11111111.11100000 (255.255.255.224) (202.112.58.64) Subnet: 11001010.01110000.00111010.00100000 (202.112.58.32) Host A s IP address Subnet: is 202.112.58.[01000001] 10100110.01110010.00000101.00100000 = 202.112.58.65 (166.111.5.32) Host B s IP address is 202.112.58.[00100011] = 202.112.58.35 Host C s IP address is 202.112.58.[01000010] = Communication 202.112.58.66 in the different Destination= Destination=C Destination=B network. Communication subnet. Transmit in the packet same to 166.111.5.58 subnet. No network subnet transmission. 1. B. A C Subnet2: Network B: 202.112.58.64 166.111.0.0 Subnet3: Router-1 202.112.58.96 Router-2 Subnet1: 202.112.58.32 B Network A:202.112.58.0 Subnet Addressing (example 2) An organization is assigned to a class B network address 150.100.0.0. Suppose the organization has many LANs, each consisting of no more than 100 host. How many bits are needed to identify the host? What is the network mask? And how many subnets available? Host bits: 2 7-2=126>100, 7 bits for host ID Subnet bits: 16-7=9. Subnet mask: 16+9=25bits (255.255.255.128) Number of subnets: 2 9-2=510 (all 1 and all 0 subnets are not usable) If a packet with destination address 150.100.12.176 arrives, which subnet is belongs to? IP address: 10010110 01100100 00001100 10110000 & mask: 11111111 11111111 11111111 10000000 Subnet: 10010110 01100100 00001100 10000000 = 150.100.12.128 Type of Subnet mask Fixed length Subnetting Variable Length Subnetting VLSMs (Variable Length Subnet Masks ) imply that different subnets in an organization could be sized differently and have different length subnet masks. Example of Classless Addressing Prefix 202.12.28.0/22 1024 host addresses announced as a single network (important!) Consists of 7 subnets 202.12.28.0/25 202.12.28.128/26 202.12.28.192/26 202.12.29.0/24 202.12.30.0/24 202.12.31.0/25 202.12.31.128/25 202.12.28.0/25 128 hosts 202.12.28.0/24 256 hosts 202.12.28.128/26 64 hosts 202.12.28.0/23 512 hosts 202.12.28.128/25 128 hosts 202.12.29.0/24 256 hosts 202.12.28.192/26 64 hosts 202.12.28.0/22 1024 hosts 202.12.30.0/24 256 hosts 202.12.28.30/23 512 hosts 202.12.31.0/25 128 hosts 202.12.31.0/24 256 hosts 202.12.31.128/25 128 hosts Route Aggregation Represents multiple networks by a single entry in the routing table reduce the number of advertised routes on large networks by summarizing routes 20-bit Network Part 12-bit Host Part

6 Route Aggregation IP Routing without Subnets This backbone router has only ONE entry of a 20-bit network for all 16 class C networks in the ISP. Traffic matching the 20-bit network part will be forwarded to R X, which then forward to the correct destination This router knows all 16 class C networks and has individual routing table entries for each network. Destination IP Network address = my IP network address Yes: send IP datagram on local network No: send IP datagram to gateway corresponding to the destination network address IP Routing with Subnets Destination IP Network address = my IP network address Yes: send IP datagram on local network No: send IP datagram to gateway corresponding to the destination (sub)network address Command to discover the subnet mask In DOS / Win95 C> winipcfg Win/XP IPconfig netstat -rn In Unix/Linux like box ifconfig -a IP address allocation body (Internic)/ARIN RIPE APNIC LACNIC AfriNIC The Internet Corporation For Assigned Names and Numbers (ICANN) APNIC (Asia & Pacific Rim) RIPE-NCC (Europe) ARIN (US & Others) Regional Internet Registry The Internet Society The Internet Architecture Board (IAB) LACNIC (Latin America) The Internet Engineering Steering Group (IESG) IETF Working Groups IETF Working Groups The Internet Research Steering Group (IRSG) IRTF Working Groups IRTF Working Groups IP Address Allocation IPv4 address allocation Static allocation, manually configure BOOTP (BOOTstrap Protocol, obseleted) DHCP (Dynamic Host Configuration Protocol) Using UDP as its transport protocol Using port 67 (for server) and 68 (for client) IPv6 address allocation Static allocation SLAAC, stateless DHCPv6, stateful Clients listen for DHCP messages on UDP port 546. Servers and relay agents listen on UDP port 547

7 Multiple IP Addresses assigned to one node One node with Multiple IP addresses One host or router with multiple network interface card, Each interface card assigned by one IP address One Interface card with multiple IP addresses Special device like router, for routing a b c Continued a b c S: Switch R: Router Example configuration in a router RouterA> interface Ethernet0 ip address 202.112.10.98 255.255.255.224 ip address 202.112.9.14 255.255.255.252 secondary ip accounting output-packets Agenda TCP/IP and Internet Internet Address Internet Layer Protocols IP Protocol ICMP Protocol ARP/RARP Protocol Mobile IP Internet Protocol (IP) IPv4 Packet header format IP provides an unreliable, connectionless datagram delivery service Unreliable No guarantees that an IP datagram will successfully reach its destination Provides a simple error handling algorithm: by sending an ICMP message back to the source Reliable service is provided by higher layers, e.g., TCP Connectionless Each datagram is handled independently IP does not maintain any state information about the datagrams Datagrams may be delivered out of order

8 Header Version A 4-bit version number Allows transition between versions (from IPv4 to IPv6) Internet Header Length (IHL) Len = Header Length (lines) Total Length - Total datagram length 20bytes~60bytes Header (continued) Type of Service: Desirable service attributes Designed to distinguish between different classes of service Precedence ( 3bits ) = Importance ( 0-7 ) - RFC791 D (1 bit ) = Low-delay request T (1 bit ) = High-through put R (1 bit ) = High-reliability request L (1 bit ) = Low-cost 1 bits unused DSCP RFC2472, RFC2475 6 bits of this field used as DSCP (differentiated service code point) to indicate the class a packet belongs to ToS RFC1349 16 priorities (0-15) Header (continued) Total length Total length in bytes = header + data 16 bits: max. IP datagram size=65535 bytes Identification Identify the datagram a fragment belongs to All the fragments of a datagram contain the same identification value Header (continued) Time to live (TTL) Limit packet lifetime prevents looping Supposed to measure the time a datagram has been in the Internet Initialized by sender to some value (255 sec) Decremented on each hop, decremented multiple times when queued for a long time in a router In practice, it counts hops When TTL=0, the datagram is discarded, and an ICMP warning message is sent to source IP datagram purging - TTL Header (continued) TTL=4 TTL=3 TTL=2 TTL=1 TTL=0 Protocol Identifies the next-layer protocol above the IP that is to receive the datagram at the final host destination, e.g., TCP, UDP and other Defined by IANA (Internet Assigned Number Authority) Online database at: http://www.iana.org/(rfc 1700) 1 ICMP Internet Control Message Protocol 2 IGMP Internet Group Message Protocol 3 GGP Gateway to Gateway Protocol 6 TCP Transport Control Protocol 9 IGP Interior Gateway Protocol 17 UDP User Datagram Protocol

9 Header (continued) Header checksum Detect errors in the header (header only) Source address (32 bits) Destination address (32 bits) Data: From TCP or other protocol IP Fragmentation A datagram may need to travel across many types of physical networks as it moves across an Internet Different networks have different max. frame size (MTU: maximum transfer unit): X.25: 1024 bytes, Ethernet: 1500 bytes Transmission unit = IP datagram (data+header) All machines are required to accept fragments of 576 bytes or less Any datagram larger than the MTU is fragmented The data portion of each fragment, except the last one, must be a multiple of 8 bytes Original header is copied to each fragment and then modified Some option fields are copied IP Header Original Datagram IP Hdr 1 Data 1 IP Hdr 2 Data 2 IP Hdr 3 Data 3 Fragmentation and reassembly IP Datagram Fragmentation Each fragment (packet) has the same structure as the IP datagram. IP specifies that datagram reassembly is done only at the destination (not on a hop-by-hop basis). If any of the fragments are lost - the entire datagram is discarded (and an ICMP message is sent to the sender). If an error is found (header checksum problem) the packet is discarded and an ICMP message is sent to the sender. Example of two fragments Reassembly Initial IP datagram More bit (M) = 0 Offset (OS) = 0 After fragmentation First Frag More bit (M) = 1 Offset (OS) = 0 After fragmentation Second Frag More bit (M) = 0 Offset (OS) = 400/8 = 50 Reassembly only at the final destination Partial datagrams are discarded after a timeout Fragments can be further fragmented along the path. Subfragments have a format similar to fragments. To reassemble a fragment, the destination must obtain all fragments starting the with the one with offset 0 through the fragment with highest offset The fragment with the highest offset will have it MF set to 0

10 Option field Source routing option Options field allows to include information not present in the original design, to permit experimenters to try out new ideas and to avoid allocating header bits to information that is rarely needed. General Format Length: Total length in option Data: use depends on option Code format Copy:=1, all frag with option =0, only first frag include option The process of transferring datagrams across an internet Connectionless transmission Routing Error detection Fragmentation and Reassembly Datagram purging IP traffic monitoring --- netstat -s IP Statistics Packets Received = 25945 Received Header Errors = 0 Received Address Errors = 4 Datagrams Forwarded = 0 Unknown Protocols Received = 0 Received Packets Discarded = 0 Received Packets Delivered = 25941 Output Requests = 29467 Routing Discards = 265 Discarded Output Packets = 0 Output Packet No Route = 0 Reassembly Required = 0 Reassembly Successful = 0 Reassembly Failures = 0 Datagrams Successfully Fragmented = 0 Datagrams Failing Fragmentation = 0 Fragments Created = 0 Agenda TCP/IP and Internet Internet Address Internet Layer Protocols IP Protocol ICMP Protocol ARP/RARP Protocol Mobile IP ICMP (Internet Control Message Protocol) ICMP reviews the basic errors that can be reported and explains how and where such messages are sent. All hosts and routers must be able to handle the ICMP messages, an integral part of IP ICMP is an error reporting mechanism. IP layer Software must take action to handle the possible action on its own Utility Ping uses ICMP to detect the reachablity and delay between nodes in the network Router use ICMP to send error and control message

11 ICMP Packet Format Length of the packet varies with type of message Type : type of message Checksum: Calculated on entire message Information: Varies with message type Frame header IP header May not be used Error messages( response to bad datagram) IP header plus 8 following octets ICMP message Message Type Examples Message type = 0 Echo reply = 3 Destination unreachable = 4 Source quench = 5 Redirect ( change route ) = 8 Echo request = 11 Time exceeded for a datagram = 12 Parameter problem on a datagram = 13 Timestamp request = 14 Timestamp reply = 15 Information request (obsolete) = 16 Information reply (obsolete) = 17 Address mask request = 18 Address mask reply ICMP Message Delivery ICMP message requires two levels of encapsulation ICMP Error Message ICMP utilizes IP, but considered to be at same level in Protocol stack. ICMP message are carried in IP packet with Protocol field = 1 Message type: destination unreachable (Type=3) Always contains the IP header and the first 64 bits of the IP datagram that caused the ICMP error to be generated For the receiver to associate the message with one particular protocol (TCP or UDP) and a particular user (port number) Code number (0~15) specifies the more detailed reason of the error 16 kind of errors ICMP Message Error Type Message code = 0 Network unreachable = 1 Host unreachable = 2 protocol unreachable = 3 port unreachable = 4 Must fragment, but DF set = 5 Source route failed = 6 destination network unknown = 7 destination host unknown = 8 source host isolated (obsolete) = 9 destination network administratively prohibited = 10 destination host administratively prohibited = 11 network unreachable for this type of service = 12 host unreachable for this type of service = 13 communication administratively prohibited by filtering = 14 host precedence violation = 15 precedence cutoff in effect ICMP Echo reply Used by processors to test whether a destination is alive and reachable Example : ping hostname Format as show below TYPE = 8 ( request ) or 0 ( reply ) IDENTIFER / SEQUENCE NUMBER: used by sender to match replies to request DATA: Optional further matching information ( returned by the sender)

12 ICMP Application 1: Ping Use ping, get information for reachability, delay, TTL ICMP Application 2: Traceroute Traceroute: Exploit TTL and ICMP Send there packet with time-to-live = 1 (hop) The first router discards the packet and sends an ICMP time-tolive exceeded message Send there packet with time-to-live = 2 (hops) The second router discards the packet and sends an ICMP time-to-live exceeded message etc When final host reached, use unlikely UDP port and get ICMP port unreachable back Does not use optional features like record route Example: Traceroute 从中国互联网络地图网站 www.chinanetmap.com 到 www.sta.net.cn. traceroute to info.sta.net.cn (202.96.199.167), 30 hops max, 40 byte packets 1 202.99.44.62 (202.99.44.62) 0.713 ms 0.590 ms 0.606 ms 2 GSR-BTO-B-P0-2.bta.net.cn (202.106.192.93) 1.063 ms 0.828 ms 0.594 ms 3 202.97.9.61 (202.97.9.61) 0.987 ms 1.483 ms 1.226 ms 4 202.97.9.166 (202.97.9.166) 20.478 ms 20.145 ms 19.667 ms 5 202.97.10.38 (202.97.10.38) 551.252 ms 565.795 ms 572.968 ms 6 202.97.18.203 (202.97.18.203) 600.645 ms 597.669 ms 606.014 ms 7 202.101.63.1 (202.101.63.1) 705.860 ms 616.349 ms 634.087 ms 8 202.101.63.105 (202.101.63.105) 635.366 ms 629.704 ms 630.352 ms 9 info.sta.net.cn (202.96.199.167) 638.950 ms * 653.169 ms ICMP Application 3: Path MTU Discovery The MTU for each medium is different To transfer bulk data ( e.g. File transfer), it is always better to send large datagrams A simple Path Discovery procedure to determine the biggest datagram size: Send a large IP datagram with Don t fragment bit set Failure to fragment at a link will result in ICMP message Later version of ICMP specifies MTU size in such ICMP messages Reduce message size until success (No ICMP message received) Example: Path MTU Discovery ICMP Summary sun % traceroute.pmtu slip traceroute to slip (140.252.13.65), 30 hops max outgoing MTU = 1500 1 bsdi (140.252.13.35) 15 ms 6 ms 6 ms 2 bsdi (140.252.13.35) 6 ms fragmentation required and DF set, trying new MTU = 1492 fragmentation required and DF set, trying new MTU = 1006 fragmentation required and DF set, trying new MTU = 576 fragmentation required and DF set, trying new MTU = 552 fragmentation required and DF set, trying new MTU = 544 fragmentation required and DF set, trying new MTU = 512 fragmentation required and DF set, trying new MTU = 508 fragmentation required and DF set, trying new MTU = 296 2 slip (140.252.13.65) 377 ms 377 ms 377 ms Destination Unreachable Network/Host/Protocol/Port/ Time Exceed TTL expired Used in traceroute tool Parameter problem IP header error Source Quench Requests source to decrease its data rate Redirect Tell source to send its message to a better address Echo Request/Echo Reply For testing (e.g., ping program sends an Error request) Timestamp Request/Reply Clock synchronization RTT Address Mask Request/Reply Diskless systems Router Solicitation and Advertisement Hosts query routers Routers advertise presence and routes

13 Agenda TCP/IP and Internet Internet Address Internet Layer Protocols IP Protocol ICMP Protocol ARP/RARP Protocol Mobile IP Address Resolution Protocol (ARP) ARP Overview ARP Detailed Concept ARP and Subnets Proxy-ARP or Transparent Subnetting ARP ARP Process IP addresses only make sense to the TCP/IP protocol suite Machines on a physical network can communication ONLY if they know each other s physical network address Mapping Internet Address to Physical Address ARP uses MAC-level address to resolve a known forwarding IP address to its MAC address. Considered to be the layer 2 protocol RFC826 Ethernet Address Resolution Protocol: Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware. D.C. Plummer. Nov-01-1982. The Address Resolution Problem Node A Send an arp request packet asking for the destination s (node B) MAC address by giving the IP address of node B Receiver (node B) response an arp packet to node A Example of arp command ARP -s inet_addr eth_addr [if_addr] ARP -d inet_addr [if_addr] ARP -a [inet_addr] [-N if_addr] -a Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed. -g Same as -a. inet_addr Specifies an internet address. -N if_addr Displays the ARP entries for the network interface specified by if_addr. -d Deletes the host specified by inet_addr. -s Adds the host and associates the Internet address inet_addr with the Physical address eth_addr. The Physical address is given as 6 hexadecimal bytes separated by hyphens. The entry is permanent. eth_addr Specifies a physical address. if_addr If present, this specifies the Internet address of the interface whose address translation table should be modified. If not present, the first applicable interface will be used.

14 Resolution Through Direct Mapping Static ARP table Configured by the system administrator Fast translation... Resolution Through Dynamic Binding The ARP allows a host to find the physical address of a target host on the same physical network by given its IP address. The Address Resolution Cache Cache the dynamic IP / MAC binding Reduce broadcast traffic Enhance the efficiency of the ARP operation Maintains the recent mappings from IP addresses to the hardware addresses Time dependent Small cache is worthwhile arp -a Proxy ARP Proxy ARP is a technique in which one machine, usually a router, answers ARP requests intended for another machine. By "faking" its identity, the router accepts responsibility for routing packets to the "real" destination. Proxy ARP allows a site to use a single IP address with two physical networks. Subnetting would normally be a better solution. ARP: Example 1 If host 1 wants to send a packet to host 2 Host 1 finds the IP address of host 2: 192.31.65.5 IP software on host 1 determines that the destination is on its own network To find the Ethernet address of the destination: host 1 broadcasts an ARP request Host 2 responds with its Ethernet address (E2) Host 1 builds an Ethernet frame addressed to E2, puts the IP packet in the payload field, and broadcasts it onto the Ethernet Ethernet card on host 2 detects this frame, recognizes it as a frame for itself, scoops it up, processes it and passes it to IP software Host 1 broadcast ARP request Host 2 responds with its Ethernet Address ARP: Example 2 If host 1 wants to send a packet to host 4 Host 4 and host 1 are on different network: host 4 will not respond to ARP request Solution Proxy ARP: CS router responds to ARP request for network 192.31.63.0. Host 1 makes an ARP entry of (192.31.63.8, E3) and send all traffic for host 4 to the local router Similarly, host 1 packs the IP address into the payload of an Ethernet frame addressed to E3 Host 1 broadcast ARP request CS router responds with its Ethernet Address (E3) Host 4 will not respond

Reverse Address Resolution Protocol (RARP) Translate from physical address to IP address RARP / ARP reversed operation RARP operation Host A broadcast a request asking for a IP address Server B reply Host A with the IP address assigned to it Multiple RARP server may be available for redundancy Host A may works in two modes: endless sending request till answer returned when timed out, manually restart its request RFC0903 Reverse Address Resolution Protocol. R. Finlayson, T. Mann, J.C. Mogul, M. Theimer. Jun-01-1984 RARP Application Agenda Machine obtains its IP address from a configuration file on the disk during bootup time RARP is used for diskless stations to obtain their IP addresses TCP/IP and Internet Internet Address Internet Layer Protocols IP Protocol ICMP Protocol ARP/RARP Protocol Mobile IP Mobility and Standard IP Routing By design, IP host address is tied to home network address Hosts are assumed to be wired, immobile Intermediate routers look only at network address Mobility without a change in IP address results in unrouteable packets What if a user wants to roam between networks? Mobile users don t want to know that they are moving between networks What if mobile users change IP when running an application? Design of Mobile IP Mobile IP was developed as a means for transparently dealing with problems of mobile users Enables hosts to stay connected to the Internet regardless of their location Enables hosts to be tracked without needing to change their IP address No changes to software of non-mobile hosts/routers Addition of some infrastructure No geographical limitations No modifications to IP addresses or IP address format Security Could be even more important than physically connected routing 92 CS 640 93 CS 640 15

16 Mobile IP Basics Proposed by IETF (Internet Engineering Task Force) Standards development body for the Internet Mobile IP allows a mobile host to move about without changing its permanent IP address Each mobile host has a home agent on its home network Mobile host establishes a care-of address when it's away from home 94 Mobile IP Mobile Node (MN) Correspondent Node (CN) Home Agent (HA) 95 Mobile IP Summary TCP/IP and Internet IP classful address IP classless address Subnet Mask IP address configuration IP protocol ICMP protocol ARP/RARP protocol IPv6 will be discussed next To be continued Thank you!