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 04-14-2010, 12:44 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Do IP addresses belong to the interface or to the system?


The subject has the big question. I've read answers both ways. The kernel has documentation that says the IP addresses belong to the system. Yet the configuration works as though they belong to the interface.

Shouldn't we have it just one way and stick with it ... and make everything work that way?

If IP addresses truly belong to the system, then a command to configure an IP address should not need (and not even accept) the name of an interface. The only exceptions would be link-local addresses (which by their nature do suggest being interface specific ... and they should be autoconfigured by the kernel, anyway). Interfaces would only need to be brought up or down.
 
Old 04-14-2010, 03:39 PM   #2
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
If I have understood what you are asking, I think the way to think about this is as follows:
  • if you have a box with several interfaces, could you be concerned about which interface has which address?

I think that the answer to that question is yes, so you want the interface to have a particular address, rather than just say 'the box has 192.168.0.1 and 10.0.0.1 and I don't care which is which' and you'll particularly feel that if one is an wlan and another is a eth, or one is 10 or 100 times faster than another.

If you have only one interface, you might think that this is a rather hypothetical discussion, and not much care. My theory is that because of this, people get a bit sloppy about using the terminology correctly.
 
Old 04-14-2010, 03:49 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Short answer: The addresses belong to the local network.

Simple example: You are connected to a router. It can be set for a fixed IP on each connection, or it can be set for DHCP. Either way, the IP is dictated by the router.
 
Old 04-14-2010, 03:50 PM   #4
A123
LQ Newbie
 
Registered: Jul 2009
Posts: 9

Rep: Reputation: 0
IP addresses are assigned to interfaces only. The only IP address all systems will have is 127.0.0.1 but that belongs to the 'lo' *interface*.
Additionally, any interface can have multiple IP addresses. Also, you can have multiple interface aliases bound to one physical interface as well. Like "eth0:1".

If some tells you that IP addresses belong to system get their IP address and sue them

Cheers!
 
Old 04-15-2010, 08:08 AM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Have a look at ${kernelsourcetree}/Documentation/networking/ip-sysctl.txt and scroll down to around line 755, and/or search for the string "arp_filter" or "IP addresses are owned by". Read the description for the default behaviour of the "arp_filter" setting.

What I am finding is the actual behaviour is somewhere between these two.

The situation I'm running into is that in many cases a particular interface won't work for some packets (even though it is UP and RUNNING and can send and receive packets) for as-yet unknown reasons. I'd like some way to make it NOT send ARPs in these cases. I want it to only send ARP on the interface that will work, even though both interfaces get the ARP request. But I think this really needs to determine why things are not working, first. Unfortunately all the machines I have spare that I can do testing on only have one ethernet interface. So I'm limited on the testing I can sneak in on machines I'm trying to roll into production (which have 2 ethernet interfaces, with currently only one being configured UP due to these entangled issues).
 
Old 04-15-2010, 08:13 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by A123 View Post
IP addresses are assigned to interfaces only.
Cheers!
....assigned to the interfaces by the local network. Going back to my simple router example, the router controls what IP is used for each machine. (How could it be otherwise?)
 
Old 04-15-2010, 08:16 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Skaperen View Post
Have a look at ${kernelsourcetree}/Documentation/networking/ip-sysctl.txt and scroll down to around line 755, and/or search for the string "arp_filter" or "IP addresses are owned by". Read the description for the default behaviour of the "arp_filter" setting.
.
<snip>
.
So I'm limited on the testing I can sneak in on machines I'm trying to roll into production (which have 2 ethernet interfaces, with currently only one being configured UP due to these entangled issues).
I'm having trouble relating this to the fundamental question of who owns the IP addresses that exist at each interface.
 
Old 04-15-2010, 09:09 AM   #8
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by pixellany View Post
....assigned to the interfaces by the local network. Going back to my simple router example, the router controls what IP is used for each machine. (How could it be otherwise?)
But what controls which interface that ARP queries for that IP may be answered on? And what if the route table specifies both interface devices (same gateway IP)?
 
Old 04-15-2010, 09:15 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I might have too simplistic a view of what the question is----Perhaps you could describe a physical configuration---eg "3 computers connected to a router using dhcp".....and then a specific scenario---eg "computer A requests/does something, and computer B responds"
 
Old 04-15-2010, 09:16 AM   #10
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by pixellany View Post
I'm having trouble relating this to the fundamental question of who owns the IP addresses that exist at each interface.
It seems the way Linux is documented to behave, it should be possible to simply assign an IP address to the system, instead of an interface (without necessarily removing the capability to assign to an interface). With that, then an ARP arriving on any interface asking for that IP address should be answered. But shouldn't the DEFAULT be that if you assign an IP address to just ONE interface, then ARPs for that IP should only be answered on THAT interface? Well, that might be a more philosophical issue. I am currently trying to wrap MY head around the "inconsistent" (to me) notion that it can be both ways ... that the IP address can be owned by the system, while the only means of configuring them is specific to an interface. One exception might be the "lo" interface. You can assign more IP addresses to it. But it works even less consistently.
 
Old 04-15-2010, 01:13 PM   #11
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Same behaviour exists with IPv6.
 
Old 04-15-2010, 02:01 PM   #12
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
I always thought the answer was the tcp/ip stack (layer 3) on the device concerned be it router or host. IP addresses being pure logical things and all that. That's 'who' and 'where' it belongs to.
 
Old 04-15-2010, 02:04 PM   #13
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Skaperen View Post
Same behaviour exists with IPv6.
How about the question in post #9?
 
Old 04-15-2010, 07:21 PM   #14
ToFue
LQ Newbie
 
Registered: Nov 2008
Location: NOLA
Distribution: Ubuntu10.4 (x86 & 64)
Posts: 6

Rep: Reputation: 0
I've always seen ip as an 'agreement' between devices to communicate, not as devA owns comm channel-1, and devB slaves to devA.. It's analogous to radio: a station broadcasts on a frequency, and the listener tunes into that frequency to quantify anything relevant - same w/ o/s vs interfase. the ARP is simply the signal In the frequency, and the interface must understand or pass it off to what can make sense of it. if one interface can interpret or transduce the signal, then its guts & firmware are wired for it, but the OS still has to manage what it means..

I believe that ip isn't owned by either, just like a radio signal isn't owned by its translating hardware. I'm sure there could be a software solution for what you've exampled to do for the ARP routing, per conditional handling, even if it's not yet specifically written. Just think of the interface as a transducer..

plz express if there's fault with this view.
 
Old 04-15-2010, 08:10 PM   #15
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by ToFue View Post
I've always seen ip as an 'agreement' between devices to communicate, not as devA owns comm channel-1, and devB slaves to devA.. It's analogous to radio: a station broadcasts on a frequency, and the listener tunes into that frequency to quantify anything relevant - same w/ o/s vs interfase. the ARP is simply the signal In the frequency, and the interface must understand or pass it off to what can make sense of it. if one interface can interpret or transduce the signal, then its guts & firmware are wired for it, but the OS still has to manage what it means..

I believe that ip isn't owned by either, just like a radio signal isn't owned by its translating hardware. I'm sure there could be a software solution for what you've exampled to do for the ARP routing, per conditional handling, even if it's not yet specifically written. Just think of the interface as a transducer..

plz express if there's fault with this view.
Go back to my simple router example. The computers on the local network have to comply with the settings of the router. I don't think there is any ambiguity in this.
 
  


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
Two IP addresses on one interface Murdock1979 Linux - Networking 2 09-08-2009 09:01 AM
LXer: Tutorial: Assigning Multiple Addresses to a Network Interface LXer Syndicated Linux News 0 10-10-2008 04:30 PM
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
SMP system :how to know which CPU a process belong to ? hhshr825 Linux - Newbie 4 01-11-2008 02:04 AM
mechanics of mapping process memory addresses to physical addresses on amd64 Tischbein Linux - Kernel 2 02-01-2007 08:09 PM

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

All times are GMT -5. The time now is 07:32 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