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 04-14-2014, 02:15 AM   #1
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,047

Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Static IP instead of DHCP


I've been using Slackware for years and have now run across a problem I can't solve. This is a new install of Slackware64 -current. I have rc.inet1.conf setup for a static IP of 192.168.1.205 and a netmask of 255.255.255.0 and DHCP line left blank. /etc/hosts is configured properly as well. The machine, instead of using the static IP I have set up always gets an IP from DHCP on my gateway router. This has never happened to me before and I can find no solution. Does anyone see what I'm over looking?? Thanks in advance.
 
Old 04-14-2014, 09:55 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
My systems are similar -- all fixed-IP, all names and addresses listed in /etc/hosts, all Gateway addressed at 192.168.1.1. They all talk nicely to each other; for example, this machine's /etc/rc.d/rc.inet1.conf looks like this:
Code:
# Config information for eth0:
IPADDR[0]="192.168.1.10"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY="192.168.1.1"
The router is a Linksys BEFSR41.

I do have DHCP running but that is only for the occasional wi-fi connection for my wife's Kindle (which will also connect with a USB cable with DHCP).

One thing I would note is that DHCP addresses start at 100 and go up from there; could your static IP of 192.168.1.205 be interfering somehow?

Just for grins, my /etc/hosts looks like this:
Code:
# For loopbacking.
127.0.0.1		localhost
# For public and private OpenSRF domains
127.0.1.2       public.localhost        public
127.0.1.3       private.localhost       private
# Local servers
192.168.1.10		fubar.lan fubar
192.168.1.15		InkJet
192.168.1.20		snafu.lan snafu
192.168.1.30		pita pita.lan
192.168.1.2		hicl01.lan hicl01
# Public servers
75.126.162.205		linuxquestions.org
74.125.224.70		maps.google.com
74.125.224.111		maps.gstatic.com

# End of hosts.
I know that's a little messy (and I just save DNS look up with the web addresses and I don't really know one way or the other if they're actually useful).

Other than that...

Hope this helps some.

Last edited by tronayne; 04-14-2014 at 10:13 AM. Reason: Fumble Finger
 
Old 04-14-2014, 10:05 AM   #3
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,047

Original Poster
Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Thank you for your response. My rc.inet1.conf is like yours and the hosts file is a good deal more spartan. I've been using the .205 address problem free for several years. It is just this installation that has this quirk. Quite strange. I'll continue to investigate. Thanks again for your response.

Ok, it's sorted. Had rc.networkmanager executing on boot. made it 0644 and all is fine with the world.

Last edited by 3rensho; 04-19-2014 at 09:50 AM.
 
  


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 or DHCP? penguinista Linux - Security 6 11-26-2007 12:54 AM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 07:32 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DHCP to static IP ?? davepal Linux - Networking 1 04-21-2004 09:34 AM
DHCP or Static Culbert Linux - Networking 1 03-14-2003 07:42 PM

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

All times are GMT -5. The time now is 08:21 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