The principle of three-layer exchange and the principle of DHCP, the author here is not explained in detail, here through a case to understand the use of three-tier exchange to do DHCP server, and for different network segments assigned IP address. In a production environment, it is common to use routers or switches to do DHCP servers.
Experiment Request:
1, configure the DHCP service on the SW1, can assign different network segment IP address for the following four different departments.
2, configure the VTP Server on the SW1, configure VTP Client on SW2 and SW3, and add the relevant VLAN to the designated department.
3. Note: Relay links are used between switches and switches and are not required between routers.
Detailed configuration information is as follows:
The R1 configuration is as follows:
#配置路由器内网接口IP和外网接口IP
R1 (config) #int f0/0
R1 (config-if) #ip add 10.0.0.2 255.0.0.0
R1 (config-if) #no sh
R1 (config-if) #no shutdown
R1 (config-if) #exit
R1 (config) #int f1/0
R1 (config-if) #ip add 202.106.123.1 255.255.255.248
R1 (config-if) #no sh
R1 (config-if) #no shutdown
#配置到内网的静态路由条目
R1 (config) #ip Route 192.168.1.0 255.255.255.0 10.0.0.1
R1 (config) #ip Route 192.168.2.0 255.255.255.0 10.0.0.1
R1 (config) #ip Route 192.168.3.0 255.255.255.0 10.0.0.1
R1 (config) #ip Route 192.168.4.0 255.255.255.0 10.0.0.1
The SW1 configuration is as follows:
#配置到路由器接口的IP地址
SW1 (config) #ip routing
SW1 (config) #int f0/0
SW1 (config-if) #no Switchport
SW1 (config-if) #ip add 10.0.0.1 255.0.0.0
SW1 (config-if) #no shutdown