TRex is a cost-effective, open-source traffic generator that can operate in both stateful and stateless modes, leveraging DPDK for efficient performance. Capable of producing L3-7 traffic, it consolidates the functions of multiple commercial tools into a single solution. The stateless features allow for the management of various streams, modifications to packet fields, and provide detailed statistics, including latency and jitter for each stream or group. Its advanced stateful capabilities enable the emulation of Layer 7 traffic, offering comprehensive support for TCP and UDP protocols. Furthermore, TRex is equipped to simulate a diverse array of client-side protocols such as ARP, IPv6, ND, MLD, IGMP, ICMP, DOT1X, DHCPv4, DHCPv6, and DNS, thereby creating a realistic environment for testing the scalability of clients and servers. With its robust functionality, TRex stands out as a versatile tool for network testing and performance evaluation.