[App] DHCP 服务器搭建

# yum -y install dhcp

# systemctl enable dhcpd

# cp -a /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example/etc/dhcp/dhcpd.conf

# vi  /etc/dhcp/dhcpd.conf

ddns-update-style interim;       # non:不支持   interim:互动更新模式       ad-hoc:特殊更新模式

subnet 10.5.5.0 netmask 255.255.255.224 {         # subnet 网段  netmask 子网掩码

  range 10.5.5.26 10.5.5.30;                                      # 分配的ip地址范围

  option domain-name-servers ns1.internal.example.org;        # 设置client dns ip

  option domain-name "internal.example.org";                          # 设置 client domain

  option routers 10.5.5.1;                                     # 设置路由信息 网关

  option broadcast-address 10.5.5.31;               # 广播地址

  default-lease-time 600;                                        # 租约时间

  max-lease-time 7200;                                        # 最长租约时间

}

 

host fantasia {                                                       # 保存固定分配地址

  hardware ethernet 08:00:07:26:c0:a5;           # mac硬件地址

  fixed-address fantasia.fugue.com;                   # 固定ip

}

 

# systemctl start dhcpd

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值