In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
DHCP walks in four steps
I have heard that many friends have long wanted to contact the practical content of dhcp relay service. Let's learn about it together:
The first step
Enter the GNS3 interface, drag two routes to the topology operation area, select HOST to drag three PCs to the topology operation area, and configure the two routers (change icon to switch, change device name to sw2/sw3, add layer 2 business veneer, set disk space to 100Mb)
Step two
The architecture required to build the topology map: three Host hosts: one is named DHCP, and the icon is changed to sever server; the other two default configurations remain unchanged, renamed to win10-1 and win10-2 respectively. Two routers: one is renamed to sw2, the icon is changed to switch, the configuration is modified to add layer 2 business veneer, the switch disk space is set to 100Mb; the other is renamed to sw3, the icon is changed to layer 3 switch, the configuration is modified to add layer 2 service veneer, and the switch disk space is set to 100Mb (space optional, enough is enough).
Step three
The way to connect is as follows. After the connection is completed, all port numbers are displayed. Next, we will divide VLAN:win10-1 into vlan10, win10-2 with vlan20 and DHCP with vlan100.
The fourth step
Edit the gateway settings: win10-1 DHCP:192.168.100.1/24 192.168.10.1, DHCP:192.168.100.1/24, 192.168.10.1 and 192.168.20.1.
Sample legend:
1. Use the yum repository to install the dhcp service package online in CentOS 7
Enter: yum install dhcp-y (no interactive installation mode)
Set up the ens33 network card after installation.
Input: vim / etc/sysconfig/network-scripts/ifcfg-ens33
As shown below:
The following is the process of configuring DHCP:
Input: cp/ usr/share/doc/dhcp-4.2.5/dhcpd.conf.example / etc/dhcp/dhcpd.conf
Enter: yes (confirm overwrite)
Enter the configuration file of DHCP:
TIP: the ";" sign after the address and gateway is indispensable.
After editing, wq saves and exits.
Open the dhcp service and see its status. As shown below:
Set the network adapter to custom vmnet1 host-only mode
2. Win10-2: the network adapter is set to custom vmnet2 host-only mode
3. Win10-1: the network adapter is set to custom vmnet8 host-only mode
Then double-click in GNS3 to open the sw2 (layer 2 switching) configuration port:
Set up three Vlan domains:
Set the Trunk mode and exit the route mode:
Then double-click to open the sw3 (layer 3 switching) configuration port and Trunk:
Reminder: because this device is layer 3 switching and is used for routing translation, the routing function does not need to be turned off here
Configure Trunk:
What we still need to do is to configure DHCP relay in the gateway interface sw3. The function of the gateway is to control the isolation and release of broadcasts.
Finally, the time to enter the system verification, enter win10-1:
Enter the network adapter first and set the IPv4 to the automatic acquisition state
Open the cmd command
Ipconfig / release: release IP back to the address pool command
Ipconfig / renew: command to get a new IP address
The new IP address obtained is 192.168.10.128.
Reenter win10-2
Or first enter the network adapter and set the IPv4 to the automatic acquisition state
Open the cmd command
Ipconfig / release (release IP back to address pool)
Ipconfig / renew (get a new IP address)
The new IP address obtained is 192.168.20.128
We can then use the ping command to test whether the two hosts can communicate with the 192.168.100.100 network segment
Win10-1 system ping test:
Win10-2 system ping test:
At this time, four data packets were successfully sent, and the interworking of the whole network was realized.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.