Title: Internet Protocol
1Internet Protocol
2Layered Network
- Why layered network architectures?
- To help manage complexity
- To facilitate the building block approach to
implementation management
- How many layers are enough?
- Depends on who's counting.
- ISO/OSI model said 7 (or so)
- Internet model says 5 (or so)
- There is no correct answer.
International Organization for Standardization
(ISO) Open System Interconnect (OSI)
3OSI Model
- Application
- Presentation
- Session
- Transport
- Network
- Data link
- Physical
4Internet Model
- Application
- Transport
- Network
- Link
- Physical
5Simplified OSI and TCP/IP Models
6Five Layer Software Schematic
7Protocol Encapsulation
8The Internet Network layer
- Three major components IP protocol, Routing
protocols, ICMP protocol
9IP Addressing
- Internet addresses specify a host's connection(s)
to a network. - A host may have more than one IP address - to the
same or to multiple networks. - Internet addresses are 32 bits long and have four
different forms classes A, B, C and D. - Addresses include both a network ID and a host
address. - IP addresses are written with dotted decimal
notation (for example, 140.114.63.1) - Internet routing is based on network ID.
- Internet addresses must be mapped to physical
network addresses (for example, by the Address
Resolution Protocol on LANs).
10IP Address, Structure
- Two levels network ID and host ID
- Network Classes
- Class A 7-bit net ID, 24-bit host ID
- Class B 14-bit net ID, 16-bit host ID
- Class C 21 bit net ID, 8-bit host ID
- Class D 28-bit group ID for multicast services
- Class E reserved
11IP Addresses - Class A
- Start with binary 0
- All 0 reserved
- 01111111 (127) reserved for loopback
- Range 1.x.x.x to 126.x.x.x
- 27 -2 126 class A network addresses
12IP Addresses - Class B
- Start with binary 10
- Range 128.x.x.x to 191.x.x.x
- Second Octet also included in network address
- 214 16,384 class B network addresses
13IP Addresses - Class C
- Start with binary 110
- Range 192.x.x.x to 223.x.x.x
- Second and third octet also part of network
address - 221 2,097,152 network addresses
14IP Addresses - Class D and E
- Class D 28-bit group ID for multicast services
- Class E reserved
15Special IP Addresses
- 0.0.0.0 this host on this net
- 0.0.0.hostid specified host on this net
- 127.0.0.1 loopback address
- 255.255.255.255 limited broadcast, this subnet
- ...255 net directed broadcast
- The value 0 typically means this host or this
net.
16Subnet Addressing
- Original IP address space not optimized for large
numbers of small networks - Subnetting allows a single network to be split
into multiple networks for internal use but
appear as a single network to the outside world - Subnets require subnet masks to separate
networks from hosts
17Subnet mask
- Indication of (net ID subnet ID) with binary
1s - The portion of host ID contains all 0s
- Example - 11111111 11111111 11111111 00000000
(255.255.255.0) - Notation of IP address (IP address/subnet mask)
- 140.114.79.132/255.255.255.0
18Operations of subnet mask
- Network_address (net ID subnet ID)
(IP_address AND MASK) - For example
- 140.114.79.132 AND 255.255.255.0
140.114.79.0 - Host_ID IP_address AND (NOT MASK)
- For example
- 140.114.79.132 AND (NOT 255.255.255.0)
0.0.0.132
19CIDR -- Classless InterDomain Routing
- CIDR was invented to keep the internet from
running out of IP addresses - documented in RFC1519 (1993)
- CIDR uses variable length subnet masks (VLSM) to
allocate IP addresses to subnets according to
individual need - subnet portion of address of arbitrary length
- address format a.b.c.d/x, where x is bits in
subnet portion of address (Example,
140.114.79.132/24)
20IP addresses how to get one?
Q How does network get network part of IP
address? A gets allocated portion of its
provider ISPs address space
ISP's block 11001000 00010111 00010000
00000000 200.23.16.0/20 Organization 0
11001000 00010111 00010000 00000000
200.23.16.0/23 Organization 1 11001000
00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100
00000000 200.23.20.0/23 ...
..
. . Organization 7
11001000 00010111 00011110 00000000
200.23.30.0/23
21IP addresses how to get one? (Cont.)
- Q How does an ISP get block of addresses?
- A ICANN Internet Corporation for Assigned
- Names and Numbers
- allocates addresses
- manages DNS
- assigns domain names, resolves domain name
disputes
22IP addresses how to get one? (Cont.)
- Q How does host get IP address?
- Manual configuration
- hard-coded by system administrator in a file
- Win control-panel-gtnetwork-gtconfiguration-gttcp/ip
-gtproperties - UNIX /etc/rc.config
- DHCP Dynamic Host Configuration Protocol
dynamically get address from a server - plug-and-play
23The format of the IP header
24Version Number
- The version number of IP V4 (Version 4)
25Internet Header Length (IHL)
- IHL is the header length in 32-bit words (4
bytes) - Minimum header length is 5 (i.e., 5 ? 32 bits)
- All the IP header fields except options and
padding are mandatory - IHL is NOT packet size (only header)
26Type of Service
- Specify
- (1) Desired reliability
- (2) Desired priority
- (3) Desired end-to-end delay
- (4) Desired throughput
- Usually set to 0 (not used)
27Total Length (16 bits)
- Total packet length in bytes
- The packet length, including IP header and user
data field
28IP Fragmentation Reassembly
- network links have MTU (max.transfer size) -
largest possible link-level frame. - The links on a route can use different link
types, different link-layer protocols, and
different MTUs - large IP datagram are divided (fragmented)
within network - one packet becomes several packets
- reassembled only at final destination
- IP header bits used to identify, order related
fragments
fragmentation in one large packet out 3
smaller packets
reassembly
29Identification (16bits)
- This field is needed in case fragmentation is
needed. - Created by sender, all smaller packets have the
same identification number as the original packet
30Flags (3 bits)
31Fragment Offset (13 bits)
- Offset of the 1st byte of the fragment from the
beginning of the original data - Specified in units of 8-byte chunks
32Example of Flag bits and Fragmentation Offset
field
- 4000 bytes packet, MTU 1500 bytes, IHL5 (20
bytes of header)
33Time-To-Live (TTL) (8 bits)
- Number of hops /links that the packet may be
routed - The hop counter will be decreased by one at every
intermediate router - If TTL 0, a router drops the IP packet
34Time-To-Live (TTL) (continued)
- traceroute utility
- Source sends series of UDP segments to
destination - First has TTL 1
- Second has TTL2, etc.
- Unlikely port number
35High Level Protocol (8 bits)
- To which higher protocol
- should IP deliver this packet
- Examples 1 ICMP 2 IGMP
- 6 TCP 17 UDP
36Header Checksum (16 bits)
- CRC Check Sum code only for the IP header
37Source/Destination IP addresses (32 bits each)
- To identify who is the sender and the destination