IP: Addressing, ARP, Routing

Slides:



Advertisements
Similar presentations
Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
Advertisements

CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 25 Introduction to Computer Networks.
ARP: Address Resolution Protocol
 As defined in RFC 826 ARP consists of the following messages ■ ARP Request ■ ARP Reply.
Special IP Addresses All 0’s – this computer on bootstrap Network.000s – id’s the network Network.111s – broadcast – broadcast 127.x loopback 6/9/2015ICSS420.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Oct 26, 2004CS573: Network Protocols and Standards1 IP: Routing and Subnetting Network Protocols and Standards Autumn
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
CS335 Networking & Network Administration Tuesday, May 11, 2010.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Subnetting.
COS 420 Day 3.
Chapter 19 Binding Protocol Addresses (ARP) Chapter 20 IP Datagrams and Datagram Forwarding.
Address Resolution Protocol (ARP). Mapping IP Address to Data-Link Address  How does a machine map an IP address to its Data- Link layer (hardware or.
1 CSCI 233 Internet Protocols Class 3 Dave Roberts.
Network Layer (Part IV). Overview A router is a type of internetworking device that passes data packets between networks based on Layer 3 addresses. A.
Protocol Headers Pre DA SA 0800h … version H L 6 TCP Header Data FCS
1 Internet Addresses (You should read Chapter 4 in Forouzan) IP Address is 32 Bits Long Conceptually the address is the pair ( NETID, HOSTID ) Addresses.
Mapping Internet Addresses to Physical Addresses (ARP)
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
Network Redundancy Multiple paths may exist between systems. Redundancy is not a requirement of a packet switching network. Redundancy was part of the.
Network Layer – Subnetting and Control Protocols Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing,
1 Computer Communication & Networks Lecture 20 Network Layer: IP and Address Mapping (contd.) Waleed.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
© 2002, Cisco Systems, Inc. All rights reserved..
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
Hyung-Min Lee ©Networking Lab., 2001 Chapter 8 ARP and RARP.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Network Administration Module 3 ARP/RARP. 2 Address Resolution The problem Physical networks use physical addresses, not IP addresses Need the physical.
Chapter 19 Binding Protocol Addresses (ARP) A frame transmitted across a physical network must contain the hardware address of the destination. Before.
Birgit Bonham: Prospect High School ARP….or What’s your MAC address?
Chapter 7 ARP and RARP.
COS 420 Day 3. Agenda Assignment Due Jan 29, 2003 Next Class Individual Projects assigned Today.
Jan 15, 2008CS573: Network Protocols and Standards1 The Internet Protocol: Related Protocols and Standards (IP datagram, addressing, ARP) Network Protocols.
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
BAI513 - PROTOCOLS ARP BAIST – Network Management.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
1 Kyung Hee University Chapter 8 ARP(Address Resolution Protocol)
CSIT 220 (Blum)1 ARP Based on Computer Networks and Internets (Comer)
Mapping IP Addresses to Hardware Addresses Chapter 5.
Network Protocols IP addressing – Classes IP packet format ARP and RARP ICMP.
IP Protocol CSE TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol.
TCP/IP Protocol Suite and IP Addressing Presented By : Dupien AMS.
ADDRESS MAPPING ADDRESS MAPPING The delivery of a packet to a host or a router requires two levels of addressing: logical and physical. We need to be able.
Address Resolution Protocol Yasir Jan 20 th March 2008 Future Internet.
TCP/IP PROTOCOL UNIT 6. Overview of TCP/IP Application FTP, Telnet, SMTP, HTTP.. Presentation Session TransportHost-to-HostTCP, UDP NetworkInternetIP,
Network Layer IP Address.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
TCP/IP Addressing and Subnetting. IP Addressing Roadmap Format of IP Addresses Traditional Class Networks Network Masks Subnetting Supernetting Special.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Address Resolution Protocol (ARP)
Chapter 21 Address Mapping
Chapter 8 ARP(Address Resolution Protocol)
Objective: ARP.
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
Chapter-5 TCP/IP Suite.
CS4470 Computer Networking Protocols
Net 323: NETWORK Protocols
Address Resolution Protocol (ARP)
NAT/ARP/RARP (Ch 5 & 8) Dr. Clincy Lecture.
8PM – Quickly Overview Final Project
ARP: Address Resolution Protocol
Internetworking Outline Best Effort Service Model
Chapter 7 ARP and RARP Prof. Choong Seon HONG.
ARP: Address Resolution Protocol
Ch 17 - Binding Protocol Addresses
Computer Networks ARP and RARP
Presentation transcript:

IP: Addressing, ARP, Routing Autumn 2004-2005 Oct 21, 2004 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn 2004-2005 Oct 21, 2004 CS573: Network Protocols and Standards CS573: Network Protocols and Standards

CS573: Network Protocols and Standards IPv4 IP Datagram Format IPv4 Addressing ARP and RARP IP Routing Basics Subnetting and Supernetting ICMP Network Address Translation (NAT) Dynamic Addressing Oct 21, 2004 CS573: Network Protocols and Standards

Internet Addresses (IP Addresses) Defined when IP was standardized in 1981 IP addresses are 32-bit long and consist of: a network address part – network identifier a host address part – host number within that network IP addresses are grouped into classes (A,B,C) depending on the size of the network identifier and the host part of the address A fourth class (Class D) was defined later (1988) for Multicast addresses Oct 21, 2004 CS573: Network Protocols and Standards

Internet Address Classes 0 8 16 24 32 bits NETWORK HOST (24 BITS) Class A Class B Class C Class D Class E 10 NETWORK HOST (16 BITS) 110 NETWORK HOST (8 BITS) 1110 IP MULTICAST ADDRESSES (28 BITS) 11110 RESERVED FOR EXPERIMENTS Oct 21, 2004 CS573: Network Protocols and Standards

Internet Address Classes Class A 126 networks (0 and 127 reserved) Assigned to very large size networks where 65K < number of hosts < 16M Class B 16384 networks Assigned to Intermediate size networks where 256 < number of hosts < 65K Class C 2097152 networks Assigned to smaller networks where #hosts < 256 Oct 21, 2004 CS573: Network Protocols and Standards

Dotted Decimal Notation Internet addresses are represented in text by the dotted decimal notation each byte is written in decimal values (from 0 to 255) example: 10000000 00001010 00000010 00011110 is written as 128. 10. 2. 30 Oct 21, 2004 CS573: Network Protocols and Standards

Internet Address Classes Lowest Network Identifier Address Highest Network Identifier Address A 1.0.0.0 126.0.0.0 B 128.0.0.0 191.255.0.0 C 192.0.0.0 223.255.255.0 D 224.0.0.0 239.255.255.255 E 240.0.0.0 247.255.255.255 Oct 21, 2004 CS573: Network Protocols and Standards

Uniqueness of IP Addresses Network numbers are assigned by a central authority The Internet Network Information Center (InterNIC) Another authority, the IANA – Internet Assigned Numbers Authority sets policy Network numbers are unique worldwide Host numbers are assigned by network managers They must be unique within a given network Thus, IP addresses are unique worldwide. Oct 21, 2004 CS573: Network Protocols and Standards

Special Purpose IP Addresses 0.0.0.0 Means this host, used by machines as source address when they boot up (if they don’t know their IP address, and need to get it from a boot server) 255.255.255.255 Means limited broadcast. Used as a destination address to send packets to all hosts on the local network where the source is. Packets sent to this address are never relayed Network part all zeros Means the host on this network Host part all ones Broadcast address on the network specified in the network identifier; routers typically do not forward these datagrams Host part all zeros Broadcast address on the network specified in the network identifier (it was an implementation error in some networks) Oct 21, 2004 CS573: Network Protocols and Standards

Special Purpose IP Addresses 127.x.x.x Means loopback (datagrams are looped back in software; they are not sent on any physical interface) 224.0.0.1 Multicast address for “All systems on this subnetwork” 224.0.0.2 Multicast address for “All routers on this subnetwork” Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards Internet Addresses ALL 0’s This Host Host on this network Limited broadcast (local net) Directed broadcast (for NET) Loopback ALL 0’s HOST ALL 1’s NET ALL 1’s 127 ANYTHING Oct 21, 2004 CS573: Network Protocols and Standards

Translating Between IP and MAC Addresses (ARP and RARP) Each interface has an IP address at Layer 3, and a MAC address at Layer 2 Assume that host A wants to send a packet to host B (A and B on the same network) Host A knows the IP address of host B; however, in order to transmit the packet, host A must somehow know or find out what the MAC (layer 2) address of host B is! Solution: the Address Resolution Protocol (ARP), RFC826 Oct 21, 2004 CS573: Network Protocols and Standards

Address Resolution Protocol Used to find the physical address of a target device on the local physical network, given only the target’s IP address Mechanism: The source broadcasts a special packet asking the device with target IP address to respond with a message carrying the (IP address, physical address) mapping All devices on the local physical network receive the broadcast, but only the target recognizes its IP address and responds to the request When the source receives the reply, it sends the packet to the target using the target’s physical address and places the mapping in its cache (a cache is used to prevent repeated broadcasts for the same destination) Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards More on ARP ARP refinements Source includes its <IP address, physical address> mapping in the ARP request anticipating the target’s need for it in the near future. This avoids extra network traffic When all machines receive the ARP request broadcast, they can store the address mapping in their cache. Do they? ARP is used when an IP to physical address mapping changes to notify hosts on the network of the change ARP messages are encapsulated in MAC frames. A special value in the type field of the frame is used to indicate that it is carrying an ARP message (0806 hex is used for ARP) Entries in the local ARP cache for each host time out after a certain period Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards ARP Message Format PROTOCOL TYPE TARGET IP (octets 0-3) 16 8 24 HLEN HARDWARE TYPE SENDER HA (octets 0-3) TARGET HA (octets 2-5) 31 PLEN OPERATION SENDER IP (octetS 0-1) SENDER HA (octetS 4-5) TARGET HA (octets 0-1) SENDER IP (octetS 2-3) Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards ARP Message HARDWARE TYPE: specifies type of hardware interface for which the request is made (e.g., 1 for Ethernet) PROTOCOL TYPE: specifies high level protocol address supplied in message (e.g. 0800 hex for IP) HLEN and PLEN: specify length of fields for hardware address and protocol address respectively OPERATION: specifies if this is an ARP request or reply message (1 for ARP request, 2 for ARP response, 3 for RARP request and 4 for RARP response) HA and IP: hardware and IP addresses respectively Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards Reverse ARP Usually, a machine’s IP address is kept on its secondary storage (OS finds it at start up) Issue : Diskless Workstations! files are stored on a remote server need IP address to use TCP/IP to obtain initial boot image Solution : Use physical address to identify machine Given a physical network address, find the corresponding Internet address Reverse Address Resolution Protocol (RARP), RFC903 Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards RARP Mechanism Sender broadcasts a RARP request, supplying its physical network address in the Target HA field Only machines authorized to supply the RARP service (RARP servers) process the request and send a reply filling in the target internet address Mechanism allows a host to ask about an arbitrary target thus sender HA is separate from target HA address RARP server replies to sender’s HA Ethernet frame Protocol Type for RARP is 8035 hex Oct 21, 2004 CS573: Network Protocols and Standards

Autumn 2004-2005 Network Protocols and Standards Autumn 2002-2003 Oct 21, 2004 IP Routing Network Protocols and Standards Autumn 2002-2003 Oct 21, 2004 CS573: Network Protocols and Standards CS573: Network Protocols and Standards

CS573: Network Protocols and Standards Routing IP Datagram Direct Delivery (i.e., not involving routers): Transmission of an IP datagram between two machines on a single physical network does not involve routers The sender encapsulates the datagram in a physical frame, binds the destination IP address to a physical hardware address (using ARP), and sends the resulting frame directly to the destination The two machines are known to be on the same network because they have the same network identifier Example: A sends IP Datagram to B Router A B C Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards Routing IP Datagram Indirect delivery (i.e. through intermediate routers) Host performs routing decisions based on routing table indicating “next hop” “Next hop” refers to next router IP address on this network, via which the destination is reached Routing decisions are made based on network prefixes (not full IP address) The sender encapsulates the datagram in a frame with the router’s physical destination address (which is found by means of ARP). Oct 21, 2004 CS573: Network Protocols and Standards

Direct and Indirect Routing B wants to send packets to A and C! Host A 204.240.18.10 Internet 204.240.18.1 Router Direct Routing: Packets sent directly using MAC address of A Indirect Routing: Packets sent to the MAC address of the router. At the IP level, B is The source and C is the destination Host B 204.240.18.20 Host C 36.14.0.200 Oct 21, 2004 CS573: Network Protocols and Standards

IP Routing Decisions R3 R1 R2 Routing Table of R2 10.0.0.5 40.0.0.7 Network 10.0.0.0 20.0.0.6 30.0.0.6 20.0.0.5 R3 Network 20.0.0.0 Network 30.0.0.0 Network 40.0.0.0 R1 R2 30.0.0.7 Routing Table of R2 To Reach Hosts on Network Next Hop Address 20.0.0.0 Direct Delivery 30.0.0.0 10.0.0.0 20.0.0.5 40.0.0.0 30.0.0.7 Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards IP Routing Algorithm Router receives an IP datagram with network portion N and destination D If N is directly connected Transmit on that network Else If host specific entry for D exists Use next hop in that entry Else If route entry for N exists Else If default route for next hop exists Use default route for next hop Else Declare error Oct 21, 2004 CS573: Network Protocols and Standards

Routing Within Same Network Consider a small company with a single LAN to which a class C network address has been assigned The company is interested in adding another small physical network (connected to old network through a router) with a few hosts Question: Could this company assign these hosts IP addresses from the same C class network? i.e., could the two LANs share the same class C network address? Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards Proxy ARP Used to allow two physical networks to share the same IP network prefix Router R’s table is configured manually to route between these two networks Router R answers ARP requests on each network for hosts on the other network, giving its own hardware address as the target address Main Router To Internet Main Network A B C Router R D E Hidden Network Oct 21, 2004 CS573: Network Protocols and Standards

CS573: Network Protocols and Standards Proxy ARP Advantage of Proxy ARP Router Can be added without disturbing the routing table in other hosts or routers on that network Disadvantages: Does not generalize to complex network topologies (does not scale) Does not support a reasonable form of routing. (relies on network managers to maintain tables of machines and addresses manually) Issues: Several IP addresses map to the same physical address. How to distinguish between a legitimate Proxy ARP router and spoofing? Oct 21, 2004 CS573: Network Protocols and Standards