hurricane1091 wrote: » A VLAN should match up with a subnet. So VLAN 1 is 192.168.1.0/24 we will say. If computer A is 192.168.1.5 and a subnet mask of 255.255.255.0 with a default gateway of 192.168.1.1, and it wants to go to computer B with an IP address of 192.168.1.X/24, it will simply ARP for the MAC Address of 192.168.1.X/24, and the switch will flood the ARP (if it does not already know the MAC address of 192.168.1.x/24) out all ports in VLAN 1. Computer B will respond, and the switch will record the MAC address and the port it came from, plus the MAC address and port associated with computer A. Computer A can than send a packet with the layer 2 destination MAC address of Computer B, and a layer 3 destination IP address of Computer B as well. If computer A wanted to go to 10.10.10.10, this is not on the same subnet, and the computer will ARP for the MAC of the default gateway (it does not do this every time, it does it once usually and then remembers the MAC), and send the packet with a layer 2 destination MAC address of the default gateway, and a layer 3 destination IP address of 10.10.10.10. The source/destination MAC address will be re-written at each rout-able hop, while the source and destination IP address will remain the same throughout the journey (unless a NAT occurs, we will not discuss that here). Hope this helps! Remember, layer 2 information is always regarded to go to the next hop. From a computer's perspective, the destination MAC address is always that of the default gateway if the layer 3 destination is on a different subnet.
Daughterofrnbsoul wrote: » That statement is similar to the Next Hop IP when forwarding an IP packet correct ? The Next Hop IP should be on the Same Subnet as you right ? since the Destination IP does not fall into a Directly Connected Subnet ID And Mask of a routers interface, the router can forward the IP packet to the next hop IP if he has a route that matches the Destination IP along with the correct Next Hop IP "Pointing to a neighboring Router ? can the Next hop ip also be "Assumed as a Gateway"
so it will forward the frame out the gig0/0.20 interface with the source MAC address of R1 and the Destination MAC address of pc1 (because in this case pc1 is on the same subnet/local network)
Daughterofrnbsoul wrote: » Hello, I am a network noobie. I was wondering if in order to get the Destination Mac-address Of an IP host that host must be on the same layer 2 VLAN and Same layer 3 Subnet ?