Question : mac and ip address

how ip and mac addresses communicate while there is a difference of 16 bits (ip address =32)(mac address=48)

Answer : mac and ip address

Hah, look like a school question (or you are doing research???)

In brief (I maybe wrong at some points, but this is the basic idea):
Each NIC (Network Interface Card, all it Ethernet if you want) has an address called MAC (unique, one and only). The MAC is assigned by the manufactured. The MAC is used as address in hardware layer. MAC cannot be changed (unless you burn the chip on the NIC).

Then in higher layer (network layer - TCP/IP or OSI model, there's not much different), each NIC is assigned a (or some) IP address(es) - this time it is assigned by operating system or user (DHCP, that what ppl talking about).

The NIC(s) in a network communicate between each other mainly by MAC.
The Operating System of the machine having the NIC(s) communicate by IP address.

The conversion between IP and MAC address is control by "something" call the arp table. It will "map" between IP and MAC, just like between a name and a person. You yourself is unique, and in EE (Experts-Exchange) we know you as adilamir.

Mapping, in brief, just like when we talk about "adilamir" in EE, we know that we are talking about YOU. When we talk about "netexpert", we know that we are talking about ME :). That's mapping. So you'll see a PC having IP 192.168.1.1, the network (and NICs) will see that computer having MAC 00.11.22.33.44.55. Two different things, right? (and no padding with bits, just like we cannot add you name with 0s and 1s to have a real guy).

Ok, so we done with mapping. In "somewhere" there's a table like:
192.168.0.1  00:00:43:56:FF:D3
192.168.0.2  01:01:54:FF:3E:DE
to map between IP and MAC, so when you say "ping 192.168.0.2", the NIC will know that it needs to send a PING request to a NIC with MAC 01:01:54:FF:3E:DE.

The last thing about it is each NIC having only one MAC, but can have more than one IP. Just like you have your fingerprint (unique and cannot change), and you have many nicknames to use on the Internet.

There's no communication between MAC and IP. Here's the model (you can draw the OSI if you like):

User ->{send command}->operating system->{send request, IP address}->NIC->{send request, MAC address}->network->another NIC{send request, IP address}->operating system->{send command}->another user.

Is this simple enough? Then start searching for "RFC" on google.com and read and read....
Good luck.
Random Solutions  
 
programming4us programming4us