Configuring direct portal authentication with a preauthentication domain

Network requirements

As shown in Figure 84, the host is directly connected to the router (the access device). The host is assigned a public IP address through DHCP. A portal server acts as both a portal authentication server and a portal Web server. A RADIUS server acts as the authentication/accounting server.

Configure direct portal authentication, so the host can access only subnet 192.168.0.0/24 before passing the authentication and access other network resources after passing the authentication.

Figure 77: Network diagram

Configuration prerequisites

Configuration procedure

Perform the following tasks on the router.

  1. Configure a preauthentication IP address pool:

    # Configure DHCP address pool pre to assign IP addresses and other configuration parameters to clients on subnet 2.2.2.0/24.

    <Router> system-view
    [Router] dhcp server ip-pool pre
    [Router-dhcp-pool-pre] gateway-list 2.2.2.1
    [Router-dhcp-pool-pre] network 2.2.2.0 24
    [Router-dhcp-pool-pre] quit
    

    # Enable the DHCP server on GigabitEthernet 1/0/2.

    [Router] interface gigabitethernet 1/0/2
    [Router–GigabitEthernet1/0/2] dhcp select server
    [Router–GigabitEthernet1/0/2] quit
    
  2. Configure a preauthentication domain:

    # Create an ISP domain named abc and enter its view.

    [Router] domain abc
    

    # Specify authorization ACL 3010 in the domain.

    [Router-isp-abc] authorization-attribute acl 3010
    [Router-isp-abc] quit
    

    # Configure a rule to permit access to the subnet 192.168.0.0/24.

    [Router] acl advanced 3010
    [Router-acl-ipv4-adv-3010] rule 1 permit ip destination 192.168.0.0 24
    [Router-acl-ipv4-adv-3010] quit
    

    # Configure preauthentication domain abc on GigabitEthernet 1/0/2.

    [Router] interface gigabitethernet 1/0/2
    [Router–GigabitEthernet1/0/2] portal pre-auth domain abc
    [Router–GigabitEthernet1/0/2] quit
    
  3. Configure portal authentication:

    # Configure a portal authentication server.

    [Router] portal server newpt
    [Router-portal-server-newpt] ip 192.168.0.111 key simple portal
    [Router-portal-server-newpt] port 50100
    [Router-portal-server-newpt] quit
    

    # Configure a portal Web server.

    [Router] portal web-server newpt
    [Router-portal-websvr-newpt] url http://192.168.0.111:8080/portal
    [Router-portal-websvr-newpt] quit
    

    # Enable direct portal authentication on GigabitEthernet 1/0/2.

    [Router] interface gigabitethernet 1/0/2
    [Router–GigabitEthernet1/0/2] portal enable method direct
    

    # Reference the portal Web server newpt on GigabitEthernet 1/0/2.

    [Router–GigabitEthernet1/0/2] portal apply web-server newpt
    

    # Configure the BAS-IP as 2.2.2.1 for portal packets sent from GigabitEthernet 1/0/2 to the portal authentication server.

    [Router–GigabitEthernet1/0/2] portal bas-ip 2.2.2.1
    [Router–GigabitEthernet1/0/2] quit
    

Verifying the configuration

# Verify the portal configuration by executing the display portal interface command. (Details not shown.)

# Display information about preauthentication portal users.

[Router] display portal user pre-auth interface gigabitethernet 1/0/2
MAC                IP                 VLAN   Interface
0015-e9a6-7cfe     2.2.2.4            --     GigabitEthernet1/0/2
  State: Online
  VPN instance: --
  Authorization information:
    DHCP IP pool: N/A
    User profile: N/A
    ACL number: 3010
    Inbound CAR: N/A
    Outbound CAR: N/A