WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: configuration of Tiny Core, as DHCP server and client DHCP  (Read 18044 times)

Offline amonel

  • Newbie
  • *
  • Posts: 29
configuration of Tiny Core, as DHCP server and client DHCP
« on: January 05, 2017, 03:15:27 PM »
Hi there.

I am thinking of using  Tiny Core, as DHCP server and client DHCP.

Is have an example config file by chance?

THX.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #1 on: January 05, 2017, 03:33:36 PM »
Hi,
busybox'  udhcpd  is part of base.

For a sample config file, see: https://udhcp.busybox.net/udhcpd.conf
Goes to  /etc/udhcpd.conf .

Remember to add this file to  /opt/.filetool.lst  and do a backup.
Download a copy and keep it handy: Core book ;)

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 661
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #2 on: January 06, 2017, 01:18:42 AM »
dnsmasq Can also be used for a very little dhcp server.

And dnsmasq can be run in foreground for testing.
And when done with correct config, just save the parameters and run as daemon.
« Last Edit: January 06, 2017, 01:40:57 AM by patrikg »

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #3 on: January 06, 2017, 11:25:03 PM »
Hi,
Thank you for your answers,
I saw that it was possible with dsnmasq, someone would have an example file by chance ???
Thanks

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #4 on: January 09, 2017, 06:38:48 AM »
Hi there

Despite that I can not seem to recover an ip address on the extensions.
this is my configuration:
tc@box:$ sudo vi /usr/local/etc/dnsmasq.conf

bogus-priv
filterwin2k
no-poll
interface=eth0
domain=xxxx.com
dhcp-authoritative
dhcp-leasefile=/tmp/dhcp.leases
dhcp-option=3,192.168.1.1
dhcp-option=19,8.8.8.8
dhcp-range=192.168.4.10,192.168.4.200,255.255.255.0,12h
dhcp-host=@mac,192.168.1.11
dhcp-host=@mac,192.168.1.2

:wq

tc@box:$ sudo vi /opt/filetool.lst
/usr/local/etc/dnsmasq.conf

:wq

tc@box:$ sudo filetool.sh -b

tc@box:$ sudo reboot

It doesn't work
I am very new to tiny core.
Could someone help me?
thanks

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #5 on: January 09, 2017, 07:04:35 AM »
For entries in  /opt/.filetool.lst  the leading "/" must be omitted.
i.e.:
Code: [Select]
usr/local/etc/dnsmasq.conf
Download a copy and keep it handy: Core book ;)

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #6 on: January 09, 2017, 07:24:03 AM »
Hi,

sudo vi /opt/.filetool.lst

opt/eth0.sh
opt/eth1.sh
usr/local/etc/dnsmasq.conf
etc/hostname

It doesn't work

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #7 on: January 09, 2017, 07:30:01 AM »
Note that hostname is set in  /opt/bootsync.sh .
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #8 on: January 09, 2017, 07:31:23 AM »
BTW,  sudo  shouldn't be needed for  filetool.sh .
Download a copy and keep it handy: Core book ;)

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #9 on: January 09, 2017, 08:50:20 AM »
Hi,
It still doesn't work,
Thanks,

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #10 on: January 09, 2017, 08:57:47 AM »
I have this

ls /opt/bootsync.sh
/opt/bootsync.sh

is it ok????

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #11 on: January 09, 2017, 09:01:59 AM »
sudo vi /opt/bootsync.sh

/usr/bin/sethostname box
/opt/bootlocal.sh &

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #12 on: January 09, 2017, 09:40:36 AM »
From  http://tinycorelinux.net/7.x/x86/tcz/dnsmasq.tcz.info
Code: [Select]
[...]
Example config file located at /usr/local/etc/dnsmasq.conf.example
dnsmask defaults to /etc/dnsmask.conf. To override the default, use:
dnsmasq --conf-file=/usr/local/etc/dnsmasq.conf
[...]
Download a copy and keep it handy: Core book ;)

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 661
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #13 on: January 09, 2017, 10:12:36 AM »
I will also mention that use
Code: (bash) [Select]
filetool.sh -bv to see verbose what files being backed up.

Offline amonel

  • Newbie
  • *
  • Posts: 29
Re: configuration of Tiny Core, as DHCP server and client DHCP
« Reply #14 on: January 09, 2017, 11:32:48 AM »
Hi,

filetool.sh -bv

home/tc/.xsession
home/tc/.setbackground
home/tc/.Xdefaults
home/tc/.wbar
home/tc/.local/
home/tc/.local/bin/
home/tc/.X.d/
home/tc/.fltk/
home/tc/.fltk/fltk.org/
home/tc/.fltk/fltk.org/filechooser.prefs
opt/
opt/.filetool.lst
opt/tcemirror
opt/filetool.lst
opt/eth0.sh
opt/eth1.sh
opt/backgrounds/
opt/bootsync.sh
opt/.xfiletool.sh
opt/shutdown.sh
opt/bootlocal.sh
gzip: short write
Done