Private Versuche-DHCP-Server erstellen
auf vm: apt install isc-dhcp-server
systemctl status isc-dhcp-server.service
Nov 23 20:41:35 dhcps dhcpd[1662]: No subnet declaration for eth0 (172.16.1.2). Nov 23 20:41:35 dhcps dhcpd[1662]: ** Ignoring requests on eth0. If this is not what Nov 23 20:41:35 dhcps dhcpd[1662]: you want, please write a subnet declaration Nov 23 20:41:35 dhcps dhcpd[1662]: in your dhcpd.conf file for the network segment Nov 23 20:41:35 dhcps dhcpd[1662]: to which interface eth0 is attached. **
/etc/dhcp/dhcpd.conf default-lease-time 3600;
subnet 172.16.1.0 netmask 255.255.255.0 {
range 172.16.1.3 172.16.1.254;
}
subnet 192.168.0.0 netmask 255.255.0.0 { }
-> DHCP server läuft
zum testen erstelle ich eine neue VM
xen-create-image --hostname=webserver --memory=1gb --vcpus=1 --dhcp --lvm=vg01 --dist=jessie --partitions=/etc/xen-tools/partitions.d/webserver --pygrub --verbose --password=q1w2e3r4
/etc/sysctl.d/97-disable_ipv6 net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1
sysctl -p /etc/sysctl.d/97-disable_ipv6
/etc/resolv.conf nameserver 62.202.31.210
route add default gw 172.16.1.1 eth0
-> ping auf IP und url möglich
apt install apache2 apache2-doc apache2-utils