SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Type pkgtool in console. Select setup anf choose Slackware installation scripts to run again. Then check netconfig, press ok, in SETUP IP ADRESS select STATIC IP.
Originally posted by garyozzy i have DHCP set up on my router. Will that override a static IP set up in slackware?
Actually yes. I just disabled the DHCP server part of my rounter (LinkSys BEFSR41) and set all my PC's to static IP's and everything works fine. Just be sure that you set your default gateway and DNS server to the same thing.
Originally posted by shilo No. The Slackware box will never make a DHCP request if set with a static IP address. The router will be irrelevant.
There won't be a DHCP request, true enough, but I had trouble with my PC set to a static IP address and my router set to be a DHCP server. After I "disabled" the DHCP server setting in the router config everything works as "smooth as silk".
I would guess that the issue might have been this (I've had it happen before):
You set up a router to be a DHCP server.
You set up a Slackware box with a static IP address (For example, as 192.168.0.2)
You have other devices (Computers, printer servers, whatever) on your LAN set to use the DHCP server
You fire up the Slackware computer
The problem can arise that the Slackware computer now thinks that it has the IP address 192.168.0.2, but the router has already leased that IP address to another device on the LAN.
There are several solutions to this, and it would depend on the capability of your router and the general LAN layout which would be best.
1) Disable DHCP server function in router
The possible issue with this is that other devices will also need to be set with static IP addresses. This can get to be a pretty big hassle, depending on the size of the LAN.
2) Configure the DHCP server to not pass out the IP address you have set Slackware for
This can be done several ways:
A) See what the range of IP addresses your router passes out. Choose something outside that range for your IP address.
B) Configure your router to always pass the desired IP adress to your Slackware computer. Even if you set Slackware up for a static IP address, this works because the router reserves that IP address, not passing it out to other devices on your LAN
C) Change the range of IP addresses your router passes out to not include the IP address of the Slackware box. This is basically another way of doing the same thing as A).
I prefer 2)B) myself. Disabling the DHCP server can be a pain. You will have to set IP addresses statically on every device that you connect to the LAN. I prefer being able to just hook up more exotic print servers and things and have them use DHCP. Saves the trouble of reading through the manuals to learn how to set static IP addresses.
Originally posted by shilo I would guess that the issue might have been this (I've had it happen before):
You set up a router to be a DHCP server.
You set up a Slackware box with a static IP address (For example, as 192.168.0.2)
You have other devices (Computers, printer servers, whatever) on your LAN set to use the DHCP server
You fire up the Slackware computer
The problem can arise that the Slackware computer now thinks that it has the IP address 192.168.0.2, but the router has already leased that IP address to another device on the LAN.
There are several solutions to this, and it would depend on the capability of your router and the general LAN layout which would be best.
1) Disable DHCP server function in router
This is what I have chosen for my little home network (two PC's only). As far as the other stuff you hit the nail on the head. By disabling the DHCP server function I have eleminated the problem and with only two PC's it ain't much of a headache. This way I can also add their respective names to /etc/hosts and then just connect to the name rather than having to specify IP addresses everytime.
Quote:
Originally posted by shilo 2) Configure the DHCP server to not pass out the IP address you have set Slackware for
This can be done several ways:
A) See what the range of IP addresses your router passes out. Choose something outside that range for your IP address.
B) Configure your router to always pass the desired IP adress to your Slackware computer. Even if you set Slackware up for a static IP address, this works because the router reserves that IP address, not passing it out to other devices on your LAN
C) Change the range of IP addresses your router passes out to not include the IP address of the Slackware box. This is basically another way of doing the same thing as A).
I prefer 2)B) myself. Disabling the DHCP server can be a pain. You will have to set IP addresses statically on every device that you connect to the LAN. I prefer being able to just hook up more exotic print servers and things and have them use DHCP. Saves the trouble of reading through the manuals to learn how to set static IP addresses.
If I had a larger network to "fiddle with" then I would use the DHCP server on the router PLUS I would add one PC as just my DHCP server this way I could reserve IP addresses against MAC addresses and/or computer names. At least I know you can do this in Windows so I figure it can be done with Linux although I've never tried it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.