03-03-2014 01:51 AM - edited 03-07-2019 06:29 PM
Hi all,
I am a newbie and would really appreciate it if someone can answer the following questions.
1. How does it work if a packet is send from one network to another network and the MAC of destination if unknown? My understanding is the sender's network gateway mac address is used as the MAC destination address. But how is it send to the destination?
2. Why do we need a MAC address? Isn't IP address enough?
3. How come there are some MAC address which does not exist in the network topology?
Many thanks again.
Richard
Solved! Go to Solution.
03-03-2014 03:35 PM
Richard
An IP address is not enough because the IP addresses cannot change (unless you are doing NAT but that is not relevant to this) but the mac addresses have to. An example might help -
H1 -> (int gi0/0) L3 switch (int gi0/1) -> S1
H1 = 192.168.5.10
S1 = 192.168.6.10
H1 wants to send a packet to S1 so it needs to send the packet to it's default gateway It does this by using the mac address of the gi0/0 interface on the L3 switch -
src mac = H1
dst mac = L3 gi0/0
src IP = 192.168.5.10
dst IP = 192.168.6.10
the L3 switch receives the packet and sees the destination IP is S1 and it has a direct connection so it sends the packet to S1 -
src mac = L3 int gi0/1
dst mac = S1
src IP = 192.168.5.10
dst IP = 192.168.6.10
notice how the IPs never change but the mac addresses do at each L3 hop.
If you just used the IP it wouldn't work because if the IP was the L3 gi0/0 IP the L3 switch would not know what the destInation IP is meant to be.
Note that i didn't cover ARP which resolves an IP to a mac address because i just wanted to keep it simple.
Hopefully that's helped with questions 1) and 2).
Not sure what you mean by question 3) ?
Jon
03-03-2014 03:35 PM
Richard
An IP address is not enough because the IP addresses cannot change (unless you are doing NAT but that is not relevant to this) but the mac addresses have to. An example might help -
H1 -> (int gi0/0) L3 switch (int gi0/1) -> S1
H1 = 192.168.5.10
S1 = 192.168.6.10
H1 wants to send a packet to S1 so it needs to send the packet to it's default gateway It does this by using the mac address of the gi0/0 interface on the L3 switch -
src mac = H1
dst mac = L3 gi0/0
src IP = 192.168.5.10
dst IP = 192.168.6.10
the L3 switch receives the packet and sees the destination IP is S1 and it has a direct connection so it sends the packet to S1 -
src mac = L3 int gi0/1
dst mac = S1
src IP = 192.168.5.10
dst IP = 192.168.6.10
notice how the IPs never change but the mac addresses do at each L3 hop.
If you just used the IP it wouldn't work because if the IP was the L3 gi0/0 IP the L3 switch would not know what the destInation IP is meant to be.
Note that i didn't cover ARP which resolves an IP to a mac address because i just wanted to keep it simple.
Hopefully that's helped with questions 1) and 2).
Not sure what you mean by question 3) ?
Jon
03-05-2014 02:59 AM
Jon,
Thanks so much,
In regarding with question 3, I have noticed some entries are static, but other entries are dynamic in the MAC address table on the Switch. There was an entry that I could not find the corresponding MAC with any interface the other day, but it does exist in the MAC address table.
Richard
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide