Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@silverscorpion-iJKtdQ • Oct 22, 2010
IP packets won't contain MAC. They willonly contain IP address, of both the source and recipient.
The MAC address of the recipient is found from the recipient's IP address using the ARP protocol.
This is called address resolution, and it happens in layer 2 or Data Link Layer. 😀 -
@sachin-0wuUmc • Oct 22, 2010
Sorry but i did not get what you are saying.
Suppose my architecture is like this
Source-->Router1---->Router2----->Destination
Source : 172.19.6.59
172.19.6.1--------Router1----172.17.15.1
172.17.15.64-----Router2-----172.31.1.4
Destination : 172.31.1.6
Assume Mac are : S,R1a,R1b,R2a,R2b,D
Now, i want to send data from 172.19.6.59 to 172.31.1.6
so i want to know how data will travel from S to D.
As i know to move from one node to other it needs H/w address of other device.
Please reply.... -
@munguti-MnxkmE • Oct 22, 2010
As an addition mac addresses are only used for hosts on the same network, while IP addresses are used for hosts on different networks. Read more on ethernet communications and routing -
@kishan-gupta-IFXTPJ • Oct 22, 2010
Munguti saying right, mac address is only used for same network and ip address for different network.
Suppose my architecture is like this
NOw as your assumption, your ip's are Class B.
Source-->Router1---->Router2----->Destination
Source : 172.19.6.59
172.19.6.1--------Router1----172.17.15.1
172.17.15.64-----Router2-----172.31.1.4
Destination : 172.31.1.6
Assume Mac are : S,R1a,R1b,R2a,R2b,D
Now, i want to send data from 172.19.6.59 to 172.31.1.6
so i want to know how data will travel from S to D.
As i know to move from one node to other it needs H/w address of other device.
Please reply....
Source transfer data to router1, here router 1 knows the mac address of source (or use mac address to communicate with it).
Router 1 read destination address, and on its table information it send data (packet) to router 2.
Router 2 receive data and read destination.
Router 2 found destination in local network, it send packets to destination system. Here mac address is again used.
In between no mac address is used.
However if we want to trace source then we need to go back in reverse order.
I think it is enough for you. -
@sachin-0wuUmc • Oct 22, 2010
But as i know we need MAC address to deliver packets to a node or system.As you are saying "in between no mac is used".jcksnIn between no mac address is used.
However if we want to trace source then we need to go back in reverse order.
I am thinking its wrong.
As router1 (2nd Nic) and Router2 (1st nic) are on same network so to send packet from router1(2nd nic) to router2(1st nic) , there id need of mac of router2(1st nic) by router1(2nd nic)
Tell me if i am wrong. -
@durga-TpX3gO • Oct 22, 2010
@blunderboy
can you show your example in pictures? from what i understand, S is connected to R1 and D is connected to R2 right?
Lets name the LAN created by R1 as L1 and similarly LAN by R2 as L2. R1, R2 are connected, but that doesnot mean they are on a 'network' infact they form a network
now, consider the case when S has to send a packet within L1, though it knows that the IP address prefix is same , it will have to know the MAC address , and thats where ARP is used.This has already been pointed out
Now the case where Packet has to traverse to a different LAN in this case L2. The source puts in the public IP address of the destination D in the packet and pushes it to R1, R1 verifies the public address . Apart from the routing tables what a router uses , router as well does a forwarding functionality. In sense, it explicitly sees on what port (interface/card) is it supposed to forward the packet to in order to send the packet to destination. In case the Interface 1(I1) of R1 is connecting to R2, then R1 forwards the packet to I1 .It might at this point, look of MAC address of the I1 NIC. -
@munguti-MnxkmE • Oct 25, 2010
I agree with blunder boy, mac addressses are used btn routers since they are on the same network. The source and destination MAC addresses change as the packet is moved from one network to another but the source and destination IPaddresses never change. This is why there is need for both forms of addressing.blunderboyBut as i know we need MAC address to deliver packets to a node or system.As you are saying "in between no mac is used".
I am thinking its wrong.
As router1 (2nd Nic) and Router2 (1st nic) are on same network so to send packet from router1(2nd nic) to router2(1st nic) , there id need of mac of router2(1st nic) by router1(2nd nic)
Tell me if i am wrong. -
@sachin-0wuUmc • Oct 25, 2010
Thanx Guys,
I have understood the concept well why we need both forms of addressing.
Just tell me one more thing when an intermediate node will send the frame to the next hop,
then the source MAC will be of itself or the original sender's MAC.
I mean will the intermediate node change the Source MAC or not ?
I hope the question is clear. -
@munguti-MnxkmE • Oct 25, 2010
The source MAC will be of itself(the intermediate node) and the destination MAC that of the next hop. But the source IP will be that for the original sender and the destination IP that of the final receiver.blunderboyThanx Guys,
I have understood the concept well why we need both forms of addressing.
Just tell me one more thing when an intermediate node will send the frame to the next hop,
then the source MAC will be of itself or the original sender's MAC.
I mean will the intermediate node change the Source MAC or not ?
I hope the question is clear.
So to answer your question, yes it will change the MAC address to be that of its own.