当前位置:网站首页>DHCP, TFTP Foundation

DHCP, TFTP Foundation

2022-06-24 08:20:00 BusyOps

One 、DHCP relevant

Hard disk was once a very scarce resource in the early days , At that time, diskless workstations were very popular , Each workstation has no operating system , When starting up, you should load the operating system provided by the server into the memory , In order to get the necessary files from the server , There was a protocol called bootp(boot protocol), It can send a broadcast message to the server for application by means of a network card with self wake-up function IP Address , Then the server sends the operating system files required by the workstation , But its distribution IP The address is permanently assigned . So then it came out DHCP(Dynamic Host Configuration Protocol), It introduces the concept of lease term

1. Workflow

  • First step (dhcp discover): After the client is powered on , Because I don't have IP Address , So pass RARP Broadcast to find DHCP The server
  • The second step (dhcp offer): After the server receives the broadcast , Will be assigned to the client IP、MASH、GW、DNS wait
  • The third step (dhcp request): Clients may receive multiple messages dhcp Server response , It will select one from multiple servers and send dhcp Request use message , This message is also broadcast , I choose one dhcp The server , And then the unselected dhcp The server reclaims the newly assigned address
  • Step four (dhcp ack):dhcp Send a confirmation message , It's also a radio

2. Renewal

  • 50%: When ip Percent of the remaining lease term of the address 50 When , The client will contact dhcp Application for renewal of server , If there is no response, proceed to the next step
  • 75%: When ip Percent of the remaining lease term of the address 75 When , The client will contact dhcp Application for renewal of server , If there is no response, proceed to the next step
  • 87.5%: When ip Percent of the remaining lease term of the address 87.5 When , The client will contact dhcp Application for renewal of server , If there is no response, it will be re initiated dhcp discover

3、 Installation and related documents

The package name is dhcp, Can be used directly yum install dhcp -y install

  • /etc/dhcp/dhcpd.conf: The configuration file
  • /etc/dhcp/dhcpd6.conf:ipv6 Configuration file for
  • /usr/sbin/dhcpd
  • /usr/sbin/dhcrelay: Repeater program file
  • /var/lib/dhcpd/dhcpd.leases:dhcp Distribution record of
  • /usr/lib/systemd/system/dhcpd.service:Uint file
  • /usr/lib/systemd/system/dhcpd6.service:Unit file
  • /usr/lib/systemd/system/dhcrealy.service:Unit file

4、 Configuration related instructions

option domain-name "string"; : Indicate except IP And mask , Other attributes to be assigned 
option domain-name-servers "string";   :DNS Server address 
default-liease-time #; : Default lease term , Unit second 
max-lease-time #; : Maximum lease term 
log-facility: Define the log 
subnet <IP> netmask <MASK> {
             : Indicate which network segment to be responsible for 
    range <START_IP> <STOP_IP>;      : Indicate the start and end addresses that can be assigned 
    option routers IP                : Indicate the assigned gateway address 
}

5、 Sample configuration

option domain-name "busyops.org";
option domain-name-servers 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;

subnet 192.168.70.0 netmask 255.255.255.0 {
    
    range 192.168.70.100 192.168.70.250;
    option routers 192.168.70.254;
}

Two 、TFTP relevant

The full name is simple file transfer protocol (Trivial File Transfer Protocol), Mainly responsible for the guidance of diskless workstation . You can use it directly yum install tftp tftp-server install

1. Related documents

  • /usr/sbin/in.tftpd: Program files
  • /etc/xinetd.d/tftp: The configuration file
  • /usr/lib/systemd/system/tftp.service:Unit file
  • /usr/lib/systemd/system/tftp.socket
  • /var/lib/tftpboot: File root
原网站

版权声明
本文为[BusyOps]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240444414938.html