Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
-- Preetam Narayan
IP ADDRESS NOTATION
Binary Notation
01000000 00001011 00000011 00011111
IP Address Notation
Hexadecimal Notation
0x800B021F
PROBLEM 1
LEARNING
PROBLEM 1
LEARNING
CLASSFUL ADDRESSING
ADDRESS SPACE
In classful addressing, the address space is divided into five classes: A, B, C, D, and E.
Decimal Notation
Binary Notation
PROBLEM 1
Find the class of the below address 00000001 00001011 00001011 11101111
LEARNING
PROBLEM 1
Find the class of the below address 11000001 10000011 00011011 11111111
LEARNING
Generalization
PROBLEM 1
LEARNING
Check for the range of the 1st byte; 224 <= 233 < 240; class D
Generalization
Yes
Yes Yes
No CLASS A
No CLASS B
No
CLASS C
Yes
No CLASS E
2012 Sasken Communication Technologies
CLASS D
Class E addresses are reserved for special purposes; most of the block is wasted.
COMMUNICATION MODE
Unicasting communication is one-to-one; Multicasting communication is one-to-many; Broadcasting communication is one to all;
PRIVATE ADDRESSING
A number of Blocks in each class which are assigned for private use only. These addresses cannot be used to connect to the Internet
IP CLASS
CLASS A CLASS B CLASS B
PRIVATE ADDRESS
10.0.0.0 10.255.255.255 169.254.0.0 169.254.255.255 172.16.0.0 172.31.255.255
CLASS C
192.168.0.0 192.168.255.255
NETWORK ADDRESS
Network Address is the first Address (of the block) that is being assigned to an Organization. Network Address identifies a network in the Internet. Given a Network Address, we can find its Network class, range of permissible addresses for that network
2012 Sasken Communication Technologies
NETWORK ADDRESS
PROBLEM 4
Find the network address 17.0.0.0, find its class and its address range
SOLUTION
NETWORK MASK
Network Mask is a 32-bit number which gives the network Address when bitwise ANDed with an IP Address
NETWORK MASK
Default Network Mask of a network is formed by setting the netid bits to 1 and hostid bits to 0
Default Network Mask of a class shouldnt be applied to an address belonging to another class
PROBLEM 5
Given the address 201.180.165.5 find its default network mask and network address
SOLUTION
Address belong to CLASS C; Default network Mask 255.255.255.0; Network Address 201.180.165.0
SPECIAL ADDRESSES
DIRECTED BROADCAST ADDRESS
SPECIAL ADDRESSES
LIMITED BROADCAST ADDRESS
SPECIAL ADDRESSES
THIS HOST Me
SPECIAL ADDRESSES
SPECIFIC HOST ON THE NETWORK
SPECIAL ADDRESSES
LOOPBACK ADDRESS
Subnetting: Process of dividing a Network into various kutti-kutti networks called subnets
Subnetting creates 3 level hierarchy: Network id, Sub-network id and Host id
2012 Sasken Communication Technologies
Subnet-mask: formed by setting network id and sub-network id bits to 1 and host id bits to 0
Given the destination address is 19.30.80.5 and mask is 255.255.192.0 Determine the sub-network address
SUBNETTING STEPS
STEP1: if the network mask byte is 255 then copy the byte to the address STEP2: if the network mask byte is 0 then replace byte in the address with 0 STEP3: if the byte in the mask is neither 0 nor 255 then perform the AND by representing it in binary notation
2012 Sasken Communication Technologies
STEPS TO SUBNETTING
Given the destination address is 202.45.34.56 and mask is 255.255.240.0 Determine the sub-network address
SOLUTION
200.45.32.0
A company is granted the site address 201.70.64.0 (Class C). The company needs 6 subnets. Design the subnets
APPROACH
STEP1: Identify the number of subnets needed STEP2: Identify the number of host bits to be borrowed STEP3: ignore the subnet bits with all 0s and all 1s STEP4: Find the subnet address space. Subnet address space = 2 (number of host id bits)
SUBNETTING A SUBNET
Given the destination address is 202.45.34.56 and mask is 255.255.240.0 Determine the number of subnets and there address range
Supernetting: combining several class C blocks to create a large address space Supernetting involves borrowing network bits In supernetting we need the 1st address of the supernet and supernet mask to define the range of addresses
2012 Sasken Communication Technologies
SUPERNETTING
PROBLEM 2
A company needs 600 addresses. Which of the following set of class C addresses can be used to for a supernet for this company ? 198.47.32.0 198.47.32.0 198.47.31.0 198.47.32.0 198.47.33.0 198.47.42.0 198.47.32.0 198.47.33.0 198.47.34.0 198.47.52.0 198.47.33.0 198.47.34.0 198.47.62.0 198.47.52.0 198.47.35.0
RULE1: The number of blocks must be power of 2 (1,2,4,8,26..) RULE2: The blocks must be contiguous in the address space. RULE3: The 3rd byte of the 1st address in the superblock must be evenly divisible by the number of blocks. In other words if the number of blocks is N then the third byte must be divisible by N
SOLUTION
1: No, there are only three blocks. 2: No, the blocks are not contiguous.
PROBLEM 6
We need to make a super-network out of 16 class C blocks. What is the supernet mask?
SOLUTION
255.255.240.0
PROBLEM 5
A supernet has a first address of 205.16.32.0 and a supernet mask of 255.255.248.0. How many blocks are in this supernet and what is the range of addresses?
SOLUTION
205.16.32.0 205.16.39.0
PROBLEM 5
A supernet has a first address of 205.16.32.0 and a supernet mask of 255.255.248.0. A router receives three packets with the following destination addresses: 205.16.37.44 205.16.42.56 205.17.33.76 Which packet belongs to the supernet?
SOLUTION
205.16.37.44
2012 Sasken Communication Technologies
CIDR NOTATION
CHARACTERASTICS OF IP
SWITCHING METHODS
CONNECTION TYPES
Connection Types
Connectionless service
Connection-oriented service
CONNECTIONLESS vs CONNECTION-ORIENTED
http://courses.iddl.vt.edu/CS1604/media/connectOriented.swf
2012 Sasken Communication Technologies
ADDRESSING SCOPE
IP is a Hop-to-Hop protocol
2012 Sasken Communication Technologies
IP HEADER
IP HEADER
VER is the IP version, to which the below packet belong. Set to 4(0100) for IPV4
ETHERNET
IP STACK
IP PACKET
YES
IP header size: Each bit is expressed in terms of multiple of 4 octets IP header size is variable 20 60 bytes
PROBLEM
An IP packet has arrived with the first byte as shown: 01000010 The receiver discards the packet. Why?
PROBLEM
In an IP packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet?
PROBLEM
In an IP packet, the value of HLEN is 516 and the value of the total length field is 002816. How many bytes of data are being carried by this packet?
>= LAYER 3
NETWORK LAYER
IP HEADER
IP multiplexes higher layer protocol Protocol field: Denotes the upper layer protocol being carried by the IP
Source IP Address and Dest IP Address doesnt change in a packet journey in a internetwork except in the case of source routing
CHECKSUM CALCULATION
Checksum is performed on the IP Header only and not on IP data Checksum is recalculated at each HOP
On detection of the checksum error, packet is dropped thereby the HOP
2012 Sasken Communication Technologies
TYPE OF SERVICE
Service level parameter, important for Routers. Prioritizes the packets based on this parameter
TIME TO LIVE
Maximum time a packet lives in an internetwork, before it would gets destroyed Set by the sender; decremented by 1 at each HOP.
TIME TO LIVE
MTU determines the maximum amount of data that can be transmitted on an underlying technology
In case the Packet size is greater than the MTU then packet need to be fragmented
Fragmentation is a process of dividing a large packet (size > MTU) to packets (size <= MTU)
2012 Sasken Communication Technologies
Once the packet is reaches the destination or a hop then it need to be reassembled Reassembly: is a process is getting back the original packet from the fragmented IP packets
2012 Sasken Communication Technologies
Based on where the fragmentationreassembly is done at Hop or final destination, fragmentation are classified under 2 types
IP Fragmentation
Intranet Fragmentation Internet Fragmentation
INTRANET FRAGMENTATION
INTRANET FRAGMENTATION fragmentation, transmission and reassembly across a local network which is invisible to the internet protocol module is called intranet fragmentation Efficient utilization of bandwidth More overhead, processing delay and buffering required
2012 Sasken Communication Technologies
INTERNET FRAGMENTATION
INTERNET FRAGMENTATION
fragmentation, transmission and reassembly across an inter-network all the way to the final destination.
No buffering needed in intermediate nodes
PROBLEM
Consider the journey of a packet of length 2048 octets and header 40 octets. It passes through the networks with maximum packet sizes as shown:
Network Maximum Packet Length
A B
C D E
FRAGMENTATION FLAGS
SET 0 for un-fragmented or last fragment packet SET 1 for rest all fragments
When SET (1) by the sender, then the packet wouldnt be fragmented. If the MTU size is not respected then it would be dropped with an ICMP message back to sender SET (0) implies there is permission to fragment
2012 Sasken Communication Technologies
FRAGMENTATION OFFSET
Indicates the relative position of the fragment w.r.t original IP datagram Fragmentation offset are measured in units of 8 octets Fragment offset 0 for the 1st fragment
2012 Sasken Communication Technologies
EXAMPLE
EXAMPLE
PROBLEM
In an IP packet arrives with the fragment offset value as 100, the value of the HLEN is 5 and value of the total length field as 100. What is the number of the 1st and last byte in that fragment ?
SOLUTION
OPTIONS
Options are optional parameters that might be sent by the sender; but not optional for implementers. So all IP module need to support all IP options
OPTIONS
In case there is space enough for partial data to be filled then the respective packet would be dropped and an ICMP error message would be generated
OPTIONS
OPTIONS FORMAT
END OF OPTIONS -- OPTION Optionally present at the end of all options if option header doesnt coincide the 32 bit boundary
NO OPERATION OPTION Optionally present in between the options; to align the beginning of next option to 32 bit boundary
Route followed by the IP packet is recorded in the IP header when this options is set; Each router in the transit, adds its IP address to the option
On fragmentation only the 1st fragment would contain this information i.e. copied to 1st fragment only
It is the responsibility of the sender to define the size of option as it is not changed in the transit
2012 Sasken Communication Technologies
Means for the source to specify the route to be followed for the IP datagram; This also record the route in the transit
Strict source either follow the path or discard the IP packet Copied on each fragments
2012 Sasken Communication Technologies
Identical to strict source route, except that the gateway or host IP is allowed to use any number of intermediate gateways to reach the next address in the route
Copied on each fragments
2012 Sasken Communication Technologies
TIMESTAMP OPTIONS
TIMESTAMP OPTIONS
TIMESTAMP OPTIONS
Over-Flow Flag: number of IP modules which couldnt register there timestamp due to lack of space
In case the overflow flag itself overflows then an ICMP error message might be sent to the sender of the message
2012 Sasken Communication Technologies