cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
442
Views
0
Helpful
2
Replies

MAC address problem

ehope2014
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

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

View solution in original post

2 Replies 2

Jon Marshall
Hall of Fame
Hall of Fame

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

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

Review Cisco Networking products for a $25 gift card