Right, this turned out to be a combination of two problems, both
fairly obviously my fault, as I rather expected. I had tried
reassigning the interface's address using ifconfig, but this evidently
wasn't clearing all the various things that needed to be fixed.
Setting a static IP of 192.168.1.34 allowed me to access the LAN only
and not the internet still, but once I'd done a sh /etc/netstart I had
full access once again. Previously, I was only netstarting after going
back to the .200 address. Using 'route get google.co.uk' showed that
'if name' was still set to 192.168.1.200, rather than .34 as I was
expecting. At least I know a wee bit more about route, now.

Turns out the original problem was because the router was using
bidirectional NAT to map LAN IP ranges to external IP addresses, and
.200 fell outside of the assigned ranges. Fixed that, and everything
worked fine.

Anyway, I've learnt that 2 hours banging my head against a problem
isn't long enough to rule out stupidity ;-)

Thanks for the assistance, folks.

  - Ruan


On Fri, Feb 27, 2009 at 9:20 AM, Ruan Kendall <shearwa...@gmail.com> wrote:
> I've come across a strange problem whereby configuring an interface
> with DHCP lets my system run absolutely fine, but assigning a static
> IP to the nic results in a system that can only speak to the local
> subnet. I can ssh into it, but cannot connect to any machines on the
> internet. The computer and internet connection are otherwise quite
> functional.
>
> In both cases, the adresses are in the same subnet, have the same
> subnet mask and default gateway. Output of ifconfig and route -rn look
> all but identical. In both cases, name resolution works just fine
> also. Tcpdump shows that when I ping a machine external to my subnet,
> outgoing packets are sent to the MAC address of my router. Only in the
> case of the statically configured adress, I never get any response.
>
> Handful of diagnostic information shown below. Evidently, I'm doing
> something stupid and wrong, but I seem to be quite unable to recognise
> what on earth it is. Does anyone have any suggestions?
>
> When dhclient is used to configure interface (by doing dhclient sis0):
>
> ifconfig sis0
> sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>        lladdr 00:00:24:c3:d6:cc
>        groups: egress
>        media: Ethernet autoselect (100baseTX full-duplex)
>        status: active
>        inet6 fe80::200:24ff:fec3:d6cc%sis0 prefixlen 64 scopeid 0x1
>        inet 192.168.1.34 netmask 0xffffff00 broadcast 192.168.1.255
>
> netstat -rn, minus ipv6 stuff
> Destination        Gateway            Flags   Refs      Use   Mtu  Prio
Iface
> default            192.168.1.1        UGS        0        2     -    48
sis0
> 127/8              127.0.0.1          UGRS       0        0 33204    48 lo0
> 127.0.0.1          127.0.0.1          UH         2        0 33204    48 lo0
> 192.168.1/24       link#1             UC         1        0     -    48
sis0
> 192.168.1.1        00:13:49:b0:cb:91  UHLc       1        1     -    48
sis0
> 192.168.1.34       127.0.0.1          UGHS       0        0 33204    48 lo0
> 224/4              127.0.0.1          URS        0        0 33204    48 lo0
>
> When adress is configured using following hostname.if file (either by
> rebooting the box, or running /etc/netstart):
> inet 192.168.1.200 255.255.255.0 NONE
>
> ifconfig sis0
> sis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>        lladdr 00:00:24:c3:d6:cc
>        groups: egress
>        media: Ethernet autoselect (100baseTX full-duplex)
>        status: active
>        inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255
>        inet6 fe80::200:24ff:fec3:d6cc%sis0 prefixlen 64 scopeid 0x1
>
> netstat -rn, minus ipv6 stuff
> Destination        Gateway            Flags   Refs      Use   Mtu  Prio
Iface
> default            192.168.1.1        UGS        0        3     -    48
sis0
> 127/8              127.0.0.1          UGRS       0        0 33204    48 lo0
> 127.0.0.1          127.0.0.1          UH         1        0 33204    48 lo0
> 192.168.1/24       link#1             UC         1        0     -    48
sis0
> 192.168.1.1        00:13:49:b0:cb:91  UHLc       1        1     -    48
sis0
> 224/4              127.0.0.1          URS        0        0 33204    48 lo0
>
> Adding !route add default 192.168.1.1 to the end of the hostname.if
> file has no effect. Adding in a route from 192.168.1.200 to 127.0.0.1
> mimicking the extra route dhclient sets up has no effect.

Reply via email to