I rebooted by Gentoo system, and regret it greatly -- some
update or other has invalidated my network configuration,
and I still don't know how to fix it.  (I'm posting this from an
Ubuntu machine).

This machine's interface to the outside world is eth1 (eth0
exists, but is a local LAN).  In /etc/conf.d/net, there was

iface_eth1="64.166.164.49 broadcast 64.166.164.55 netmask 255.255.255.248"
gateway="eth1/64.166.164.54"

This used to work fine.  Now it causes complaints about a  deprecated syntax
and advice to go look in /etc/conf.d/net.example.  It also complains
that there's
no module to provide broadcast or netmask.  Moreover, it does not bring up
a useable network.  Here's the output of route(1)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
64.166.164.48   *               255.255.255.248 U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo

Note the lack of a gateway.

I've tried various other things after looking into net.example, and here's
the most likely thing I've come up with:

config_eth1=( "64.166.164.49/29 brd 64.166.164.55" )
gateway=( "eth1/64.166.164.54" )

This no longer gives me syntax complaints, but also does not bring up a
gateway:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
64.166.164.48   *               255.255.255.248 U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo

So I tried going back to tried and true things: ifconfig.  I tried this script:
   ifconfig eth1 down
   ifconfig eth1 64.166.164.49 netmask 255.255.255.248
   ifconfig eth1 up
   route add 0.0.0.0 gw 64.166.164.54

And now I have a gateway of sorts, but it does not work:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         router          255.255.255.255 UGH   0      0        0 eth1
64.166.164.48   *               255.255.255.248 U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo

I compared this to the output of route(1) on this Ubuntu box, and notice that
the flags contain "H", which means 'the target is a host'.  This also happens
if I give a netmask of 0.0.0.0 in the route command.  I know it's not working
because any attempt I've made to send packets beyond the router have
failed with "network unreachable", and tcpdump indicates that NO packets
were sent.  On the other hand, pinging the router itself works, and tcpdump
can see it.  The router in in the telco CO, not here, and is also used by this
Ubuntu machine, so it is not implicated.

I also know that the interface card is working locally, because I can get
in via ssh from this Ubuntu machine.  I cannot get in from beyond the
router because the host does not know to send reply packets to the
gateway.

It appears that I need to have a gateway (so my /etc/conf.d/net needs to
do that) and it may need to have the "H" flag off.

Can anyone else who uses a static IP setup take a look and see what
I'm doing differently?

++ kevin

--
Kevin O'Gorman, PhD
--
gentoo-user@gentoo.org mailing list

Reply via email to