You are not logged in.

#1 2010-10-10 07:32:28

Never
Member
Registered: 2008-07-01
Posts: 103

ifconfig and rc.conf not working right [Solved]

I have my rc.conf configured as follows:

#eth0="eth0 194.413.1.131 netmask 255.255.255.0 broadcast 194.413.1.255"
eth0="dhcp"
INTERFACES=(eth0)
gateway="default gw 194.413.1.1"
ROUTES=(!gateway)

With dhcp on I get a network and the ability to ping, when I flip it off: uncomment the static line, comment the dhcp line and remove the exclamation mark from the ROUTES I get no network.  When I undo that  I get a network but the ifconfig of the system has the same output as my static settings not what the dhcp has assigned. I know it is not 194.413.1.131, because when I go to my router's main page [194.413.1.1] I can see the device connected as a ip address that is in the dhcp range.

Any clues as to why this thing will not accept a static IP address? This is a fresh install.

Edit: Solved using netcfg. I just commented out the settings, INTERFACES, and put the ! back in ROUTES, added NETWORKS=(ethernet-static), ! marked network and added net-profiles in DAEMONS. Copied the ethernet-static example, basically just changed the ADDR, GATEWAY and DNS, almost as fast as doing it in Windows.

Last edited by Never (2010-10-10 08:34:39)

Offline

#2 2010-10-10 07:44:24

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: ifconfig and rc.conf not working right [Solved]

I am not sure I understand exactly what you did. Could you post the rc.conf after you have assigned the static address (are all addresses correct?). Could you also post the output of ifconfig and "netstat -nr" with dhcp and a static address. After making any change to the network configuration, you have to restart the network.

Offline

Board footer

Powered by FluxBB