Hi all,
I want to borrow the IP of the loopback as the gateway address so that a whole subnet can be used for access users. However, after the gateway unnumbered interface LoopBack command is configured, an error message is displayed when configuring the section.
Device: NE40E V800R011C10SPC100
[~NE40E]ip pool test1 bas local
Info: It's successful to create an IP addresspool
[~NE40E-ip-pool-test1]gateway unnumbered interface LoopBack10
[~NE40E-ip-pool-test1]commit
[~NE40E-ip-pool-test1]section 1 192.168.xx.128 ?
X.X.X.X The end IP address of the section
<cr>
[~NE40E-ip-pool-test1]section 1 192.168.xx.128 192.168.xx.255
Error: Please configure the gateway first.
After contacting Huawei technical support, we got the following two solutions :
Solution 1:
Configuring a specific gateway, and binding the ip-pool to the domain.
#
interfaceLoopBack0
ip address 1.1.1.11 255.255.255.255
#
ip pool test1 bas local
gateway unnumbered interface LoopBack10
gateway 192.168.xx.129 255.255.255.128
section 0 192.168.xx.128 192.168.xx.255
excluded-ip-address 192.168.xx.130 192.168.xx.254
dns-server xx.xx.xx.21 xx.xx.xx.194
frame-ip lease manage
#
aaa
domain test123
ip-pool test1
#
In this way, the gateway 1.1.1.11 is assigned to users.
[~NE40E-aaa-domain-test123jdisp access-user domain test123 verbose
Basic:
User access index : 122880
State : Used
User name : user@test123
Domain name : test123
User backup state :No
RUI user state : -
User access interface : GigabitEthernet4/0/2.100
User access PeVlan/CeVlan : 100/-
User access slot : 4
User MAC :4c00-xxxx-d610
User IP : 192.168.xx.129
User IP netmask : 255.255.255.255
User gateway address : 1.1.1.11
However, the network IP address or the broadcast IP address cannot be used for user address assignment.
[~NE40E-ip-pool-test1]excluded-ip-address 192.168.xx.128
Error: The loopback or broadcast IP cannot be excluded.
[~NE40E-ip-pool-test1]excluded-ip-address 192.168.xx.255
Error: The loopback or broadcast IP cannot be excluded.
[~NE40E-ip-pool-test1]
Solution 2:
Use Radius server to assign the IP address from 192.168.xx.128 to 192.168.xx.255 to the user, no need to do any IP pool configuration or configure any ip-pool under the domain. It just needs the Radius server to assign the IP addresses through the radius option Framed-IP-Address (8) and assign the DNS from the Radius server with attributes HW-Client-Primary-DNS (135) and HW-Client-Secondary-DNS (136).
In this solution, to assign the IP of the LoopBack10 as the gateway of the users, we should configure the ip address unnumbered interface LoopBack command in the virtual-template view.
#
interface Virtual-Template 2.
ip address unnumbered interface LoopBack10
#
And if the ppp-gateway unnumbered loopback command is configured in the aaa view, the gateway will be the IP address of the smallest Loopback interface number, that is Loopback0.
