Outils pour utilisateurs

Outils du site


Panneau latéral

Tips

Divers

Projets

Ham Radio

Machines

Research

Privé

Études

projets:mudrublic:dhcp

DHCP

Configuration

#       $OpenBSD: dhcpd.conf,v 1.2 2008/10/03 11:41:21 sthen Exp $
#
# DHCP server options.
# See dhcpd.conf(5) and dhcpd(8) for more information.
#

# Domain name:          narf.ssji.net
# Network:              192.168.103.0/255.255.255.0
# Name servers:         192.168.103.1
# Default router:       192.168.103.1
# Addresses:            192.168.103.129 192.168.103.254
#
option  domain-name "narf.ssji.net";

subnet 192.168.103.0 netmask 255.255.255.0 {
        option  routers 192.168.103.1;
        option  domain-name-servers 192.168.103.1
        range 192.168.103.10 192.168.103.254;
}
subnet 192.168.42.0 netmask 255.255.255.0 {
        option  routers 192.168.42.1;
        option  domain-name-servers 192.168.42.1
        range 192.168.42.2 192.168.42.254;
}

host flintwinch {
        hardware ethernet 00:0e:7f:6d:e4:1d;
        fixed-address 192.168.103.2;
}

Startup

An entry is added to /etc/rc.conf.local.

dhcpd_flags=

ISC-DHCP>3

The following requires isc-dhcpd>3 (the one shipped with OpenBSD is 2).

In /etc/dhcpd.conf:

# Domain name:          narf.ssji.net
# Network:              10.0.0.0/255.255.255.0
# Name servers:         10.0.0.1
# Default router:       10.0.0.1
# Addresses:            10.0.0.129 10.0.0.254
#
shared-network 10.0.0.0 {
        option  domain-name "narf.ssji.net";
        option  domain-name-servers 10.0.0.1;
        option  routers 10.0.0.1;

        subnet 10.0.0.0 netmask 255.255.255.0 {
                pool {
                        range 10.0.0.2 10.0.0.127;
                        deny unknown clients;
                }
                pool {
                        range 10.0.0.129 10.0.0.254;
                        allow unknown clients;
                }
        }
}

Known host are given a proper host entry:

host schtrnick {
        hardware ethernet 00:09:5b:8b:23:4a;
}
host gloduk {
        hardware ethernet 00:11:24:9e:0a:3c;
}
host speckled-jim {
        hardware ethernet 00:26:5e:3a:0c:62;
}

Interfaces

Add interface ath0 to /etc/dhcp.interfaces, the wired network is, once again, taken care of as a side-effect of the bridging.

projets/mudrublic/dhcp.txt · Dernière modification: 2013-11-15 05:06 (modification externe)