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

Similar documents
TCP/IP and the OSI Model

IP: Addressing, ARP, Routing

Internet Protocol (IP)

End-to-End Communication

Vorlesung Kommunikationsnetze

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

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

Network layer: Overview. Network Layer Functions

ROUTING INTRODUCTION TO IP, IP ROUTING PROTOCOLS AND PROXY ARP

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

McGraw-Hill The McGraw-Hill Companies, Inc., 2000

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

IPv4. Christian Grothoff.

TCP /IP Fundamentals Mr. Cantu

The Interconnection Structure of. The Internet. EECC694 - Shaaban

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

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

Network Layer/IP Protocols

ECE 461 Internetworking Fall Quiz 1

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

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

IP - The Internet Protocol

Internet Protocol Addressing and Routing. Redes TCP/IP

The Internet Protocol (IP)

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

CIS-331 Final Exam Fall 2015 Total of 120 Points. Version 1

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

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

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

Agenda L2 versus L3 Switching IP Protocol, IP Addressing IP Forwarding ARP and ICMP IP Routing First Hop Redundancy

ECE 4450:427/527 - Computer Networks Spring 2017

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

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

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

TSIN02 - Internetworking

IP Address Assignment

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

IP : Internet Protocol

Chapter Motivation For Internetworking

Router Architecture Overview

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

CS 458 Internet Engineering Spring First Exam

IP Addressing and Subnetting

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

Lecture 2: Basic routing, ARP, and basic IP

Network Layer PREPARED BY AHMED ABDEL-RAOUF

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

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

TSIN02 - Internetworking

CIS-331 Final Exam Spring 2016 Total of 120 Points. Version 1

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

Packet Header Formats

This talk will cover the basics of IP addressing and subnetting. Topics covered will include:

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

Internet Protocols (chapter 18)

I. More ARP Week 7. after resolving a hardware address, why not store it?

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

Chapter 4: Network Layer

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

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

EE 610 Part 2: Encapsulation and network utilities

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

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

IP Addresses McGraw-Hill The McGraw-Hill Companies, Inc., 2000

Communication Systems DHCP

CS118 Discussion 1A, Week 6. Zengwen Yuan Dodd Hall 78, Friday 10:00 10:50 a.m.

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

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

Data Communication & Computer Networks Week # 13

Veryx ATTEST TM. Sample Test cases Overview. Conformance Test Suite. Internet Protocol version 4 (IPv4) Part Number: T / TCLS IPv /1.

Lecture 11: Fragmentation & Addressing. CSE 123: Computer Networks Stefan Savage

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

ECE 461 Internetworking Fall Quiz 1

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

Networking Fundamentals

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

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

Chapter 4 Network Layer

TCP/IP Protocol Suite

Introduction to Internetworking

Internet Addresses (You should read Chapter 4 in Forouzan)

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

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

Lecture 10: Addressing

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

Lecture 11: Networks & Networking

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

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

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

The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or

Internet. Organization Addresses TCP/IP Protocol stack Forwarding. 1. Use of a globally unique address space based on Internet Addresses

SEN366 (SEN374) (Introduction to) Computer Networks

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Chapter 18 and 22. IPv4 Address. Data Communications and Networking

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

CSC 401 Data and Computer Communications Networks

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

CIS-331 Final Exam Spring 2018 Total of 120 Points. Version 1

Internet Networking recitation #2 IP Checksum, Fragmentation

Transcription:

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

IP Addresses IP Addresses are 32 bit. Written in dotted decimal format: X.X.X.X Example: A Clemson address : 130.127.48.4 An address encodes the identification of the network as well as the host (network id, host id) What is a host? How does an address relate to a host? Three types of addresses?

IP Addresses IP Addresses are 32 bit. Written in dotted decimal format: X.X.X.X Example: A Clemson address : 130.127.48.4 An address encodes the identification of the network as well as the host (network id, host id) What is a host? A computer that can communicate with another computer over a TCP/IP network. How does an address relate to a host? Not one to-one!! Multihomed hosts have more than one interface AND more than one IP address So slightly better answer is one IP address per interface although. NAT totally changes this - Network Address Port Translation allows any number of Hosts to share the same IP address Three types of addresses? Unicast Broadcast Multicast

Original Classful Addressing Scheme Network Prefix (Network ID) (Network Number) Original address scheme was classful: Class A for large networks (>64K hosts) Class B for medium networks (>256 hosts) Class C for small networks (<256 hosts) Class D for multicast Class E reserved

Original Classful Addressing Scheme What s the total address space? Example: Clemson address: 130.127.49.225 Class? Network ID? Host ID? Example: 192.168.1.100

Broadcast Addresses: Two Types A network directed broadcast contains a valid network id with an all 1 s host id class C example: 192.168.1.255 From a host on a different network (192.168.2.2), conceptually, if we issue ping -c 192.168.1.255, ping should receive an echo response from all hosts on the 192.168.2 network. There s not a router in the world that will allow this!!!! A local or limited broadcast does not require knowledge of the network address. Referred to as the all 1 s broadcast: 255.255.255.255 A limited broadcast useful for certain startup protocols:

Special Addresses Conventions. The this rule and the all rule: A netid or a host id of 0 implies this A netid or a host id of 1 implies all Class C example: 192.168.1.0 The this rule: This host on the network Class C example: 192.168.1.255 The 1 s rule: All hosts on the network

Addresses with Special Meaning All 0 s and all 1 s: has slightly different meanings for the entire address, just the network id or just the host id Loop Back : 127.x.x.x (e.g., 127.0.0.1) What address class? Conceptually, all 2exp24 addresses in this class A network are equivalent. In reality, the Host OS probably will only accept a few. Try Ping 127.0.0.1 Ping 127.22.22.22 Ping localhost //A defacto standard host name that gets resolved to 127.0.0.1 Private address space: RFC 1918 defines certain address ranges for private use. 10.0.0.0-10.255.255.255 (Class A space) 172.16.0.0-172.31.255.255(Class B space) 192.168.0.0-192.168.255.255 (Class C space)

Special Addresses So, how many valid host ids are available with the following address: 192.1.1.0/24 What happens if you ping 0.0.0.0?

Classful Address Ranges Class Lowest Address Highest Address A 1.0.0.0 126.0.0.0 B 128.1.0.0 191.255.0.0 C 192.0.1.0 223.255.255.0 D 224.0.0.0 239.255.255.255 E 240.0.0.0 247.255.255.255 Dotted Decimal Class Address Ranges

Classful Addresses Addresses do not specify computers, but rather connections to particular hosts. Multihomed: A host that has >1 physical connection.

Classful Addresses Basic mechanism: A two level class hierarchy. requires a unique network prefix for each physical interface. Two additional schemes designed to conserve net addresses: subnet and classless addressing (CIDR). Other issues: Mobility Flexibility Naming And of course the IP Address shortage problem...

Subnetworks Subnet addressing: Allows an organization to create multiple logical networks internally while preserving the presence of a single autonomous network to the outside. An autonomous network: A collection of routers and networks that fall under one administrative entity.

Subnetworks Example : 130.127.49.225 mask 255.255.255.0 10000010 01111111 00110001 11100001 Network ID Network Number Network Prefix Host ID Extended Network Prefix Subnetwork Address Classfull network address: 130.127.0.0 Classfull network prefix notation: 130.127/16 Subnetwork address: 130.127.49.0 Network Prefix Notation: 130.127.49/24 Subnet Number SubnetID

Address Resolution Protocol The Address Resolution Problem: In order for two hosts on the same network to communicate, they need to know each others MAC address. IP Header IP Data Dest Address (6) Source Address (6) Length (2) DSAP SSAP cntl code type (1) (1) (1) (3) (2) Data ( 38-1492) CRC (4)

Address Resolution Protocol One approach is through direct binding: Phys = f(ip) Objective is to encode the IP address in Physical Dynamic binding protocol is required for Ethernet networks where: Physical address larger than IP address (48 vs 32 bits) Physical address can change Potentially many hosts on the network Address resolution protocol (ARP) is a table lookup approach Defined by RFC 826

ARP: Host A Sends to Host B 192.168.1.3 Host B 192.168.1/24 Router A Internet Host A 192.168.1.2 192.168.1.1

ARP: Host A Sends to Host B 192.168.1.4 Host C Host B 192.168.1.3 192.168.1/24 Router A Internet Host A 192.168.1.2 Host A s arp cache: IP ADDR MAC ADDR ----------------------------- 192.168.1.4 xxxxxx 192.168.1.1 Host A looks in its ARP table to see if the binding exists If not, Host A issues a limited broadcast (all 1 s) sending an ARP whois message. All Hosts on the network receive the broadcast. Remember that on a LAN, the frames that are received must have a matching destination MAC address or the dest.address must be the Ethernet broadcast address. Host C ignores the broadcast, Host B receives the message and passes it to its ARP program Host B replies with a response that says map my IP address to this MAC addr Try an arp a on a windows machine!!

The Internet Protocol (IP) (a) An example internet with three routers connecting four physical networks, and (b) the conceptual routing table found in router R2. Each entry in the table lists a destination network and the next hop along a route to that network. The IP standard (RFC 791) defines: The basic unit of transfer (the datagram) Routing/data forwarding Rules for how hosts/routers should deal with packets and errors

Routing/Forwarding Routing means process of selecting a path over which to send packets. Router is the computer which makes such a selection. The Internet is composed of multiple physical networks inter-connected by computers called routers. Direct Delivery - transmission of a datagram from one machine across a physical network directly to another. Indirect Delivery - when the destination is not on a directly attached network; sender passes the datagram to a router for delivery.

Indirect Delivery: Host A sends to Host C The forwarding problem when two Hosts on DIFFERENT networks want to communicate: The sending Host must learn the MAC address of the correct Router. Host B 192.168.1.3 Router (66.26.245.1) Internet Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 66.26.245.241 192.168.2.1 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Example: Host A issues a ping to Host C. Assume the ARP cache in all nodes is empty Router (66.26.245.1) Internet 192.168.1.3 Host B Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 66.26.245.241 192.168.2.1 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Example: Host A issues a ping to Host C. Assume the ARP cache in all nodes is empty Step 1: ARP whois from Host A to Router A Host B 192.168.1.3 Router (66.26.245.1) Internet Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 66.26.245.241 192.168.2.1 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Example: Host A issues a ping to Host C. Assume the ARP cache in all nodes is empty Step 1: ARP whois from Host A to Router A Host B 192.168.1.3 Step 2: ARP I am from Router A to Host A Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 Router (66.26.245.1) 66.26.245.241 192.168.2.1 Internet 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Step 3: Host A forwards IP packet to Router A Router (66.26.245.1) Internet 192.168.1.3 Host B Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 66.26.245.241 192.168.2.1 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Step 3: Host A forwards IP packet to Router A Step 4: Router A issues a who is for Host C Router (66.26.245.1) Internet 192.168.1.3 Host B Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 66.26.245.241 192.168.2.1 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Step 3: Host A forwards IP packet to Router A Step 4: Router A issues a who is for Host C Step 5: Host C issues a I am ARP message to Router A Host B 192.168.1.3 Router (66.26.245.1) Internet Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 66.26.245.241 192.168.2.1 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

Indirect Delivery: Host A sends to Host C Step 3: Host A forwards IP packet to Router A Step 4: Router A issues a who is for Host C Step 5: Host C issues a I am ARP message to Router A Host B 192.168.1.3 Step 6: Router A forwards the packet to Host C Host A 192.168.1.2 192.168.1/24 Router A 192.168.1.1 Router (66.26.245.1) 66.26.245.241 192.168.2.1 Internet 192.168.2.2 192.168.2/24 Destination Network Router 192.168.1.0/24 192.168.1.1 (direct) 192.168.2.0/24 192.168.2.1 (direct) 66.26.245.1 66.26.245.241 (direct) default 66.26.245.1 (indirect) Host C Try a netstat -r on a windows machine!!

IP Datagram Format: UDP example IP Header 20 60 bytes First bit Last bit MAC Header IP Header UDP Header UDP Application Data This is what gets sent on the wire : a frame which contains an IP Packet

IP Datagram Format: UDP example Here is a 1500 byte UDP packet in hex: 4500 05dc version 4, length 20bytes, TOS:0, total length:1500bytes 1234 4000 id:1234 Flags(3 bits):010 in binary (DF set), offset : 0 ff11 aaaa TTL:255, protocol: 0x11(UDP), checksum: 0xaaaa c0a8 0164 src:192.168.1.100 ca01 0101 dst: 202.1.1.1 5555 6666 src port: 0x5555, dst port 0x6666 05c8 bbbb UDPlength:1480, UDP checksum:0xbbbb 1472 bytes of application data

IP Fragmentation: Ping example Router (66.26.245.1) Internet 192.168.1.3 Host B 192.168.1/24 MT 1500 Router A 66.26.245.241 192.168.2.1 192.168.1.1 192.168.2.2 192.168.2/24 MTU 1500 Host C 192.168.1.2 Host A Ping l 3000 192.168.2.2

IP Fragmentation control {unused, don t frag, more frags} offset Identification field: uniquely ids a datagram Flags: DF (don t frag) and MF (more frag) Fragment offset: specifies the offset in the original datagram of the data being carried in the fragment specified in units of 8 octets. The data portion of a fragment must be a multiple of 8 (except for the last fragment).

IP Fragmentation: Ping example Packet 4 5 0 3028 1234 0 0 255 11 xxxx Datagram 192.168.1.2 192.168.2.2 ICMP header 8 bytes ICMP Data 3000 bytes 4 5 0 1500 4 5 0 1500 4 5 0 68 1234 MF 0 1234 MF 185*8 1234 0 370*8 255 11 aaaa 192.168.1.2 192.168.2.2 ICMP header 8 bytes ICMP Data 1472 bytes 255 11 bbbb 255 11 cccc 192.168.1.2 192.168.2.2 ICMP Data 1480 bytes 192.168.1.2 192.168.2.2 ICMP Data 48 bytes