Subscribe by Email


Showing posts with label Datagrams. Show all posts
Showing posts with label Datagrams. Show all posts

Thursday, September 19, 2013

What is fragmentation?

- The fragmentation technique is implemented in the IP (internet protocol) for breaking down the datagrams into smaller pieces. 
- This is done so that it becomes easy for the data packets to be passed through the link with a datagram size smaller than that of the original MTU or the maximum transmission unit. 
- The procedure for the IP fragmentation along with the procedures for reassembling and transmitting the datagrams is given in the RFC 791. 
- For determining the optimal MTU path, the IPv6 hosts are needed so that the packets can be sent. 
- If in case the PDU i.e., the protocol data unit received by the router is larger than the MTU of the next hop, then there are two options are available if IPv4 transport is being used:
Ø Dropping the PDU and sending an ICMP (internet control message protocol) message indicating that the condition packet is quite big.
Ø  Fragmenting the IP packet and then transmitting it over the link whose MTU is smaller. Any IPv6 packet with a size less than or equal to 1280 bytes can be delivered without having the need for using the IPv6 fragmentation.

- If a fragmented IP packet is received by the recipient host, its job is to reassemble the datagram and then send it over to the protocols at the higher layers. 
- The purpose of reassembling is expected to take place at the recipient’s host side but for some practical reasons it might be done by some intermediate router. 
- For example, the fragments might be reassembled by the NAT (network address translation) for translating the data streams. 
- Excessive re-transmission can result as a consequence of the IP fragmentation whenever packet loss might be encountered by the fragments. 
- It is required for all the reliable protocols (example, TCP) for re-transmitting the fragments in their correct order for recovering from the single fragment loss. 
Thus, typically two approaches are used by the senders for determining datagrams of what size should be transmitted over the network:
  1. First approach: The sender must transmit an IP datagram of size as same as that of the first hop’s MTU.
  2. Second approach: Running the path MTU discovery algorithm.

- Fragmentation does leave an impact on the network forwarding. 
- When there are multiple parallel paths for the internet router the traffic is split by the technologies such as the CEF and LAG throughout the links via some hash algorithms. 
- The major goal of this algorithm is to make sure that all the packets with the same flow are transmitted out on the same path for the minimization of the not so required packet reordering. 
- If the TCP or UDP port numbers are used by the hash algorithm, the fragmented packets might be forwarded through different paths. 
- This is so because the layer 4 information is contained only in the first fragment of the packet. 
- As a result of this, usually the initial fragment arrives after the non-initial fragments. 
- This condition is often treated as an error by most of the security devices in the hosts.  
- Therefore, they drop these packets.
- The fragmentation mechanism differs in IPv4 and IPv6. 
- In the former, the fragmentation is performed by the router. 
- On the other hand, in IPv6 fragments that are larger than MTU are dropped by the routers.
- Also, in both the cases there is a variation in the header format. 
- Since fragmentation is carried out using analogous fields, therefore the algorithm can be used again and again for the purpose of fragmentation and reassembling. 
- A best effort should be made by the IPv4 hosts for reassembling the datagram fragments. 


Wednesday, September 18, 2013

What are the advantages and disadvantages of datagram approach?

- Today’s packet switching networks make use of a basic transfer unit commonly known as the datagram. 
- In such packet switched networks, the order of the data packets arrival, time of arrival and delivery comes with no guarantee. 
- The first packet switching network to use the datagrams was CYCLADES. 
- Datagrams are known by different names at different levels of the OSI model. 
- For example, at layer 1 we call it Chip, at layer 2 it is called Frame or cell, data packet at layer 3 and data segment at layer 4. 
- The major characteristic of a datagram is that it is independent i.e., it does not rely on any other thing for the information required for exchange.
- The duration of a connection between any two points is not fixed such as in telephone conversations. 
- Virtual circuits are just the opposite of the datagrams. 
- Thus, a datagram can be called as a self containing entity. 
- It consists of information sufficient for routing it from the source to the destination without depending up on the exchanges made earlier. 
- Often, a comparison is drawn between the mail delivery service and the datagram service. 
- The user’s work is to just provide the address of the destination. 
- But he/she is not guaranteed the delivery of the datagram and if the datagram is successfully delivered, no confirmation is sent to the user. 
- The data gram are routed to some destination without help of a predetermined path. 
- The order in which the data has to be sent or received is given no consideration. 
- It is because of this that the datagrams belonging to a single group might travel over different routes before they reach their common destination. 

Advantages of Datagram Approach
  1. Datagrams can contain the full destination address rather than using some number.
  2. There is no set up phase required for the datagram circuits. This means that no resources are consumed.
  3. If it happens during a transmission that one router goes down, the datagrams that will suffer will include only those routers which would have been queued up in that specific router. The other datagrams will not suffer.
  4. If any fault or loss occurs on a communication line, the datagrams circuits are capable of compensating for it.
  5. Datagrams play an important role in the balancing of the traffic in the subnet. This is so because halfway the router can be changed.
Disadvantages of Datagram Approach

  1. Since the datagrams consist of the full destination address, they generate more overhead and thus lead to wastage of the bandwidth. This in turn makes using datagram approach quite costly.
  2. A complicated procedure has to be followed for datagram circuits for determining the destination of the packet.
  3. In a subnet using the datagram approach, it is very difficult to keep congestion problems at bay.
  4. The any-to-any communication is one of the key disadvantages of the datagram subnets. This means that if a system can communicate with any device, any of the devices can communicate with this system. This can lead to various security issues.
  5. Datagram subnets are prone to losing or re - sequencing the data packets during the transition. This puts a great burden on the end systems for monitoring, recovering, and reordering the packets as they were originally.
  6. Datagram subnets have less capability of dealing with congestion control as well as flow control. This happens because the direction of the incoming traffic is not specified. In the virtual circuit subnets, the flow of the packets is directed only along the virtual circuits thus making it comparatively easy for controlling it.
  7. The unpredictable nature of the flow of the traffic makes it difficult to design the datagram networks. 


Saturday, March 27, 2010

CLNP (Connectionless Network Protocol)

CLNP is a datagram network protocol. It provides fundamentally the same underlying service to a transport layer as IP. CLNP provides essentially the same maximum datagram size, and for those circumstances where datagrams may need to traverse a network whose maximum packet size is smaller than the size of the datagram, CLNP provides mechanisms for fragmentation (data unit identification, fragment/total length and offset). Like IP, a checksum computed on the CLNP header provides a verification that the information used in processing the CLNP datagram has been transmitted correctly, and a lifetime control mechanism ("Time to Live") imposes a limit on the amount of time a datagram is allowed to remain in the internet system.

CLNP (Connectionless Network Protocol) may be used between network-entities in end systems or in Network Layer relay systems (or both). CLNP is intended for use in the Subnetwork Independent Convergence Protocol (SNICP) role, which operates to construct the OSI Network Service over a defined set of underlying services, performing functions necessary to support the uniform appearance of the OSI Connectionless-mode Network Service over a homogeneous or heterogeneous set of interconnected subnetworks.

CLNP Protocol Structure


- NLP ID - Network Layer Protocol Identifier : The value of this field is set to binary 1000 0001 to identify this Network Layer protocol as ISO 8473. The value of this field is set to binary 0000 0000 to identify the Inactive Network Layer protocol subset.
- Length ID : Length Indicator is the length in octets of the header.
- Version : Version/Protocol Id Extension identifies the standard Version of ISO 8473.
- Lifetime : PDU Lifetime representing the remaining lifetime of the PDU, in units of 500 milliseconds.
- Flags : There are three flags : segmentation permitted, more segments, error report.
- Type : The Type code field identifies the type of the protocol data unit, which could be data PDU or Error Report PDU.
- Segment Length : The Segment Length field specifies the entire length, in octets, of the Derived PDU, including both header and data (if present).
- Checksum : The checksum is computed on the entire PDU header.


Friday, March 26, 2010

Routing Information Protocol (RIP) Cont...

RIP Message Format


RIP updates are placed as UDP payload inside an IP datagram. The format is as follows:
- Command : It indicates whether the packet is a request or a response. The request asks that a router send all or part of its routing table. The response can be an unsolicited regular routing update or a reply to a request. Responses contain routing table entries. Multiple RIP packets are used to convey information from large routing tables.
- Version number : It specifies the RIP version used. This field can signal different potentially incompatible versions.
- Zero : This field is not actually used by RFC 1058 RIP; it was added solely to provide backward compatibility with prestandard varieties of RIP. Its name comes from its defaulted value: zero.
- Address family identifier (AFI) : It specifies the address family used. RIP is designed to carry routing information for several different protocols. Each entry has an address-family identifier to indicate the type of address being specified. The AFI for IP is 2.
- Address : It specifies the IP address for the entry.
- Metric : It indicates how many internetwork hops (routers) have been traversed in the trip to the destination. This value is between 1 and 15 for a valid route, or 16 for an unreachable route.

RIPv2 header explanation


- Command : Indicates whether the packet is a request or a response.
- Version : Version of RIP.
- Unused : It has a value set to zero.
- Address family identifier (AFI) : It specifies the address family used.
- Route tag : It provides a method for distinguishing between internal routes (learned by RIP) and external routes (learned from other protocols).
- IP address : It specifies the IP address for the entry.
- Subnet mask : It contains the subnet mask for the entry. If this field is zero, no subnet mask has been specified for the entry.
- Next hop : It indicates the IP address of the next hop to which packets for the entry should be forwarded.
- Metric : It indicates how many internetwork hops (routers) have been traversed in the trip to the destination. This value is between 1 and 15 for a valid route, or 16 for an unreachable route.


Saturday, March 20, 2010

UDP - User Datagram Protocol

The User Datagram Protocol (UDP) is a transport layer protocol defined for use with the IP network layer protocol.UDP is often used in videoconferencing applications or computer games specially tuned for real-time performance.
- UDP network traffic is organized in the form of data grams.A data-gram comprises one message unit. The first eight bytes of a data-gram contain header information and the remaining bytes contain message data.
- UDP can be used in networks where TCP is traditionally implemented.
- It does not guarantee reliability or the correct sequencing of data.
- UDP makes use of a simple communication model without implicit transmission checks for guaranteeing reliability, sequencing, or data-gram integrity.
- UDP considers that error checks and corrections should be carried out in the communicating application, and not at the network layer.
- UDP makes the protocol that much faster and more efficient because it does not have the overhead of checking whether the data has reached the destination every time it is sent.
- UDP is a stateless protocol. UDP is used for packet broadcast or multi-casting whereby the data is sent to all the clients in the network.

The UDP header consists of four fields each of 2 bytes in length :

- Source Port : Source port recognizes the sending port and should be understood to be the port to respond to if required. If not used, then its value should be zero.

- Destination Port : UDP packets from a client use this as a service access point (SAP) to indicate the service required from the remote server.

- UDP length : The number of bytes comprising the combined UDP header information and payload data.

- UDP Checksum : A checksum to verify that the end to end data has not been corrupted by routers or bridges in the network or by the processing in an end system.


Friday, July 31, 2009

Quick Tech Tip: Overview Of The Network Layer

The network layer provides services to the transport layer through virtual circuits or datagrams. In both cases, its main job is routing packets from the source to the destination. In virtual circuit subnets, a routing decision is made when the virtual circuit is set up. In datagram subnets, it is made on every packet.
Many routing algorithms are used in computer networks. Static algorithms include shortest path routing, flooding, and flow-based routing. Dynamic algorithms include distance vector routing and link state routing. Most actual networks use one of these. Other important routing techniques are hierarchical routing, routing for mobile hosts, broadcast routing, and multicast routing.
Subnets can become congested, increasing the delay and lowering the throughput for packets. Techniques include traffic shaping, flow specifications, and bandwidth reservation. If congestion does occur, it must be dealt with. Choke packets can be sent back, load can be shed, and other methods applied.
Networks differ in various ways, so when multiple networks are connected together problems can occur. Sometimes problems can be finessed by tunneling a packet through a hostile network, but if the source and the destination networks are different, this approach fails. Fragmentation may be called for if different networks are having different maximum sizes.
The Internet has a rich variety of protocols related to the network layer. These include the data protocol, IP, but also the control protocols ICMP, ARP, and RARP, and the routing protocols OSPF and BGP. The Internet is rapidly running out of IP addresses, so a new version of IP, IPv6, has been developed.
Unlike the datagram-based Internet, ATM networks use virtual circuits inside. There must be a set up before data can be transferred and torn down after transmission is completed. Quality of service and congestion control are major issues with ATM networks.


Sunday, July 19, 2009

Quick Tech Tip - Connectionless Internetworking

Connectionless internetworking follows the datagram model. In this model, the network layer offers the transport layer the ability to inject datagrams into the subnet. There is no notion of a virtual circuit at all in the network layer. This model does not require all packets belonging to one connection to traverse the same sequence of gateways.
A routing decision is made separately for each packet, possibly depending on the traffic at the moment the packet is sent. This strategy can use multiple routes and thus achieve a higher bandwidth than the concatenated virtual circuit model.

Connectionless Internetworking

Datagrams are constructed and sent in the usual way. Routing decisions are made on a packet by packet basis so that we cannot even guarantee that all the packets in a message will be sent over the same set of networks. Since each of the networks can have different properties the processing that the packets receive will be different depending on the route they took.
Since each network will have its own network layer protocol we cannot simply transfer network layer packets across the routers. One possibility is to try and convert from one protocol to another but this is not very successful for much the same set of reasons that converting between the different frame types of the 802 Ethernets was difficult.
A major issue in transferring from one network to another is that of addressing. In general different networks use different addressing schemes. One possibility would be to assign every host an address for every sort of network but apart from being inefficient (lots of addresses would never be used) it would also require a huge translation table to be kept.
What IP (Internet Protocol) attempts to do is to define a universal packet which can be carried across all networks. Of course others have also had this idea so there are several ‘universal’ schemes and these have to be dealt with as well.
A major advantage of the datagram approach is that it can be used over subnets that do not use virtual circuits inside. Many LANs, mobile networks and even some WANs fall into this category. When an internet includes one of these, serious problem occurs if the networking strategy is based on virtual circuits.


Facebook activity