Basic IP Protocol
Outline
Overview.
IP Address.
Subnetting.
IP Routing.
ICMP.
An Internet According to TCP/IP
TCP vs. OSI Model
Network Layer
IP:Internet Protocol
Unreliable (best-effort)
Connectionless
IP datagram
ICMP: Internet Control Message Protocol
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
Reliable (timeout/retransmission mechanism)
Connection-oriented.
TCP segment
Telnet, rlogin, SMTP, HTTP, FTP
UDP (datagram)
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 transmissio
n.
IP Routing Mechanism
Search routing table for an entry:
Matches the complete IP address (both network and host I
Ds).
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 iss
ues 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 kno
w the destination physical network address.
The sender/router must convert from IP address to p
hysical 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 n
etwork 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 f
or IP and higher layers.
Message Types:
Status checking: ping.
Error messages: destination unreachable, network unreac
hable, etc.
Flow control: source quench.
Routing control: redirect, etc.
Information retrieval: timestamp request, etc.
Important ICMP Messages
Echo:
for ping program.
Destination, network, port unreachable messages:
Used by the traceroute program.
Time Exceeded:
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.