You can easily turn your Raspberry PI board into a router with this $5 Chinese network USB adapter. The only issue is that all these devices share the same mac address “00:e0:4c:53:44:58” and you can’t connect multiple network cards to the same PC. I managed to change their mac addresses on Ubuntu 18.04 and connect 7 NICs to the same board.
So, let’s get started!
First of all, identify the devices:
~ $ lsusb
Bus 001 Device 014: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) DM9601 Fast Ethernet Adapter
# or
Bus 001 Device 014: ID 0fe6:9700 ICS Advent DM9601 Fast Ethernet Adapter
Then figure out the cards interfaces. Find those that correspond to mac address 00:e0:4c:53:44:58.
~ $ ip link | awk '{print $2}'
eth1:
00:e0:4c:53:44:58
eth2:
00:e0:4c:53:44:58
Now figure out the USB port numbers. Note “1-1.2” for eth1.
~ $ udevadm info /sys/class/net/eth1
P: /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/net/eth1
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1.2/1-1.2:1.0/net/eth1
E: INTERFACE=eth1
E: IFINDEX=2108
E: SUBSYSTEM=net
Add rules to /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:53:44:58", DEVPATH=="*1-1.2*", NAME="enx00e04c534413", RUN+="/sbin/ifconfig enx00e04c534413 hw ether 00:e0:4c:53:44:13"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:53:44:58", DEVPATH=="*1-1.3*", NAME="enx00e04c534424", RUN+="/sbin/ifconfig enx00e04c534424 hw ether 00:e0:4c:53:44:24"
Now you need to reboot. Note that the network card mac address doesn’t change during soft reboots. So you need to power off /on your PC to force the address change.