06-03-2024 05:26 AM
I have total 4 ports [0,1,2,3]. I am running Trex in ASTF mode. I want to send traffic from my client1 (Port0) to Server1(Port1). And rest two port should not send the request. I am not sure how we can define which port to use like stl mode. So can anyone guide me how I can define such ports related configuration in ASTF mode ?
06-03-2024 06:44 AM
I think you are correct, the ASTF mode in Trex doesn't allow you to directly specify which ports to use for traffic generation like in STL mode. You might be able to fix this by using server to client (or client to server) flow? I have not tried this fyi, update to your needs
# Define a client-to-server flow
trex_cfg = {
"flows": [
{
"name": "client1_to_server1",
"type": "client-to-server",
"client_ports": [0], # Use only port 0 for client
"server_ports": [1],
# ... other flow configurations ...
}
]
}
# Start Trex with the configuration
trex.start(trex_cfg)
06-03-2024 09:40 PM
Thanks @bigevilbeard for the quick response. In which file I need to update this?
06-04-2024 12:05 AM
You should update the Trex configuration file (.yaml or .json) with the ASTF settings.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide