netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Ben Greear <greearb@candelatech.com>
Cc: Rick Jones <rick.jones2@hp.com>, netdev <netdev@vger.kernel.org>
Subject: Re: IP address: property of host or interface?
Date: Mon, 26 Jan 2009 21:20:26 +0300	[thread overview]
Message-ID: <497DFEEA.20700@msgid.tls.msk.ru> (raw)
In-Reply-To: <497DFBC2.4030903@candelatech.com>

Ben Greear wrote:
> Rick Jones wrote:
>>> So.. am I right that an IP address is a HOST property, not an INTERFACE
>>> property, and that the traditional way is just more convenient to set
>>> up? And
>>> that all the tools that complains that "there's no IP address
>>> assigned to this
>>> interface" (tcpdump) are wrong? :)
>>
>> There are two "schools" of thought - the Linux stack follows the "weak
>> end system" model in which IP addresses are treated as a host
>> property.  There is another school of thought called the "strong end
>> system" model where IP addresses are an interface property.  There are
>> some "other" stacks out there which can be configured to behave in a
>> "strong end system" way but they tend to default to more of something
>> in between the two.

As someone else pointed out, it's all described in RFC1122 (1989!).
It was quite.. interesting reading.

>> Tcpdump may simply be caught in the middle :)

heh.

> With a bit of configuring (away from system defaults), Linux can behave
> as a 'strong end system', and even

Well, that's quite "a bit". Involves iptable filters.

> in default behaviour, I don't believe it will process IP packets from an
> interface that has NO IP address assigned
> to it.

Just try it.  Trivial to do.  Assume you've a "simple-workstation"
config (no fancy stuff just lo and eth0 with single ip) with
192.168.1.5/24 on your eth0:

# ip addr add 192.168.1.5/32 dev lo  <== assigns that IP to lo interface
# ifconfig eth0 0.0.0.0  <= clears it (and routes) from eth0 but
                         <= keeps the interface up
# ip route add 192.168.1.0/24 dev eth0 <= restores the route

Now ping (or whatever) 192.168.1.5 from any host on eth0 segment.
All IP/TCP/UDP/etc stuff will work as usual.

/mjt

      reply	other threads:[~2009-01-26 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-24 13:57 IP address: property of host or interface? Michael Tokarev
2009-01-26 17:43 ` Rick Jones
2009-01-26 18:06   ` Ben Greear
2009-01-26 18:20     ` Michael Tokarev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497DFEEA.20700@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=greearb@candelatech.com \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).