Discussion:
Can't configure default gateway
(too old to reply)
a***@mail.telepac.pt
2006-11-08 23:43:18 UTC
Permalink
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.


Alexandre Almeida





--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Rui Paulo
2006-11-09 00:32:03 UTC
Permalink
Post by a***@mail.telepac.pt
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



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Alexandre Almeida
2006-11-09 10:31:45 UTC
Permalink
Post by Rui Paulo
Post by a***@mail.telepac.pt
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

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Rui Paulo
2006-11-09 10:31:25 UTC
Permalink
Post by Alexandre Almeida
$ 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
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
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
======================================================================
=====
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
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
To add such route you need something like:

route add -ifa <your_tlp1_address> default 194.65.169.215
--
Rui Paulo



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Alexandre Almeida
2006-11-09 12:30:27 UTC
Permalink
Post by Rui Paulo
Post by Alexandre Almeida
$ 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
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
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
===========================================================================
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
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
route add -ifa <your_tlp1_address> default 194.65.169.215
--
Rui Paulo
When I do:
route add -ifa 82.155.244.210 default 194.65.169.215
or
route add -ifp 00:90:d0:e4:da:81 default 194.65.169.215

the error:
arplookup: unable to enter address for ***@00:90:d0:e4:da:81
on tlp1 (host is not on local network)

so I have done this:
assign an alias to tlp1 (192.168.1.101)
assign as default 192.168.1.254

and now works, I have the public ip on NETBSD.


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.244.210 netmask 0xff000000 broadcast 82.255.255.255
inet alias 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33136
inet 127.0.0.1 netmask 0xff000000

Destination Gateway Flags Refs Use Mtu
Interface
default 192.168.1.254 UGS 0 0 - tlp1
82/8 link#2 UC 6 0 - tlp1
82.154.237.54 00:90:d0:e4:da:81 UHLc 1 64 - tlp1
82.155.24.181 00:90:d0:e4:da:81 UHLc 0 3 - tlp1
82.155.74.97 00:90:d0:e4:da:81 UHLc 0 4 - tlp1
82.155.151.74 00:90:d0:e4:da:81 UHLc 0 3 - tlp1
82.155.242.129 00:90:d0:e4:da:81 UHLc 0 2 - tlp1
82.155.242.218 00:90:d0:e4:da:81 UHLc 0 1 - tlp1
82.155.244.210 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 10 33136 lo0
192.168.1/24 link#2 UC 1 0 - tlp1
192.168.1.254 00:90:d0:e4:da:81 UHLc 1 11 - tlp1

But I think that this behavior is not normal. this error
arplookup: unable to enter address for ***@00:90:d0:e4:da:81
on tlp1 (host is not on local network)
must have a motive to occurs.

Alexandre Almeida



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Thomas E. Spanjaard
2006-11-09 15:52:03 UTC
Permalink
Post by Alexandre Almeida
But I think that this behavior is not normal.
I think this has to do with NetBSD's routing stack requiring the default
gateway to be immediately reachable. Iirc the check is in rtm_alloc1()
or rtm1_alloc() or something like that. Been a while.

Cheers,
--
Thomas E. Spanjaard
***@netphreax.net
Patrick Welche
2006-11-23 15:42:10 UTC
Permalink
Post by Alexandre Almeida
route had default 194.65.169.215
error no route to host
How about
route add default 194.65.169.215
^^^
?
(or
echo "dhclient=YES" >> /etc/rc.conf
)

Cheers,

Patrick

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...