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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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?" |
| |||
| 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 |
| |||
| 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?" |
| |||
| 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 |
| |||
| 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 |
| |||
| >>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. |
| |||
| 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?" |
| ||||
| >>>>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. |
| Thread Tools | |
| Display Modes | |
|
|