DNS笔记
作者:会飞的zxl
DHCP dynamic host configuration protocol 批量部署 自动配IP
相关文件
/etc/dhcpd.conf 主配置文件
/usr/share/doc/dhcp.*/dhcpd.sample 模板文件
/usr/sbin/dhcpd 执行文件
/var/lib/dhcpd/dhcpd.leases 租约文件
/etc/syscofig/dhcrelay 中继代理配置文件
vim /etc/services 所有的端口号
service dhcp start
/etc/init.d/dhcpd start 启动服务
/usr/sbin/dhcpd
自定网卡启动DHCP服务
/etc/sysconfig/dhcpd
DHCPARGS=eth0
DHCP
mount /dev/cdrom /mnt/
服务器端:
Server #rpm -ivh dhcp* -y
cp /usr/share/doc/dhcp-3.0.5/dhcp.conf.sample /etc/dhcpd.conf
vim /etc/dhcpd.conf
中继代理
vim /etc/sysconfig/dhcrelay
service dhcrelay restart
ECHO 1> /proc/sys/net/ipv4/ip_forward 转发
vim /etc/sysctl.conf
net.ipv4.ip_forward=1
sysctl -p
冗余
server1 192.168.1.2/24
dhcpd.conf
ddns-update-style none;
ignore client-updates;
default-lease-time 21600;
max-lease-time 43200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.1681.255;
option time-offset -28800; # Eastern Standard Time
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1,202.106.0.20;
range 192.168.1.3 192.168.1.60;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option domain-name-servers 192.168.2.1,202.106.0.20;
range 192.168.2.3 192.168.2.60;
}
server2 192.168.2.2/24
dhcpd.conf
ddns-update-style none;
ignore client-updates;
default-lease-time 21600;
max-lease-time 43200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option time-offset -28800; # Eastern Standard Time
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1,202.106.0.20;
range 192.168.0.61 192.168.0.120;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option domain-name-servers 192.168.2.1,202.106.0.20;
range 192.168.2.61 192.168.2.120;
}
日志分离
dhcpd.conf
log-facility local4;
syslog.conf
*.info;mail.none;authpriv.none;cron.none;local4.none /var/log/messages
local4.* /var/log/dhcpd.log
service syslog restart
service dhcpd restart
iptables -L
sestaus-v
server1
echo 1 > /proc/sys/ipv4/ip_forwarad
(echo 1 > /proc/sys/net/ipv4/conf/all/bootp_relay)
/etc/sysconfig/dhcrelay
INITERFACES="172.17.17.2"
servi
猜你喜欢
您可能感兴趣的文章:
- 编写安全 PHP 应用程序的七个习惯
- 二维数组的array_unique函数
- 截取中文字符串时屏蔽乱码
- 静态页面已不利于搜索引擎优化和收录和排名
- 企业网站优化的弊端如何改变
- 去掉桌面图标阴影
- 如何针对MSN搜索进行网站优化
- 使用 mb_detect_encoding() 函数来判断字符串是什么编码的
- 网页状态码的含义网页错误类型详情
- 用php处理百万级以上的数据提高查询速度的方法
- 用php防止XSS跨站脚本攻击的方法
- 用php过滤网页中所有的html,css,js代码
- elasticsearch php Content-Type header [] is not supported
- elasticsearch php body为空
- PHP中调用 ElasticSearch的数据
- Access denied phpmyadmin ngxin
- ajax获取跨域数据
- 运维知识体系
- 心灵鸡汤