Unix Technical Forum

Network interface listens for all IPs configured

This is a discussion on Network interface listens for all IPs configured within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, This phenomena isn't slackware specific, but as I've seen it for the first time on my 10.2 box ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 02:45 PM
Joel Hatton
 
Posts: n/a
Default Network interface listens for all IPs configured

Hi,

This phenomena isn't slackware specific, but as I've seen it for the
first time on my 10.2 box I think it's ok to ask here.

I have three physical interfaces in my host, eth0/1/2. All are
configured with IPs on a private net eg 10.0.0.1/2/3 and all are 'UP'.
RJ45 attached to eth0 only. From another host on the same net, pinging
any of the three IPs will receive a response via this interface -
unexpected!

Is there a way to disable this behaviour? I would expect only replies
for eth0's configured IP via eth0, and so on...

thanks,
joel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:45 PM
Grant
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

On Thu, 23 Feb 2006 11:38:50 +1000, Joel Hatton <uqjhatto+news@uq.edu.au> wrote:

>I have three physical interfaces in my host, eth0/1/2. All are
>configured with IPs on a private net eg 10.0.0.1/2/3 and all are 'UP'.
>RJ45 attached to eth0 only.


For what reason you want the box to appear on the same network
segment three times over?
>
>Is there a way to disable this behaviour? I would expect only replies
>for eth0's configured IP via eth0, and so on...


Crazy, just down the unused interfaces with ifconfig. Each NIC
should be on a different network segment.

For example I have a three NIC box:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
203.220.79.66 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.192 - 255.255.255.192 ! 0 - 0 -
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0

eth2 -> ppp0 for ADSL to world

Grant.
--
.... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 02:45 PM
Joel Hatton
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

Grant wrote:
> On Thu, 23 Feb 2006 11:38:50 +1000, Joel Hatton <uqjhatto+news@uq.edu.au> wrote:
>
>> I have three physical interfaces in my host, eth0/1/2. All are
>> configured with IPs on a private net eg 10.0.0.1/2/3 and all are 'UP'.
>> RJ45 attached to eth0 only.

>
> For what reason you want the box to appear on the same network
> segment three times over?


The question was somewhat hypothetical, but I'd like to know
nevertheless. Your example is certainly helpful, and I'll take your
advice on board, but you didn't answer my question.

regards,
joel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 02:45 PM
Grant
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

On Thu, 23 Feb 2006 21:50:45 +1000, Joel Hatton <uqjhatto+news@mailbox.uq.edu.au> wrote:

>advice on board, but you didn't answer my question.


Yes I did, a 'normal' (non-bridged setup) box responds on its matching
network interface address -- given three addresses on same network it
may respond to all three addr on _one_ physical interface as that does
what is expected. What part of that answer you not see?

Grant.
--
.... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 02:45 PM
William Hunt
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

On Thu, 23 Feb 2006, Joel Hatton wrote:
> Grant wrote:
>> On Thu, 23 Feb 2006 11:38:50 +1000, Joel Hatton <uqjhatto+news@uq.edu.au>
>>> I have three physical interfaces in my host, eth0/1/2. All are configured
>>> with IPs on a private net eg 10.0.0.1/2/3 and all are 'UP'. RJ45 attached
>>> to eth0 only.

[...]
> The question was somewhat hypothetical, but I'd like to know nevertheless.


normal behaviour - you have a 'multi-homed' box. it knows itself by
any of the assigned ip#. it does not care which interface a packet came
in on, just that it has reached the destination host. 'ifconfig ethx down'
doesn't change the machine identity. similarly, note that ip_forward doesn't
affect this behaviour either.


--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 02:45 PM
William Hunt
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

On Thu, 23 Feb 2006, Joel Hatton wrote:
> Grant wrote:
>> On Thu, 23 Feb 2006 11:38:50 +1000, Joel Hatton <uqjhatto+news@uq.edu.au>

[...]
> The question was somewhat hypothetical, but I'd like to know nevertheless.
> Your example is certainly helpful, and I'll take your advice on board, but
> you didn't answer my question.



You can circumvent this behaviour by assigning a new ip# to the
interface which you had previously assigned an ip# to that you now
want to 'release', such that the host will no longer respond to the
old ip#. This can be done with ifconfig. Suppose you have:

# ifconfig eth2 10.0.0.2 netmask 255.0.0.0

and now you want to 'release' it. bring the interace
down with something like:

# ifconfig eth2 10.0.0.254 netmask 255.0.0.0 down

When you want to bring the interface back up, explicitly
assign whaterver ip# :

# ifconfig eth2 10.0.0.102 netmask 255.0.0.0


--
William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 02:46 PM
lamerfreak
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

>>advice on board, but you didn't answer my question.
>
>Yes I did, a 'normal' (non-bridged setup) box responds on its matching
>network interface address -- given three addresses on same network it
>may respond to all three addr on _one_ physical interface as that does
>what is expected. What part of that answer you not see?


How about:

"Is there a way to disable this behaviour?"

Technically, the only actual question of his post.

I'm actually curious about this as well. I've noted this on my
slackware boxes and didn't have to think about it - until I've come
across RedHat, etc, that *don't* seem to do it out-of-the-box.

Think it's a kernel option, but don't know what.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 02:46 PM
Grant
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

On Thu, 23 Feb 2006 16:44:13 -0600, lamerfreak <laaaaameeeeerfreak@namor.ca> wrote:

>>>advice on board, but you didn't answer my question.

>>
>>Yes I did, a 'normal' (non-bridged setup) box responds on its matching
>>network interface address -- given three addresses on same network it
>>may respond to all three addr on _one_ physical interface as that does
>>what is expected. What part of that answer you not see?

>
>How about:
>
>"Is there a way to disable this behaviour?"


repeat after me: ifconfig down eth1; ifconfig down eth2 )
as three NICs on same network segment useless
>
>Technically, the only actual question of his post.


Disagree, are you thinking of teaming (Intel-speak) NICs to
speed up the link?

>Think it's a kernel option, but don't know what.


Perhaps iproute2 or bridging? Niki K. did bridging and wrote about
it here recently.

Grant.
--
.... The computer scientist, who had listened to all of this said,
"Yes, but where do you think the chaos came from?"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 02:46 PM
lamerfreak
 
Posts: n/a
Default Re: Network interface listens for all IPs configured

>>>>advice on board, but you didn't answer my question.
>>>
>>>Yes I did, a 'normal' (non-bridged setup) box responds on its matching
>>>network interface address -- given three addresses on same network it
>>>may respond to all three addr on _one_ physical interface as that does
>>>what is expected. What part of that answer you not see?

>>
>>How about:
>>
>>"Is there a way to disable this behaviour?"

>
>repeat after me: ifconfig down eth1; ifconfig down eth2 )
>as three NICs on same network segment useless


Ahhhh... technically right, but not in the spirit. I see.

>>Technically, the only actual question of his post.

>
>Disagree, are you thinking of teaming (Intel-speak) NICs to
>speed up the link?


Hrm? Don't think I asked.

>>Think it's a kernel option, but don't know what.

>
>Perhaps iproute2 or bridging? Niki K. did bridging and wrote about
>it here recently.


I'll look through my options again. I do my own kernels every time as
well, so if that, it would have to be part of some innocuous portion
that I'm keeping in common, I think.

iproute2 I know would do this, and I've played with it in a limited
degree on another (non-Slack) server. Not sure whether it's enabled
on other systems by default, though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:06 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com