dhcp

1358 ワード


server2   
  server2   eth0 172.17.17.2
  dhcp   
  /etc/dhcpd.conf
ddns-update-style none;
default-lease-time 18800;
max-lease-time 37600;
ignore client-updates;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers  192.168.1.254;
        range   192.168.1.3 192.168.1.252;
}
subnet 192.168.2.0 netmask 255.255.255.0 {
        option routers  192.168.2.254;
        range   192.168.2.3 192.168.2.252
}
subnet 172.17.17.0 netmask 255.255.255.0 {
        option routers  172.17.17.254;
        range   172.17.17.3 172.17.17.252;  
             host print{
                          hardware ethernet 00:0C:29:74:D7:19
                          fixed-address 172.17.17.3
}
}


server1   
  dhcp     
  ip    eth0 172.17.17.1 eth1 192.168.18.1.1 eth2 192.168.18.2.1
vim /etc/sysconfig/dhcrelay 

 
INTERFACES="eth0 eth1 eth2"
DHCPSERVERS="172.17.17.2"

echo 1 >/proc/sys/net/ipv4/ip_forward

service dhcrelay start


     
linux  dhclient          IP  
		dhclient -r        IP  
windows