steiner-gtk.de
Docs » Lokalen DHCP-Server einrichten

Lokalen DHCP-Server einrichten

1. Statische IP-Adresse für die Netzwerkinterface festlegen:

Open Network Preferences

Set your Wired Network Interface Card with the following IP address:

IP address - 192.168.10.2 Subnet Mask - 255.255.255.0

2. DHCP-Konfiguration erstellen:

Open the Terminal application and create under "/etc" the DHCP config file, 
name it "bootpd.plist" elevating your permission using "sudo":

sudo vi /etc/bootpd.plist

3. Inhalt bootpd.plist:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

    <key>bootp_enabled</key>

    <false/>

    <key>detect_other_dhcp_server</key>

    <integer>1</integer>

    <key>dhcp_enabled</key>

    <array>

        <string>en0</string>

    </array>

    <key>reply_threshold_seconds</key>

    <integer>0</integer>

    <key>Subnets</key>

    <array>

        <dict>

            <key>allocate</key>

            <true/>

            <key>dhcp_router</key>

            <string>192.168.10.1</string>

            <key>lease_max</key>

            <integer>86400</integer>

            <key>lease_min</key>

            <integer>86400</integer>

            <key>name</key>

            <string>192.168.10</string>

            <key>net_address</key>

            <string>192.168.10.0</string>

            <key>net_mask</key>

            <string>255.255.255.0</string>

            <key>net_range</key>

            <array>

                <string>192.168.10.100</string>

                <string>192.168.10.200</string>

            </array>

        </dict>

    </array>

</dict>

</plist>
Please note that this script assumes that the wired Network Interface Card is labeled as "en0" - if this is not the case 
you will need to adjust the script, to do so edit this script using your favorite editor, 
Edit the interface name (line 11) and save the file.

4. DHCP-Server starten:

sudo /bin/launchctl load -w /System/Library/LaunchDaemons/bootps.plist

5. DHCP-Server beenden:

sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/bootps.plist
Previous Next

steiner-gtk.de

Table of Contents

Impressum / Datenschutzerklaerung