Basic IP Protocol

Download Report

Transcript Basic IP Protocol

Basic IP Protocol
Natawut Nupairoj, Ph.D.
Department of Computer Engineering
Chulalongkorn University
Outline





Overview.
IP Address.
Subnetting.
IP Routing.
ICMP.
An Internet According to TCP/IP
TCP vs. OSI Model
Network Layer

IP:Internet Protocol




ICMP: Internet Control Message Protocol




Unreliable (best-effort)
Connectionless
IP datagram
Request/response/error messages
Ping, traceroute
Encapsulated in IP datagrams.
IGMP: Internet Group Management Protocol


Join/leave IP multicast groups.
Encapsulated in IP datagrams.
Transport Layer

TCP





UDP (datagram)



Reliable (timeout/retransmission mechanism)
Connection-oriented.
TCP segment
Telnet, rlogin, SMTP, HTTP, FTP
Unreliable but low-overhead
DNS, TFTP, BOOTP, SNMP
Connecting thru “port” (SAP).


16-bit numbers
well-known port number: HTTP(80), FTP(20), etc.
Port
IP Datagram
IP Address
IP Address Classes
Decimal Notation
IP Class Ranges
Network and Host Address
Example
Example: Subnet
Subnetting
Netmask
Basic IP Routing


Hop-by-hop using routing table.
Routing table entry:

Destination IP address:
host address - non-zero host ID
 network address - host ID = 0


Gateway IP address:
next-hop router.
 directly connected.

Basic IP Routing

Flags
destination IP: host or network address
 gateway IP: router or direct connect


Network interface should be used for
transmission.
IP Routing Mechanism

Search routing table for an entry:



Matches the complete IP address (both network and host
IDs).
Matches the destination network ID.
Default route.

If found, send to the gateway IP address (either
next-hop or directly connected interface).

Otherwise, the datagram is undeliverable (router
issues an ICMP error message).
Internet Control Protocols

To provide support for IP.




ARP
RARP
ICMP
All data for these protocols are encapsulated
in IP datagrams.
ICP: ARP

ARP: Address Resolution Protocol

To send a packet to the destination, a host must
know the destination physical network address.

The sender/router must convert from IP address to
physical network address (ie. Ethernet address).
When a host wants to find a physical address:


It broadcasts an ARP request containning an IP address.

The owner (or designated responder) replies with its own
network address.
ARP response can be cached.

Address Resolution Protocol
ICP: RARP



Reverse Address Resolution Protocol.
The reverse of ARP.
For diskless workstation.


X Terminal
Other related protocols:


bootp
tftp
ICP: ICMP

Internet Control Message Protocol

Communicate error messages and other conditions
for IP and higher layers.
Message Types:


Status checking: ping.

Error messages: destination unreachable, network
unreachable, etc.
Flow control: source quench.
Routing control: redirect, etc.
Information retrieval: timestamp request, etc.



Important ICMP Messages

Echo:


Destination, network, port unreachable messages:


Used by the traceroute program.
Time Exceeded:



for ping program.
TTL = 0 during transit or reassembly.
Also used by the traceroute program.
Source quench:


flow control.
the receiver informs the sender that it is running out of
buffer and starts dropping datagrams.