cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10631
Views
33
Helpful
4
Replies

Packet flow

vvvvvbbb123
Level 1
Level 1

Hi All,

WOuld like to know how a packet flows from a PC in one network to another in detail. COuld someone help with useful links or explain over here ?

 

Regards,

VB

1 Accepted Solution

Accepted Solutions

VB

Steps 1 - 3 are not correct ie. the PC does not arp out and if it gets no response it knows it needs routing.

The PC has an IP address and a subnet mask. With this it can work out what subnet it is using.

When it wants to connect to a remote device it compares the remote device's IP address with it's own subnet mask and if the subnet is the same as it's own it knows it can simply arp out for the mac address of that IP.

If the subnet is different the PC knows it needs to send traffic to it's default gateway and if it has an arp entry for that, which it probably will, it then sends the packets to it's default gateway.

If it doesn't have an arp entry it obviously sends an arp for the default gateway IP address.

The rest of the process you outline is fairly accurate although bear in mind a router also needs to know L2 as well as L3 addresses to be able to forward traffic.

You may want to have a read of this link if you haven't already -

https://supportforums.cisco.com/blog/153276/what-happens-when-router-receives-packet

Jon

View solution in original post

4 Replies 4

I think you are looking for something like below. If else, pls let us know.

Hi Vivek,

This is a high level diagram and explanation.

Below is my understanding on a packet, but not sure whether it is correct,

 

1. PC-A creates a packet with Source, destination and protocol field
2. To identify the destination MAC, an arp request is sent out.
3. If no reply, PC A assumes that the destionation is a far subnet and it requires routing.
4. Identifies the MAC of router  by arping the default gateway.
5. Data to be transmitted is sent to data link layer, where frame is created with Ether type, FCS and destination MAC
6. Frame is then passed on to the physical layer for transmisstion
7. Router receives the frame and checks for FCS, if errors discarded, else checks for the ether type field and extract the packet.
8. Assuming the packet to be IPv4, header checksum is verified. If mismatch, discards, else router checks for destination IP and checks whether the destination is in one of the same interfaces of the router.
9. If yes, the packet has arrived the destination and checks the protocol filed and passed to payload to upper layer protocol
10. Else the packet has to be routed. Checks the TTL value is > 1. if not, packet dropped with "iCMp time exceeded"
11. Router check for the most matching prefix to the destination
12. the router use the next hop IP and interfaces to be used to build the new data link frame
13. Before creating a new frame , router updates the IP header TTL or hop count field, requiring a new IPv4 checksum computation.
14. the router encapulates the ip packet inside the data link layer header to create a new frame and passed on the physical layer for transmission
15. When the packet arrives @ different router or desrired subnet, Frame & payload information is extracted and passsed on to the internal devices to reach the destination.

 

Regards,

VB

 

Guys need your help

VB

Steps 1 - 3 are not correct ie. the PC does not arp out and if it gets no response it knows it needs routing.

The PC has an IP address and a subnet mask. With this it can work out what subnet it is using.

When it wants to connect to a remote device it compares the remote device's IP address with it's own subnet mask and if the subnet is the same as it's own it knows it can simply arp out for the mac address of that IP.

If the subnet is different the PC knows it needs to send traffic to it's default gateway and if it has an arp entry for that, which it probably will, it then sends the packets to it's default gateway.

If it doesn't have an arp entry it obviously sends an arp for the default gateway IP address.

The rest of the process you outline is fairly accurate although bear in mind a router also needs to know L2 as well as L3 addresses to be able to forward traffic.

You may want to have a read of this link if you haven't already -

https://supportforums.cisco.com/blog/153276/what-happens-when-router-receives-packet

Jon

Review Cisco Networking for a $25 gift card