Tiny Core Linux
Tiny Core Base => Micro Core => Topic started by: remus on March 07, 2012, 05:54:05 PM
-
Hi all,
I'm wondering if there is a text based wizard for setting network settings, like the one in the tinycore control panel ?
If there isn't I'm guessing, I could just run the tinycore network wizard, and let it produce the settings I need, and then copy them into a microcore environment.
thoughts and comments appreciated :)
-
Hi remus
The Tinycore network wizard just produces a script like the following:
#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.30 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.1
echo nameserver 192.168.1.1 > /etc/resolv.conf
echo nameserver 192.168.1.1 >> /etc/resolv.conf
I would just use that as template and modify the numbers as required.
If you run this script as a regular user, you may have to add sudo to some/all of the commands.
-
I just started throwing together a script that will work pretty much like the cpanel "Network" applet but in a terminal. If anyone else has already done so, or actually knows what they are doing with such things (or if the Network applet is really just a front end for an existing script that I don't know about?), let me know. Otherwise, I'll continue - perhaps coming up with something suitable for inclusion in base.
-
Hi Lee
The /usr/bin/network applet does not appear to be a front end for a script. If you examine the binary, near the end
you'll see the commands it uses to create the configuration script, update bootlocal.sh, etc.
-
Thanks Rich.
And thanks to the community for not beating us up about this... I'll plead that I still spend waaay too much time on closed source systems but - I just now thought to go and snarf the source from
http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/fltk_projects/network/
Its all object-oriented-lookin' but at least I'll get it right. :)
-
Thanks for your advice Rich,
I have a static ip address in MicroCore 3.8.4 with the following method.
I've added the following instruction to the start of "/opt/bootlocal.sh"
sudo sh /opt/eth0.sh &
My "/opt/eth0.sh" file contains the following
#!/bin/sh
pkill udhcpc
ifconfig eth0 10.1.1.202 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
I had to add the following to "/opt/.filetool.lst"
opt/eth0.sh
And finally I had to run
filetool.sh -b
-
Hi remus
Not to quibble, but don't you mean:
ifconfig eth0 10.1.1.202 netmask 255.255.255.0 broadcast 10.1.1.255 up
-
Hi Rich,
ifconfig eth0 10.1.1.202 netmask 255.255.255.0 broadcast 10.1.1.255 up
I seem to recall that I got the netmask and broadcast settings by running ifconfig from microcore while it was in dhcp client mode (<- did I say that right ?)
The only part of the IP at work that changes is the forth octet, so the 10.1.1. is static.
I know where you are coming from though, I'll run ipconfig from a few windows computers and see what they are doing, and I'll double check my memory by booting up a few systems with a stock mc cd and run ifconfig
-
10. is a class A network, so the original netmask and broadcast were correct. Though no reason you couldn't subnet it to just 256.
-
I've not yet spent much time learning about network theory, i've always been trying to get something working, and then having to move onto the next project, without the time to reflect on what was done, and learning the theory that relates to it. I hope that i'll get some down time eventually. And learn about network theory.
This looks helpful.
http://www.tcpipguide.com/free/t_IPDefaultSubnetMasksForAddressClassesABandC.htm