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.
I guess I have confused myself to the point where my eyes are getting blurry and now I seek help.
Here is what I want to do:
I want to connect to my home wireless network. My network is not running any kind of encryption right now to make things easier. I DON'T have DHCP turned on, on my wireless router. I also DON'T want to use the netconfig script with Slack. I want to be able to change, by hand, my IP address, Netmask, Gateway, & DNS Server. I'd like to be able to use:
IP - 192.168.1.10
Netmask - 255.255.255.0
Gateway - 192.168.1.1
DNS - 192.168.1.1
I was thinking all the commands I need were taken care of through "ifconfig" but I must have the syntax wrong as I can't seem to get it right.
So, I know I do a:
Code:
iwconfig ath1 essid "my network"
That successfully authenticates me. I can see packets on the network (via Wireshark).
From here, I have seen several different "ifconfig" command line options. Surely, there must be a fairly "easy" way to get this in
I realize, that none of this will stick through a re-boot, and that is fine. I just want to be able to change the info "on-the-fly"...
I have looked at that .conf file, but it seems strange that I would have to edit out a .conf file and then restart inet1 everytime I needed to change the IP', Gateway's, etc.. on the machine. I would have thought there would be some type of command line switch to do that with.
The only way to change the name server is to edit this file.
/etc/resolv.conf
Contents of file:
Code:
nameserver 192.168.1.1
If you use "nscd" to cache name server information then you have to restart "nscd".
nscd -K
nscd
Be careful when entering the command "dhcpcd" because there are similar commands such as "dhcpd". There are two "c" characters in the correct command name.
If you want to set (or reset) the interface according to the normal (boot time) configuration files then you can usually restart the network interface like this.
/etc/rc.d/rc.inet1 eth0_restart
That will undo any temporary manual changes that you have made. If you have edited the configuration files you can also use that to reload the configuration files without rebooting.
I hope that answers your question. Your distro may be slightly different. As always the devil is in the details.
You can always setup a static IP for the desired device as long as that device has the proper drivers. You could setup a static IP first, do as root from cli;
Code:
~#ifconfig -a #get recognized devices
~#ifconfig wlan0 192.168.0.10 #set to a available IP
~#route add default gw 192.168.0.1 #set to your gateway
~#route -n #show the route table
~#ifconfig wlan0 up #should be up already
~#ping 192.168.0.1 #ping your gateway
~#ping 208.69.32.130 #google.com IP
~#ping google.com #test DNS, if fail then
#check /etc/resolv.conf
You should have your '/etc/resolv.conf' setup with your 'ISP DNS' nameservers.
Code:
sample '/etc/resolv.conf';
search 192.168.1.1
nameserver xxx.xxx.xxx.xxx #ISP DSN 'replace xxx.xxx.xxx.xxx
#with IP from your ISP
nameserver 4.2.2.1 #Verizon third level DNS
nameserver 4.2.2.2
nameserver 4.2.2.3
nameserver 4.2.2.4
Just remember that you can setup the '/etc/rc.d/rc.inet1.conf' to reflect any settings of your needs or desires. 'wicd' is a very useful tool that would allow you too do as you wish without manual intervention. You can always restart the 'inet' with '/etc/rc.d/rc.inet1.conf restart'. Another useful tool would be the daemon 'ifplugd' if you must connect/disconnect the wired.
You can always setup a static IP for the desired device as long as that device has the proper drivers. You could setup a static IP first, do as root from cli;
Code:
~#ifconfig -a #get recognized devices
~#ifconfig wlan0 192.168.0.10 #set to a available IP
~#route add default gw 192.168.0.1 #set to your gateway
~#route -n #show the route table
~#ifconfig wlan0 up #should be up already
~#ping 192.168.0.1 #ping your gateway
~#ping 208.69.32.130 #google.com IP
~#ping google.com #test DNS, if fail then
#check /etc/resolv.conf
You should have your '/etc/resolv.conf' setup with your 'ISP DNS' nameservers.
Code:
sample '/etc/resolv.conf';
search 192.168.1.1
nameserver xxx.xxx.xxx.xxx #ISP DSN 'replace xxx.xxx.xxx.xxx
#with IP from your ISP
nameserver 4.2.2.1 #Verizon third level DNS
nameserver 4.2.2.2
nameserver 4.2.2.3
nameserver 4.2.2.4
Just remember that you can setup the '/etc/rc.d/rc.inet1.conf' to reflect any settings of your needs or desires. 'wicd' is a very useful tool that would allow you too do as you wish without manual intervention. You can always restart the 'inet' with '/etc/rc.d/rc.inet1.conf restart'. Another useful tool would be the daemon 'ifplugd' if you must connect/disconnect the wired.
The above links and others are available from 'Slackware-Links'. More than just SlackwareŽ links!
As always, you guys are as helpful as ever. I do a lot of troubleshooting in field and am moving away from Windows and concentrating on using Slack more and more on my laptop. Hence, the reason, I was looking for a way to (fairly) easily and painlessly do the above.
It's just a few more commands lines to remember, but what is 4 or 5 more when I already have a few hundred in my head...
Well, you might not need it, as you sound like your
bulb is quite a bit brighter than mine.
There is a file on every box on this LAN, which is
constantly added to and rsync'ed around, whose name
is good_commands. It is presently 28K and 938 lines
of information that sometimes 'saves my bacon'.
Well, you might not need it, as you sound like your
bulb is quite a bit brighter than mine.
There is a file on every box on this LAN, which is
constantly added to and rsync'ed around, whose name
is good_commands. It is presently 28K and 938 lines
of information that sometimes 'saves my bacon'.
My "important_stuff" file on my server is just under 8K. I feel like a lightweight now!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.