Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-14-2008, 02:43 PM
|
#1
|
|
Member
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 331
Rep:
|
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
|
|
|
|
09-14-2008, 03:21 PM
|
#2
|
|
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
|
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/
|
|
|
|
09-14-2008, 03:21 PM
|
#3
|
|
Moderator
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,505
Rep: 
|
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.
|
|
|
|
09-14-2008, 04:05 PM
|
#4
|
|
Member
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 331
Original Poster
Rep:
|
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.
|
|
|
|
09-14-2008, 04:08 PM
|
#5
|
|
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
|
Re: 1 & 2. Both MAC and IP addresses are required in EACH packet.
3. I don't understand your question. Can you rephrase?
|
|
|
|
09-15-2008, 01:42 PM
|
#6
|
|
Member
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 331
Original Poster
Rep:
|
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.
|
|
|
|
09-15-2008, 02:33 PM
|
#7
|
|
Senior Member
Registered: Jun 2008
Posts: 2,529
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:03 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|