Subject: Re: Can't configure default gateway
To: Rui Paulo <rpaulo@fnop.net>
From: Alexandre Almeida <ale.almeida@mail.telepac.pt>
List: tech-net
Date: 11/09/2006 10:31:45
Rui Paulo escreveu:
>
> On Nov 8, 2006, at 11:43 PM, ale.almeida@mail.telepac.pt wrote:
>
>> This is my first post, so... be patience
>>
>> I'm trying to configure my network...
>>
>> internet--router--NETBSD
>>
>> router gives to netbsd by dhcp the public ip that he (router) colect
>> with pppoa from my ISP.
>>
>> on NETBSD the public ip is configured but the default gateway is not.
>>
>> an error "can't allocate llinfo", occurs.
>>
>> I tried to see in mail archives, there are some posts about this but I
>> haven't seen the solution.
>>
>> This network configuration works on linux and windows.
>>
>> I kown that I'm doing something wrong...
>>
>> Please give me a tip.
>>
>> Just for the record: I leave windows, went to linux, and I realy like
>> NETBSD.
>
> Hmm, is the gateway in the same subnet ? Is the netmask correct?
>
> -- 
> Rui Paulo
>
>
That I think is the problem, here are configuration parameter's:

$ ifconfig -a
tlp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:00:f8:04:29:59
media: Ethernet autoselect (10baseT)
status: active
inet 172.20.27.61 netmask 0xffffffc0 broadcast 172.20.27.63
tlp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:00:f8:09:85:be
media: Ethernet autoselect (10baseT)
status: active
inet 82.155.138.115 netmask 0xff000000 broadcast 82.255.255.255
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33136
inet 127.0.0.1 netmask 0xff000000

$ netstat -ranf inet
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
82/8 link#2 UC 0 0 - tlp1
82.155.138.115 127.0.0.1 UGHS 0 0 33136 lo0
127/8 127.0.0.1 UGRS 0 0 33136 lo0
127.0.0.1 127.0.0.1 UH 2 46 33136 lo0

On windows or linux the default is configuesd by DHCP, here the routing 
table:

Rotas activas:
Destino de rede    Máscara de rede          Gateway       Interface  Métrica
          0.0.0.0          0.0.0.0   194.65.169.215    82.155.154.8       1
         82.0.0.0        255.0.0.0     82.155.154.8    82.155.154.8       20
     82.155.154.8  255.255.255.255        127.0.0.1       127.0.0.1       20
   82.255.255.255  255.255.255.255     82.155.154.8    82.155.154.8       20
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
        224.0.0.0        240.0.0.0     82.155.154.8    82.155.154.8       20
  255.255.255.255  255.255.255.255     82.155.154.8               5       1
  255.255.255.255  255.255.255.255     82.155.154.8               4       1
  255.255.255.255  255.255.255.255     82.155.154.8    82.155.154.8       1
  255.255.255.255  255.255.255.255     82.155.154.8               2       1
  255.255.255.255  255.255.255.255     82.155.154.8               6       1
Gateway predef.:    194.65.169.215
===========================================================================

I have tried to had manually to configure with:

route had default 194.65.169.215
error no route to host
route add -host 194.65.169.215 -gateway 82.155.138.115 -interface 
-llinfo -cloned
arpresolve: can't allocate llinfo on tlp1 for 194.65.169.215
arpresolve: can't allocate llinfo on tlp1 for 194.65.169.215

# netstat -ran
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
82/8 link#2 UC 0 0 - tlp1
82.155.138.115 127.0.0.1 UGHS 0 0 33136 lo0
127/8 127.0.0.1 UGRS 0 0 33136 lo0
127.0.0.1 127.0.0.1 UH 2 46 33136 lo0
194.65.169.215 82.155.138.115 UHLSc 0 4 - tlp1


I, think that on NETBSD the gateway value for 194.65.169.215 should be 
the mac address of my router.
but arpresolve got an error because the default gateway it is not on the 
same subnet, but this works on linux,
so I consider that I'm missing something.

Thanks (Obrigado)
Alexandre Almeida