# # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # see 'man 5 dhcpd.conf' # # DHCP Server Configuration file for route mode CMTS authoritative; option domain-name "localdomain"; option domain-name-servers 8.8.8.8,8.8.4.4; option time-servers 192.53.103.108; ddns-update-style none; min-lease-time 2592000; default-lease-time 2592000; max-lease-time 2592000; log-facility local6; option space PacketCable; option PacketCable.pri-dhcp code 1 = ip-address; option PacketCable.sec-dhcp code 2 = ip-address; option PacketCable.kerberos-realm-name code 6 = text; option packet-cable code 122 = encapsulate PacketCable; option PacketCable.pri-dhcp 172.33.55.10; # interface eth0 subnet 172.33.55.0 netmask 255.255.255.0 { } # cm on cmts 2 (arris) subnet 10.5.0.0 netmask 255.255.0.0 { option routers 10.5.0.1; option routers 10.5.0.1; option time-servers 172.33.55.10; next-server 172.33.55.10; filename "basic.config.cfg"; range dynamic-bootp 10.5.10.0 10.5.31.255; } # cpe subnet 10.20.0.0 netmask 255.255.0.0 { option routers 10.20.0.1; range dynamic-bootp 10.20.0.0 10.20.31.255; }
yum -y install dhcp
Open the file /etc/sysconfig/dhcpd, add the name of the specific interface to the list of DHCPDARGS, for example if the interface is eth0
, then add:
DHCPDARGS=eth0
nano /etc/dhcp/dhcpd.conf
add configuration.
service dhcpd restart
service xinetd restart
service ntpd restart
# default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /home/albismart/tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 }
GNU nano 2.0.9 File: /etc/xinetd.d/daytime-dgram # This is the configuration for the udp/dgram daytime service. service daytime { # This is for quick on or off of the service disable = no # The next attributes are mandatory for all services id = daytime-dgram type = INTERNAL wait = yes socket_type = dgram # protocol = socket type is usually enough
# This is the configuration for the udp/dgram time service. service time { # This is for quick on or off of the service disable = no # The next attributes are mandatory for all services id = time-dgram type = INTERNAL wait = yes socket_type = dgram # protocol = socket type is usually enough # External services must fill out the following # user = # group = # server = # server_args =
route add -net 10.5.0.0/16 gw 172.33.55.12
route add -net 10.20.0.0/16 gw 172.33.55.12