L2 Question
xkaijinx
Member Posts: 90 ■■□□□□□□□□
in CCNA & CCENT
Answer from an exam simulation of forwarding packets....
When a host sends a packet to another device on a different subnet, the host will place its own MAC address in the Source MAC field, its own IP address in the Source IP field, the MAC address of the Cisco Routers nearest interface in the Destination MAC field, and the IP address of the destination device in the Destination IP field.
If there is a switch sitting between the host and the Router, I thought the Host would put the mac address of the switch in the Destination MAC Field?
Why does it skip the switch and go straight through the Router?
When a host sends a packet to another device on a different subnet, the host will place its own MAC address in the Source MAC field, its own IP address in the Source IP field, the MAC address of the Cisco Routers nearest interface in the Destination MAC field, and the IP address of the destination device in the Destination IP field.
If there is a switch sitting between the host and the Router, I thought the Host would put the mac address of the switch in the Destination MAC Field?
Why does it skip the switch and go straight through the Router?
Comments
-
johnifanx98 Member Posts: 329If you replace MAC dest address with a switch's MAC addr, how will the switch know which device the frame go to?
-
kast1 Member Posts: 26 ■□□□□□□□□□The host sends the packet to the router because of the different subnet. The switch is only acting as a Layer 2 switch and doesn’t know how to route the packet to the other host.
That is the reason why the host uses the destination mac address of the router, because the router, in its routing table would know the correct network to the host destination.
If both the hosts are on the same network, then you wouldn’t need the mac address router to reach your destination. The switch should have the mac address stored in its table and direct you to your host destination.