Raspberrypi.dhcp: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Root (Diskussion | Beiträge) |
Root (Diskussion | Beiträge) |
||
| Zeile 21: | Zeile 21: | ||
== /etc/dhcp/dhcpd.conf == | == /etc/dhcp/dhcpd.conf == | ||
server-name pi3x00; | |||
option domain-name "lummerland"; | |||
option domain-name-servers 192.168.115.46; | |||
option routers 192.168.115.116; | |||
# | |||
# Time | |||
# | |||
option ntp-servers 192.53.103.108; | |||
option pcode code 100 = text; | |||
option tcode code 101 = text; | |||
option pcode "GMT+01:00"; | |||
option tcode "Europe/Amsterdam"; | |||
# option netbios-name-servers 192.168.115.25; | |||
#filename "pxelinux.0"; | |||
ddns-update-style none; | |||
ddns-updates off; | |||
authoritative ; | |||
log-facility local7; | |||
subnet 192.168.115.0 netmask 255.255.255.0 { | |||
range 192.168.115.200 192.168.115.249; | |||
use-host-decl-names on; | |||
default-lease-time 14400; | |||
max-lease-time 172800; | |||
host mexico { | |||
hardware ethernet 00:E0:4C:AC:A0:46; | |||
fixed-address 192.168.115.1; | |||
} | |||
host raib2 { | |||
hardware ethernet 0c:c4:7a:b3:20:da; | |||
fixed-address raib2; | |||
} | |||
host rom { | |||
hardware ethernet 9c:5c:8e:73:fd:f0; | |||
fixed-address rom; | |||
} | |||
host raib2m { | |||
hardware ethernet 0c:c4:7a:b8:ea:90; | |||
fixed-address raib2m; | |||
} | |||
host hp377dw { | |||
hardware ethernet 58:20:b1:f2:fd:d7; | |||
fixed-address hp377dw; | |||
} | |||
host berlin { | |||
hardware ethernet 00:02:2A:D5:28:6D; | |||
fixed-address 192.168.115.5; | |||
} | |||
host netgeare2db0a { | |||
hardware ethernet 00:14:6C:E2:DB:0A; | |||
fixed-address 192.168.115.6; | |||
} | |||
host netgear1F2542 { | |||
hardware ethernet 00:14:6C:1F:25:42; | |||
fixed-address 192.168.115.7; | |||
} | |||
host wlan1750E { | |||
hardware ethernet 3e:10:d5:82:ca:e1; | |||
fixed-address wlan1750E; | |||
} | |||
host Wii { | |||
hardware ethernet 00:1a:e9:9f:6c:bf; | |||
fixed-address 192.168.115.8; | |||
option domain-name-servers 8.8.4.4; | |||
} | |||
host madrid { | |||
hardware ethernet 00:15:AF:B7:94:FD; | |||
fixed-address 192.168.115.9; | |||
} | |||
host newyork { | |||
option host-name "newyork"; | |||
hardware ethernet f4:6d:04:d4:7d:82; | |||
fixed-address newyork; | |||
} | |||
host karlsruhe { | |||
option host-name "karlsruhe"; | |||
hardware ethernet 08:00:27:F5:6E:1D; | |||
fixed-address 192.168.115.14; | |||
} | |||
host bruchsal { | |||
option host-name "bruchsal"; | |||
hardware ethernet 08:00:27:B8:5B:9C; | |||
fixed-address 192.168.115.15; | |||
} | |||
# | |||
# Servers bind to gateway | |||
# | |||
# | |||
group { | |||
option routers 192.168.115.115; | |||
host raib25 { | |||
option host-name "raib25"; | |||
hardware ethernet 90:E6:BA:07:60:48; | |||
fixed-address 192.168.115.25; | |||
} | |||
host server { | |||
hardware ethernet D0:17:C2:93:29:FE; | |||
fixed-address server; | |||
option host-name "server"; | |||
} | |||
host prag { | |||
hardware ethernet D0:17:C2:93:29:FF; | |||
fixed-address server; | |||
option host-name "prag"; | |||
} | |||
host pi3x00 { | |||
option host-name "pi3x00"; | |||
hardware ethernet b8:27:eb:dd:fa:77; | |||
fixed-address pi3x00; | |||
} | |||
host pi3x02 { | |||
option host-name "pi3x02"; | |||
hardware ethernet b8:27:eb:bd:79:cc; | |||
fixed-address pi3x02; | |||
} | |||
host pi3x03 { | |||
option host-name "pi3x03"; | |||
hardware ethernet b8:27:eb:8b:9b:0a; | |||
fixed-address pi3x03; | |||
} | |||
host pi3x04 { | |||
option host-name "pi3x04"; | |||
hardware ethernet b8:27:eb:c6:06:67; | |||
fixed-address pi3x04; | |||
} | |||
host pi3x05 { | |||
option host-name "pi3x05"; | |||
hardware ethernet b8:27:eb:64:bd:93; | |||
fixed-address pi3x05; | |||
} | |||
host vpnvm { | |||
option host-name "vpnvm"; | |||
hardware ethernet 08:00:27:B8:94:2A; | |||
fixed-address vpnvm; | |||
} | |||
} | |||
# | |||
# Backup Server bind to router | |||
# Pure Clients | |||
# | |||
group { | |||
option routers 192.168.115.116; | |||
host pi3x01 { | |||
option host-name "pi3x01"; | |||
# hardware ethernet B8:27:EB:81:95:D4; | |||
hardware ethernet b8:27:eb:d4:c0:81; | |||
fixed-address pi3x01; | |||
} | |||
host pi2x02 { | |||
option host-name "pi2x02"; | |||
hardware ethernet b8:27:eb:df:71:eb; | |||
fixed-address pi2x02; | |||
} | |||
host lmbuero { | |||
option host-name "lmbuero"; | |||
option domain-name-servers 192.168.115.116; | |||
hardware ethernet 00:03:12:01:27:AC; | |||
fixed-address 192.168.115.11; | |||
} | |||
host lmprivat { | |||
option host-name "lmprivat"; | |||
option domain-name-servers 192.168.115.116; | |||
hardware ethernet 00:03:12:01:23:3f; | |||
fixed-address 192.168.115.12; | |||
} | |||
} | |||
host khao { | |||
option host-name "khao"; | |||
hardware ethernet 00:26:18:52:75:48; | |||
fixed-address khao; | |||
} | |||
host mr3020 { | |||
option host-name "mr3020"; | |||
hardware ethernet 64:66:b3:4d:71:35; | |||
fixed-address mr3020; | |||
} | |||
host eldorado { | |||
option host-name "eldorado"; | |||
hardware ethernet 00:90:A9:80:4E:07; | |||
fixed-address 192.168.115.18; | |||
} | |||
host dresden { | |||
option host-name "dresden"; | |||
hardware ethernet 90:E6:BA:3F:93:61; | |||
fixed-address 192.168.115.19; | |||
} | |||
host elmirador { | |||
option host-name "elmirador"; | |||
hardware ethernet 00:90:A9:82:F9:05; | |||
fixed-address 192.168.115.99; | |||
} | |||
host poweron { | |||
option host-name "poweron"; | |||
hardware ethernet 00:16:18:77:2C:91; | |||
fixed-address 192.168.115.20; | |||
} | |||
host dgs1210 { | |||
option host-name "dgs1210"; | |||
hardware ethernet 00:18:E7:CC:4A:83; | |||
fixed-address 192.168.115.21; | |||
} | |||
host rtn66u { | |||
option host-name "rtn66u"; | |||
# 08:60:6E:CA:C9:28 | |||
hardware ethernet 08:60:6e:ca:c9:28; | |||
fixed-address rtn66u; | |||
} | |||
host pi2x00 { | |||
option host-name "pi2x00"; | |||
# hardware ethernet b8:27:eb:3b:90:79; | |||
hardware ethernet b8:27:eb:38:4e:f2; | |||
fixed-address pi2x00; | |||
} | |||
host pi2x01 { | |||
option host-name "pi2x01"; | |||
hardware ethernet 00:E0:8F:00:8F:82; | |||
fixed-address pi2x01; | |||
} | |||
host raib23 { | |||
option host-name "raib23"; | |||
hardware ethernet 0c:c4:7a:08:7b:12; | |||
fixed-address 192.168.115.23; | |||
} | |||
host raib23m { | |||
option host-name "raib23m"; | |||
hardware ethernet 0c:c4:7a:08:79:74; | |||
fixed-address 192.168.115.123; | |||
} | |||
host raib24 { | |||
option host-name "raib24"; | |||
hardware ethernet E0:CB:4E:D6:8B:F1; | |||
# hardware ethernet 00:11:6b:94:bf:22; | |||
fixed-address 192.168.115.24; | |||
} | |||
host raib27 { | |||
option host-name "raib27"; | |||
hardware ethernet 00:11:6B:94:BC:01; | |||
fixed-address 192.168.115.27; | |||
} | |||
host raib28 { | |||
option host-name "raib28"; | |||
hardware ethernet 00:11:6B:94:D5:84; | |||
fixed-address 192.168.115.28; | |||
} | |||
host raib33 { | |||
hardware ethernet 00:0E:A6:F7:2D:0F; | |||
fixed-address 192.168.115.33; | |||
} | |||
host raib30 { | |||
hardware ethernet 00:1B:FC:1C:0E:DE; | |||
fixed-address 192.168.115.30; | |||
} | |||
host raib42 { | |||
hardware ethernet D0:50:99:78:B2:87; | |||
fixed-address 192.168.115.42; | |||
} | |||
host virt42 { | |||
hardware ethernet 08:00:27:71:e7:82; | |||
fixed-address 192.168.115.43; | |||
} | |||
} | |||
== /etc/default/isc-dhcp-server == | == /etc/default/isc-dhcp-server == | ||
Version vom 13. Februar 2019, 23:05 Uhr
Server
apt-get install isc-dhcp-server
/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto eth0 iface eth0 inet static address 192.168.115.46 netmask 255.255.255.0 gateway 192.168.115.115
/etc/dhcp/dhcpd.conf
server-name pi3x00;
option domain-name "lummerland";
option domain-name-servers 192.168.115.46;
option routers 192.168.115.116;
#
# Time
#
option ntp-servers 192.53.103.108;
option pcode code 100 = text;
option tcode code 101 = text;
option pcode "GMT+01:00";
option tcode "Europe/Amsterdam";
# option netbios-name-servers 192.168.115.25;
#filename "pxelinux.0";
ddns-update-style none;
ddns-updates off;
authoritative ;
log-facility local7;
subnet 192.168.115.0 netmask 255.255.255.0 {
range 192.168.115.200 192.168.115.249;
use-host-decl-names on;
default-lease-time 14400;
max-lease-time 172800;
host mexico {
hardware ethernet 00:E0:4C:AC:A0:46;
fixed-address 192.168.115.1;
}
host raib2 {
hardware ethernet 0c:c4:7a:b3:20:da;
fixed-address raib2;
}
host rom {
hardware ethernet 9c:5c:8e:73:fd:f0;
fixed-address rom;
}
host raib2m {
hardware ethernet 0c:c4:7a:b8:ea:90;
fixed-address raib2m;
}
host hp377dw {
hardware ethernet 58:20:b1:f2:fd:d7;
fixed-address hp377dw;
}
host berlin {
hardware ethernet 00:02:2A:D5:28:6D;
fixed-address 192.168.115.5;
}
host netgeare2db0a {
hardware ethernet 00:14:6C:E2:DB:0A;
fixed-address 192.168.115.6;
}
host netgear1F2542 {
hardware ethernet 00:14:6C:1F:25:42;
fixed-address 192.168.115.7;
}
host wlan1750E {
hardware ethernet 3e:10:d5:82:ca:e1;
fixed-address wlan1750E;
}
host Wii {
hardware ethernet 00:1a:e9:9f:6c:bf;
fixed-address 192.168.115.8;
option domain-name-servers 8.8.4.4;
}
host madrid {
hardware ethernet 00:15:AF:B7:94:FD;
fixed-address 192.168.115.9;
}
host newyork {
option host-name "newyork";
hardware ethernet f4:6d:04:d4:7d:82;
fixed-address newyork;
}
host karlsruhe {
option host-name "karlsruhe";
hardware ethernet 08:00:27:F5:6E:1D;
fixed-address 192.168.115.14;
}
host bruchsal {
option host-name "bruchsal";
hardware ethernet 08:00:27:B8:5B:9C;
fixed-address 192.168.115.15;
}
#
# Servers bind to gateway
#
#
group {
option routers 192.168.115.115;
host raib25 {
option host-name "raib25";
hardware ethernet 90:E6:BA:07:60:48;
fixed-address 192.168.115.25;
}
host server {
hardware ethernet D0:17:C2:93:29:FE;
fixed-address server;
option host-name "server";
}
host prag {
hardware ethernet D0:17:C2:93:29:FF;
fixed-address server;
option host-name "prag";
}
host pi3x00 {
option host-name "pi3x00";
hardware ethernet b8:27:eb:dd:fa:77;
fixed-address pi3x00;
}
host pi3x02 {
option host-name "pi3x02";
hardware ethernet b8:27:eb:bd:79:cc;
fixed-address pi3x02;
}
host pi3x03 {
option host-name "pi3x03";
hardware ethernet b8:27:eb:8b:9b:0a;
fixed-address pi3x03;
}
host pi3x04 {
option host-name "pi3x04";
hardware ethernet b8:27:eb:c6:06:67;
fixed-address pi3x04;
}
host pi3x05 {
option host-name "pi3x05";
hardware ethernet b8:27:eb:64:bd:93;
fixed-address pi3x05;
}
host vpnvm {
option host-name "vpnvm";
hardware ethernet 08:00:27:B8:94:2A;
fixed-address vpnvm;
}
}
#
# Backup Server bind to router
# Pure Clients
#
group {
option routers 192.168.115.116;
host pi3x01 {
option host-name "pi3x01";
# hardware ethernet B8:27:EB:81:95:D4;
hardware ethernet b8:27:eb:d4:c0:81;
fixed-address pi3x01;
}
host pi2x02 {
option host-name "pi2x02";
hardware ethernet b8:27:eb:df:71:eb;
fixed-address pi2x02;
}
host lmbuero {
option host-name "lmbuero";
option domain-name-servers 192.168.115.116;
hardware ethernet 00:03:12:01:27:AC;
fixed-address 192.168.115.11;
}
host lmprivat {
option host-name "lmprivat";
option domain-name-servers 192.168.115.116;
hardware ethernet 00:03:12:01:23:3f;
fixed-address 192.168.115.12;
}
}
host khao {
option host-name "khao";
hardware ethernet 00:26:18:52:75:48;
fixed-address khao;
}
host mr3020 {
option host-name "mr3020";
hardware ethernet 64:66:b3:4d:71:35;
fixed-address mr3020;
}
host eldorado {
option host-name "eldorado";
hardware ethernet 00:90:A9:80:4E:07;
fixed-address 192.168.115.18;
}
host dresden {
option host-name "dresden";
hardware ethernet 90:E6:BA:3F:93:61;
fixed-address 192.168.115.19;
}
host elmirador {
option host-name "elmirador";
hardware ethernet 00:90:A9:82:F9:05;
fixed-address 192.168.115.99;
}
host poweron {
option host-name "poweron";
hardware ethernet 00:16:18:77:2C:91;
fixed-address 192.168.115.20;
}
host dgs1210 {
option host-name "dgs1210";
hardware ethernet 00:18:E7:CC:4A:83;
fixed-address 192.168.115.21;
}
host rtn66u {
option host-name "rtn66u";
# 08:60:6E:CA:C9:28
hardware ethernet 08:60:6e:ca:c9:28;
fixed-address rtn66u;
}
host pi2x00 {
option host-name "pi2x00";
# hardware ethernet b8:27:eb:3b:90:79;
hardware ethernet b8:27:eb:38:4e:f2;
fixed-address pi2x00;
}
host pi2x01 {
option host-name "pi2x01";
hardware ethernet 00:E0:8F:00:8F:82;
fixed-address pi2x01;
}
host raib23 {
option host-name "raib23";
hardware ethernet 0c:c4:7a:08:7b:12;
fixed-address 192.168.115.23;
}
host raib23m {
option host-name "raib23m";
hardware ethernet 0c:c4:7a:08:79:74;
fixed-address 192.168.115.123;
}
host raib24 {
option host-name "raib24";
hardware ethernet E0:CB:4E:D6:8B:F1;
# hardware ethernet 00:11:6b:94:bf:22;
fixed-address 192.168.115.24;
}
host raib27 {
option host-name "raib27";
hardware ethernet 00:11:6B:94:BC:01;
fixed-address 192.168.115.27;
}
host raib28 {
option host-name "raib28";
hardware ethernet 00:11:6B:94:D5:84;
fixed-address 192.168.115.28;
}
host raib33 {
hardware ethernet 00:0E:A6:F7:2D:0F;
fixed-address 192.168.115.33;
}
host raib30 {
hardware ethernet 00:1B:FC:1C:0E:DE;
fixed-address 192.168.115.30;
}
host raib42 {
hardware ethernet D0:50:99:78:B2:87;
fixed-address 192.168.115.42;
}
host virt42 {
hardware ethernet 08:00:27:71:e7:82;
fixed-address 192.168.115.43;
}
}
/etc/default/isc-dhcp-server
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server) # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf). #DHCPDv4_CONF=/etc/dhcp/dhcpd.conf #DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf # Path to dhcpd's PID file (default: /var/run/dhcpd.pid). #DHCPDv4_PID=/var/run/dhcpd.pid #DHCPDv6_PID=/var/run/dhcpd6.pid # Additional options to start dhcpd with. # Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead #OPTIONS="" # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". INTERFACESv4="eth0" INTERFACESv6=""
Client
/etc/dhcpcd.conf
# Most distributions have NTP support. option ntp_servers, posix_timezone, tzdb_timezone
- Leider heist die Option auf dem Server "pcode", hier "posix_timezone"
- Leider heist die Option auf dem Server "tcode", hier "tzdb_timezone"
- Leider erkennt der client "pcode" nicht und spricht hier von "100" "Printer Name"
- Leider erkennt der Client "tcode" nicht und spricht hier von "101" "MDHCP"