DataGrams,IP datagram format ,FRAGMENTATION , CHECKSUM,IP ADDRESSES,classful addressing,classless addressing - Codeprg

Breaking

programing News Travel Computer Engineering Science Blogging Earning

Friday 15 May 2020

DataGrams,IP datagram format ,FRAGMENTATION , CHECKSUM,IP ADDRESSES,classful addressing,classless addressing

Application Layer :
SMTP , FTP ,TFTP ,DNS ,SNMP, DHCP

Transport Layer:
SCTP, TCP, UDP.

Network Layer:
IGMP ,ICMP ,IP ,ARP

Data Link Layer and Physical Layer :
Underlying LAN or WAN technology.

DataGrams:
Packets in the network (internet) layer are called datagrams. A datagram is a variable-length packet consisting of two parts: header and data. The header is 20 to 60 bytes in length and contains information essential to routing and delivery. It is customary in TCP/IP to show the header in 4-byte sections. A brief description of each field is in order.

IP datagram format :
IP protocol version number, header length, type of data, total datagram length :
fragmentation/reassembly:16 bit identifier ,flags,fragment offset.
time to live, the upper layer, header checksum:
32-bit source IP address:
32-bit destination IP address:

Protocols :
ICMP=1
IGMP=2
TCP=6
UDP=17
OSPF=89

FRAGMENTATION :
A datagram can travel through different networks. Each router decapsulates the IP datagram from the frame it receives, processes it, and then encapsulates it in another frame. The format and size of the received frame depend on the protocol used by the physical network through which the frame has just traveled. The format and size of the sent frame depend on the protocol used by the physical network through which the frame is going to travel.

CHECKSUM:
The error detection method used by most TCP/IP protocols is called the checksum. The checksum
protects against the corruption that may occur during the transmission of a packet. It is redundant information added to the packet. The checksum is calculated at the sender and the value obtained is sent with the packet. The receiver repeats the same calculation on the whole packet including the checksum. If the result is satisfactory, the packet is accepted; otherwise, it is rejected.

IP ADDRESSES:
The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or IP address. An IP address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet. IP addresses
are unique. They are unique in the sense that each address defines one, and only one, connection to the Internet. Two devices on the Internet can never have the same address.

The address space of IPv4 is 2(32) or 4,294,967,296.

IP addresses, when started a few decades ago, used the concept of classes. This architecture is called classful addressing. In the mid-1990s, a new architecture, called classless addressing, was introduced and will eventually supersede the original architecture. However, part of the                             Internet is still using classful addressing, but the migration is very fast.

1.Recognizing Classes

2.Netid and Hostid

3.Classes and Blocks

4.Network Addresses

5.Sufficient Information

6.Mask

7.CIDR Notation

8.Address Depletion

Class and  thier number of addresses per class:

 A=2147483648=50% or 0 to 127
B=1073741824=25% or 128 to 191
C=536870912=12.5% or 192 to 223
D=268435456=6.25% or 224 to 239
E=268435456=6.25% or 240  to 255

Millions of class A addresses are wasted.
Many class B addresses are wasted.
The number of addresses in class C is smaller than the needs of most organizations.
Class D addresses are used for multicasting, there is only one block in this class.
Class E addresses are reserved for future purposes; most of the block is wasted.

In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization. The range of addresses can automatically be inferred from the network address.

The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero.

Note that we must not apply the default mask of one class to an address belonging to another class.

Specifically, the network addresses available for assignment to organizations are close to depletion. This is coupled with the ever-increasing demand for addresses from organizations that want the connection to the Internet. In this section, we briefly discuss two
solutions: subnetting and supernetting.

The topics discussed in this section include:

Subnetting

Supernetting

Supernet Mask

Obsolescence

IP addresses are designed with two levels of hierarchy.

In subnetting, we need the first address of the subnet and the subnet mask to define the range of addresses.

In supernetting, we need the first address of the supernet and the supernet mask to define the range of
addresses.

In classless addressing, variable-length blocks are assigned that belong to no class. In this architecture, the entire address space (232 addresses) is divided into blocks of different sizes.

1.Restrictions

2.Finding the Block

3.Granted Block

The right-most byte must be 0, the IP addresses use base 256 arithmetic. When the right-most byte is 0, the total address is divisible by 256.

Classful addressing is a special case of classless addressing.

In classless addressing, the last address in the block does not necessarily end in 255.

In CIDR notation, the block granted is defined by the first address and the prefix length.

When an organization is granted a block of addresses, it can create subnets to meet its needs. The prefix length increases to define the subnet prefix length.

1.Finding the Subnet Mask

2.Finding the Subnet Addresses

3.Variable-Length Subnets

In fixed-length subnetting, the number of subnets is a power of 2.

Address allocation is the responsibility of a global authority called the Internet Corporation for Assigned Names and Addresses (ICANN). It usually assigns a large block of addresses to an ISP to be distributed to its Internet users.