DHCP triggered subs with ASTF

144 views
Skip to first unread message

Damian Cornfield

unread,
Sep 29, 2022, 12:50:09 PM9/29/22
to TRex Traffic Generator
Hello,

I have setup a Trex system running on HPE 4x100G server.
I have successfully ran a custom traffic profile with pcaps using ASTF mode based off one of the sfr templates and scaled the IP ranges up so there are 32k subs.

I needed to pre-configure subscribers on the DUT to match the IP ranges specified in by the ip gen of the py file.

So far so good, high rates, good distribution traffic-wise after tuning the cps on each pcap.

Now, for testing in a different subscriber management deployment model its necessary to dynamically trigger sub creates on the DUT first using DHCP requests.

How can I get a DHCP request to occur first so the ASTF flows use the DHCP provided addresses?
I'm not sure how or where I would add code to do this automatically.
Any help would be appreciated.

Thanks,
Damian C.

hanoh haim

unread,
Oct 2, 2022, 6:47:27 AM10/2/22
to Damian Cornfield, TRex Traffic Generator
Hi Damian, 
EMU is the service to enable CP protocols, for example IPV6ND/ARP/DHCPv4/DHCPv6 
you can see an example here:
https://trex-tgn.cisco.com/trex/doc/trex_astf.html#_sending_traffic

There is an API to disable a specific client or clients range, so you could do something like this 
(this is a bit complex because EMU and ASTF server are not related ..)

give the ASTF profile the full range when all clients are disabled 
start EMU DHCP 
using the active DHCP range start enabling clients 

a bit complex that it should work 


Thanks
Hanoh



Thanks
Hanoh



--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/e323b461-9975-41f8-a003-ea6cde748025n%40googlegroups.com.


--
Hanoh
Sent from my iPhone

Damian Cornfield

unread,
Oct 12, 2022, 3:56:32 PM10/12/22
to TRex Traffic Generator
Thanks Hanoh, I appreciate the advice.
I have been trying for days to use the emu for dhcpc6 plugin but I'm having issues.
I was only getting SOLICIT req and ADVERTISE response repeatedly when I captured from a mirror port of DUT subscriber intf port.
After a bunch of debugging, I realized that the trex client port is not forwarding the ADVERTISE packet to the dhcpv6 plugin to continue the exchange..

I tried to enable the service mode --dhcp in the console, but I get "Cannot set NO_TCP_UDP off in ASTF!"
If I load trex and omit --astf so it loads in STL mode, I can enable the service filtering and I get proper complete DHCPv6 Solicit/Advertise/Request/Reply exchange and my subs are present on the DUT.

But I thought I would be able to run this plugin under ASTF, get the client states, then sync those MAC -> IPv6 mappings into the astf?

It's not possible to toggle between STL and ASTF is it?
Is there a way to export the clients data and import between modes?

Damian C.

hanoh haim

unread,
Oct 13, 2022, 6:04:23 AM10/13/22
to Damian Cornfield, TRex Traffic Generator
Hi Damian,
Nice level of debugging! 
Seems as a simple issue in our filter code, it should work the same in both ASTF and STL.

I’m out of office right now, we will look into this next week.

Cheers,
Hanoh 

Damian Cornfield

unread,
Oct 13, 2022, 12:30:09 PM10/13/22
to TRex Traffic Generator
Thank you!

I stumbled upon this in the emu faq...

6.2. Is it possible to sync ASTF/STL clients addresses with TRex-EMU?

I would like to create 1000 clients using TRex-EMU and use the same DHCP/DHCPv6 address with ASTF/STL profile.

For STL you can use the Field engine but it is limited with the scale of ip pool. We would create a indirect table that could be filled with the information from TRex-EMU.

For ASTF there is no support and the MAC, IPv4, IPv6 would be static.


This is exactly what I'm trying to accomplish, I need dynamic sub creation with DHCPv6 emu, then use those sub contexts with their unique mac:ipv6 pair with ASTF flows. (the data path is traversing through a transparent TCP proxy, so ASTF is a requirement.)

Is this still possible based on what you mentioned earlier?
It doesn't matter to me if I need to perform the test in 2 stages, like a setup subs phase, then a traffic phase.

Thanks again,
Damian C.

hanoh haim

unread,
Oct 17, 2022, 3:10:51 PM10/17/22
to Damian Cornfield, TRex Traffic Generator
Yes, the FAQ is not up to date and was written before ASTF client cluster feature. 

Shlomo Yaakov

unread,
Oct 19, 2022, 5:38:00 AM10/19/22
to TRex Traffic Generator

Hi  Damian,

When you enable service mode in ASTF your filter must include the mask `no-tcp-udp`.
So you can use: service --dhcp --no-tcp-udp, or you can just use one of the flags '--emu', '--all'. that implies `no-tcp-udp`.

Damian Cornfield

unread,
Oct 19, 2022, 3:27:32 PM10/19/22
to TRex Traffic Generator
ok.. ok.. I see, thank you for clarifying.
When I tested it in STL mode and it worked with only --dhcp , I misinterpreted the error message to mean it wasn't supported in ASTF at all.

This is good, I made the change and its working in ASTF mode now, I have a handful of dynamic subs established.

Any ideas on getting the dynamic client_info into the astf side of things?
My astf traffic profile is based off the sfr.py which uses the ASTFIPGenDist to provide the client/server address pool.
I appended the following for IPv6 to try and get traffic flowing.
IPs are correct, but the src mac is always the one specified in the portattr output.
How  can I override the src mac per sub?

info.ipv6.src_msb = "4ffd:0:5:1::"
info.ipv6.dst_msb = "1001:55::"
info.ipv6.enable  = 1



trex>emu_show_all
Namespace #1 Information

Port | Vlan tags | Tpids |   Plugins    | #Clients
-----+-----------+-------+--------------+---------
 0   |     -     |   -   | dhcpv6, ipv6 |    20    

Clients Information

       MAC        |   Plugins    
------------------+-------------
00:c6:17:00:00:10 | dhcpv6, ipv6
00:c6:17:00:00:11 | dhcpv6, ipv6
00:c6:17:00:00:12 | dhcpv6, ipv6
00:c6:17:00:00:13 | dhcpv6, ipv6
00:c6:17:00:00:14 | dhcpv6, ipv6
00:c6:17:00:00:15 | dhcpv6, ipv6
00:c6:17:00:00:16 | dhcpv6, ipv6
00:c6:17:00:00:17 | dhcpv6, ipv6
00:c6:17:00:00:18 | dhcpv6, ipv6
00:c6:17:00:00:19 | dhcpv6, ipv6
00:c6:17:00:00:1a | dhcpv6, ipv6
00:c6:17:00:00:1b | dhcpv6, ipv6
00:c6:17:00:00:1c | dhcpv6, ipv6
00:c6:17:00:00:1d | dhcpv6, ipv6
00:c6:17:00:00:1e | dhcpv6, ipv6

Press Enter to see more clients


       MAC        |   Plugins
------------------+-------------
00:c6:17:00:00:1f | dhcpv6, ipv6
00:c6:17:00:00:20 | dhcpv6, ipv6
00:c6:17:00:00:21 | dhcpv6, ipv6
00:c6:17:00:00:22 | dhcpv6, ipv6
00:c6:17:00:00:23 | dhcpv6, ipv6

8.44 [sec]

trex>emu_show_client_info -p 0 --mac 00:c6:17:00:00:10 --6
Clients Information

       MAC        | IPv6 |    DHCPv6     |       IPv6-Local       |   Plugins
------------------+------+---------------+------------------------+-------------
00:c6:17:00:00:10 | ::1  | 4ffd:0:5:1::1 | fe80::2c6:17ff:fe00:10 | dhcpv6, ipv6

2.20 [ms]


trex>emu_show_client_info -p 0 --mac 00:c6:17:00:00:11 --6
Clients Information

       MAC        | IPv6 |    DHCPv6     |       IPv6-Local       |   Plugins
------------------+------+---------------+------------------------+-------------
00:c6:17:00:00:11 | ::2  | 4ffd:0:5:6::1 | fe80::2c6:17ff:fe00:11 | dhcpv6, ipv6

2.75 [ms]

trex>emu_show_client_info -p 0 --mac 00:c6:17:00:00:12 --6
Clients Information

       MAC        | IPv6 |    DHCPv6     |       IPv6-Local       |   Plugins
------------------+------+---------------+------------------------+-------------
00:c6:17:00:00:12 | ::3  | 4ffd:0:4:8::1 | fe80::2c6:17ff:fe00:12 | dhcpv6, ipv6

2.36 [ms]



Thanks,
Damian C.

Damian Cornfield

unread,
Oct 19, 2022, 5:07:53 PM10/19/22
to TRex Traffic Generator
Searching through the group threads I see that possibly client clustering is the solution to this problem.

Have not used them before, looking though the topology api. 
Any help appreciated!


hanoh haim

unread,
Oct 20, 2022, 7:10:51 AM10/20/22
to Damian Cornfield, TRex Traffic Generator
Correct! a bit of a sync code between DHCP and ASTF 

Reply all
Reply to author
Forward
0 new messages