Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In OSI reference model terminology -the TCP/IP protocol suite covers the network and transport layers. TCP/IP can be used on many data-link layers (can support many network hardware implementations).
Introduction to TCP/IP
Host Host
Internet TCP/IP
Router Router
DOD
Transport
3
Internet
2
Data Link
Physical
Data Link
1
Physical
Application
20 Bytes
Port Numbers
F T P T E L N E T
23 TCP
Application Layer
S M T P
D N S
T F T P
S N M P
R I P
21
25
53
69
UDP
161
520
Transport Layer
Port Numbers
Telnet Z
Host A Host Z
SP 1028
DP 23
Send SYN (seq=100 ctl=SYN) SYN received SYN received Send SYN, ACK 2 (seq=300 ack=101 ctl=syn,ack)
Send SYN (seq=100 ctl=SYN) SYN received SYN received Send SYN, ACK 2 (seq=300 ack=101 ctl=syn,ack)
Window size = 1
Receiver Receive 1
Window size = 1
Receiver Receive 1
Send ACK 2
Window size = 1
Receiver Receive 1
Send ACK 2
Send 2
Receive 2
Window size = 1
Receiver Receive 1
Send ACK 2
Send 2
Receive ACK 3
Window size = 1
Receiver Receive 1
Send ACK 2
Send 2
Receive ACK 3 Send 3
Window size = 1
Receiver Receive 1
Send ACK 2
Send 2
Receive ACK 3 Send 3
Receive ACK 4
Window size = 1
TCP Windowing
Sender Receiver
TCP Windowing
Sender
Window size = 3 Send 1 Window size = 3 Send 2 Window size = 3 Send 3
Receiver
TCP Windowing
Sender
Window size = 3 Send 1 Window size = 3 Send 2 Window size = 3 Send 3
Receiver
Packet 3 is Dropped
TCP Windowing
Sender
Window size = 3 Send 1 Window size = 3 Send 2 Window size = 3 Send 3
Receiver
Packet 3 is Dropped
TCP Windowing
Sender
Window size = 3 Send 1 Window size = 3 Send 2 Window size = 3 Send 3 Window size = 3
Receiver
UDP
Datagram Delivery Connectionless Unreliable Minimal
Transport
Internet Data Link Physical
Internet Control Message Protocol (ICMP) Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP)
IP Datagram
Bit 0 1
Version (4) Header Length (4)
Bit 15 Bit 16
Identification (16)
Time to live (8) Protocol (8)
Source IP Address (32) Destination IP Address (32) Options (0 or 32 if any) Data (varies if any)
Protocol Field
Transport Layer
TCP 6
Internet Layer
1
ICMP Internet
Reverse ARP
What is my IP address?
Reverse ARP
What is my IP address? I heard that broadcast. Your IP address is 172.16.3.25.
Reverse ARP
What is my IP address? I heard that broadcast. Your IP address is 172.16.3.25.
Reverse ARP
What is my IP address? I heard that broadcast. Your IP address is 172.16.3.25.
Map MAC
IP
172.18.0.2
10.13.0.0 10.13.0.1
172.16.0.2
192.168.1.0 192.168.1.1
172.17.0.1
172.17.0.2
Unique addressing allows communication between end stations Path choice is based on destination address Location is represented by an address
IP Datagrams
IP provides connectionless, unreliable delivery of IP datagram. Connectionless: each datagram is independent of all others. Unreliable: there is no guarantee that datagrams are delivered correctly or at all.
IP Addresses
IP addresses are not the same as the underlying data-link (MAC) addresses.
IP Addresses
IP is a network layer - it must be capable of providing communication between hosts on different kinds of networks (different data-link implementations). The address must include information about what network the receiving host is on. This makes routing feasible.
IP Addresses
IP addresses are logical addresses (not physical) 32 bits. Includes a network ID and a host ID. Every host must have a unique IP address. IP addresses are assigned by a central authority (the NIC/IANA).
Format of IP address
bbbbbbbb
bbbbbbbb
bbbbbbbb
bbbbbbbb
110
1110
8 bits
HostID
Multicast Address
8 bits 8 bits 8 bits
Class A
128 possible network IDs over 4 million host IDs per network ID
Class B
Class C
over 2 million possible network IDs about 256 host IDs per network ID
IP Addresses
IP Addresses are usually shown in dotted decimal notation: 1.2.3.4 00000001 00000010 00000011 00000100 128.213.1.1
10000000 11010101 00000001 00000001
Subnet Addresses
An organization can subdivide its host address space into groups called subnets. The subnet ID is generally used to group hosts based on the physical network topology.
10 NetID SubnetID HostID
Subnetting
router
Subnet 1 128.213.1.x
Subnet 2 128.213.2.x
Subnet 3 128.213.3.x
Subnetting
Subnets can simplify routing. IP subnet broadcasts have a hostID of all 1s. It is possible to have a single wire network with multiple subnets.
ARP
The Address Resolution Protocol is used by a sending host when it knows the IP address of the destination but needs the Ethernet address. ARP is a broadcast protocol - every host on the network receives the request. Each host checks the request against its IP address - the right one responds.
ARP
ARP does not need to be done every time an IP datagram is sent - hosts remember the hardware addresses of each other. Part of the ARP protocol specifies that the receiving host should also remember the IP and hardware addresses of the sending host.
ARP
HEY - Everyone please listen! Will 128.213.1.5 please send me his/her Ethernet address
RARP
HEY - Everyone please listen! My Ethernet address is22:BC:66:17:01:75. Does anyone know my IP address ?
not me
Services provided by IP
Connectionless Delivery (each datagram is treated individually). Unreliable (delivery is not guaranteed). Fragmentation / Reassembly (based on hardware MTU). Routing. Error detection.
IP Datagram
1 byte 1 byte 1 byte 1 byte
VERS
HL Service Fragment Length Datagram ID FLAG Fragment Offset TTL Protocol Header Checksum Source Address Destination Address Options (if any)
Data
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 hopby-hop basis). If any of the fragments are lost - the entire datagram is discarded (and an ICMP message is sent to the sender).
IP Datagram Fragmentation
If packets arrive too fast - the receiver discards excessive packets and sends an ICMP message to the sender (SOURCE QUENCH). If an error is found (header checksum problem) the packet is discarded and an ICMP message is sent to the sender.
ICMP
Internet Control Message Protocol
ICMP is a protocol used for exchanging control messages. ICMP uses IP to deliver messages. ICMP messages are usually generated and processed by the IP software, not the user process.
Process
Process
Process Layer
TCP
ICMP, ARP & RARP
UDP
Transport Layer
IP
Network Layer
Hardware
Data-Link Layer
Network Services
Support Any LAN & WAN architecture Ethernet, Token Ring, ATM, Frame-Relay, X.25 etc
TCP/IP Summary
IP: network layer protocol
unreliable datagram delivery between hosts.