SUMMARY and ANOTHER Q: Why can't I connect to hosts on my subnet?

From: David Lawrence Oppenheimer (davido@davido.remote.Princeton.EDU)
Date: Sun Jun 19 1994 - 10:20:32 CDT


Sun-Managers,

Hello again. I have received enough similar responses to my original query,
that
I shall now post a summary of responses received, and ask another question
which
these responses introduced.

The original question was:

-------------------------------------------------------------------------------

The SLIP saga continues. In our last episode, I found that cslip-2.7 works
well and comes with good documentation. By following the directions and not
hacking the files myself, I was able to get everything working fine.

Almost.

The problem I have is that I can reach any host on the Internet *except* hosts
on my subnet. For example, my subnet mesk is 0xfffffc00 (255.255.252.0) and my
IP address is 128.112.64.99. So I am not able to reach, for example, a host
with an IP address of 128.112.65.33 (ping, telnet, etc.)

Interesting observation: When I try to initiate a TCP connection with a host
on my subnet, instead of going over my SLIP link, the connection request seems
to go over the (unused and unconnected) Ethernet port. I say this because
immediately upon typing 'ping foobar' where foobar is on my subnet, I get the
le0: No carrier - twisted pair cable problem or hub link test disabled?
message once per second on the console (this doesn't happen with such
connections to hosts not on my subnet). So it certainly makes sense that I
can't reach hosts on my subnet, if the connect request isn't even going out
over the SLIP line. (Connections to all other hosts do go through the sl0 SLIP
interface).

Here is the information given by slinfo:

        if_unit if_mtu if_addr ia_net
              0 552 128.112.64.99 128.112.0.0
    ifa_dstaddr ia_netmask ia_subnet ia_subnetmask
 128.112.64.164 255.255.0.0 128.112.64.0 255.255.252.0

       if_flags 1051 (UP,POINTOPOINT,RUNNING,LINK0)
    if_ipackets if_ierrors if_opackets if_oerrors if_collisions
           7747 0 7919 0 0
       if_timer ifq_len ifq_maxlen ifq_drops
              0 0 50 0

[I delete the rest, it's not interesting.]

ifconfig gives the following information for the SLIP (sl0) and Ethernet (le0)
interfaces on my system:

sl0: flags=1051<UP,POINTOPOINT,RUNNING,LINK0>
        inet 128.112.64.99 netmask fffffc00
le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
        inet 128.112.64.99 netmask fffffc00 broadcast 128.112.64.0

[128.112.64.164 is the IP address of the SLIP server. I am able to connect to
the SLIP server, which is on my subnet, but that's the only machine on my
subnet to which I can connect.]

Does anyone know why the system tries to send packets destined for machines on
my subnet over the Ethernet connection instead of SLIP? I have tried ifconfig
le0 down to get the Ethernet disabled but that makes the whole system crash.

Routing note: the slip.login script automatically does a

route -n add default <SLIP_server_address_here> 1

so I assume all my packets to ANY address should be sent to the SLIP server
first (?)

Additional information: System is a Sun SS5 running SunOS 4.1.3_U1. I am using
the cslip-2.7 program and the modem is connected to my serial port A.

--------------- SUMMARY OF RESPONSES -----------------------------------------

To: davido@Princeton.EDU
Subject: Re: Q: Why can't I connect to hosts on my subnet?
Date: Sat, 18 Jun 1994 15:08:40 -0500
From: Neil W Rickert <rickert@cs.niu.edu>

>Interesting observation: When I try to initiate a TCP connection with a host
>on my subnet, instead of going over my SLIP link, the connection request
seems
>to go over the (unused and unconnected) Ethernet port.

Have you tried running the system without ethernet. That is, have
you tried commenting out the 'ifconfig' line for the ethernet port in
/etc/rc*, and rebooting. [Don't try unless you have alternate ways of
booting - just in case it doesn't come up.]

Alternatively, have you tried assigning your ethernet connection a
totally bogus address which does not correspond to any known network?

------------------------------------------------------------------------------

Date: Sat, 18 Jun 94 16:43:04 EDT
From: stpeters@bird.crd.ge.com (Dick St.Peters)
To: davido@Princeton.EDU
Subject: Re: Q: Why can't I connect to hosts on my subnet?

>sl0: flags=1051<UP,POINTOPOINT,RUNNING,LINK0>
> inet 128.112.64.99 netmask fffffc00
>le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
> inet 128.112.64.99 netmask fffffc00 broadcast 128.112.64.0
>
>[128.112.64.164 is the IP address of the SLIP server. I am able to connect to
>the SLIP server, which is on my subnet, but that's the only machine on my
>subnet to which I can connect.]
>
>Does anyone know why the system tries to send packets destined for machines
on
>my subnet over the Ethernet connection instead of SLIP? I have tried ifconfig
>le0 down to get the Ethernet disabled but that makes the whole system crash.

Try ifconfig'ing the le0 to some other address and turning it off,
for a quick and dirty example:

  ifconfig le0 6.0.0.1 down

------------------------------------------------------------------------------

Date: Sat, 18 Jun 1994 16:43:00 -0700 (PDT)
From: John Stanley <stanley@oce.orst.edu>
Subject: Re: Q: Why can't I connect to hosts on my subnet?
To: davido@Princeton.EDU

On Sat, 18 Jun 1994, David Lawrence Oppenheimer wrote:

> ifconfig gives the following information for the SLIP (sl0) and Ethernet
(le0)
> interfaces on my system:
>
> sl0: flags=1051<UP,POINTOPOINT,RUNNING,LINK0>
> inet 128.112.64.99 netmask fffffc00
> le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
> inet 128.112.64.99 netmask fffffc00 broadcast 128.112.64.0

My understanding of How Things Work (HTW) is that you must have different
interfaces on different nets. That is how the Sun determines which piece
of hardware to use to try to talk to someone.

The netmask determines who is "local" to your host, and thus, who does NOT
need to have packets routed through a gateway. Thus, pinging "local"
addresses will NOT invoke a gateway.

You need to get either end of the slip connection onto different nets.
That way, when you need the gateway, things get send out the slip line.
In your case, this means EVERYTHING is sent through the gateway.

> route -n add default <SLIP_server_address_here> 1
>
> so I assume all my packets to ANY address should be sent to the SLIP server
> first (?)

Only packets to non-local hosts. Local is defined as "not on the same
sub-net".

------------------------------------------------------------------------------

From: blymn@awadi.com.AU (Brett Lymn)
Subject: Re: Q: Why can't I connect to hosts on my subnet?
To: davido@Princeton.EDU
Date: Sun, 19 Jun 1994 11:15:18 +0930 (CST)

According to David Lawrence Oppenheimer:
>
>
>[128.112.64.164 is the IP address of the SLIP server. I am able to connect to
>the SLIP server, which is on my subnet, but that's the only machine on my
>subnet to which I can connect.]
>
>Does anyone know why the system tries to send packets destined for machines
on
>my subnet over the Ethernet connection instead of SLIP? I have tried ifconfig
>le0 down to get the Ethernet disabled but that makes the whole system crash.
>

Try ifconfig'ing the le0 interface to some strange adderss, say
10.10.10.10 (the 10 class A number is the martian net - you should not
see anyone with this address...). This way packets destined for your
subnet will not be routed out the le0 interface.

>Routing note: the slip.login script automatically does a
>
>route -n add default <SLIP_server_address_here> 1
>
>so I assume all my packets to ANY address should be sent to the SLIP server
>first (?)
>

No. The default route will only be taken if the destination address
does not match any of the other routes in the routing table. Normally
on bootup the subnet you are on is routed out the le0 interface, I
assume that route is still there since the interface is claimed to be
up.

------------------------------------------------------------------------------D
ate: Sat, 18 Jun 94 21:18:33 PDT
From: perryh@pluto.rain.com (Perry Hutchison)
To: davido@Princeton.EDU
Subject: Re: Q: Why can't I connect to hosts on my subnet?

> I can reach any host on the Internet *except* hosts on my subnet. For
> example, my subnet mesk is 0xfffffc00 (255.255.252.0) and my IP address is
> 128.112.64.99. So I am not able to reach, for example, a host with an IP
> address of 128.112.65.33 (ping, telnet, etc.)
>
> Interesting observation: When I try to initiate a TCP connection with a host
> on my subnet, instead of going over my SLIP link, the connection request
> seems to go over the (unused and unconnected) Ethernet port ...
>
> ifconfig gives the following information for the SLIP (sl0) and Ethernet
> (le0) interfaces on my system:
>
> sl0: flags=1051<UP,POINTOPOINT,RUNNING,LINK0>
> inet 128.112.64.99 netmask fffffc00
> le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
> inet 128.112.64.99 netmask fffffc00 broadcast 128.112.64.0

Part of the problem is having two interfaces with the same IP address. I'm
pretty sure that's illegal.

> I am able to connect to the SLIP server, which is on my subnet, but that's
> the only machine on my subnet to which I can connect.
>
> Does anyone know why the system tries to send packets destined for machines
> on my subnet over the Ethernet connection instead of SLIP ...
> I assume all my packets to ANY address should be sent to the SLIP server
> first (?)

Nope, that default route causes all packets *for which no other route
can be found* to go to the slip server. Your ifconfig for le0 implies
an explicit route to machines on that subnet. sl0 conflicts with le0
for routing, as it has the same IP address and netmask. The wonder is
that it works at all.

> I have tried ifconfig le0 down to get the Ethernet disabled but that makes
> the whole system crash.

Probably because ip gets totally hosed by the illegal configuration.

I think you probably need to avoid bringing le0 up in the first place.
That way, the illegal condition will never arise and you won't have to
wonder how to get out of it. Look through /etc/rc* for "ifconfig" and
comment out the one which isn't part of the slip setup, or put the
"ifconfig le0 down" in the slip setup ahead of the "ifconfig sl0 up".

------------------------------------------------------------------------------
                       AND NOW, THE QUESTION PART....
                       ------------------------------

In response to the above, here are the things I tried:

[1] Do an 'ifconfig le0 10.10.10.10' [where 10.10.10.10 is an unused IP
address]

        What happened: X-windows stops functioning. Why? A normal
        netstat reveals:

Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
udp 0 0 localhost.123 *.*
udp 0 0 davido.123 *.*
tcp 0 0 davido.6000 davido.1071 ESTABLISHED
tcp 0 0 davido.1071 davido.6000 ESTABLISHED
tcp 0 0 davido.6000 davido.1065 ESTABLISHED
tcp 0 0 davido.1065 davido.6000 ESTABLISHED
tcp 0 0 davido.6000 davido.1063 ESTABLISHED
...etc...

        But upon ifconfig, netstat shows :

Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
udp 0 0 localhost.123 *.*
udp 0 0 davido.123 *.*
tcp 0 0 davido.6000 10.10.10.10.1414 TIME_WAIT
tcp 0 0 davido.6000 davido.1402 ESTABLISHED
tcp 0 0 davido.1402 davido.6000 ESTABLISHED
tcp 0 0 davido.6000 davido.1401 ESTABLISHED
...etc...

As you can see, the bogus Ethernet port is trying to start an X client to
display on my X server! My X server responds with

Xlib: connection to "davido.remote.Princeton.EDU:0.0" refused by server
Xlib: Client is not authorized to connect to Server
couldn't connect to display "davido.remote.Princeton.EDU"

which make sense, since I haven't told xhost to allow connections from
10.10.10.10 (since I didn't expect the nonexistant Ethernet interface to
try to start an X client on my display).

So then I do xhost +10.10.10.10 just to see what happens when I allow
connections
from 10.10.10.10. Well, the answer is, nothing changes. I no longer get the
Xlib
errors, but still all my packets for hosts on my same subnet get sent out the
unconnected Ethernet port (and I get the le0 unconnected or loopback test
disabled
error) while packets sent to hosts not on my subnet go out over sl0 just fine.
So
this hasn't fixed anything.

[2] Do an 'ifconfig le0 down' while in X.

        What happened: X-windows crashes.

[3] Do an 'ifconfig le0 down' while just on a text console (i.e. before
        starting X) and then start X.

        What happened: X hangs when I start it up, and I have to L1-A to reboot.

[4] Prevent the system from ever brining up le0 by editing /etc/rc.boot and/or
        /etc/rc.local (so that sl0 is the only interface attached at the
        end of the boot process, no le0)

        What happened: X hangs when I start it up.

So it now seems that my problem has changed from a TCP/IP one to an X one.
Namely, why does X insist on my having a le0 interface? And what on earth
is it using that interface for? Is there anything I can do to get X to ignore
le0?

I seem to be in a Catch-22: I can't run X without having the Ethernet (le0)
interface
up, but I can't connect to hosts on my subnet unless I have the Ethernet (le0)
interface
down!

Additional information: I am using X11R5, and the twm window manager.

And thoughts/suggestions/help are most welcome. Many thanks.

David Oppenheimer
davido@Princeton.EDU



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:04 CDT