标签:dhcp配置
DHCP配置
1,/etc/dhcpd.conf或/etc/dhcp/dhcpd.conf
ddns-update-styleinterim;
ignoreclient-updates;
subnet 10.10.10.0netmask 255.255.255.0 {
# --- default gateway
option routers 10.10.10.1;
option subnet-mask 255.255.255.0;
# option netbios-node-type 2;
option domain-name-servers 172.16.31.1;
range dynamic-bootp 10.10.10.10010.10.10.110;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at afixed address
}
2,/etc/sysconfig/dhcpd
# Command lineoptions here
DHCPDARGS=eth1 #用于DHCP的网卡接口
user=root
group=root
3,iptables –t filter–F
Iptables –t nat –F
4,iptables –t nat –L–n
iptables -t nat -IPOSTROUTING -s 10.10.10.0/24 -j SNAT --to 172.16.31.6
在POSTROUTING链中做源地址转换
5,/etc/sysctl.conf
net.ipv4.ip_forward= 1
6,保存配置
/etc/rc.d/init.d/iptablessave
Iptables-save >iptables.bak
Iptables-restore<iptables.bak
标签:dhcp配置
原文地址:http://1317745.blog.51cto.com/1307745/1738601