You are not logged in.

#1 2010-02-03 17:47:25

Canute
Member
From: Norway
Registered: 2007-04-23
Posts: 21

[SOLVED] Routing doesn't get set when using static IP.

I have always used static IP, and when I reinstalled Arch because of x64 I set it in rc.conf like I always have:

#Static IP example
#eth0="dhcp"
eth0="eth0 192.168.2.88 netmask 255.255.255.0 broadcast 192.168.2.255"

INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.2.1"
ROUTES=(gateway)

It sets up the IP right, and I can ping my router (192.168.2.1), but I can't access the internet unless I first issue a

dhcpcd

and then manually set the IP with

ifconfig eht0 192.168.2.88

Any clear mistakes? Anything else that might be wrong which could contribute to this?

- Knut

Last edited by Canute (2010-02-06 17:42:33)

Offline

#2 2010-02-03 18:34:57

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Routing doesn't get set when using static IP.

Did you try pinging an ip on the internet or just a hostname? Maybe you forgot to set your dns?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2010-02-03 18:43:05

antonikus
Member
Registered: 2009-11-22
Posts: 42

Re: [SOLVED] Routing doesn't get set when using static IP.

Why in the world would do you a dhcpcd if you have a static IP???

Why not check first with ifconfig and route -n if the interface was configured properly? And cat /etc/resolv.conf
to see if the nameservers are setup correctly. And mii-tool to see if you have a physical link.

The problem as you describe is may be in your router. If it is a linux box you need to echo "1" > /proc/sys/net/ipv4/ip_forward to enable forwarding.


Linux user since redhat 6.1. former gentooer, former slacker. Now arher.

Offline

#4 2010-02-06 17:40:50

Canute
Member
From: Norway
Registered: 2007-04-23
Posts: 21

Re: [SOLVED] Routing doesn't get set when using static IP.

Mr.Elendig wrote:

Did you try pinging an ip on the internet or just a hostname? Maybe you forgot to set your dns?

DNS was the problem. My confusion was because /etc/resolv.conf was set correctly with dhcpcd, but then removed when I rebooted.

Last edited by Canute (2010-02-06 17:41:45)

Offline

Board footer

Powered by FluxBB