What is IP?
1) high level: networks, applications and services
2) Internet Protocol, a network layer protocol enabling the routing of data across a packet network using specific address schemes
TCP/IP
1) Internet Protocol Suite, a set of communication protocols for the Internet and similar networks
2) IP is part of the TCP/IP Model and is the glue that makes all the other protocols work
TCP – Transmission Control Protocol
OSI Model
L1 physical – defines how the physical bits are sent
Ethernet, USB, bluetooth
L2 Data link – a set of rules that determine when a device can send data over a particular medium
Ethernet, frame relay, PPP
- frame relay(both header and Trailer)
- ethernet on both L1/L2
L3 Network – defines network addressing
1) logical addressing
2) routing
3) path determination
IPv4/v6, IPX
L4 Transport -accepts the data from a session and formats the data into segments for transport across the network
TCP, UDP, SCTP
L5 Session – establishes, manages and terminates communication sessions.
NetBIOS, SAP
L6 Presentation – translates data formats
MIME, TLS, SSL
L7 Application – interfaces directly with the application programs running on the devices, user Authentication
FTP
HTTP
Telnet
TCP/IP Layer Communciation
Internet Layer, IP Protocol Number field – which protocol on the Transport Layer used
Transport Layer, TCP and UDP Port Number field to identify which application on the Application Layer used
OSI vs TCP/IP
TCP/IP Transport Layer – encapsulating application data blocks into datagrams suitable for transfer
1) UDP – User Datagram Protocol
weak: occasionally be dropped and subsequently not re-sent, arrive at destination in the wrong order, and also arrive without the integrity of the data intact
benefit: very fast due to no handshaking, ideal for real-time data transmission
VoIP, online multilayer gaming
DNS – simple request/reply
DHCP – assign IP address
2) TCP – Transmission Control Protocol, reliable, ordered delivery of data packets from one application on one system to another application on another system. TCP detects errors, initiates retransmissions, and controls the flow of information.
WWW, email, ftp
DNS – larger messages, especially zone transfers
BGP – table of IP networks
UDP header
Source Port,Destination Port, Length, and UDP Checksum.
TCP header
32 bits(4bytes) width
Port Number
Port 20, 21 for FTP
Port 22 for SSH/SFTP
Port 23 for Telnet
Port 53 for DNS
Port 80 for HTTP
Port 143 for IMAP
Port 161 for SNMP
IPv4 Header
32 bits width
Version : 0100 v4
Header Length, min 20 bytes, up to 60 bytes
Type of Service, 2 parts:
Precedence – packet priority
TOS – selection of a delivery service
Total Length, max 65535 bytes
Identifier, Flags and Fragment Offset fields for fragmentation of a packet: frag into smaller packets when exceed MTU
Time to Live: decrement by 1 pass through one hop, packet dropped when reach 0
Protocol: transport protocol, TCP/UDP
Source Address
Destination Address
Options
Padding
IPv4 address
32 bits long, network + host
Class A 128 16,777,214
Class B 16,384 65,534
Class C 2,097,152 254
First Octet Rule
A 0 1-126
B 10 128-191
C 110 192-223
D n E
D 224.0.0.0 – 239.255.255.255 multicast
E 240.0.0.0 – 254.255.255.254 (reserved)
Subnetting
Saves IP address space
Reduces network traffic
Optimizes network performance
Simplified management
Subnet mask
the network address plus the bits reserved for identifying the subnetwork
CIDR Classless Inter Domain Routing
to aggregate multiple IP addresses of the same class
1) slow the growth of routers across the Internet
2) help slow down the exhaustion of IPv4 addresses
Private IP Address Space
not routed to public network
- 10.0.0.0 – 10.255.255.255 1 “Class A” network
- 172.16.0.0 – 172.31.255.255 16 “Class B” networks
- 192.168.0.0 – 192.168.255.255 256 “Class C” networks
Special Use IP Address Space
0.0.0.0/8 "This" Network
14.0.0.0/8 Public-Data Networks
24.0.0.0/8 Cable Television Networks
39.0.0.0/8 Reserved but subject to allocation
127.0.0.0/8 Loopback
128.0.0.0/16 Reserved but subject to allocation
169.254.0.0/16 Link Local
192.0.0.0/24 Reserved but subject to allocation
192.0.2.0/24 Test-Net
192.88.99.0/24 6to4 Relay Anycast
223.255.255.0/24 Reserved but subject to allocation
Reserved IP
.0 and .255
Run out of IP address
Class A: 256 networks
Class B: 65 535 networks
Class C: 16 777 216 networks
Address IP issue
- Private IP addresses, NAT
- CIDR (IP subnets)
- IPv6