top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Data Packet flow in Network.

+2 votes
5,131 views

All the hosts in IPv4 environment are assigned unique logical IP addresses. When a host wants to send some data to another host on the network, it needs the physical (MAC) address of the destination host. To get the MAC address, the host broadcasts ARP message and asks to give the MAC address whoever is the owner of destination IP address. All the host on that segment receives ARP packet but only the host which has its IP matching with the one in ARP message, replies with its MAC address. Once the sender receives the MAC address of receiving station, data is sent on the physical media.

In case, the IP does not belong to the local subnet. The data is sent to the destination by means of Gateway of the subnet. To understand the packet flow we must first understand following components:

MAC Address:
Media Access Control Address is 48-bit factory hard coded physical address of network device which can uniquely be identified. This address is assigned by device manufacturers.

Address Resolution Protocol:
Address Resolution Protocol is used to acquire the MAC address of a host whose IP address is known. ARP is a Broadcast packet which is received by all the host in the network segment. But only the host whose IP is mentioned in ARP responds to it providing its MAC address.

Proxy Server:
To access Internet, network uses Proxy Server which has a public IP assigned. All PCs request Proxy Server for a Server on Internet, Proxy Server on behalf of PC sends the request to server and when it receives response from the Server, the Proxy Server forwards it to the client PC. This is a way to control Internet access in computer networks and it helps to implement web based policies.

Dynamic Host Control Protocol:
DHCP is a service by which a host is assigned IP address from a pre-defined address pool. DHCP server also provides necessary information such as Gateway IP, DNS Server Address, lease assigned with the IP etc. By using DHCP services network administrator can manage assignment of IP addresses at ease.

Domain Name System:
This is very likely that a user does not know the IP address of a remote Server he wants to connect to. When the user types in the name of remote server he wants to connect to the localhost behind the screens sends a DNS query. Domain Name System is a method to acquire the IP address of the host whose Domain Name is known.

Network Address Translation:
Almost all PCs in a computer network are assigned private IP addresses which are not routable on Internet. As soon as a router receives an IP packet with private IP address it drops it. In order to access Servers on public private address, computer networks use an address translation service, which translates between public and private addresses, called Network Address Translation. When a PC sends an IP packet out of a private network, NAT changes the private IP address with public IP address and vice versa.

We can now describe the packet flow. Assume that a user wants to access www.gmail.com from her personal computer. She is having internet connection from her ISP. The following steps will be taken by the system to help her reach destination website.

Step: 1 – Acquiring an IP Address (DHCP)

When user’s PC boots up, it searches for a DHCP server to acquire an IP address. For the same, PC sends a DHCPDISCOVER broadcast which is received by one or more DHCP servers on the subnet and they all respond with DHCPOFFER which includes all the necessary details like IP, subnet, Gateway, DNS etc. PC sends DHCPREQUEST packet in order to request the offered IP address. Finally, DHCP sends DHCPACK packet to tell PC that it can keep the IP for some given amount of time aka IP lease.

Alternatively a PC can be assigned an IP address manually without taking any help from DHCP Server. When a PC is well configured with IP address details, it can now speak to other computers all over the IP enabled network.

Step: 2 – DNS query

When a user opens a web browser and types www.gmail.com which is a domain name and a PC does not understand how to communicate with the server using domain names. PC sends a DNS query out on the network in order to obtain the IP address pertaining to the domain name. The pre-configured DNS server responds the query with IP address of the domain name specified.

Step: 3 – ARP request

The PC finds that the destination IP address does not belong to his own IP address range and it has to forward the request to the Gateway. Gateway in this scenario can be a router or a Proxy Server. Though Gateway’s IP address is known to the client machine but computers do not exchange data on IP addresses rather they need machine’s hardware address which is Layer-2 factory coded MAC address. To obtain the MAC address of the Gateway the client PC broadcasts an ARP request saying "Who owns this IP address?" The Gateway in response to the ARP query sends it MAC address. Upon receiving MAC address PC sends the packets to Gateway.

An IP packet has both source and destination addresses and this connects host with a remote host logically. Whereas MAC addresses helps systems on a single network segment to transfer actual data. This is important that source and destination MAC addresses change as they travel across the Internet (segment by segment) but source and destination IP address never changes.

posted Jul 28, 2014 by Vrije Mani Upadhyay

  Promote This Article
Facebook Share Button Twitter Share Button LinkedIn Share Button


Related Articles

Internet Protocol being a layer-3 protocol (OSI) takes data Segments from layer-4 (Transport) and divides it into what’s called packet. IP packet encapsulates data unit received from above layer and adds its own header information.
enter image description here

The encapsulated data is referred to as IP Payload. IP header contains all the necessary information to deliver the packet at the other end.
enter image description here

IP header includes many relevant information including Version Number, which, in this context, is 4. Other details are as follows:

Version: Version no. of Internet Protocol used (e.g. IPv4)

IHL: Internet Header Length, Length of entire IP header

DSCP: Differentiated Services Code Point, This is Type of Service.

ECN: Explicit Congestion Notification, carries information about the congestion seen in the route.

Total Length: Length of entire IP Packet (including IP header and IP Payload)

Identification: If IP packet is fragmented during the transmission, all the fragments contain same identification no. to identify original IP packet they belong to.

Flags: As required by the network resources, if IP Packet is too large to handle these ‘flags’ tell that if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.

Fragment Offset: This offset tells the exact position of the fragment in the original IP Packet.

Time to Live: To avoid looping in the network, every packet is sent with some TTL value set, which tells the network how many routers (hops) this packet can cross. At each hop, its value is decremented by one and when the value reaches zero, the packet is discarded.

Protocol: Tells the Network layer at the destination host, to which Protocol this packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP is 1, TCP is 6 and UDP is 17.

Header Checksum: This field is used to keep checksum value of entire header which is then used to check if the packet is received error-free.

Source Address: 32-bit address of the Sender (or source) of the packet.

Destination Address: 32-bit address of the Receiver (or destination) of the packet.

Options: This is optional field, which is used if the value of IHL is greater than 5. These options may contain values for options such as Security, Record Route, Time Stamp etc.

READ MORE

An IPv4 address transfer can only happen when the source account initiates the process. At the same time, the recipient account would be required to acknowledge the transfer of the IP address within a month or the request would be canceled by APNIC. After both the parties agree to the IPv4 transfer, APNIC Hostmasters would evaluate the request and approve it if it meets all the terms and conditions specified by the Regional Internet Registry.

Generally, APNIC Hostmasters takes around 1 – 2 working days to respond to an IPv4 address transfer request. Once it is approved, the IPv4 addresses to be transferred would show up on the transfer log on the APNIC website. However, the RIR might ask for additional information for clarification before the transfer is completed.

The source account should be open before lodging a request for IPv4 transfer. If there was any renewal invoice issued, the account holder must settle it before submitting the IPv4 address transfer request. After the transfer is done, the source account holder would have no right to oversee the IPv4 addresses. Note that APNIC cannot undo the transfer or offer any membership fee refund on account of an IPv4 transfer. However, the source account is allowed to cancel the IPv4 address transfer request through MyAPNIC before the recipient account accepts it.

IPv4 Address

IPv4 Transfers Facts

APNIC usually asks the recipient account to give more information to explain the IPv4 transfer. Once the transfer is complete, the recipient account would be responsible to manage the IPv4 addresses as well as pay the fees associated with its renewal. Even if the recipient account were in another region, APNIC can transfer the IPv4 addresses to the relevant RIR. Yet, the policies regarding IPv4 transfer might vary a bit here, depending upon the region of the recipient account.

To receive an IPv4 transfer from a different RIR country, the recipient account in the Asia Pacific would need to file a request for pre-approval from APNIC. As soon as APNIC receives and approves the pre-approval, the recipient account would need to appeal APNIC to include the particulars about the recipient account on the IPv4 Address Transfer Listing Service page of their website. It is to be noted that pre-approval expires within two years, so this step should be taken as early as possible to make the IPv4 transfer smooth.

After the recipient and the source account holder reach an agreement, the recipient account holder can provide the applicable details to the source RIR as required. APNIC would contact the recipient to finalize the transfer when it gets the transfer request from the source account’s RIR.

READ MORE
...