Topic: Please, help a newbie to reach the Internet!

I am giving up! I`ve justr installed NetBSD, it`s nice and works well, but... I can`t connect to the Internet! Whatever I`ve tried about configuration, the result has always been the same - "no route to the host"!
I have an ethernet adsl modem and a Realtek card conncted to the modem. I also have another ethernet card on that machine, that is unplugged at present, but, it will be used for a LAN connection. So, that machine should be   the gateway for the LAN. With Windows XP and Debian on the same machine I can connect.
In Windows XP I have this routing table:

===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 0e 2e 83 c4 cc ...... Realtek RTL8139/810x Family Fast Ethernet NIC - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1     79.24.52.34      20
      79.24.52.34  255.255.255.255        127.0.0.1       127.0.0.1      20
   79.255.255.255  255.255.255.255      79.24.52.34     79.24.52.34      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      79.24.52.34     79.24.52.34      20
  255.255.255.255  255.255.255.255      79.24.52.34     79.24.52.34      1
Default Gateway:       192.168.1.1
===========================================================================
Persistent Routes:
  None

And here is the output of ifconfig /all:


Windows IP Configuration

        Host Name . . . . . . . . . . . . : mymachinename
        Primary Dns Suffix  . . . . . . . : mynetname
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : mynetname

Ethernet adapter Local Area Connection 7:

        Connection-specific DNS Suffix  . : 
        Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Ethernet NIC
        Physical Address. . . . . . . . . : 00-0E-2E-83-C4-CC
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 79.24.52.34
        Subnet Mask . . . . . . . . . . . : 255.255.255.255
        IP Address. . . . . . . . . . . . : ?
        Default Gateway . . . . . . . . . : 192.168.1.1
        DHCP Server . . . . . . . . . . . : 192.168.1.1
        DNS Servers . . . . . . . . . . . : 85.37.17.41
                                            ?
                                            ?
                                            ?
        Lease Obtained. . . . . . . . . . : sabato 26 luglio 2008 9.52.18
        Lease Expires . . . . . . . . . . : sabato 26 luglio 2008 9.53.18

Tunnel adapter Teredo Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . : 
        Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
        Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-00
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : ?
        Default Gateway . . . . . . . . . : 
        NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter 6to4 Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . : 
        Description . . . . . . . . . . . : 6to4 Tunneling Pseudo-Interface
        Physical Address. . . . . . . . . : 4F-18-34-22
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : ?
        Default Gateway . . . . . . . . . : 
        DNS Servers . . . . . . . . . . . : ?
                                            ?
                                            ?
        NetBIOS over Tcpip. . . . . . . . : Disabled

Tunnel adapter Automatic Tunneling Pseudo-Interface:

        Connection-specific DNS Suffix  . : 
        Description . . . . . . . . . . . : Automatic Tunneling Pseudo-Interface
        Physical Address. . . . . . . . . : 4F-18-34-22
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : ?
        Default Gateway . . . . . . . . . : 
        DNS Servers . . . . . . . . . . . : ?
                                            ?
                                            ?
        NetBIOS over Tcpip. . . . . . . . : Disabled

In Debian, the (working) rooting table looks quite simpler (to my eyes) and it seems there is no tunneling neither:

$ ip route
192.168.1.1 dev eth0  scope link
192.168.0.0/24 dev eth1  proto kernel  scope link  src 192.168.0.1
169.254.0.0/16 dev eth0  scope link  metric 1000
default via 192.168.1.1 dev eth0

or

# netstat -n -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.1     0.0.0.0         255.255.255.255 UH        0 0          0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

And here is what ifconfig says about eth0 interface (Realtek card=rtk0 in NetBSD):

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0E:2E:83:C4:CC
          inet addr:79.21.69.39  Bcast:79.21.69.39  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5545 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6907 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3777364 (3.6 MiB)  TX bytes:1208018 (1.1 MiB)
          Interrupt:209 Base address:0xc800

Note that I do not use pppoe, it didn`t seem to work for me. I`ve managed to obtain that working routing table by adding the following line to /etc/network/interfaces bellow

iface eth0 inet dhcp
    hostname mymachinename.mynetworkname.xyz
    up route add -net 192.168.1.1 netmask 255.255.255.255 dev eth0
    up route add default gw 192.168.1.1

What the Hell should I do in NetBSD to get something similar!!!? I`ve tried about a hundred combinations of settings in etc/rc.conf, /etc/dhcpclient.conf, /etc/sysctl.conf, /etc/pf.boot.conf, /etc/ifconfig.rtk0,  /etc/networks, /etc/protocols,  /etc/netconfig... and whatever I was doing, my routing table has been something like:

Routing tables

Internet:
Destination        Gateway            Flags 
default            192.168.1.1        UG     
127.0.0.0/8        127.0.0.1          UGR    
127.0.0.1          127.0.0.1          UH     
192.168.1.1        00:0e:2e:83:c4:cc  UHL    
192.168.1.1/32     link#2             U      

Internet6:
Destination                        Gateway                        Flags 
::/104                             ::1                            UGR    
::/96                              ::1                            UGR    
::1                                ::1                            UH     
::127.0.0.0                        ::1                            UGR    
::224.0.0.0                        ::1                            UGR    
::255.0.0.0                        ::1                            UGR    
::ffff:0.0.0.0                     ::1                            UGR    
2001:db8::                         ::1                            UGR    
2002::                             ::1                            UGR    
2002:7f00::                        ::1                            UGR    
2002:e000::                        ::1                            UGR    
2002:ff00::                        ::1                            UGR    
fe80::                             ::1                            UGR    
fe80::%rtk0                        link#2                         U      
fe80::20e:2eff:fe83:c4cc%rtk0      00:0e:2e:83:c4:cc              UHL    
fe80::%lo0                         fe80::1%lo0                    U      
fe80::1%lo0                        link#3                         UHL    
ff01:2::                           link#2                         U      
ff01:3::                           ::1                            U      
ff02::%rtk0                        link#2                         U      
ff02::%lo0                         ::1                            U

... or just

Routing tables

Internet:
Destination        Gateway            Flags 
default            192.168.1.1        UG     
192.168.1.1
          00:0e:2e:83:c4:cc  UHL    
192.168.1.1/32     link#2             U      

Internet6:
Destination        Gateway            Flags 
localhost          localhost          UH     
fe80::%rtk0        link#2             U      
fe80::%lo0         fe80::1%lo0        U      
ff01:2::           link#2             U      
ff01:3::           localhost          U      
ff02::%rtk0        link#2             U      
ff02::%lo0         localhost          U

(Off course, it was slightly changing during my re-configurations, but, I`ve never got a working one.)
And here is how the rtk interface behaves:
After the system start I have this:

# ifconfig rtk0
rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0e:2e:83:c4:cc
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet6 fe80::20e:2eff:fe83:c4cc%rtk0 prefixlen 64 scopeid 0x2

If I issue the command "# ifconfig rtk0 inet 192.168.1.1 netmask 0xffffff00 media auto up" my rtk0 interface, for a while, looks like:

# ifconfig rtk0
rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0e:2e:83:c4:cc
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::20e:2eff:fe83:c4cc%rtk0 prefixlen 64 scopeid 0x2

Then it becomes:

# ifconfig rtk0
rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0e:2e:83:c4:cc
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
        inet6 fe80::20e:2eff:fe83:c4cc%rtk0 prefixlen 64 scopeid 0x2

... and soon after that it`s again:

# ifconfig rtk0
rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0e:2e:83:c4:cc
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet6 fe80::20e:2eff:fe83:c4cc%rtk0 prefixlen 64 scopeid 0x2

After deleting /etc/ifconfig.rtk0, I`ve managed to get:

# ifconfig rtk0
rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0e:2e:83:c4:cc
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 79.21.69.39 netmask 0xffffffff broadcast 79.21.69.39
        inet6 fe80::20e:2eff:fe83:c4cc%rtk0 prefixlen 64 scopeid 0x2

... but, soon it became

inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255

again and everything was like before. However, in any case, I can`t ping (to an IP, not URL).. no route to host. But, resolv.conf is being updated, even if I purposingly change it to a bad vallue.

I appologize for such a long post, I`ve just tried to supply as much of the basic information as possible as soon as possible. So, if somebody has enough patience to read all this... please, give me a light, I really don`t know where to look any more! (And I know nothing about tunneling, vlans and such kind of things... if it come to be about it).

Last edited by tartaruga (2008-08-31 22:34:30)

Re: Please, help a newbie to reach the Internet!

I'm not familiar with ADSL, but how is the box supposed to get an IP address? Via DHCP? If so, what happens if you tell NetBSD to use DHCP?

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Please, help a newbie to reach the Internet!

yeah, it looks like you're using DHCP on Debian, so why not do the same on NetBSD? I'm not sure how to do it on boot, but I think that the command dhclient rtk0 will do the trick temporarily.

Re: Please, help a newbie to reach the Internet!

asemisldkfj wrote:

yeah, it looks like you're using DHCP on Debian, so why not do the same on NetBSD? I'm not sure how to do it on boot, but I think that the command dhclient rtk0 will do the trick temporarily.

Sorry, I`ve beleived it was clear I was already using DHCP on NetBSD! I have it configured it in /etc/rc.conf

dhclient=YES
dhclient_flags="rtk0"

(maybe it should be on the same line? however, it doesn`t seem to miss the interface). I also have /etc/dhclient.conf. Off course, there`re high chances there is some missconfiguration, although I`ve tried many combinations (maybe I could say all?) and nothing worked. (Yes, I`ve tried even without /etc/dhclient.conf)
Well, dhclient runs on startup, but, it repetedly gives me the message that "network is unreachable". Why a network is unreashable and which network is unreachable??? However, I thought it might even be normal at that point; at last - it manages somehow to get both the IP and DNS server! (I only can see those messages during the startup, I haven`t been able to find them in any log file and dmesg.boot finishes before this point.)
Anyway, just to double check, I did run dhclient manually now and, off course, it said that it was already running. Well, it might be it dies for some reason soon after startup, I didn`t wait, but, in any case, I have no connection even while it`s certainly runningl
BTW, in Debian I was able to get a connection only after I`ve removed everything that had something to do with inet6 (well, I`m not sure whether it was  what did the trick, since I haven`t got the connection until I`ve added the 2 lines to /etc/network/interfaces smile , but, it certainly did simplify the task a lot). In NetBSD 1) I don`t know how to do it 2) I wouldn`t like to do that unless really necessary, since the NetBSDians seem to be so proud about inet6 in NetBSD and it`s superiority etc., etc. that I`d be sorry to miss it. 3) I`ve just forgotten what it was... but, there was something smile

Re: Please, help a newbie to reach the Internet!

ok, try this setup.

rc.conf

dhclient=YES
dhclient_flags="rtk0"
defaultroute=192.168.1.1

and delete /etc/hostname.rtk0. then reboot and see what happens.

Re: Please, help a newbie to reach the Internet!

asemisldkfj wrote:

ok, try this setup.

rc.conf

dhclient=YES
dhclient_flags="rtk0"
defaultroute=192.168.1.1

OK, I`ll try it, although I`ve already had it (I only have to uncomment "defaultroute=192.168.1.1")

and delete /etc/hostname.rtk0. then reboot and see what happens.

Wait a minute! Did you happen to mean "ifconfig.rtk0"? (I`had created that file too, but, I`ve removed it later.) What is "hostname.rtk0" (if you really meant so)? And is it just "hostname", or it should be myhostname? I haven`t found anything about such a file, yet. this is a discovery (maybe the discovery!)! What is supposed to be in that file? (I`ll try to find out myself on the Net) Ah, yes... another question - may an interface have its own "hostname", or they all must have the unic hostname of the machine?

Re: Please, help a newbie to reach the Internet!

tartaruga wrote:
asemisldkfj wrote:

ok, try this setup.

rc.conf

dhclient=YES
dhclient_flags="rtk0"
defaultroute=192.168.1.1

OK, I`ll try it,

Nothing! Network is unreachable. I`ve also tried to create /etc/hostname.rtk0 (after I`ve commented the defaultroute line again, with just my full host name inside - allways the same. I`ve tried some other things too (since I noticed I might have had wrong netmasks in some places) - useless everything.
Well, here is how my files look like at the moment:
/etc/rc.conf

wscons=YES
hostname="somename.something.xyz"
defaultroute="192.168.1.1"
domainname="something.xyz"
dhclient=YES
dhclient_flags="rtk0"    
auto_ifconfig=NO
sshd=YES

/etc/sysctl.conf

net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1

/etc/pf.boot.conf

block all
pass on lo0
pass out proto { tcp, udp } from any to any port 53 keep state
pass out inet proto icmp all icmp-type echoreq keep state
pass out inet6 proto icmp6 all icmp6-type neighbrsol
pass in inet6 proto icmp6 all icmp6-type neighbradv
pass out inet6 proto icmp6 all icmp6-type routersol
pass in inet6 proto icmp6 all icmp6-type routeradv

/etc/nsswitch.conf

group:        compat
group_compat:    nis
hosts:        files dns nis
netgroup:    files [notfound=return] nis
networks:    files
passwd:        compat
passwd_compat:    nis
shells:        files

/etc/networks

 loopback    127    
#mynetwork1 (inactive)    192.168.0
#netmask        255.255.255
#mynetwork2 (adsl)    192.168.1
#netmask        255.255.255.255

(On the last line I used to have 255.255.255.0; then I`ve changed it to this one; then I`ve commented all again)
/etc/netconfig

udp6       tpi_clts      v     inet6    udp     -       -
tcp6       tpi_cots_ord  v     inet6    tcp     -       -
udp        tpi_clts      v     inet     udp     -       -
tcp        tpi_cots_ord  v     inet     tcp     -       -
rawip      tpi_raw       -     inet      -      -       -
local      tpi_cots_ord  -     loopback  -      -       -

/etc/dhclient.conf

send host-name "somename.something.xyz";                 
send dhcp-client-identifier "somename.something.xyz";             
request subnet-mask, broadcast-address, routers,
    domain-name-servers;

timeout 30;
retry 60;
select-timeout 5;

script "/sbin/dhclient-script";

lease {
  interface "rtk0";                               
  option host-name "somename.something.xyz";           
  option subnet-mask 255.255.255.255;
  option domain-name "something.xyz";                
  option domain-name-servers 127.0.0.1;
  renew 2 2000/1/12 00:00:01;
  rebind 2 2000/1/12 00:00:01;
  expire 2 2000/1/12 00:00:01;
}

BTW, during the last reboot I`ve noticed that the message 'no route to host' at the startup is addressed to my simple host name (say "something") and I wonder why and how, since in all my /etc/files it appeares only once - as one of the aliases (along with the full host name) of the localhost in /etc/host file; everythere else there is only the full host name.
I`ve removed /etc/ifconfig.rtk0, but, it was

inet 192.168.1.1 netmask 0xffffffff media auto

(The netmask also used to be 0xffffff00)

Re: Please, help a newbie to reach the Internet!

tartaruga wrote:

Nothing! Network is unreachable...

How do you know that the network in unreachable?
Did NetBSD get an IP address via DHCP?

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Please, help a newbie to reach the Internet!

WIntellect wrote:
tartaruga wrote:

Nothing! Network is unreachable...

How do you know that the network in unreachable?
Did NetBSD get an IP address via DHCP?

How do I know that the network in unreachable? NetBSD sais so and whatever he means, I don`t have a reason to suspect him lying. Yes, he does get an IP address (but, looses it soon).

Re: Please, help a newbie to reach the Internet!

if pf is enabled with that configuration file that might be preventing you from reaching the net. you're blocking all by default and only allowing TCP traffic on port 53. try disabling pf and see if you can get online.

you also shouldn't be trying to give rtk0 192.168.1.1 as an IP address. your computer and default gateway can't have the same IP. if you try to manually assign an IP address use 192.168.1.2 or something like that.

your netmask should probably be 255.255.255.0 or 0xffffff00.

Re: Please, help a newbie to reach the Internet!

asemisldkfj wrote:

if pf is enabled with that configuration file that might be preventing you from reaching the net. you're blocking all by default and only allowing TCP traffic on port 53. try disabling pf and see if you can get online.

In /etc/defaults/rc.conf (and I haven`t touched it in etc/rc.conf) there is a line

pf=NO            pf_rules="/etc/pf.conf"

Although I`m not sure, I suppose it means that it is disabled. (Maybe it might be enabled somewhere else?)

you also shouldn't be trying to give rtk0 192.168.1.1 as an IP address. your computer and default gateway can't have the same IP. if you try to manually assign an IP address use 192.168.1.2 or something like that.

Well, it really seems to make sense (and I`ll try it.) But, in Debian, if I understand well, I have exactly that setup, and it works.

iface eth0 inet dhcp
    hostname myname.mynet.xyz
    up route add -net 192.168.1.1 netmask 255.255.255.255 dev eth0
    up route add default gw 192.168.1.1

your netmask should probably be 255.255.255.0 or 0xffffff00.

I`ve tried both.
Hmm... what do you think - if, instead of assigning an IP to rtk0 interface, I enable DHCP server on 192.168.1.1? How could I do it?

Re: Please, help a newbie to reach the Internet!

asemisldkfj wrote:

if pf is enabled with that configuration file that might be preventing you from reaching the net. you're blocking all by default and only allowing TCP traffic on port 53. try disabling pf and see if you can get online.

you also shouldn't be trying to give rtk0 192.168.1.1 as an IP address. your computer and default gateway can't have the same IP. if you try to manually assign an IP address use 192.168.1.2 or something like that.

your netmask should probably be 255.255.255.0 or 0xffffff00.

Voil

Re: Please, help a newbie to reach the Internet!

tartaruga wrote:

Now, I`ll try to put back ifconfig.rtk0 with this line inside

 inet 192.168.1.2 netmask 0xffffff00 media auto

and to reboot. I hope...

Now, it doesn`t work sad I had to run the command manually.
This is the good routing table:

# route show
Routing tables

Internet:
Destination        Gateway            Flags 
default            192.168.1.1        UG     
host39-69-dynamic. 127.0.0.1          UGH    
79.21.69.39/32     link#2             U      
loopback           127.0.0.1          UGR    
localhost          127.0.0.1          UH     
192.168.1.0/24     link#2             U      
          00:1c:f0:9f:54:87  UHL    

Internet6:
Destination        Gateway            Flags 
::/104             localhost          UGR    
::/96              localhost          UGR    
localhost          localhost          UH     
::127.0.0.0        localhost          UGR    
::224.0.0.0        localhost          UGR    
::255.0.0.0        localhost          UGR    
::ffff:0.0.0.0     localhost          UGR    
2001:db8::         localhost          UGR    
2002::             localhost          UGR    
2002:7f00::        localhost          UGR    
2002:e000::        localhost          UGR    
2002:ff00::        localhost          UGR    
fe80::             localhost          UGR    
fe80::%rtk0        link#2             U      
fe80::20e:2eff:fe83:c4cc%rtk0 00:0e:2e:83:c4:cc  UHL    
fe80::%lo0         fe80::1%lo0        U      
fe80::1%lo0        link#3             UHL    
ff01:2::           link#2             U      
ff01:3::           localhost          U      
ff02::%rtk0        link#2             U      
ff02::%lo0         localhost          U

What should I do to have it permanently?

Re: Please, help a newbie to reach the Internet!

I think you have to have "up" somewhere in hostname.rtk0. maybe put "up" on a separate line above the rest, like this:

up
inet 192.168.1.2 netmask 0xffffff00 media auto

Re: Please, help a newbie to reach the Internet!

asemisldkfj wrote:

I think you have to have "up" somewhere in hostname.rtk0. maybe put "up" on a separate line above the rest, like this:

up
inet 192.168.1.2 netmask 0xffffff00 media auto

I really thought it would, but... doesn`t work. Neither above nor below and not even at the end of the same line sad

Re: Please, help a newbie to reach the Internet!

what is the output of ifconfig rtk0 after a reboot?

Re: Please, help a newbie to reach the Internet!

asemisldkfj wrote:

what is the output of ifconfig rtk0 after a reboot?

# ifconfig rtk0
rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:0e:2e:83:c4:cc
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet6 fe80::20e:2eff:fe83:c4cc%rtk0 prefixlen 64 scopeid 0x2

It works after I manually run the command

ifconfig rtk0 inet 192.168.1.2 netmask 0xffffff00 media auto up & route add default 192.168.1.1

Re: Please, help a newbie to reach the Internet!

Then stick the command in /etc/rc.local and see if it works on reboot then

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: Please, help a newbie to reach the Internet!

seems like hostname.rtk0 isn't working as it should. the IP address of the interface isn't even set. is there a way to run the network configuration in hostname.rtk0 on NetBSD? on OpenBSD you can do sh /etc/netstart rtk0 and it will run the stuff in hostname.rtk0. maybe just try executing it?

sh /etc/hostname.rtk0 ?

Re: Please, help a newbie to reach the Internet!

seems like hostname.rtk0 isn't working as it should

Are you using hostname.rtk0 or ifconfig.rtk0 ?

Read more about interface-specific configuration files here: http://man.netbsd.se/?find=ifconfig.if+5+20

<wintellect> NetBSD users are smart enough to accept that there's no 3D support tongue

Re: Please, help a newbie to reach the Internet!

oh woops, I was letting a little bit of OpenBSD slip into this thread smile. the OP refers to ifconfig.rtk0, so I might have messed that up by suggesting hostname.rtk0.

Re: Please, help a newbie to reach the Internet!

WIntellect wrote:

Then stick the command in /etc/rc.local and see if it works on reboot then

Here we are! Here is the winning combination:
ifconfig.rtk0:

up
!dhclient $int
!rtsol $int

rc.local:

ifconfig rtk0 192.168.1.2 media auto & route add default 192.168.1.1

Thank you all! smile

Re: Please, help a newbie to reach the Internet!

How come you specify an IP and route in rc.local and then ask for them again using dhclient ?

<wintellect> NetBSD users are smart enough to accept that there's no 3D support tongue

Re: Please, help a newbie to reach the Internet!

dynek wrote:

How come you specify an IP and route in rc.local and then ask for them again using dhclient ?

I don`t know how, but, it works.

Re: Please, help a newbie to reach the Internet!

What is the IP of rtk0 after booting ? 192.168.1.2 ?

If so, that means dhclient is not getting an answer from any DHCP server. Hence you have to specify the IP address.

<wintellect> NetBSD users are smart enough to accept that there's no 3D support tongue