LinuxQuestions.org
Visit Jeremy's Blog.
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 08-28-2011, 10:33 AM   #1
retxed
Member
 
Registered: Sep 2009
Location: Chennai
Distribution: Ubuntu 11.10 and back track 4
Posts: 45

Rep: Reputation: 9
Lightbulb why MAC & IP both are needed ?


hello LQ members !

I have a basic fundamental doubt about why both MAC address and IP address are needed ?

can't only one suffice ? if not then why they are both needed ?
 
Old 08-28-2011, 10:38 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
One reason: organising the network into subnets would become impossible if only the MAC was used.
 
Old 08-28-2011, 10:50 AM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
MAC is layer 2 address, IP is layer 3 address. if it is assignment, you have to find the answer on your own way
 
Old 08-28-2011, 12:07 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@retxed: Right, this question is totally ambiguous. Are you referring to a particular configuration file? Or general understanding?

If the latter, study the OSI model, and pick up a book on IP from your library.
 
Old 08-28-2011, 02:44 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Just they way they did it and I doubt it will change.
 
0 members found this post helpful.
Old 08-28-2011, 06:55 PM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Theoretically, one identifies the hardware uniquely, and the other doesn't. So, the one that works before network set up has been completed doesn't need all of networking to be working in order to be there and is what you need while setting up the rest of networking.

Now, when you consider networking that passes through routers, etc, etc, the hardware ident doesn't pass, so the way networking is constructed today does need the two. You could, perhaps, argue that if, thirty years ago, when the networking infrastructure was being architected, it could have been constructed rather differently, using only the hardware address, but it wasn't. Today, there is too much to change.

Oh, and by the way, almost every firewall in the world would fail, and would become an absolute pain to maintain. And, the kind of networking that everyone takes for granted with wireless hotspots, would be another total pain (I can think of use cases in which iptables would become unworkable, but you could argue that we'd have something rather different from iptables, because today's iptables would be unworkable, but maybe something more like ebtables would do it).
 
1 members found this post helpful.
Old 08-29-2011, 06:09 AM   #7
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by salasi View Post
You could, perhaps, argue that if, thirty years ago, when the networking infrastructure was being architected, it could have been constructed rather differently, using only the hardware address, but it wasn't. Today, there is too much to change.
As mentioned by kirukan, it's a matter of layer too. There is/was DECnet, LAT, AppleTalk,... running on the same ethernet hardware - they all don't use a TCP/IP address.
 
Old 08-29-2011, 08:58 AM   #8
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
This misunderstanding keeps cropping up. MAC addresses are only relevant to Ethernet and Token-Ring type networks. An IP packet must traverse many types of network - Ethernet, ATM, Frame Relay, PPP, ISDN, etc and MAC addresses mean nothing to these technologies. A MAC address serves to get the IP packet from your PC to your router over your ethernet network, but then it is de-encapsulated from its Ethernet frame and encapsulated into a container suitable for the next link in the chain, probably PPP. IP must have its own independant means of addressing endpoints regardless of the physical network type they are connected to. Hence why it is considered to be a higher "layer" than any of these other protocols.

Code:
  <---------------------------L3--------------------------->
       <-----L2------>        <--L2--->       <----L2---->
[hostA]---(ethernet)--[router]--(PPP)--[router]--(ATM)----[hostB]
i.e. How could host hostA communicate with hostB when hostB has no concept of a MAC address?
Answer - they both have IP addresses that are independant of their Layer2 addressing

Last edited by baldy3105; 08-29-2011 at 09:00 AM.
 
1 members found this post helpful.
Old 08-29-2011, 05:29 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Edit.

Never mind.

Last edited by jefro; 08-29-2011 at 05:31 PM.
 
  


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
Acer One Linpus Linux Lite & Mac OS X & Nokia Symbian S60 - Best of friends ??? TokoUnion Linux - Newbie 1 08-17-2009 12:38 PM
ATIIXP & ALSA & DMix help needed (mplayer & xmms audio same time) Angelus Linux - Hardware 7 06-23-2006 06:05 AM
Mac OS & Linux Area needed? sbleecker LQ Suggestions & Feedback 1 12-15-2005 07:57 AM
Linux & Win lilke Mac & DOS in Quadra610 txino Linux - Hardware 3 07-20-2005 04:51 PM
Networking Mac OS X with Suse 9.1 -Help needed pav Linux - Networking 5 11-15-2004 04:44 PM

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

All times are GMT -5. The time now is 08:13 PM.

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