423
[Device] dhcp enable
# Create an IP address pool named
test
and enter its view.
[Device] dhcp server ip-pool test
# Configure a gateway IP address for the host and enable route exporting. Route exporting
automatically adds the gateway IP address and related static IP address to the routing table
of the host.
[Device-dhcp-pool-test] gateway-list 3.3.3.1 export-route
# Configure network segment
3.3.3.0/24
in the pool.
[Device-dhcp-pool-test] network 3.3.3.0 24
# Exclude IP addresses 3.3.3.2 from dynamic allocation in DHCP address pool
test
.
[Device-dhcp-pool-test] forbidden-ip 3.3.3.2
[Device-dhcp-pool-test] quit
Verifying the configuration
# Display IPoE session information to verify that the host has come online.
[Device] display ip subscriber session
Type: D-DHCP S-Static U-Unclassified-IP
Interface IP address MAC address Type State
--------------------------------------------------------------------------------
GE3/1/2 3.3.3.2 147b-1924-0206 S Online
Example: Configuring subnet-leased users
Network configuration
As shown in
, three hosts access the BRAS as subnet-leased users. The BRAS performs
AAA for the hosts through the RADIUS server.
Figure 149 Network diagram
Procedure
1.
Configure the RADIUS server: (This section uses the Linux Free RADIUS server as an
example.)
# Add BRAS IP address
4.4.4.2
and secret
radius
to the
clients.conf
file.
client 4.4.4.2/32 {
ipaddr = 4.4.4.2
netmask=32
secret=radius
}