[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Local Area Network' (Debian-LAN): no hardcoded IP addresses left



Hi everybody,

I am happy to report that with the last commits there are no specific
hardcoded IP addresses left in the config space [1] and it should be
possible to use debian-lan in a variety of networks.

All network-specific information and used IP addresses are collected
in class/SERVER_A.var [2].

The code generating the DHCP and DNS configuration does for sure not
work for all possible networks and netmasks, however it should work
for standard cases, perhaps with minor modifications.

Best regards,

     Andi



[1]
debian-lan/fai/config$ rgrep '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' *

class/SERVER_A.var:MAINSERVER_IPADDR="10.0.0.1"
class/SERVER_A.var:GATEWAY="10.0.0.1"
class/SERVER_A.var:BROADCAST="10.0.255.255"
class/SERVER_A.var:SUBNET="10.0.0.0"
class/SERVER_A.var:NETMASK="255.255.0.0"
class/SERVER_A.var:SUBNETMASK="10.0.0.0/16"
class/SERVER_A.var:FAINETMASK="10.0.0.0/24"
class/SERVER_A.var:RANGE="10.0.1.10 10.0.1.200"
files/etc/hosts/diskless:127.0.0.1      localhost
files/etc/hosts/diskless:127.0.1.1      host.intern host
files/etc/hosts/mainserver:127.0.0.1    localhost
files/etc/hosts/mainserver:127.0.1.1    mainserver.intern mainserver
files/etc/networks/FAIBASE:default         0.0.0.0
files/etc/networks/FAIBASE:loopback        127.0.0.0
files/etc/networks/FAIBASE:link-local      169.254.0.0
files/etc/fai/grub.cfg/SERVER_A:    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo ip=10.0.1.100:::::eth0:off hostname=demohost
files/etc/fai/grub.cfg/SERVER_A:    linux   /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install ip=192.168.1.1:::::eth0:off hostname=demohost
files/etc/fai/grub.cfg/SERVER_A:    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install ip=192.168.1.1:::::eth0:off hostname=gnomehost
files/etc/fai/grub.cfg/SERVER_A:    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=install ip=192.168.1.250::192.168.1.254:255.255.255.0::xxx:off hostname=faiserver
files/etc/fai/grub.cfg/SERVER_A:    linux /boot/vmlinuz boot=live FAI_FLAGS="verbose,createvt" FAI_ACTION=sysinfo ip=192.168.1.1:::::eth0:off hostname=demohost
scripts/NTP_SERVER/10-ntp.conf:   ReplaceAll "#broadcast 192.168.123.255" With "broadcast ${BROADCAST}"
scripts/NTP_SERVER/10-ntp.conf:   AppendIfNoSuchLine "server 127.127.1.0 # local clock"
scripts/NTP_SERVER/10-ntp.conf:   AppendIfNoSuchLine "fudge 127.127.1.0 stratum 10"
scripts/PROXY/10-config:          ReplaceAll "#acl localnet src 10.0.0.0/8" With "acl localnet src ${SUBNETMASK}"


[2]
debian-lan/fai/config$ cat class/SERVER_A.var
[...]
## Variables that define the network.  If you choose the same IP
## address for mainserver ($MAINSERVER_IPADDR) and gateway ($GATEWAY),
## the mainserver is configured as gateway to the external network.
## You'll need two network cards in that case.
MAINSERVER_IPADDR="10.0.0.1"
GATEWAY="10.0.0.1"
BROADCAST="10.0.255.255"
NAMESERVER_IPADDR=""  # leave empty to use mainserver's IP address

SUBNET="10.0.0.0"
NETMASK="255.255.0.0"
SUBNETMASK="10.0.0.0/16"

## NETMASK for FAI config space access:
FAINETMASK="10.0.0.0/24"

## DHCP range for unknown clients (cf. dhcpd.conf):
RANGE="10.0.1.10 10.0.1.200"

## IP address-endings for workstations and diskless machines (the list
## is generated using 'seq $WS_RANGE' respectively 'seq $DL_RANGE'):
WS_RANGE="50 149"
DL_RANGE="150 249"
[...]


Reply to: