This configuration example was created and verified on R9900P2705 of the F5000-AI-55-G device.
As shown in the following figure, an enterprise deploys Device as a border security gateway to enable internal users to access Internet through PPPoE. Configure the network to meet the following requirements:
Device acts as a PPPoE client, performs authentication with the PPPoE server, and establishes a connection to the PPPoE server. After authentication, a session is established. All internal users share this session for Internet access.
Device automatically assigns private network addresses and DNS server addresses to internal users.
After the connection is disconnected, Device automatically tries to reconnect at regular intervals.
Enable DHCP on interface GE 1/0/2, which connects Device to the LAN, to automatically assign addresses to internal users.
Configure a security policy to allow internal hosts to access Internet. Permit traffic from the security zone of the DHCP-enabled interface to the local security zone.
Configure a NAT policy to perform source address translation for internal user packets. Use the easy IP mode and configure the fixed public IP from the ISP as the translated source address.
For the host in the internal network, set the gateway to 192.168.1.1 and DNS server addresses to 8.8.8.8 and 114.114.114.114. This example does not cover the configuration.
Assign IPv4 addresses to interfaces.
# Specify an IPv4 address for each interface according to the network plan.
<Sysname>
[Sysname]
[Device]
[Device-GigabitEthernet1/0/2]
[Device-GigabitEthernet1/0/2]
Configure the PPPoE dialup interface.
# Create dialer group 1 and configure a dialup rule for it.
[Device]
# Create interface Dialer1, and configure it to obtain an IP address through negotiation. Enable bundle DDR on the interface, and assign the interface to dialer group 1. Set the local username and password for PAP authentication by the peer to
[Device]
[Device-Dialer1]
[Device-Dialer1]
[Device-Dialer1]
[Device-Dialer1]
[Device-Dialer1]
[Device-Dialer1]
# Establish a PPPoE session on interface GigabitEthernet 1/0/1 and assign it to dialer bundle 1 (interface Dialer1).
[Device]
[Device-GigabitEthernet1/0/1]
[Device-GigabitEthernet1/0/1]
Add interfaces to security zones.
# Add interfaces to security zones according to the network diagram.
[Device]
[Device-security-zone-Untrust]
[Device-security-zone-Untrust]
[Device-security-zone-Untrust]
[Device]
[Device-security-zone-Trust]
[Device-security-zone-Trust]
Configure security policies to permit required service packets.
# Create a security policy rule named
[Device]
[Device-security-policy-ip]
[Device-security-policy-ip-1-trust-untrust]
[Device-security-policy-ip-1-trust-untrust]
[Device-security-policy-ip-1-trust-untrust]
[Device-security-policy-ip-1-trust-untrust]
# Configure security policy rules
[Device-security-policy-ip]
[Device-security-policy-ip-2-trust-local]
[Device-security-policy-ip-2-trust-local]
[Device-security-policy-ip-2-trust-local]
[Device-security-policy-ip-2-trust-local]
[Device-security-policy-ip]
[Device-security-policy-ip-3-local-trust]
[Device-security-policy-ip-3-local-trust]
[Device-security-policy-ip-3-local-trust]
[Device-security-policy-ip-3-local-trust]
Configure a static route to ensure that internal network traffic can access the ISP router.
[Device]
Configure the DHCP service.
# Enable the DHCP service and configure interface GE 1/0/2 as the DHCP server to assign IP addresses and DNS server addresses to internal users.
[Device]
[Device]
[Device-dhcp-pool-1]
[Device-dhcp-pool-1]
[Device-dhcp-pool-1]
[Device-dhcp-pool-1]
[Device]
[Device-GigabitEthernet1/0/2]
Configure NAT.
# Configure a NAT policy to allow only users in subnet 192.168.1.100/24 of the internal network to access Internet with source address translation, and use the outgoing interface’s IP address as the translated address.
[Device]
[Device-nat-global-policy]
[Device-nat-global-policy-rule-nat44-policynat1]
[Device-nat-global-policy-rule-nat44-policynat1]
[Device-nat-global-policy-rule-nat44-policynat1]
[Device-nat-global-policy-rule-nat44-policynat1]
[Device-nat-global-policy-rule-nat44-policynat1]
[Device-nat-global-policy]
# Configure Host to automatically obtain an IP address.
After you complete the preceding configuration, execute the following
[Device]
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
GE1/0/1 UP UP 10.0.0.11
Identify whether Host on the internal network can access Internet by using domain names. If yes, the configuration is successful. If not, check the configuration.
#
sysname Device
#
interface GigabitEthernet1/0/1
pppoe-client dial-bundle-number 1
#
interface GigabitEthernet1/0/2
ip address 192.168.1.100 255.255.255.0
#
dialer-group 1 rule ip permit
#
interface Dialer1
ppp pap local-user pppoeuser1 password cipher $c$3$N6IfLjGJaxQQ09YbepytRGVqre4L
wFy0AA==
dialer bundle enable
dialer-group 1
ip address ppp-negotiate
#
security-zone name Trust
import interface GigabitEthernet1/0/2
#
security-zone name Untrust
import interface Dialer1
import interface GigabitEthernet1/0/1
#
ip route-static 0.0.0.0 0 Dialer1
#
security-policy ip
rule 1 name trust-untrust
action pass
source-zone trust
destination-zone untrust
source-ip-subnet 192.168.1.100 255.255.255.0
rule 2 name trust-local
action pass
source-zone trust
destination-zone local
rule 3 name local-trust
action pass
source-zone local
destination-zone trust
#
dhcp enable
#
dhcp server ip-pool 1
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
dns-list 8.8.8.8
#
nat global-policy
rule name policynat1
source-zone Trust
destination-zone Untrust
source-ip subnet 192.168.1.0 24
action snat easy-ip
#