cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5875
Views
0
Helpful
7
Replies

Why need mac address in LAN

shijad007
Level 1
Level 1

I know that if Host A and Host B are connected with a switch and if Host A whats to communicate with Host B then Host A will send a arp message to find the MAC address of Host B and the communication starts. My question is if both the computers have IP addresses why don't they start communication using IP address? And also the switch instead of having a MAC address table can have an IP address table so that devices can communicate. Why is that we still need MAC address for communication?

1 Accepted Solution

Accepted Solutions

I do not understand the response from Leo saying that it can be done if device is assigned a static IP. What the original poster is suggesting is that the device just use IP and not bother with mac addresses. The real answer to that question is that our network protocols are based on the layered network model in which IP is layer 3 and runs on layer 2. The way that IP was designed depends on having layer 2 working and providing local communication. IP does not have to worry about how to make local communication which is layer 2. In older environments where a router was likely to have both Ethernet and Serial ports it may be easier to understand the advantage that IP did not need to worry about whether it was going over Ethernet or HDLC. In current environments where it is more common that all interfaces are Ethernet it may be a bit more difficult to understand the distinction.

 

Perhaps an analogy might be useful. Perhaps suggesting that devices could communicate using just IP but not mac addresses is similar to having a good engine in a car and expecting it to work if we remove the wheels. The engine runs well and if we connect it with a propeller and put it in a boat it goes well or if we put it with wheels in a car and it goes well. But the engine without the media does not go well. It is similar that IP at layer 3 works well if it has the support of layer 2 (Ethernet and mac addresses) but without the support of layer 2 it does not work.

 

HTH

 

Rick

HTH

Rick

View solution in original post

7 Replies 7

MaryGrace
Level 1
Level 1

Hi,

 

They don't need to use an IP address since they are on the same network. In network perspective IP address is use when hosts needs to communicate outside of its network.

 

MAC address (Layer 2) is what hosts use to communicate on LAN on the same network . If hosts are in the same switch (as you've said) basically you don't have routers (Layer 3)  in between them which uses an IP address to distinguish a hosts on the network.

 

Hope it helps.

 

Grace

Thank you for your reply. I know that mac address and ip addresses are required for communication. My question is why can't a switch act as a layer 3 device and eliminate the need of sending broadcast messages for finding mac address of a device and communicate just using ip?

Can be done if the device is assigned a static IP address.

I do not understand the response from Leo saying that it can be done if device is assigned a static IP. What the original poster is suggesting is that the device just use IP and not bother with mac addresses. The real answer to that question is that our network protocols are based on the layered network model in which IP is layer 3 and runs on layer 2. The way that IP was designed depends on having layer 2 working and providing local communication. IP does not have to worry about how to make local communication which is layer 2. In older environments where a router was likely to have both Ethernet and Serial ports it may be easier to understand the advantage that IP did not need to worry about whether it was going over Ethernet or HDLC. In current environments where it is more common that all interfaces are Ethernet it may be a bit more difficult to understand the distinction.

 

Perhaps an analogy might be useful. Perhaps suggesting that devices could communicate using just IP but not mac addresses is similar to having a good engine in a car and expecting it to work if we remove the wheels. The engine runs well and if we connect it with a propeller and put it in a boat it goes well or if we put it with wheels in a car and it goes well. But the engine without the media does not go well. It is similar that IP at layer 3 works well if it has the support of layer 2 (Ethernet and mac addresses) but without the support of layer 2 it does not work.

 

HTH

 

Rick

HTH

Rick

I misunderstood the question from the ops, hence, my response. I had to re-read it several times.

balaji.bandi
Hall of Fame
Hall of Fame

MAC addresses and IP addresses operate on different layers of the internet protocol suite.
MAC addresses are used to identify machines within the same broadcast network on layer 2,
while IP addresses are used on layer 3 to identify machines throughout different networks.

Even though if your computer has an IP address, it still needs a MAC address to find other machines on the same network (especially the router/gateway to the rest of the network/internet),
since every layer is using underlying layers.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Leo Laohoo
Hall of Fame
Hall of Fame
1. Switch is layer 2 in the OSI level. MAC address is Layer 2 in the OSI layer (IP address is Layer 3).
2. Before a host gets an IP address, what information does a host have that sets it apart from the next one? A MAC address.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card