LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2017, 06:32 PM   #1
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Rep: Reputation: Disabled
Force Ubuntu to use wireless with static IP


I have Ubuntu 9.1 with a wireless connection which works well via DHCP.

I now wish to set up two different static IPs and still have the option to use DHCP but I want to retain control over which route is used and not have it select DHCP when I am trying to use a static IP.

This is easy on various Macs but my attempts to get it working on Ubuntu have failed.

I would prefer to stick to 9.1 - I tried later versions some years ago and found them OTT.

I have discovered that I can get it to remember my static settings by restarting immediately after inputting them in the GUI but I have not yet discovered how to stop it creating and attempting to use a new Auto DHCP route despite having DHCP switched off at the router.

I am happy to use command-line solutions or edit files directly as long as the GUI is retained for future use.
 
Old 03-30-2017, 08:44 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,978
Blog Entries: 28

Rep: Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067Reputation: 6067
Ubuntu has a long article on setting ip addresses on their website. See the sections on "Static IP Address Assignment" and "DNS Client Configuration."

Ubuntu 9.10 reached end of life over half a decade ago.
 
Old 03-30-2017, 09:25 PM   #3
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
not have it select DHCP when I am trying to use a static IP
-::-Change the default setting.-::-

Running an unsupported distribution isn't the best practice.:-

https://www.ubuntu.com/download/desktop
 
Old 03-31-2017, 05:27 AM   #4
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Ubuntu has a long article on setting ip addresses on their website. See the sections on "Static IP Address Assignment" and "DNS Client Configuration."

Ubuntu 9.10 reached end of life over half a decade ago.
The link appears very useful - thanks - I will play with some of the commands later.

I tried the main release after 9.1 and did not like it - it had lost much of the simplicity I liked. There are probably better solutions than Ubuntu for me but I still had my original 9.1 install CD.
 
Old 03-31-2017, 05:31 AM   #5
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
-::-Change the default setting.-::-

Running an unsupported distribution isn't the best practice.:-

https://www.ubuntu.com/download/desktop
How do I change the default?

Please see my earlier remarks about using Ubuntu 9.1.

As a Mac PPC user I have no concerns about unsupported OSs.
 
Old 03-31-2017, 08:05 AM   #6
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Ubuntu has a long article on setting ip addresses on their website. See the sections on "Static IP Address Assignment" and "DNS Client Configuration."

Ubuntu 9.10 reached end of life over half a decade ago.
Upon further investigation the link is about wired server connections.

I assume that server commands may be the same in a non-server situation but wired commands are unlikely to be the same as wireless commands. This thread is about: 'Force Ubuntu to use wireless with static IP'.
 
Old 03-31-2017, 09:45 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051
Quote:
Originally Posted by Neville Hillyer View Post
Please see my earlier remarks about using Ubuntu 9.1.

As a Mac PPC user I have no concerns about unsupported OSs.
that's not how linuxes work.

and with EVERY problem you ask us, there's an almost 100% probability that it has at least partly to do with you using an EOL distro.
or we cannot offer advice or even a fix, because the first step will always be "update your system"...

i understand it wasn't easy to get your realtek thingy working, but you were told before that it would be neither harder nor easier on a current distro.
 
Old 03-31-2017, 09:57 AM   #8
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
that's not how linuxes work.

and with EVERY problem you ask us, there's an almost 100% probability that it has at least partly to do with you using an EOL distro.
or we cannot offer advice or even a fix, because the first step will always be "update your system"...

i understand it wasn't easy to get your realtek thingy working, but you were told before that it would be neither harder nor easier on a current distro.
There are many of Linux versions in use that are no longer supported - perhaps I will let others list a few !

Last edited by Neville Hillyer; 03-31-2017 at 09:59 AM.
 
Old 03-31-2017, 02:17 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,721

Rep: Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595Reputation: 5595
Are you trying to configure a static IP address for a particular access point/router?

NetworkManager is the service that automatically finds and connects to access points or switches between wired and wireless on the fly. I don't remember if the nm-applet version running on Ubuntu 9.1 has the capability to set a static address for an each access point.
 
Old 03-31-2017, 04:06 PM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Neville Hillyer View Post
How do I change the default?

Please see my earlier remarks about using Ubuntu 9.1.

As a Mac PPC user I have no concerns about unsupported OSs.
On a system that is well supported you would have to hunt down the DHCP configuration file and change the arguments in it so that DHCP is not the default.

https://help.ubuntu.com/community/isc-dhcp-server
https://help.ubuntu.com/lts/servergu...iguration.html

Like ondoho said in post #7 we really can't offer advise or a fix on such a old distro.

Even if the newer version of Ubuntu may seem OTT to you however; it's totally worth it to have the most current version installed. <seriously>

A system that is not supported has way too many security vulnerabilities. Aside from that the functionality of the libraries, API's, GUI and DE are generally misconfigured and things don't run or launch properly.
 
Old 03-31-2017, 05:24 PM   #11
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Are you trying to configure a static IP address for a particular access point/router?

NetworkManager is the service that automatically finds and connects to access points or switches between wired and wireless on the fly. I don't remember if the nm-applet version running on Ubuntu 9.1 has the capability to set a static address for an each access point.
I am trying to set up a laptop for use in various locations.

In these days of router hacking I prefer to make my routers as secure as possible and not transmit half the required information via DHCP. Also most of my router settings are non-default including the IP range.

I have discovered that Network Manager was designed to work with a combination of GUI and text data but the documentation/examples could be better. I suspect it is not as unreliable as most say but simply needs setting up properly.

Last edited by Neville Hillyer; 04-01-2017 at 05:35 AM.
 
Old 03-31-2017, 05:33 PM   #12
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
On a system that is well supported you would have to hunt down the DHCP configuration file and change the arguments in it so that DHCP is not the default.

https://help.ubuntu.com/community/isc-dhcp-server
https://help.ubuntu.com/lts/servergu...iguration.html

Like ondoho said in post #7 we really can't offer advise or a fix on such a old distro.

Even if the newer version of Ubuntu may seem OTT to you however; it's totally worth it to have the most current version installed. <seriously>

A system that is not supported has way too many security vulnerabilities. Aside from that the functionality of the libraries, API's, GUI and DE are generally misconfigured and things don't run or launch properly.
Your first link is about DHCP servers - I have a client !

The other link is too general to assist with locating anything in an old OS.
 
1 members found this post helpful.
Old 03-31-2017, 05:57 PM   #13
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Neville Hillyer View Post
Your first link is about DHCP servers - I have a client !

The other link is too general to assist with locating anything in an old OS.
Use the find or the locate cmd to find the dhcp configuration file.

http://manpages.ubuntu.com/manpages/...nt.conf.5.html

HTH

Last edited by Ztcoracat; 03-31-2017 at 06:45 PM.
 
Old 04-01-2017, 06:11 AM   #14
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Use the find or the locate cmd to find the dhcp configuration file.

http://manpages.ubuntu.com/manpages/...nt.conf.5.html

HTH
The only dhclient.conf file is a sample file at /etc/dhcp3/dhclient.conf
 
Old 04-01-2017, 11:00 AM   #15
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Neville Hillyer View Post
The only dhclient.conf file is a sample file at /etc/dhcp3/dhclient.conf
By sample file do you mean it's not the real configuration file?

What is the output of:

Code:
locate dhcp
IF you don't have /etc/dhcp/dhclient.conf than you would have to create one.

Each distribution is different so I don't think my configuration file (Debian based) would work on your Ubuntu system. I could be wrong:-
----------------------------------------------------------------------------------

I found dhcp on my Debian System:
Code:
root@fractcat:/home/Linuxcat# locate dhcp
/etc/dhcp
/etc/dhcp/dhclient-enter-hooks.d
/etc/dhcp/dhclient-exit-hooks.d
/etc/dhcp/dhclient.conf
/etc/dhcp/dhclient-enter-hooks.d/debug
/etc/dhcp/dhclient-enter-hooks.d/samba
/etc/dhcp/dhclient-exit-hooks.d/debug
/etc/dhcp/dhclient-exit-hooks.d/ntpdate
/etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes
/etc/samba/dhcp.conf
/usr/lib/syslinux/modules/bios/dhcp.c32
/usr/lib/syslinux/modules/bios/prdhcp.c32
/usr/lib/syslinux/modules/efi32/dhcp.c32
/usr/lib/syslinux/modules/efi32/prdhcp.c32
/usr/lib/syslinux/modules/efi64/dhcp.c32
/usr/lib/syslinux/modules/efi64/prdhcp.c32
/usr/share/doc/isc-dhcp-client
/usr/share/doc/isc-dhcp-common
/usr/share/doc/isc-dhcp-client/NEWS.Debian.gz
/usr/share/doc/isc-dhcp-client/changelog.Debian.gz
/usr/share/doc/isc-dhcp-client/copyright
/usr/share/doc/isc-dhcp-common/changelog.Debian.gz
/usr/share/doc/isc-dhcp-common/copyright
/usr/share/doc/wpasupplicant/examples/udhcpd-p2p.conf
/usr/share/man/man5/dhcp-eval.5.gz
/usr/share/man/man5/dhcp-options.5.gz
/var/cache/apt/archives/isc-dhcp-client_4.3.1-6+deb8u2_amd64.deb
/var/cache/apt/archives/isc-dhcp-common_4.3.1-6+deb8u2_amd64.deb
/var/lib/dhcp
/var/lib/dhcp/dhclient.eth0.leases
/var/lib/dhcp/dhclient.leases
/var/lib/dpkg/info/isc-dhcp-client.conffiles
/var/lib/dpkg/info/isc-dhcp-client.list
/var/lib/dpkg/info/isc-dhcp-client.md5sums
/var/lib/dpkg/info/isc-dhcp-client.postinst
/var/lib/dpkg/info/isc-dhcp-client.postrm
/var/lib/dpkg/info/isc-dhcp-client.preinst
/var/lib/dpkg/info/isc-dhcp-common.list
/var/lib/dpkg/info/isc-dhcp-common.md5sums
Here's my /etc/dhcp/dhclient.conf (sample)

Code:
root@fractcat:/home/Linuxcat# cat /etc/dhcp/dhclient.conf
# Configuration file for /sbin/dhclient, which is included in Debian's
#	dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
#	man page for more information about the syntax of this file
#	and a more comprehensive list of the parameters understood by
#	dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
#	not leave anything out (like the domain name, for example), then
#	few changes must be made to this file, if any.
#

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

#send host-name "andare.fugue.com";
send host-name = gethostname();
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
	domain-name, domain-name-servers, domain-search, host-name,
	dhcp6.name-servers, dhcp6.domain-search,
	netbios-name-servers, netbios-scope, interface-mtu,
	rfc3442-classless-static-routes, ntp-servers;
#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
#select-timeout 5;
#initial-interval 2;
#script "/etc/dhcp3/dhclient-script";
#media "-link0 -link1 -link2", "link0 link1";
#reject 192.33.137.209;

#alias {
#  interface "eth0";
#  fixed-address 192.5.5.213;
#  option subnet-mask 255.255.255.255;
#}

#lease {
#  interface "eth0";
#  fixed-address 192.33.137.200;
#  medium "link0 link1";
#  option host-name "andare.swiftmedia.com";
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.33.137.255;
#  option routers 192.33.137.250;
#  option domain-name-servers 127.0.0.1;
#  renew 2 2000/1/12 00:00:01;
#  rebind 2 2000/1/12 00:00:01;
#  expire 2 2000/1/12 00:00:01;
Is your sample the same as mine?

The man page for dhcp should help you to make your own configuration file.

I'm sorry, Neville Hillyer but I can't create that file for your system. I don't have that skill yet. <still learning from the RHCE Exam Books>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Static IP and wireless arubin Slackware 3 06-22-2008 08:04 AM
Cannot connect to wireless networks using a Broadcom Air Force One card on Slackware gamaxray Linux - Networking 2 05-23-2008 09:40 PM
force newly connected wireless users to website or Agreement ckob Linux - Networking 3 05-14-2008 07:00 AM
Broadcom Air Force One Wireless Issues seifertjr Grafpup 2 11-22-2007 11:40 PM
Friend is looking on how to download Broadcom air force one BCM4318 wireless card Devilman501 Linux - General 1 11-12-2007 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration