-   Slackware (
-   -   Static IP address (

mikz 11-28-2005 03:25 PM

Static IP address
I have a slackware 10 which acts a webserver. The webserver is on my LAN and recieves its IP ( via the DHCP from my router which has an IP-pool of - 99.
How do I go about giving my webserver a 'static' ip which would still be visible to the rest of the LAN.?

Is it enough to change the appropiate files in /etc/rc.d/?

Alien Bob 11-28-2005 03:35 PM

This would do (put it in /etc/rc.d/rc.inet1.conf):

# Config information for eth0:


# Default gateway IP address:

Where the XXX is the IP of your router/gateway.
If your server uses eth1 instead, change the [0] into [1]. Don't forget to remove the existing DHCP related lines for your network interface (the USE_DHCP[0]="yes" specifically)


mikz 11-28-2005 03:43 PM

Would I also need to edit /etc/resolv.conf?

raska 11-28-2005 04:17 PM


Originally posted by mikz
Would I also need to edit /etc/resolv.conf?
don't think so, that one is for your DNS servers ;)

urka58 11-28-2005 04:30 PM

It is also possible you assign a static IP address by DHCP adding some lines to your /etc/dhcp/dhcp.conf like

host myhost {
hardware ethernet xx:xx:xx:xx:xx:xx;

replace xx's with your actual HW address
edit your /etc/hosts file adding something like myhost

All times are GMT -5. The time now is 07:03 PM.