From: torvalds@klaava.Helsinki.FI (Linus Torvalds) Subject: Re: [Q] Can't do networking with SLS 1.03 Date: 16 Aug 1993 15:33:28 +0300
In article <24nqdc$a44@tuegate.tue.nl> ronald@lowt.phys.tue.nl (Ronald Aarts) writes:
>I still have problems getting my network going with the latest SLS 1.03 release
>(disk a1.3 dated Aug 12). In doinstall I select option 5 for NFS-install and I
>specify my IP-number, network number, etc. My NFS-host is on the same subnet.
>It looks as if the network configuration is OK (no errors or warnings), but
>the NFS-mount doesn't work:
>
>! mount clntudp_create: RPC: Port mapper failure - RPC: Unable to send
>
>My ifconfig and route look like:
>
>! lo IP ADDR 131.155.110.55 BCAST 131.155.255.255 NETMASK 255.255.255.0
>! MTU 2000 METRIC 0 POINT-TO-POINT ADDR 0.0.0.0
>! FLAGS: 0x0049 ( UP LOOPBACK RUNNING )
This is wrong. Loopback should be configured to 127.0.0.1 and not your
IP address. Use
/etc/ifconfig lo 127.0.0.1
/etc/route add 127.0.0.1
to set up your loopback device.
>! eth0 IP ADDR 131.155.110.55 BCAST 131.155.255.255 NETMASK 255.255.255.0
>! MTU 1500 METRIC 0 POINT-TO-POINT ADDR 0.0.0.0
>! FLAGS: 0x0043 ( UP BROADCAST RUNNING )
At least the eth0 broadcast and netmask doesn't match: the broadcast
addrss implies a B-class network, while the netmask is for a C-class
(probably correct - subnetted).
>! Kernel routing table
>! Destination net/address Gateway address Flags RefCnt Use Iface
>! network * UH 0 43 eth0
Your "network" route is in fact a host route judging by the flags (the
'H'). Add the network to your /etc/networks so that 'route' will set up
the correct routing (but see caveat about libc-4.4.1). Assuming you do
indeed want a C-class network, your /etc/networks should have at least
this line
=====
network 131.155.110.0
=====
>! softland * UH 0 0 lo
>
>I don't think the latter is correct !!!
See earlier for correct loopback setup.
>After that I installed Linux from my hard disk, but I still couldn't get the
>network going. ifconfig and route give similar output as above and NFS-mounts
>give the same error.
>I can ping to localhost, but I can't ping to any other host. From the other
>side, if I try to ping to my PC from e.g. an RS/6000 I don't get a reply, but
>now a host with IP-address 0.0.192.31 shows up in the arp-table of the RS ????
>
>I also tried the hints of Darcy Boese in comp.os.linux/53085:
>
> /etc/ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
The ifconfig is correct (assuming you set the right ip, netmask and
broadcast addresses: in your case these should probably be
"131.155.110.55", "255.255.255.0" and "131.15.110.255" respectively).
Check the broadcast define.
> /etc/route add default gw ${GATEWAY} metric 1
> /etc/route add ${IPADDR}
The route commands should be written as
/etc/route add ${NETWORK}
/etc/route add default gw ${GATEWAY}
The network route has to be added first (to tell the kernel how to get
to the gateway), and the network ("131.15.110.0" most probably) entry
has to exist in the /etc/networks file. After that, the output of
ifconfig should look something like this:
! lo IP ADDR 127.0.0.1 BCAST 127.155.255.255 NETMASK 255.0.0.0
! MTU 2000 METRIC 0 POINT-TO-POINT ADDR 0.0.0.0
! FLAGS: 0x0049 ( UP LOOPBACK RUNNING )
!
! eth0 IP ADDR 131.155.110.55 BCAST 131.155.110.255 NETMASK 255.255.255.0
! MTU 1500 METRIC 0 POINT-TO-POINT ADDR 0.0.0.0
! FLAGS: 0x0043 ( UP BROADCAST RUNNING )
and 'route':
! Kernel routing table
! Destination net/address Gateway address Flags RefCnt Use Iface
! default 131.155.110.xx UGN 0 0 eth0
! network * UN 0 43 eth0
! loopback * UH 0 0 lo
Note that the above 'xx' depends on whatever gateway machine you
specified, and that I wrote it without actually testing it out: I'm not
at my linux machine right now. But hopefully it should give you some
idea.
Also, your IP address implies a B-class network (255.255.0.0), but you
seem to be subnetted to C-class (255.255.255.0). Sadly, this is one of
the things that the 4.4.1 libc gets wrong, and the "getnetbyname()"
function will mess up your network address (it will truncate it to
131.155.0.0 instead of the 131.155.110.0 found in your /etc/networks).
The only solution is probably to get the 4.4.2 library (which hasn't
been released yet, ugh) or to recompile 'route' to fix this some other
way to overcome the library bug (adding a 'net' keyword or even
hardcoding it orwhatever to specify a network address instead of using
/etc/networks and the buggy C library).
Hope the above helps,
Linus