[SOLVED] Having internet with USE_DHCP="" in rc.inet1.conf possible?
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.
If I am correct, this is possible *only* if your ISP provides you a fixed IP address (IOW when you request an IP address, the DHCP server of your ISP always gives you the same one).
Then you can just use the "static IP" option of 'netconfig' to set up your wired network connection.
I assume the NetworkManager option is usable as well for that, but didn't actually check.
Thanks. My ISP only gives dynamic IPs. But there must be a way I can choose an IP for the machines in my LAN. For the moment, what I do is to run ifconfig and use the IP appearing to the right of inet. Example:
# ifconfig
eth0 inet 192.168.0.100
and I use 192.168.0.100 for that machine. But then, may be tomorrow, I run ifconfig and the inet number has change, which is very upsetting. Is there a solution?
Following from my suggestion in your thread, the answer is YES.
You do not need to use any Windows setup software. You can access your router and do configuration using a web browser on your Slackware box.
Again, from the manual
Quote:
1.
To access the configuration utility, open a web-browser and type the default address http://tplinklogin.net in the address field of the browser.
After a moment, a login window will appear, similar to the Figure 3-4. Enter admin for the User
Name and Password, both in lower case letters. Then click the OK button or press the Enter key.
Once you have accesss to the router, you can do the address reservation according to the manual section 4.7.3
When this is completed, your Slackware box will always be assigned the same IP address. The behaviour will be exactly like assigning a static IP address to your Slackware box. I do this with my setup, so that my desktop, laptop wired interface and laptop wireless interface are always assigned the same IP address. This is necessary for me to be able to use NFS without addressing issues.
I think you need to understand the steps involved in establishing your connection to the internet. When you turn your router on, it sends out a DHCP request to your ISP's DHCP server and the ISP's server responds and assigns your router a WAN IP address. As you have seen, this is likely to be different from one connection to the next. This is the IP address that would be reported if you were to do a query to whatsmyip or similar.
Your router also contains a DHCP server (enabled by default with your hardware). If you have your Slackware box set to use DHCP, it will send a DHCP request that will go to your router's DHCP server. The router's DHCP server will respond and assign your SLackware box a LAN IP address.
By using address reservation, this will always be the same IP address.
You are the first person who explains this with clarity. It's now a week long since I began reading the Linux Network Administrator's Guide, only to find, just now, that is does not mention DHCP anywhere. I've lost my time. Now I am reading http://www.tldp.org/HOWTO/Cable-Modem/index.html but I'm afraid the part covering DHCP is inaccessible.
What I can't understand is that my problem has to be a very common one for people having two computers connected to the same ISP account. Why pay for two accounts?
You don't pay for two accounts. Your problem is a problem in understanding, it is neither a physical nor a hardware problem, so for most people it is not a common problem. From reading your threads I get the feeling that you tend to over-complicate simple things, preventing yourself from seeing the simple solutions. I will explain it once more here, as I have done in your other thread regarding the same topic (in the future please ask follow up questions in the already existing thread).
Your router and the PCs in your local net are totally independent from your modem and the Internet. While your modem gets an IP from your ISP (via DHCP) this has absolutely nothing to do with DHCP in your local network. Again, those networks are independent, your local machines don't care at all (and don't need to know) how the modem gets its IP.
Just give them a static IP, set the router as gateway and all is fine.
Just give them a static IP, set the router as gateway and all is fine.
I do not recommend doing this. Setting up DHCP correctly will pay dividends in the future. It will make adding additional devices to your LAN much easier.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.