In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Application experiment of DHCP
Experimental requirements:
Pc obtains the IP address through dhcp
The plan is as shown in the picture
The steps of the experiment:
1. Configuration of interactive computer sw1
Sw1 (config) # vlan10, 20 first create vlan10 and vlan20, note here, be sure to create two, connected
Sw1 (config-vlan) # exit
Sw1 (config) # int f1and0
Sw1 (config-if) # switchport mode access
Sw1 (config-if) # switchport access vlan 10 add Port
Sw1 (config-if) # exit
Sw1 (config) # int range f1amp 14-15 set trunk port, configure multiple ports command
Sw1 (config-if-range) # switchport trunk encapsulation dot1q
Sw1 (config-if-range) # switchport mode trunk
two。 Configuration of interactive computer sw2
Sw2 (config) # vlan 10pm 20 you can build only one vlan 20 here.
Sw2 (config-vlan) # exit
Sw2 (config) # int f1and0
Sw2 (config-if) # switchport mode access
Sw2 (config-if) # switchport access vlan 20
Sw2 (config-if) # int f1and14
Sw2 (config-if) # switchport trunk encapsulation d
Sw2 (config-if) # switchport mode trunk
3. Configuration of router R1
R1 (config) # int f0bin1 must first be equipped with IP, that is, the gateway address, which can be applied to one-arm routing.
R1 (config-if) # no shut must open the port first
R1 (config-if) # int f0bin1.10
The number after R1 (config-subif) # encapsulation dot1Q 10 indicates the number of vlan.
R1 (config-subif) # ip add 192.168.10.1 255.255.255.0
R1 (config-subif) # no shut opens subports again
R1 (config-subif) # int f0bin1.20
R1 (config-subif) # encapsulation dot1Q 20
R1 (config-subif) # ip add 192.168.20.1 255.255.255.0
R1 (config-subif) # no shut
R1 (config) # service dhcp starts the dhcp service
R1 (config) # ip dhcp pool vlan10 (vlan10 has no spaces)
^
% Invalid input detected at'^ 'marker.
R1 (config) # ip dhcp pool vlan10 enters vlan10 and allocates dhcp to vlan10's pc server
R1 (dhcp-config) # network 192.168.10.Universe 24
^
% Invalid input detected at'^ 'marker.
R1 (dhcp-config) # network 192.168.10.0 / 24 sets the address pool, with spaces in / 24 and the previous network segment)
R1 (dhcp-config) # def
R1 (dhcp-config) # default-router 192.168.10.1 equipped with gateway
R1 (dhcp-config) # dns-server 2.2.2.2 with dns
R1 (dhcp-config) # exit
R1 (config) # ip dhcp pool vlan20
R1 (dhcp-config) # network 192.168.20.0 / 24
R1 (dhcp-config) # default-router 192.168.20.1
R1 (dhcp-config) # dns-server 2.2.2.2
R1 (dhcp-config) # exit
4. test
Enter the PC side and enter dhcp, which automatically obtains the IP address.
5. Some view commands
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.