You are not logged in.
When I have:
eth0="eth0 192.168.1.73 netmask 255.255.255.0 broadcast 192.168.1.255"
set in rc.conf at boot, I get no network. I can't even ping machines on the LAN. When I have
eth0="dhcp"
in rc.conf at boot, the network works fine. What I can't figure out is why, if I boot with the dhcp line in rc.conf, then change that line to read
eth0="eth0 192.168.1.73 netmask 255.255.255.0 broadcast 192.168.1.255"
and execute
/etc/rc.d/network restart
the network works fine and I get what I want: a static IP. How can I set it so I get my desired IP on boot?
Last edited by hbarnwheeler (2009-08-07 22:54:52)
Offline
What is the exact problem you've having?
At a guess, I'd say the DHCP client sets you Default Route and DNS Servers in /etc/resolv.conf which you may not be doing when you change to static IP. It works it you boot with DHCP, then change to Static because the DHCP client has already set them, but if you boot directly to a Static IP address, they don't get set.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
What is the exact problem you've having?
At a guess, I'd say the DHCP client sets you Default Route and DNS Servers in /etc/resolv.conf which you may not be doing when you change to static IP. It works it you boot with DHCP, then change to Static because the DHCP client has already set them, but if you boot directly to a Static IP address, they don't get set.
I figured something like this must be happening. I.e. DHCP server does more than bring up the interface with IP, broadcast IP and subnet mask. I solved the problem by changing
ROUTES=(!gateway)
to
ROUTES=(gateway)
Offline