TCP Ip
TCP Ip
TCP Ip
networking
IP : Internet Protocol
RTP, traceroute
What is an internet?
Layer 3 : Network IP
Layer 5 : Session
Layer 6 : Presentation
Layer 7 : Application
You dont need to know the layers just the idea that it is layered
Layer 2 : Network
Layer 3 : Transport
Layer 4 : Application
TCP/IP Hierarchy
Protocols
7th
Application Layer
6th
Presentation
Layer
5th
Session Layer
4th
Transport Layer
3rd
Network Layer
Application
Layer
Transport
Layer
Network Layer
2nd
Link Layer
1st
Physical Layer
Link Layer
card
Network Layer
Routing
Link Layer
Packet Encapsulation
22Bytes20Bytes20Bytes
64 to 1500 Bytes
4Bytes
IP
Unreliable
IP addresses
4 bytes
e.g. 163.1.125.98
But
Routing
Routing (cont)
Allocation of addresses
IP packets
Protocol number
Various options
IP Datagram
0
Vers
16
Len
TOS
24
31
Total Length
Identification
TTL
19
Flags
Protocol
Fragment Offset
Header Checksum
Padding
Data...
Field
Vers
Len
TOS
T. Length
Ident.
Flags
Frag Off
Purpose
IP version number
Length of IP header (4 octet units)
Type of Service
Length of entire datagram (octets)
IP datagram ID (for frag/reassembly)
Dont/More fragments
Fragment Offset
Field
TTL
Protocol
Purpose
Time To Live - Max # of hops
Higher level protocol (1=ICMP,
6=TCP, 17=UDP)
Checksum Checksum for the IP header
Source IA Originators Internet Address
Dest. IA
Final Destination Internet Address
Options
Source route, time stamp, etc.
Data...
Higher level protocol data
IP Routing
Source
Destination
Application
Application
Transport
Router
Transport
Network
Network
Network
Link
Link
Link
Routing Table
Destination IP address
IP address of a next-hop router
Flags
Network interface specification
UDP
Still unreliable:
UDP datagram
0
16
31
Source Port
Destination Port
Length
Checksum
Application data
Field
Source Port
Destination Port
Length
Checksum
Purpose
16-bit port number identifying originating application
16-bit port number identifying destination application
Length of UDP datagram (UDP header + data)
Checksum of IP pseudo header, UDP header, and data
VOIP
Most games
TCP
Applications of TCP
Most things!
HTTP, FTP,
TCP implementation
TCP Packets
TCP Segment
0
10
16
Source Port
19
24
31
Destination Port
Sequence Number
Acknowledgment Number
Len
Reserved
Flags
Window
Checksum
Urgent Pointer
Options...
Padding
Data...
Field
Source Port
Destination Port
Sequence Number
Acknowledgment #
Len
Flags
Window
Checksum
Urgent Pointer
Options
Purpose
Identifies originating application
Identifies destination application
Sequence number of first octet in the segment
Sequence number of the next expected octet (if ACK flag set)
Length of TCP header in 4 octet units
TCP flags: SYN, FIN, RST, PSH, ACK, URG
Number of octets from ACK that sender will accept
Checksum of IP pseudo-header + TCP header + data
Pointer to end of urgent data
Special TCP options such as MSS and Window Scale
You just need to know port numbers, seq and ack are added
Clien
t
Send Packet 1
Start Timer
ACK would normally
Arrive at this time
Host
Packet Lost
Time Expires
Timer
Retransmit Packet1
Start Timer
Receive ACK 1
Cancel Timer
Receive Packet 1
Send AXK 1
IPv6