2. IPoE multiple instances¶
This section shows how to set up multiple instances of IPoE servers to increase the number of sessions.
2.1. Start instances¶
See Start instances section.
2.2. Configuration¶
An IPoE server will be configured in the main VRF, we will use the internal DHCP embedded within the IPoE server.
Configure IPoE server in main VRF for 10000 sessions and a dhcp ip pool 10.100.0.0/16.
vbng-1> edit running vbng-1 running config# vrf main interface physical eth0 ipv4 address 10.100.0.1/16 vbng-1 running config# vrf main ipoe-server vbng-1 running ipoe-server# enabled true vbng-1 running ipoe-server# limits max-session 10000 vbng-1 running ipoe-server# dhcp-server vbng-1 running ipoe-server# dhcp-server ip4-pool poolIpoe vbng-1 running ipoe-server# dhcp-server ip-pools-setup vbng-1 running ipoe-server# dhcp-server ip-pools-setup default-local-ip 10.100.0.1 vbng-1 running ipoe-server# dhcp-server ip-pools-setup pool poolIpoe vbng-1 running ipoe-server# dhcp-server ip-pools-setup pool poolIpoe peer-pool 10.100.0.10-10.100.255.250
We’ll also bind the ipoe server to interface
eth0
:vbng-1 running ipoe-server# dhcp-server interface eth0 vbng-1 running ipoe-server# dhcp-server interface eth0 router 10.100.0.1
Optionally, you can also configure KPIs.
vbng-1> edit running vbng-1 running config# / vrf main kpi telegraf metrics template all vbng-1 running config# / vrf main kpi telegraf influxdb-output url http://<server>:8086 database telegraf vbng-1 running config# commit vbng-1>
Configure other instances.
For the other instances, use the same configuration but change the DHCP pool, eth0 IP address. For example:
vbng-2> edit running vbng-2 running config# vrf main interface physical eth0 ipv4 address 10.101.0.1/16 vbng-2 running ipoe-server# dhcp-server ip4-pool poolIpoe vbng-2 running ipoe-server# dhcp-server ip-pools-setup vbng-2 running ipoe-server# dhcp-server ip-pools-setup default-local-ip 10.101.0.1 vbng-2 running ipoe-server# dhcp-server ip-pools-setup pool poolIpoe vbng-2 running ipoe-server# dhcp-server ip-pools-setup pool poolIpoe peer-pool 10.101.0.10-10.101.255.250 vbng-2 running ipoe-server# dhcp-server interface eth0 vbng-2 running ipoe-server# dhcp-server interface eth0 router 10.101.0.1
vbng-3> edit running vbng-3 running config# vrf main interface physical eth0 ipv4 address 10.102.0.1/16 vbng-3 running ipoe-server# dhcp-server ip4-pool poolIpoe vbng-3 running ipoe-server# dhcp-server ip-pools-setup vbng-3 running ipoe-server# dhcp-server ip-pools-setup default-local-ip 10.102.0.1 vbng-3 running ipoe-server# dhcp-server ip-pools-setup pool poolIpoe vbng-3 running ipoe-server# dhcp-server ip-pools-setup pool poolIpoe peer-pool 10.102.0.10-10.102.255.250 vbng-3 running ipoe-server# dhcp-server interface eth0 vbng-3 running ipoe-server# dhcp-server interface eth0 router 10.102.0.1
Now we configure the authentication to be bound to a RADIUS, this one will be directly connected through interface
to-radius
previously configured. Regarding authentication we’ll use following criterias (username/password will be identicals) :Interface where the IPoE sessions (DHCP packets) are coming from
Client MAC address
Note
Depending on your environment you are free to use following options :
{server_interface} : Interface’s name receiving DHCP packet.
{vendor_class_id}: Vendor class ID (option 60). Supported only in DHCPv4.
{client_hwaddress}: Peer hardware (MAC) address. Supported only in DHCPv4.
vbng-1 running config# / vrf main ipoe-server auth vbng-1 running ipoe-server# username {server_interface}_{client_hwaddress} vbng-1 running ipoe-server# password {server_interface}_{client_hwaddress} vbng-1 running ipoe-server# radius server address 172.20.1.1 auth-port 1812 acct-port 1813 secret 5ecret123 vbng-1 running ipoe-server# radius nas vbng-1 running ipoe-server# radius nas ip-address 172.20.1.254 vbng-1 running ipoe-server# radius nas identifier 172.20.1.254 vbng-1 running ipoe-server# radius change-of-authorization-server vbng-1 running ipoe-server# radius change-of-authorization-server ip-address 172.20.1.1 vbng-1 running ipoe-server# radius change-of-authorization-server secret 5ecret123 vbng-1 running ipoe-server# radius accounting vbng-1 running ipoe-server# radius accounting interim-interval 15 vbng-1 running ipoe-server# radius accounting interim-jitter 5 vbng-1 running ipoe-server# radius accounting session-id-in-authentication true
2.3. Configuring Radius¶
Firstly check the mandatory radius config here Configuring Radius section.
Then you’ll find below a Freeradius configuration example for an IPoE account, eth0
stands for {server_interface} then _
then {client_hwaddress}
eth0_02:00:00:00:00:01 Cleartext-Password := 'eth0_02:00:00:00:00:01'
Acct-Interim-Interval = 60,
Session-Timeout = 3600
See also
See the User’s Guide for more information regarding:
2.4. Start sessions¶
For testing purpose, we will use the bngblaster tool to create sessions. For 3 vBNG, we will create 30 000 sessions.
Get a Ubuntu 22.04 image and spawn a new virtual machine. This time, use a PF interface (passthrough mode).
cp ubuntu-22.04.qcow2 /var/lib/libvirt/images/blaster.qcow2 virt-install --name blaster --vcpus=6,sockets=1,cores=3,threads=2 \ --os-variant ubuntu22.04 --cpu host --network=default,model=e1000 \ --ram 8192 --noautoconsole --import \ --memorybacking hugepages=yes \ --disk /var/lib/libvirt/images/blaster.qcow2,device=disk,bus=virtio \ --host-device 17:00.1
Pin vCPUs to host CPUs.
virsh vcpupin blaster 0 7 virsh vcpupin blaster 1 31 virsh vcpupin blaster 2 8 virsh vcpupin blaster 3 32 virsh vcpupin blaster 4 9 virsh vcpupin blaster 5 33
Log on the blaster instance.
virsh console blaster
Configure interface.
ip link set dev ens1 up ip link set dev eth0 up dhclient ens1
Install bngblaster.
dpkg-query -W bngblaster || { wget https://github.com/rtbrick/bngblaster/releases/download/0.9.15/bngblaster-0.9.15-ubuntu-22.04_amd64.deb; dpkg -i bngblaster-0.9.15-ubuntu-22.04_amd64.deb; }
Configure and start bngblaster.
cat bngblaster_ipoe.json { "interfaces": { "access": [ { "interface": "eth0", "type": "ipoe", "vlan-mode": "N:1" } ] }, "dhcp": { "enable": true }, "dhcpv6": { "enable": false }, "access-line": { }, "sessions": { "max-outstanding": 1000, "reconnect": true, "count": 30000 }, "ipoe": { "ipv4": true, "ipv6": false } } bngblaster -C bngblaster_ipoe.json -J /tmp/report.json -S /tmp/bngblaster.sock -L /tmp/bng.log -I
Check active sessions on each vBNG. For example:
vbng-1> show ipoe-server-stats Sessions counters active : 290 starting : 1204 delayed : 0