mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* stupied userspace programs or kernel bug ?
@ 2004-07-07 12:28 Adam Popik
  2004-07-07 14:15 ` Mark Watts
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Popik @ 2004-07-07 12:28 UTC (permalink / raw)
  To: linux-kernel

Hello ;
That is a problem:
linux#ifconfig eth0 192.168.1.1
linux#ifconfig lo:1 192.168.1.100 netmask 255.255.255.255 up
	       ^^^^
otherlinuxonsamenet#ifconfig eth0 192.168.1.2
otherlinuxonsamenet#ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=2.20 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=19.6 ms

That was good but:
otherlinuxonsamenet#ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=0 ttl=64 time=2.20 ms
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=19.6 ms

That are no computers on net with ip 192.168.1.100.

Why that's works (on solaris, freebsd simply don't work - thats ok )?

PS Sorry for broken english
Adam
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: stupied userspace programs or kernel bug ?
  2004-07-07 12:28 stupied userspace programs or kernel bug ? Adam Popik
@ 2004-07-07 14:15 ` Mark Watts
  2004-07-07 14:54   ` Adam Popik
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Watts @ 2004-07-07 14:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Adam Popik

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Hello ;
> That is a problem:
> linux#ifconfig eth0 192.168.1.1

Because you didn't specify a netmask, it defaulted to 255.255.255.0

> linux#ifconfig lo:1 192.168.1.100 netmask 255.255.255.255 up

Although you specified a tighter netmask here, the routing table is such that 
192.168.1.0/24 is routed out eth0, overriding the fact that 1.100 is on lo:1

I'll bet the kernel responds to the ICMP echo request because it knows it 
holds the IP for 1.100 so it should respond, yet its outbound routing tells 
it to respond via eth0. (somone connect me if I'm wrong)

This is probably a side effect of having two interfaces on the same subnet, 
and having the /24 subnet higher up the routing rable than the /32 host.

I believe the behaviour you are seeing is 'by design' although the merits of 
this have been discussed to death in the past (IIRC)

Mark.

- -- 
Mark Watts
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services group
GPG Public Key ID: 455420ED

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7AVuBn4EFUVUIO0RAlXpAJ9I1FBUhqDDgV3Tvs53NjSM9BQq9QCeIVeu
f4Jzs0L/LlvjOsm8CcMNoJs=
=/jLZ
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: stupied userspace programs or kernel bug ?
  2004-07-07 14:15 ` Mark Watts
@ 2004-07-07 14:54   ` Adam Popik
  2004-07-07 19:47     ` Dub Spencer
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Popik @ 2004-07-07 14:54 UTC (permalink / raw)
  To: Mark Watts; +Cc: linux-kernel

On Wed, 7 Jul 2004, Mark Watts wrote:
That test was with 2 host network and no more hosts, routers and others...
linux#  shold have this address for virtual use only on that 
machine (loopback interface), 
netmask on all linuxboxes are same, onlny on lo was /32. When I use /24 
mask and router (routing was good until assinging ip address to loopback)
network traffic is broken about 40 icmp requests (outside local net)...
Is linux bugs ?
on same test on FreeBSD and Solaris 9 no problems (loopback is and only 
loopback)

Adam

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> > Hello ;
> > That is a problem:
> > linux#ifconfig eth0 192.168.1.1
> 
> Because you didn't specify a netmask, it defaulted to 255.255.255.0
Yes it C ...
> 
> > linux#ifconfig lo:1 192.168.1.100 netmask 255.255.255.255 up
> 
> Although you specified a tighter netmask here, the routing table is such that 
> 192.168.1.0/24 is routed out eth0, overriding the fact that 1.100 is on lo:1
> 
> I'll bet the kernel responds to the ICMP echo request because it knows it 
> holds the IP for 1.100 so it should respond, yet its outbound routing tells 
> it to respond via eth0. (somone connect me if I'm wrong)
> 
> This is probably a side effect of having two interfaces on the same subnet, 
> and having the /24 subnet higher up the routing rable than the /32 host.
> 
> I believe the behaviour you are seeing is 'by design' although the merits of 
> this have been discussed to death in the past (IIRC)
> 
> Mark.
> 
> - -- 
> Mark Watts
> Senior Systems Engineer
> QinetiQ Trusted Information Management
> Trusted Solutions and Services group
> GPG Public Key ID: 455420ED
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFA7AVuBn4EFUVUIO0RAlXpAJ9I1FBUhqDDgV3Tvs53NjSM9BQq9QCeIVeu
> f4Jzs0L/LlvjOsm8CcMNoJs=
> =/jLZ
> -----END PGP SIGNATURE-----
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: stupied userspace programs or kernel bug ?
  2004-07-07 14:54   ` Adam Popik
@ 2004-07-07 19:47     ` Dub Spencer
  0 siblings, 0 replies; 4+ messages in thread
From: Dub Spencer @ 2004-07-07 19:47 UTC (permalink / raw)
  To: Adam Popik; +Cc: linux-kernel

On Wed, Jul 07, 2004 at 04:54:01PM +0200, Adam Popik wrote:
> On Wed, 7 Jul 2004, Mark Watts wrote:
> That test was with 2 host network and no more hosts, routers
> and others...  linux#  shold have this address for virtual
> use only on that machine (loopback interface), netmask on
> all linuxboxes are same, onlny on lo was /32.  When I use
> /24 mask and router (routing was good until assinging ip
> address to loopback) network traffic is broken about 40 icmp
> requests (outside local net)...  Is linux bugs ?  on same
> test on FreeBSD and Solaris 9 no problems (loopback is and
> only loopback)

you may want to check the installed routes, it may well be a
system configuration issue: netstat -ran (-finet on bsd), and
look if the local 192... address doesnt get routed via lo.

dub

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-07 19:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-07 12:28 stupied userspace programs or kernel bug ? Adam Popik
2004-07-07 14:15 ` Mark Watts
2004-07-07 14:54   ` Adam Popik
2004-07-07 19:47     ` Dub Spencer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®