VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Static IP: dhcpcd runs and obtains dhcp address after loss of LAN connection.  (Read 106 times)

Rytz

  • Member
  • *
  • Posts: 63

Greetings:

I have a VLocity 7 box set up which is LAN only and is configured to pull a static IP address from the router.

I only have a single rc.inet# configured.  All others have been renamed and chmod'ed to be ignored.

Upon reconnection after some router downtime, I noticed that this box grabbed a DHCP address (instead of using the static IP address).  I saw dhcpcd running, which I'm assuming is the culprit for obtaining a DHCP lease.

I was able to reproduce this and even tried setting DHCP='no' in "functions-network", where dhcpcd is called.  Still pulled a dhcp address.

When booting up normally, the static IP is always obtained.  This problem only seems to happen during a loss of connection to the router.

Anyone have any ideas on why this is happening?  What else could be calling dhcpcd?

Thanks!
Logged
~ Rytz

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1297

Generally, your router is what provides the assigned IP address. If you set the router up to assign a specific address to Machine A, that's the only one your machine should receive, regardless of how it's set up.
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

Rytz

  • Member
  • *
  • Posts: 63

Generally, your router is what provides the assigned IP address. If you set the router up to assign a specific address to Machine A, that's the only one your machine should receive, regardless of how it's set up.
Hi retired1af.

I have DHCP set up on my router for use with wireless connections, but since my vector box is requesting a static IP (DHCP is off in the rc.inet0), shouldn't it only be pulling that static IP?  Are you suggesting that the router is providing a DHCP address anyway?

What about seeing dhcpcd running when I have the wrong IP address?
Logged
~ Rytz

wigums

  • Packager
  • Packager
  • Vectorite
  • ****
  • Posts: 164

do you have network manager running? try this

Code: [Select]
chmod -x /etc/rc.d/rc.networkmanager
check/fix your configs and reboot
Logged
When the people fear their government, there is tyranny; when the government fears the people, there is liberty.

Rytz

  • Member
  • *
  • Posts: 63

do you have network manager running? try this

Code: [Select]
chmod -x /etc/rc.d/rc.networkmanager
check/fix your configs and reboot

Nope - no network managers running.  rc.networkmanager doesn't exist on my system.  I'm running Joe's Window Manager as my desktop.
Logged
~ Rytz

retired1af

  • Packager
  • Vectorian
  • ****
  • Posts: 1297

If it were possible for machines to request "static" IP addresses, we'd all be doing it through our Internet providers.

You assign static IP addresses via the agency that assigns it, not the agency that requests it. So you need to set your router to assign a specific address to a specific machine. Doesn't matter if it's via Cat 5 or Wifi. The router is going to handle the assignment.

On my D-Link, this would be set under Setup -> Network Settings -> Add DHCP reservation. Assign the MAC address of the computer you wish to receive a static IP, and plug in the address you want it to have.

« Last Edit: May 18, 2015, 03:23:05 am by retired1af »
Logged
ASUS K73 Intel i3 Dual Core 2.3GHz

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4083

Nope - no network managers running.  rc.networkmanager doesn't exist on my system.  I'm running Joe's Window Manager as my desktop.

JWM is used in VL Light, which came with wicd instead of network manager. See if that one is installed and running.
Logged

crum

  • Member
  • *
  • Posts: 77

Router supplies ip-address set up router . As far as boot from iso would be good less steps,although dd works very well.
Logged

bigpaws

  • Vectorian
  • ****
  • Posts: 1869

Any system can have a static ip assigned to it. The router does not need to
be involved other then the actual routing. The only problem would be
an ip outside of the routers subnet.or duplicate ips.

Please post if this is 7.0 or 7.1

Also look for this file (/etc/rc.d/rc.wicd or /etc/rc.d/init.d/wicd )and post the output of
ls -la if it does exit.

Post the output of /etc/rc.d/rc.inet1.conf and /etc/rc.d/rc.inet.

It appears that a network manager of some sort is running.

Bigpaws
Logged

Rytz

  • Member
  • *
  • Posts: 63

If it were possible for machines to request "static" IP addresses, we'd all be doing it through our Internet providers.

You assign static IP addresses via the agency that assigns it, not the agency that requests it. So you need to set your router to assign a specific address to a specific machine. Doesn't matter if it's via Cat 5 or Wifi. The router is going to handle the assignment.

On my D-Link, this would be set under Setup -> Network Settings -> Add DHCP reservation. Assign the MAC address of the computer you wish to receive a static IP, and plug in the address you want it to have.

Thanks - I know what you are saying but, from my past networking experience, a system that is configured for a static IP address will always have that IP address but the router doesn't have to acknowledge it (provide connectivity).

JWM is used in VL Light, which came with wicd instead of network manager. See if that one is installed and running.
Any system can have a static ip assigned to it. The router does not need to
be involved other then the actual routing. The only problem would be
an ip outside of the routers subnet.or duplicate ips.

Please post if this is 7.0 or 7.1

Also look for this file (/etc/rc.d/rc.wicd or /etc/rc.d/init.d/wicd )and post the output of
ls -la if it does exit.

Post the output of /etc/rc.d/rc.inet1.conf and /etc/rc.d/rc.inet.

It appears that a network manager of some sort is running.

Bigpaws

Version is VLocity 7.0 .  I prefer JWM so I uninstalled the VLocity desktop manager.

Looks like WICD is probably the culprit.  I assumed this was only for wireless so I didn't even bother checking.  I have wicd stuff running.  I will disable wicd on startup and try the scenario again later this week:

ps aux | grep wicd
Code: [Select]
root      2541  0.0  0.0 109024  9812 ?        S    09:58   0:00 /usr/bin/python -O /usr/share/wicd/daemon/wicd-daemon.py
root      2543  0.0  0.0  96940 10204 ?        S    09:58   0:00 /usr/bin/python -O /usr/share/wicd/daemon/monitor.py

ls -al /etc/rc.d
Code: [Select]
drwxr-xr-x 11 root root  4096 May 17 13:52 ./
drwxr-xr-x 80 root root 12288 May 18 09:58 ../
-rwxr-xr-x  1 root root   845 Apr  1  2011 diamond*
-rwxr-xr-x  1 root root 12147 Apr  1  2011 functions*
-rwxr-xr-x  1 root root  3180 Apr  1  2011 functions-display*
-rwxr-xr-x  1 root root  2945 May 17 02:50 functions-network*
-rwxr-xr-x  1 root root  4692 Apr  1  2011 functions-service*
drwxr-xr-x  3 root root  4096 Apr 16 14:07 init.d/
lrwxrwxrwx  1 root root     4 Apr 14 14:38 rc.0 -> rc.6*
-rwxr-xr-x  1 root root   893 Apr  1  2011 rc.4*
-rwxr-xr-x  1 root root  6184 Jul  5  2010 rc.6*
-rwxr-xr-x  1 root root  2942 Apr  1  2011 rc.A*
-rwxr-xr-x  1 root root  8754 Apr 14 22:26 rc.K*
-rwxr-xr-x  1 root root  7013 Aug 10  2011 rc.M*
-rwxr-xr-x  1 root root 15927 Oct  2  2011 rc.S*
-rwxr-xr-x  1 root root  2347 Aug 10  2011 rc.X*
-rw-r--r--  1 root root   816 Apr  1  2011 rc.acpi
-rwxr-xr-x  1 root root   466 Apr  1  2011 rc.acpid*
-rwxr-xr-x  1 root root  2771 Feb  8  2011 rc.alsa*
-rwxr-xr-x  1 root root   746 Apr  1  2011 rc.apm*
-rw-r--r--  1 root root  2784 Mar  5  2010 rc.autofs
-rwxr-xr-x  1 root root   431 Apr  1  2011 rc.autologin*
-rwxr-xr-x  1 root root  1569 Mar 26  2011 rc.avahidaemon*
-rwxr-xr-x  1 root root  1627 Mar 26  2011 rc.avahidnsconfd*
-rw-r--r--  1 root root  3378 Jun 21  2012 rc.bind
-rw-r--r--  1 root root   497 Mar 30  2011 rc.bluetooth
-rwxr-x---  1 root root   690 Apr  1  2011 rc.bootsplash*
-rw-r--r--  1 root root  9052 Apr  1  2011 rc.cdrom
-rw-r--r--  1 root root  4852 Mar  3  2011 rc.cgconfig
-rw-r--r--  1 root root  3397 Mar  3  2011 rc.cgred
-rwxr-xr-x  1 root root   572 Dec 18  2010 rc.consolekit*
-rw-r--r--  1 root root  4318 Jan 21  2011 rc.cups
-rw-r--r--  1 root root   512 Apr  1  2011 rc.dnsmasq
-rwxr-xr-x  1 root root   124 Apr  1  2011 rc.fc-cache*
-rw-r--r--  1 root root 23358 Apr  1  2011 rc.firewall
-rwxr-xr-x  1 root root   119 Apr  1  2011 rc.font*
-rwxr-xr--  1 root root  1893 Apr  1  2011 rc.fuse*
-rw-r--r--  1 root root   906 Nov 16  2010 rc.hald
-rw-r--r--  1 root root  1585 Apr  1  2011 rc.hotplug
-rwxr-xr-x  1 root root   634 Apr 14 18:15 rc.inet0*
-rw-r--r--  1 root root   566 Apr  1  2011 rc.inet1.backup
-rw-r--r--  1 root root  3759 Apr  1  2011 rc.inet1.conf.backup
-rw-r--r--  1 root root  4752 Aug 24  2009 rc.inet1.conf.new
-rw-r--r--  1 root root  9600 Aug 26  2009 rc.inet1.new
-rw-r--r--  1 root root   475 Apr  1  2011 rc.inet2.backup
-rw-r--r--  1 root root  4847 Sep 17  2007 rc.inet2.new
-rwxr-xr-x  1 root root   497 Apr  1  2011 rc.inetd*
-rw-r--r--  1 root root  2063 Apr  1  2011 rc.ip_forward
-rw-r--r--  1 root root  2684 Dec  3  2008 rc.ip_forward.new
-rw-r--r--  1 root root   450 Apr  1  2011 rc.keymap
-rwxr-xr-x  1 root root  1032 Feb  8  2011 rc.local*
-rwxr-xr-x  1 root root  1740 May  7  2012 rc.messagebus*
-rwxr-xr-x  1 root root     0 Apr 14 21:54 rc.messagebus.new*
-rwxr-xr-x  1 root root 23594 Jul  5  2010 rc.modules*
-rwxr-xr-x  1 root root   384 Jul  5  2010 rc.network*
-rwxr-xr-x  1 root root  2444 Apr  1  2011 rc.nfsd*
-rwxr-xr-x  1 root root  2449 Mar 21  2011 rc.nfsd.new*
-rw-r--r--  1 root root  1148 Apr  1  2011 rc.parallel
-rw-r--r--  1 root root   917 Apr  1  2011 rc.paranoid
-rw-r--r--  1 root root  1722 Apr  1  2011 rc.pcmcia
-rwxr-xr-x  1 root root   215 Apr  1  2011 rc.pnp*
-rwxr-xr-x  1 root root  1337 Apr  1  2011 rc.route*
-rw-r--r--  1 root root  1402 Apr  1  2011 rc.rpc
-rw-r--r--  1 root root     0 May 25  2012 rc.samba.new
-rw-r--r--  1 root root  1169 Apr  1  2011 rc.saslauthd
-rwxr-xr-x  1 root root   967 Apr  1  2011 rc.scanluns*
-rw-r--r--  1 root root  2895 Apr  1  2011 rc.serial
-rw-r--r--  1 root root   895 Apr  1  2011 rc.snmpd
-rwxr-xr-x  1 root root  1600 Feb  4  2011 rc.sshd*
-rwxr-xr-x  1 root root   860 Apr  1  2011 rc.syslog*
-rw-r--r--  1 root root  1018 Apr 25  2010 rc.sysstat
-rwxr-xr-x  1 root root  1740 Apr  1  2011 rc.sysvinit*
-rwxr-xr-x  1 root root  1316 Jul  5  2010 rc.text*
-rw-r--r--  1 root root   340 Apr  1  2011 rc.tmpfs
-rw-r--r--  1 root root  5058 Dec 13  2010 rc.udev
-rwxr-xr-x  1 root root  3085 Jul  5  2010 rc.vlinit*
-rwxr-xr-x  1 root root  1087 Jan 18  2011 rc.wicd*
-rw-r--r--  1 root root  5638 Apr  1  2011 rc.wireless
-rw-------  1 root root  7320 Apr  1  2011 rc.wireless.conf
-rw-r--r--  1 root root 12835 Jan  2  2010 rc.wireless.new
drwxr-xr-x  2 root root  4096 Sep 23  2008 rc0.d/
drwxr-xr-x  2 root root  4096 Sep 23  2008 rc1.d/
drwxr-xr-x  2 root root  4096 Apr 16 17:04 rc2.d/
drwxr-xr-x  2 root root  4096 Apr 14 14:38 rc2.d.original/
drwxr-xr-x  2 root root  4096 Apr 14 22:42 rc3.d/
drwxr-xr-x  2 root root  4096 Apr 14 22:42 rc4.d/
drwxr-xr-x  2 root root  4096 Apr 14 22:42 rc5.d/
drwxr-xr-x  2 root root  4096 Sep 23  2008 rc6.d/
lrwxrwxrwx  1 root root     5 Apr 14 21:54 rc7.d -> rc4.d/
lrwxrwxrwx  1 root root     5 Apr 14 21:54 rc8.d -> rc5.d/
-rwxr-xr-x  1 root root  6210 Apr  1  2011 service*

rc.inet0 (only using rc.inet0 and the .conf files are not used / renamed for testing this problem)
Code: [Select]
DEVICE='eth0'
DHCP='no'
IPADDR='192.168.1.140'
NETMASK='255.255.255.0'
GATEWAY='192.168.1.1'
PROBE='no'
. /etc/rc.d/functions-network "$@"
« Last Edit: May 18, 2015, 09:53:22 am by Rytz »
Logged
~ Rytz