The IP address plan of a department on the network shown in Figure 1 is as follows:
A DHCP client resides on a different network segment than the DHCP server. Therefore, a DHCP relay agent needs to be configured on the network segment where the DHCP client resides so that the DHCP client can obtain the configuration such as an IP address and DNS server's IP address from the DHCP server.
The configuration roadmap is as follows:
<FW> system-view [FW] sysname FW_B [FW_B] interface GigabitEthernet 0/0/1 [FW_B-GigabitEthernet0/0/1] ip address 10.1.1.2 255.255.255.0 [FW_B-GigabitEthernet0/0/1] quit [FW_B] firewall zone dmz [FW_B-zone-dmz] add interface GigabitEthernet 0/0/1 [FW_B-zone-dmz] quit
<FW> system-view [FW] sysname FW_A [FW_A] interface GigabitEthernet 0/0/1 [FW_A-GigabitEthernet0/0/1] ip address 192.168.20.1 255.255.255.0 [FW_A-GigabitEthernet0/0/1] quit [FW_A] interface GigabitEthernet 0/0/2 [FW_A-GigabitEthernet0/0/2] ip address 10.1.1.1 255.255.255.0 [FW_A-GigabitEthernet0/0/2] quit [FW_A] firewall zone trust [FW_A-zone-trust] add interface GigabitEthernet 0/0/1 [FW_A-zone-trust] quit [FW_A] firewall zone dmz [FW_A-zone-dmz] add interface GigabitEthernet 0/0/2 [FW_A-zone-dmz] quit
To realize mutual access between the DHCP relay and the DHCP server, you need to configure the packet filtering on the FW for the interzone between the Local zone and the zone where the DHCP client resides to allow packets through. To realize mutual access between the DHCP client and the DHCP relay, as well as between the DHCP relay and the DHCP server, you need to configure the packet filtering on FW_A and FW_B for the interzone between the Local zone and the zone where the interface resides to allow packets through.
If the DHCP client obtains incomplete information (for example, only the IP address is obtained), run the ipconfig /release command to lease the dynamic IP address, and run the ipconfig /renew command to apply for a new IP address and other network parameters.
C:\Documents and Settings\Administrator> ipconfig /all
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : example.com
Description . . . . . . . . . . . : Realtek RTL8139/810x Family Fast Ethernet NIC
Physical Address. . . . . . . . . : 00-50-ba-50-73-25
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.20.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.20.1
DHCP Server . . . . . . . . . . . : 10.1.1.2
DNS Servers . . . . . . . . . . . : 3.3.3.3
Primary WINS Server . . . . . . . :
Lease Obtained. . . . . . . . . . : Tuesday, December 13, 2011, 17:52:10 PM
Lease Expires . . . . . . . . . . : Friday, December 23, 2011, 17:52:10 PM
Verify the client IP address assigned by the DHCP server.
Configuration scripts of FW_A
# sysname FW_A # dhcp enable # interface GigabitEthernet0/0/1 ip address 192.168.20.1 255.255.255.0 ip relay address 10.1.1.2 dhcp select relay # interface GigabitEthernet0/0/2 ip address 10.1.1.1 255.255.255.0 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/1 # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/2 # security-policy rule name sec_policy_1 source zone local source zone dmz destination zone local destination zone dmz action permit # security-policy rule name sec_policy_2 source zone local source zone trust destination zone local destination zone trust action permit # return
Configuration scripts of FW_B
# sysname FW_B # dhcp enable # ip pool 1 gateway-list 192.168.20.1 network 192.168.20.0 mask 24 static-bind ip-address 192.168.20.254 mac-address 0021-97cf-2238 lease day 10 hour 0 minute 0 dns-list 3.3.3.3 domain-name example.com # interface GigabitEthernet0/0/1 ip address 10.1.1.2 255.255.255.0 dhcp select global # firewall zone dmz set priority 50 add interface GigabitEthernet0/0/1 # ip route-static 192.168.20.0 255.255.255.0 10.1.1.1 # security-policy rule name sec_policy source zone local source zone dmz destination zone local destination zone dmz action permit # return