1

So I need to create a simple process to test a large amount of gigabit network ports. Since I don't want to setup two machines and run software on both the test connection my first thought was to create a loopback cable. ANd just see if I can send data and receive what I send. So I looked online and this seemed possible. So I build my own loopback cable with the following pinout:

enter image description here

Now when I plug this cable into a network port I do see the lights coming on. And in Linux I sporadically see a link being established at 10mbit for a short amount of time.

I configured the network interface as follows:

  • Ip address: 192.168.1.50
  • Netmask: 255.255.255.0
  • Gateway: empty
  • Link negotiation: Tried both auto and manual which didn't seem to make a difference

I can sporadically ping myself:

λ ping 192.168.1.50
PING 192.168.1.50 (192.168.1.50) 56(84) bytes of data.
From 143.178.160.1 icmp_seq=1 Packet filtered
From 143.178.160.1 icmp_seq=2 Packet filtered
From 143.178.160.1 icmp_seq=3 Packet filtered
From 143.178.160.1 icmp_seq=8 Packet filtered
64 bytes from 192.168.1.50: icmp_seq=9 ttl=64 time=0.048 ms
64 bytes from 192.168.1.50: icmp_seq=10 ttl=64 time=0.032 ms
64 bytes from 192.168.1.50: icmp_seq=11 ttl=64 time=0.038 ms
64 bytes from 192.168.1.50: icmp_seq=12 ttl=64 time=0.043 ms
64 bytes from 192.168.1.50: icmp_seq=13 ttl=64 time=0.034 ms
64 bytes from 192.168.1.50: icmp_seq=14 ttl=64 time=0.033 ms
64 bytes from 192.168.1.50: icmp_seq=15 ttl=64 time=0.074 ms
From 143.178.160.1 icmp_seq=16 Packet filtered
From 143.178.160.1 icmp_seq=18 Packet filtered
From 143.178.160.1 icmp_seq=20 Packet filtered
From 143.178.160.1 icmp_seq=21 Packet filtered
From 143.178.160.1 icmp_seq=22 Packet filtered
From 143.178.160.1 icmp_seq=23 Packet filtered
From 143.178.160.1 icmp_seq=24 Packet filtered
From 143.178.160.1 icmp_seq=25 Packet filtered
From 143.178.160.1 icmp_seq=26 Packet filtered
From 143.178.160.1 icmp_seq=27 Packet filtered
64 bytes from 192.168.1.50: icmp_seq=28 ttl=64 time=0.019 ms
...

My other network interface do not seem to interfere:

λ ifconfig
enp0s13f0u1u2u1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.50  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2e0:4cff:fe6c:77a9  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:6c:77:a9  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 248  bytes 15360 (15.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1135  bytes 127855 (124.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1135  bytes 127855 (124.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vboxnet0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.56.1  netmask 255.255.255.0  broadcast 0.0.0.0
        ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp113s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.24.78  netmask 255.255.255.0  broadcast 10.0.24.255
        inet6 fe80::9eb6:d0ff:fe3e:5655  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::b5d5:5582:6a6a:7f04  prefixlen 64  scopeid 0x20<link>
        ether 9c:b6:d0:3e:56:55  txqueuelen 4096  (Ethernet)
        RX packets 404929  bytes 345953679 (329.9 MiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 176917  bytes 31814869 (30.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So my question is how can I make this work? I simply want to start testing the interface. Send some udp packets at maximum throughput. First I thought my cable was simply badly made but I tried 3 times making new cables and all of them have the same result so I don't think it's a badly made cable.

Any help is appreciated!

1
  • 1
    1000Base-T, unlike 10Base-T or 100Base-TX, does not use separate transmit and receive pairs that you could loop back from transmit to receive. All pairs are used to both send and receive, and it uses echo-cancelling for this, which kills signals sent from what is received. What you have will not work for 1000Base-T.
    – Ron Maupin
    Jul 19, 2022 at 13:53

1 Answer 1

2

That won't work.

You cannot use a simple loopback for 1000BASE-T due to its use of hybrids and echo compensation. Simply put, the link signals that are sent on the port itself are canceled out and there's nothing to be received. Also, auto negotiation (that is mandatory for 1000BASE-T) won't be able to negotiate the required master/slave relationship.[*1]

I'm afraid there's no way around using a simple active device with a 1000BASE-T port - a small node (RPi-ish) or a basic switch.

[*1] The link you're seeing is due to the feature on some NICs (mostly Broadcom, "Ethernet@Wirespeed") of falling back to 100BASE-TX or 10BASE-T when 1000BASE-T PCS linking fails even when auto negotiation initially determined 1000BASE-T as mutually supported.

3
  • Can a switch be configured to loopback the data? If so then I would just buy a switch.
    – John Smith
    Jul 19, 2022 at 14:07
  • Some switches can be coaxed into doing that, using a network loop and abusing (unidirectional) port mirroring or source-port filtering to avoid the bridge loop. That's not a supported mode though and you'd need to test it yourself.
    – Zac67
    Jul 19, 2022 at 14:14
  • If you don't mind the looped back frames to carry some VLAN tag, you could translate the VLAN on the loop and tag the translated VLAN on the test port (works with most switches, not all).
    – Zac67
    Jul 19, 2022 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.