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 �Ct filter�CF

  Iptables �Ct nat �CF

4,iptables �Ct nat �CL�Cn

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)