[Voyage-linux] DHCP
Rainer Stratmann
(spam-protected)
Fri Oct 5 04:17:25 HKT 2012
Am Monday 01 October 2012 04:25:57 schrieben Sie:
> 2012/9/28 Rainer Stratmann <RainerStratmann at t-online.de>
>
> > How to swith off DHCP by default and start in (eventually) manually
> > later?
>
> DHCP Client? or Server?
Client
Isn't it possible to make it easier?
Is it possible to let /etc/network/interfaces untouched?
To supress the start of the dhclient program in general?
And then later (if required) start the dhclient program?
Or set (if required) the ipadress manually with sudo ifconfig
eth0 192.168.178.10 for example.
That worked fine in the past with the previous dhclient 'pump' in earlier
voyage distributions.
I need to know where in the startup script the dhclient program ist started.
There are 2 files which are likely involved here:
/sbin/dhclient
/sbin/dhclient-script
But I am not sure where to begin.
> If client, from my build doc:
>
> Make it easy for user to switch between DHCP and static IP
>
> sudo cp -pi /etc/network/interfaces /etc/network/interfaces.dhcp
> sudo cp -pi /etc/network/interfaces /etc/network/interfaces.static1
>
> sudo vi /etc/network/interfaces.static1
>
> #iface eth0 inet dhcp
> iface eth0 inet static
> address 10.2.16.6
> netmask 255.255.255.252
> broadcast 10.2.16.7
> gateway 10.2.16.5
>
> sudo cp -pi /etc/network/interfaces.static1 /etc/network/interfaces.static
>
> Set up address method selection scripts. Note that /usr/local/bin/setip
> provides a dialog for setting IP, default gateway, etc
>
> sudo vi /usr/local/bin/switch2dhcp
> #
> /bin/cp -p /etc/network/interfaces.dhcp /etc/network/interfaces
>
> sudo vi /usr/local/bin/switch2static
> #
> /bin/cp -p /etc/network/interfaces.static /etc/network/interfaces
>
>
> sudo chmod 755 /usr/local/bin/switch2dhcp /usr/local/bin/switch2static
>
>
> -------------------------
>
> If you want to disable DHCP server:
>
> Disable, DHCP. No accidents!
>
> vi /etc/dnsmasq.more.conf
>
> #dhcp-range=wlan0,10.1.10.10,10.1.10.250,24h
> #dhcp-range=eth1,10.1.20.10,10.1.20.250,24h
> #dhcp-range=eth2,10.1.30.10,10.1.30.250,24h
> #dhcp-range=eth3,10.1.40.10,10.1.40.250,24h
> dhcp-leasefile=/var/tmp/dnsmasq.leases
>
>
> Reboot, or re-start dnsmasq
>
> Jon
More information about the Voyage-linux
mailing list