How can I do the same on Linux (RedHat or Debian)?
I need to create local loopback as shown herein: Performing Loopback Testing for Fast Ethernet and Gigabit Ethernet Interfaces.
Excerpt
Configure a Local Loopback Action
To configure a local loopback without physically connecting the transmit port to the receive port, follow these steps:
In configuration mode, go to the following hierarchy level:
[edit]
user@host# edit interfaces interface-name (fastether-options | gigether-options)
Configure the local loopback:
[edit interfaces interface-name (fastether-options | gigether-options)]
user@host# set loopback