LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-14-2008, 02:43 PM   #1
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
IP addresses Vs MAC and ARP


Hello friends!

i was doing some stuff on ARP for my collge study.ARP is used tp map MAC addresses to IP adresses.

I have visited many web page for to figure out the confusion in my mind. The confusion is here....

1. if we can identify a host with the IP address. then why we need a MAC address to send frames to particular host.

ANS. the theory behind this concept is that the data link layer did not know to communicate with devices using IP address.

But friends i want to know why these layer did not know about it.

Friends please can u tell me all about this why & how arp works like this and what are the various step involved when a host want to transmit a frame using ARP

Thanks
 
Old 09-14-2008, 03:21 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
TCP/IP networking is a packet switching network, and uses a layered approach, that separates out layers of functionality. The data link layer uses HARDWARE addresses, which are globally unique to each piece of hardware. The IP layer uses IP addresses, which are not globally unique. The IP layer is where routing occurs. At the MAC layer, only devices directly connected to the net network (wire) can receive packets.

For more overview, see Lecture Notes 1, 2, and 3 at:

http://cis68c2.mikecappella.com/
 
Old 09-14-2008, 03:21 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
ARP is the Address Resolution Protocol. ARP, as you correctly stated, is used to map MAC (Hardware) addresses to IP Addresses. IP Addresses are not directly used as some protocols do not use IP (this is very uncommon these days, but look at NetBEUI from the Win 9X days). Also, most network cards and network switches have no knowledge of IP addresses, only hardware addresses. Additionally, without MAC addresses machines could not function on a network before receiving an IP address in the case of BOOTP or DHCP.
 
Old 09-14-2008, 04:05 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Original Poster
Rep: Reputation: 34
oh! My friends

You people are great.

I understand this

1. MAC address is must to send frames from one host to another or we can to communicate two computers. (e.g. in LAN)

2. IP address are required where we need to transfer packets from one network to another.

3. (my only confusion left) the more i can figure ot that there are some communication between computers that needs such protocols (http,dns, ftp) that can possible only through IP address.

all the above said under standing of mine is correct?. Esp the last one.

Please reply

Thanks for so much nice & quick response.
 
Old 09-14-2008, 04:08 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Re: 1 & 2. Both MAC and IP addresses are required in EACH packet.

3. I don't understand your question. Can you rephrase?
 
Old 09-15-2008, 01:42 PM   #6
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Original Poster
Rep: Reputation: 34
Hi Mr. C


Thanks for help

The confusion was that:

To send packets/data from one computer to another If we have IP address to identify a particular host on particular Network. Then why we need MAC addresses as well?

My understanding from above said discussion is that ...


1. The Frames contains MAC & IP addressed both.

2. As the lower layers device hubs/switches/network cards dont know about Ip address so they send & receive the packets by using MAC addresses only(the IP is nothing for them). (SO WE NEED MAC ADDRESSES IN FRAMES)

3 But the higher layers devices or application (routers, Http/ftp/telnet/DNS) are designed to send/receive packets only on the based of IP addr.(they dont know MAC addresses) (SO WE NEED IP ADDRESSES IN FRAMES)

but as i know router know about both MAC & IP addresses.

Means the router is designed to work with both of them.

So sir please explain.

Is this understanding is right?

Please reply

Thanks

Last edited by KinnowGrower; 09-15-2008 at 01:45 PM.
 
Old 09-15-2008, 02:33 PM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Yes, that is essentially correct.

Re: 3. Some higher level applications such as DHCP require MAC addresses, so keep this in mind too.

Take note also that network card device drivers also care about IP addresses. For example, they need to accept subscribed multicast packets and program the interface to accept these packets by examining the IP address upon reception. So, while you can think of the network card hardware itself being a layer 2 device, its driver is both layer 2 and 3 (and sometimes does more, such as allowing for tcp checksum offloading).

A very important point: the divisions between the 7-layer ISO stack are NOT perfect and clear. There are many instances where one layer "violates" another layer's encapsulation by peeking into, or modifying, another higher or lower layer's data. In traditional *nix TCP/IP implentation, there are from 3-5 layers, depending upon who you ask. Again, refer to the lecture notes or other references for more details.

It is also important to note that many of today's switches are *smart* in that they perform some layer 3 functionality, and some routers perform layer 2, and layer 4 or higher functionality. More and more devices are becoming all-in-one appliance-like.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
arp giving me incomplete mac addresses iamnotherbert Linux - Networking 2 01-02-2014 06:36 AM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 13 02-24-2008 08:16 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 1 02-09-2008 07:17 AM
Mapping IP addresses to MAC addresses basilio Linux - Networking 17 09-12-2007 01:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration