You are not logged in.

#1 2011-06-08 02:41:34

sarloth
Member
Registered: 2011-02-22
Posts: 4

[SOLVED] Static IP causes "No Hostname" and Loses Internet Access

Still getting the hang of arch.

I have read this and referenced it many times:
https://wiki.archlinux.org/index.php/Co … _Static_IP

These are the relevant portions of my config files:

rc.conf

HOSTNAME="minerva"

eth0="eth0 192.168.0.201 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth0="dhcp"
INTERFACES=(eth0)

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

hosts

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost minerva
::1             localhost.localdomain   localhost

# End of file

This works fine for the Local Area Network. However, this machine does not have access to the internet. I checked the router and noticed that the router couldn't detect the hostname of the machine. It detected the hostname fine when it was set to dhcp.

Can anyone help me out with this one?

Last edited by sarloth (2011-06-08 03:17:19)

Offline

#2 2011-06-08 02:59:44

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: [SOLVED] Static IP causes "No Hostname" and Loses Internet Access

Have you tried enabling  gateway in ROUTES

ROUTES=(gateway)

Offline

#3 2011-06-08 03:07:03

sarloth
Member
Registered: 2011-02-22
Posts: 4

Re: [SOLVED] Static IP causes "No Hostname" and Loses Internet Access

When I reset the network after making that change:

:: Stopping Network                                                      [BUSY] SIOCDELRT: No such process
                                                                         [FAIL]
:: Starting Network                                                      [DONE]

Which scared me before I posted here. But I just did it again and then pinged out, works fine.

Thanks! big_smile

Offline

#4 2011-06-08 13:51:27

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [SOLVED] Static IP causes "No Hostname" and Loses Internet Access

I know it is solved, but for any nubees looking in:
1) if you use dhcp, gateway and dns-server will be automatic.
2) with a static ip-addy, you have to supply a gateway (/etc/rc.conf), dns-server (/etc/resolv.conf) and a machine name/ip-addy (/etc/hosts)

Offline

Board footer

Powered by FluxBB