Necessary Tips:
Host IP address in the DHCP protocol services to automate the management LAN IP address effectively improve utilization, improve the efficiency, reduce management and maintenance costs. Is the ip address assignment, port 67 is used, the primary file location:
/etc/dhcp/dhcpd.conf
First, download dhcp service
Next we look at its main configuration file
* Represents the version number inside
Enter the command: cat /etc/dhcp/dhcpd.conf
We then conduct some copy
Enter the command: cp -a /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
After a good copy in the past, we look at its profile, and then configure
Enter the command to open: vim /etc/dhcp/dhcpd.conf
Look here, here is the DNS configuration, you can change it, the name of self-created
The first parameter is a domain change, the second parameter is changed server ip
Then scroll down, change must be changed
The first parameter is the starting ip network segment, followed by the server's mask
With the latter range is that you want to assign dynamic ip address segment
After the server ip and domain name
The next two parameters are the default gateway and broadcast address, follow me here so you can modify it
The last two times the default lease time and maximum lease time
When you're done, we can look at it there is no open port 67 (does not seem to open, then we restart the direct service)
Enter the command: netstat -an | grep 67
Restart Service
Now we configure over
At this point we restart the network adapter installed on the client, you can automatically get the ip address of friends
We open another virtual machine
Restart the service
This time we are in a virtual machine inside the terminal, hey, he found that ip has been automatically acquired from us within that range
Enter the command: ifconfig
Of course - if you want to specify a computer's ip, you need to change a Ha (provided you know it's mac address) in the configuration file inside
Then we go to check our client's mac address
Open the configuration file server virtual machine
Enter the command: vim /etc/dhcp/dhcpd.conf
The client is just automatically get 102 this ip, we limit him to prescribe 199
00: 50: 56: 20: 2F: 8B
Then we come to look at the client
First his card restart it
We can then test it in another Windows virtual machine under
Open a Windows virtual machine (here I use the Windows 2008 virtual machine) (Note that all virtual machines are in bridge mode)
We change my adapter settings
Changing this
Change settings
Set to automatically obtain an IP address
We see what ip in the command prompt (see, here is our ip already set that up)
Enter: ipconfig (where you can use ipconfig / all view all things related to IP's)
Necessary Tips:
Host IP address in the DHCP protocol services to automate the management LAN IP address effectively improve utilization, improve the efficiency, reduce management and maintenance costs. Is the ip address assignment, port 67 is used, the primary file location:
/etc/dhcp/dhcpd.conf
First, download dhcp service
Next we look at its main configuration file
* Represents the version number inside
Enter the command: cat /etc/dhcp/dhcpd.conf
We then conduct some copy
Enter the command: cp -a /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
After a good copy in the past, we look at its profile, and then configure
Enter the command to open: vim /etc/dhcp/dhcpd.conf
Look here, here is the DNS configuration, you can change it, the name of self-created
The first parameter is a domain change, the second parameter is changed server ip
Then scroll down, change must be changed
The first parameter is the starting ip network segment, followed by the server's mask
With the latter range is that you want to assign dynamic ip address segment
After the server ip and domain name
The next two parameters are the default gateway and broadcast address, follow me here so you can modify it
The last two times the default lease time and maximum lease time
When you're done, we can look at it there is no open port 67 (does not seem to open, then we restart the direct service)
Enter the command: netstat -an | grep 67
Restart Service
Now we configure over
At this point we restart the network adapter installed on the client, you can automatically get the ip address of friends
We open another virtual machine
Restart the service
This time we are in a virtual machine inside the terminal, hey, he found that ip has been automatically acquired from us within that range
Enter the command: ifconfig
Of course - if you want to specify a computer's ip, you need to change a Ha (provided you know it's mac address) in the configuration file inside
Then we go to check our client's mac address
Open the configuration file server virtual machine
Enter the command: vim /etc/dhcp/dhcpd.conf
The client is just automatically get 102 this ip, we limit him to prescribe 199
00: 50: 56: 20: 2F: 8B
Then we come to look at the client
First his card restart it
We can then test it in another Windows virtual machine under
Open a Windows virtual machine (here I use the Windows 2008 virtual machine) (Note that all virtual machines are in bridge mode)
We change my adapter settings
Changing this
Change settings
Set to automatically obtain an IP address
We see what ip in the command prompt (see, here is our ip already set that up)
Enter: ipconfig (where you can use ipconfig / all view all things related to IP's)