2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

DHCPサーバーを構築する

Posted at

インストール

$ sudo apt -y update
$ sudo apt install -y isc-dhcp-server

設定ファイルの変更

/etc/dhcp/dhcpd.conf
subnet 192.168.2.0 netmask 255.255.255.0 {
    range 192.168.2.1 192.168.2.252;
    option routers 192.168.2.254;
    option domain-name-servers 192.168.1.1;
}

解説

  • subnet 192.168.2.0 netmask 255.255.255.0
    配布するIPのネットワークプレフィックスの指定
  • range 192.168.2.1 192.168.2.252;
      配布するIPのレンジの指定
  • option routers 192.168.2.254;
    デフォルトゲートウェイの指定
  • option domain-name-servers 192.168.1.1;
    DNSの指定

サービス再起動

$ systemctl restart isc-dhcp-server
$ systemctl status isc-dhcp-server
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?