Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: remus on February 12, 2013, 07:20:56 PM
-
Hi all,
I've got mc 3.8.4 running samba 3.4.5 as a file server, its stable.
The server is configured to use a static ip address at boot up.
The server changed its ip address from this static address yesterday and grabbed the next available dynamic address from the ADSL modem router that is at the heart of our small office network.
This happened once a few week's ago and now its happened again, I thought I'd make a post about it.
Config Details:
File : /opt/bootlocal.sh
sudo sh /opt/eth0.sh
File : /opt/eth0.sh
#!/bin/sh
pkill udhcpc
ifconfig eth0 10.1.1.151 netmask 255.0.0.0 broadcast 10.255.255.255 up
route add default gw 10.1.1.1
echo nameserver 10.1.1.1 > /etc/resolv.conf
Any suggestions are welcome.
-
Use the nodhcp boot code.
-
Ok, I'll do that.
Is mc getting a new IP address for that reason ?
-
I was always under the impression that without nodhcp the dhcp client is only started once and if you kill it like remus did I don't see where it would get restarted.
-
Unless it is still running, there could be no IP assignment.
Check all the scripts in /opt and make sure nothing restarts it.
-
Hi Remus,
I do nearly the same - using TC 3.8.4 to run a web server (not Apache, only Monkey).
To get always the same IP-address I use my router (a rather old DLink DI-524).
Via DHCP-configuration this router has the ability to deliver always the same IP-address
for a specific PC by using the MAC-address of the ethernet card of this PC. They call
somewhat like 'static DHCP configuration' and 'cloning'.
Maybe you can take a look at the administration of your router, if it has a similar functionality.
My TC works in that way without any special scripts or additional configuration.
Regards
xyz-worx
-
Any chance this could occur in case the interface is not up yet at the time of running that script?
-
That might be it,
with this running in the background it would be a race
[ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh &
-
I've used qremaster to create a custom mc 3.8.4 boot cd with the following boot codes.
syslog showapps nodhcp noautologin
Other than that the boot cd is stock with no merged tce folder or extensions.
This is a bit of a problem, as the server is used by several windows xp machines in a client - server database relationship.
I'm happy to help with any testing, just for specific info, and I'll try to provide it.