Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

How are MAC/IP addresses used in routing

Course Queries Syllabus Queries

Max. 2000 characters
Replies

usr_profile.png

User

( 4 months ago )


I have to teach my sixth form about MAC Addresses and IP Addresses in a few weeks time and there are some areas I am unclear on which I am hoping some of you will be able to clarify for me. I have enough to get them through the syllabus, but I like to have more knowledge than the spec so that I can explain how things work in more meaningful way.

So as I understand it the following happens when a device on a LAN sends a packet/frame to a device on another separate LAN via the internet.

A packet is created at the sending end with the destination and sending IP

First question: Is the destination IP actually the IP of the gateway for the receiving device’s LAN

This is then turned into a frame which will go to the gateway for the LAN - this happens at the data link layer and the frame has a MAC sending and destination address added

First question: The destination MAC address - is this the final destination or the destination of the gateway?

The packet/frame is then sent onto the internet and routed (using the IP address) to the next hop towards the final destination

Second question: At each hop, does the data link layer change the destination MAC address in the frame to the MAC address of the next hop?

The packet/frame is routed to the destination address (which is the gateway )

Third question: Once the frame/packet reaches the gateway of the receiving LAN is the destination MAC address in the frame used by a switch to ensure it ends up at the correct device? This obviously assumes that the destination MAC address is not amended by the routers as the frame/packet traverses the internet - if it is amended then once the receiving gateway receives the frame/packet, how does it know where to send it?

usr_profile.png

User

( 4 months ago )


First question: The destination MAC address - is this the final destination or the destination of the gateway?

The MAC addresses are used in the layer 2 of the frame, and the layer 2 define the local network. So, the destination MAC address is the address of your gateway if the final target is not on the same LAN.

Second question: At each hop, does the data link layer change the destination MAC address in the frame to the MAC address of the next hop?

Yes, or the MAC address of the final target if it is on the same LAN.

Third question: Once the frame/packet reaches the gateway of the receiving LAN is the destination MAC address in the frame used by a switch to ensure it ends up at the correct device? This obviously assumes that the destination MAC address is not amended by the routers as the frame/packet traverses the internet - if it is amended then once the receiving gateway receives the frame/packet, how does it know where to send it?

With the IP address of the final target and his routes (LAN address and masks), the router can deduct if the target of the packet is on the same LAN or not. If the IP address is in the range of the LAN IP address and the mask, it knows the final target is in a LAN the router is connected.

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif