Interfaces
The BNG Blaster supports three types of interfaces.
All interfaces are optional but obviously at least one interface is required to start the BNG Blaster.
Interface Settings
The following settings are applied to all interfaces.
{
"interfaces": {
"tx-interval": 0.1,
"rx-interval": 0.1,
"io-slots": 2048,
}
}
{ "interfaces": {} }
Attribute |
Description |
Default |
---|---|---|
tx-interval |
TX ring polling interval in milliseconds |
5.0 |
rx-interval |
RX ring polling interval in milliseconds |
5.0 |
qdisc-bypass |
Bypass the kernel’s qdisc layer |
true |
io-mode |
IO mode |
packet_mmap_raw |
io-slots |
IO slots (ring size) |
1024 |
io-stream-max-ppi |
IO traffic stream max packets per interval |
32 |
capture-include-streams |
Include traffic streams in capture |
true |
The tx-interval
and rx-interval
should be set to at to at least 1.0
(1ms)
if more precise timestamps or high throughput is needed. This is recommended for IGMP
join/leave or QoS delay measurements. For higher packet rates (>1g) it might be needed to
increase the io-slots
from the default value of 1024
to 2048
or more.
The supported IO modes are listed with bngblaster -v
but except
packet_mmap_raw
all other modes are currently considered as experimental. In
the default mode (packet_mmap_raw
) all packets are received in a Packet MMAP
ring buffer and send directly trough RAW packet sockets.
The interfaces used in BNG Blaster do not need IP addresses configured in the host operating system but they need to be in up state.
sudo ip link set dev <interface> up
It is not possible to send packets larger than the interface MTU which is 1500 per default but for PPPoE with multiple VLAN headers this might be not enough for large packets. Therefore the interface MTU should be increased using the following commands.
sudo ip link set mtu 9000 dev <interface>
This can be also archived via netplan using the following configuration for each BNG Blaster interface.
network:
version: 2
renderer: networkd
ethernets:
eth1:
dhcp4: no
dhcp6: no
link-local: []
mtu: 9000
eth2:
dhcp4: no
dhcp6: no
link-local: []
mtu: 9000
Note
The number of interfaces is currently limited to 32!
Network Interfaces
The network interfaces are used for traffic and routing protocols.
Those interfaces can communicate with the configured gateway only. Meaning that all traffic sent from the network interface will be sent to the learned MAC address of the configured gateway.
The network interface behaves like a router. It accepts all traffic sent to its own MAC address. This allows to send and receive traffic for prefixes advertised via routing protocols or configured via static routes on the connected device under test.
The BNG Blaster responds to all ICMP echo requests sent to its own MAC address.
{ "interfaces": { "network": [] } }
Attribute |
Description |
Default |
---|---|---|
interface |
Network interface name (e.g. eth0, …) |
|
address |
Local network interface IPv4 address |
|
gateway |
Gateway network interface IPv4 address |
|
address-ipv6 |
Local network interface IPv6 address (implicitly /64) |
|
gateway-ipv6 |
Gateway network interface IPv6 address (implicitly /64) |
|
vlan |
Network interface VLAN |
0 (untagged) |
gateway-mac |
Optional set gateway MAC address manually |
|
gateway-resolve-wait |
Sessions will not start until gateways are resolved |
true |
isis-instance-id |
Assign interface to ISIS instance |
|
isis-level |
ISIS interface level |
3 |
isis-p2p |
ISIS P2P interface |
true |
isis-l1-metric |
ISIS level 1 interface metric |
10 |
isis-l2-metric |
ISIS level 2 interface metric |
10 |
The BNG Blaster supports multiple network interfaces as shown in the example below.
{
"interfaces": {
"tx-interval": 1,
"rx-interval": 1,
"io-slots": 4096,
"network": [
{
"interface": "eth2",
"address": "10.0.0.1",
"gateway": "10.0.0.2",
"address-ipv6": "fc66:1337:7331::1",
"gateway-ipv6": "fc66:1337:7331::2"
},
{
"interface": "eth3",
"address": "10.0.1.1",
"gateway": "10.0.1.2",
"address-ipv6": "fc66:1337:7331:1::1",
"gateway-ipv6": "fc66:1337:7331:1::2"
}
],
}
}
Using multiple network interfaces requires to select which network interface
to be used. If not explicitly configured one of the interface is selected
automatically. Therefore, the configuration option network-interface
is supported in different sections.
Access Interfaces
The access interfaces are used to emulate PPPoE and IPoE clients.
{ "interfaces": { "access": [] } }
Attribute |
Description |
Default |
---|---|---|
interface |
Access interface name (e.g. eth0, …) |
|
network-interface |
Select the corresponding network interface for this session |
|
type |
Set access type (pppoe or ipoe) |
pppoe |
vlan-mode |
Set VLAN mode 1:1 or N:1 |
1:1 |
qinq |
Set outer VLAN ethertype to QinQ (0x88a8) |
false |
outer-vlan-min |
Outer VLAN minimum value |
0 (untagged) |
outer-vlan-max |
Outer VLAN maximum value |
0 (untagged) |
outer-vlan |
Set outer-vlan-min/max equally |
|
inner-vlan-min |
Inner VLAN minimum value |
0 (untagged) |
inner-vlan-max |
Inner VLAN maximum value |
0 (untagged) |
inner-vlan |
Set inner-vlan-min/max equally |
|
third-vlan |
Add a fixed third VLAN (most inner VLAN) |
0 (untagged) |
address |
Static IPv4 base address (IPoE only) |
|
address-iter |
Static IPv4 base address iterator (IPoE only) |
|
gateway |
Static IPv4 gateway address (IPoE only) |
|
gateway-iter |
Static IPv4 gateway address iterator (IPoE only) |
|
username |
Overwrite the username from authentication section |
|
password |
Overwrite the password from authentication section |
|
authentication-protocol |
Overwrite the username from authentication section |
|
agent-circuit-id |
Overwrite the agent-circuit-id from access-line section |
|
agent-remote-id |
Overwrite the agent-remote-id from access-line section |
|
rate-up |
Overwrite the rate-up from access-line section |
|
rate-down |
Overwrite the rate-down from access-line section |
|
dsl-type |
Overwrite the dsl-type from access-line section |
|
ipcp |
De-/activate PPP IPCP |
|
ip6cp |
De-/activate PPP IP6CP |
|
ipv4 |
De-/activate IPoE IPv4 |
|
ipv6 |
De-/activate IPoE IPv6 |
|
dhcp |
De-/activate DHCP |
|
dhcpv6 |
De-/activate DHCPv6 |
|
igmp-autostart |
Overwrite IGMP autostart |
|
igmp-version |
Overwrite IGMP protocol version (1, 2 or 3) |
|
stream-group-id |
Stream group identifier |
|
access-line-profile-id |
Access-line-profile identifier |
|
cfm-cc |
De-/activate EOAM CFM CC (IPoE only) |
false |
cfm-level |
Set EOAM CFM maintenance domain level |
0 |
cfm-ma-id |
Set EOAM CFM maintenance association identifier |
0 |
cfm-ma-name |
Set EOAM CFM maintenance association short name |
|
i1-start |
Iterator for usage in strings {i1} |
1 |
i1-step |
Iterator step per session |
1 |
i2-start |
Iterator for usage in strings {i2} |
1 |
i2-step |
Iterator step per session |
1 |
For all modes, it is possible to configure between zero and three VLAN
tags on the access interface. The VLAN identifier 0
disables the
corresponding VLAN header.
[ethernet][outer-vlan][inner-vlan][third-vlan][pppoe]...
Untagged
{
"access": {
"interface": "eth1",
"outer-vlan-min": 0,
"outer-vlan-max": 0,
"inner-vlan-min": 0,
"inner-vlan-max": 0
}
}
Single Tagged
{
"access": {
"interface": "eth1",
"outer-vlan-min": 1,
"outer-vlan-max": 4049,
"inner-vlan-min": 0,
"inner-vlan-max": 0
}
}
Double Tagged
{
"access": {
"interface": "eth1",
"outer-vlan-min": 1,
"outer-vlan-max": 4049,
"inner-vlan-min": 7,
"inner-vlan-max": 7
}
}
Triple Tagged
{
"access": {
"interface": "eth1",
"outer-vlan-min": 10,
"outer-vlan-max": 20,
"inner-vlan-min": 128,
"inner-vlan-max": 4000,
"third-vlan": 7
}
}
The BNG Blaster supports also multiple access interfaces or VLAN ranges as shown in the example below.
{
"access": [
{
"interface": "eth1",
"type": "pppoe",
"username": "pta@rtbrick.com",
"outer-vlan-min": 1000,
"outer-vlan-max": 1999,
"inner-vlan-min": 7,
"inner-vlan-max": 7
},
{
"interface": "eth1",
"type": "pppoe",
"username": "l2tp@rtbrick.com",
"outer-vlan-min": 2000,
"outer-vlan-max": 2999,
"inner-vlan-min": 7,
"inner-vlan-max": 7
},
{
"interface": "eth3",
"type": "pppoe",
"username": "test@rtbrick.com",
"outer-vlan-min": 128,
"outer-vlan-max": 4000,
"inner-vlan-min": 7,
"inner-vlan-max": 7
},
{
"interface": "eth4",
"type": "ipoe",
"outer-vlan-min": 8,
"outer-vlan-max": 9,
"address": "200.0.0.1",
"address-iter": "0.0.0.4",
"gateway": "200.0.0.2",
"gateway-iter": "0.0.0.4"
}
]
}
The configuration attributes for username, agent-remote-id and agent-circuit-id
support also some variable substitution. The variable {session-global}
will
be replaced with a number starting from 1 and incremented for every new session.
where as the variable {session}
is incremented per interface section.
In VLAN mode N:1
only one VLAN combination is supported per access interface section.
This means that only VLAN min or max is considered as VLAN identifier.
{
"access": [
{
"interface": "eth1",
"type": "pppoe",
"vlan-mode": "N:1",
"username": "test@rtbrick.com",
"outer-vlan-min": 7
},
{
"interface": "eth2",
"type": "pppoe",
"vlan-mode": "N:1",
"username": "test@rtbrick.com",
"outer-vlan-min": 2000,
"inner-vlan-min": 7,
},
]
}
A10NSP Interfaces
The A10NSP interface emulates an layer two provider interface. The term A10 refers to the end-to-end ADSL network reference model from TR-025.
The A10NSP interface is required for L2BSA tests.
{ "interfaces": { "a10nsp": [] } }
Attribute |
Description |
Default |
---|---|---|
interface |
A10nSP interface name (e.g. eth0, …) |
|
qinq |
Set outer VLAN ethertype to QinQ (0x88a8) |
false |
mac |
Optional set gateway interface address manually |
The BNG Blaster supports multiple A10NSP interfaces as shown in the example below.
{
"interfaces": {
"tx-interval": 1,
"rx-interval": 1,
"a10nsp": [
{
"interface": "eth4",
"qinq": true,
"mac": "02:00:00:ff:ff:01"
},
{
"interface": "eth5",
"qinq": false,
"mac": "02:00:00:ff:ff:02"
}
],
}
}
You can define multiple interfaces with the same MAC address to emulate some static link aggregation (without LACP).