Rhel5.6下DHCP中繼代理的實現

第一個Server1設置三塊網卡作爲中繼器
設置IP地址:
eth0:172.17.17.1
eth1:192.168.1.1
eth2:192.168.2.1
    1、
# vi /etc/sysctl.conf
# echo 1 > /proc/sys/net/ipv4/conf/all/bootp_relay
# echo 1 > /proc/sys/net/ipv4/ip_forward
    2、
# vi /etc/sysconfig/dhcrelay
 INTERFACES="eth0 eth1 eth2"
 DHCPSERVERS="172.17.17.2"
    3、
# chkconfig --level 2345 dhcrelay on
# /etc/init.d/dhcrelay start
--------------------------------------------------------
Server2作爲DHCP服務器:
設置IP地址:
eth0:172.17.17.2
 
   1、
# vi /etc/dhcpd.conf
ddns-update-style none;
ignore client-updates;
default-lease-time 12000;
max-lease-time 24000;
option time-offset  -18000;
subnet 172.17.17.0 netmask 255.255.255.0 {
option routers   172.17.17.1;
option subnet-mask  255.255.255.0;
option domain-name-servers 172.17.17.1;
range 172.17.17.11 172.17.17.254;
host printer {
hardware ethernet 00:12:fc:78:AB:CD;
fixed-address 172.17.17.3;
  }
 }
 subnet 192.168.1.0 netmask 255.255.255.0 {
  option routers   192.168.1.1;
  option subnet-mask  255.255.255.0;
  option domain-name-servers 192.168.1.1;
  range 192.168.1.11 192.168.1.254;
 }
 subnet 192.168.2.0 netmask 255.255.255.0 {
  option routers   192.168.2.1;
  option subnet-mask  255.255.255.0;
  option domain-name-servers 192.168.2.1;
    range 192.168.2.11 192.168.2.254;
}
    2、
# vi /etc/sysconfig/dhcpd
DHCPDARGS="eth0"
 
    3、
# /etc/init.d/dhcpd start
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章