Create tiny ethernet router
Ferry Toth <[email protected]>
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
I have a device with 2 ethernet ports. Can I get connman to setup the
network to route traffic from the one port to the other?
I guess I would need to tether one of them? Then how would I do that?
TLDR;
Actually I have 2 devices, both are Intel Edison-Arduino. These can
setup the usb port in either host or device mode. The one in device mode
has a eem gadget (ethernet over usb).
The other in host mode has a smsc95xx usb to eth+4p usb hub.
As it is the one in host mode has 2 eth devices:
root@edison:~# ifconfig
enp0s17u1u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.70 netmask 255.255.255.0 broadcast
192.168.178.255
inet6 fe80::280:fff:fe95:1d4d prefixlen 64 scopeid 0x20<link>
inet6 2a02:a466:68ed:1:280:fff:fe95:1d4d prefixlen 64 scopeid
0x0<global>
ether 00:80:0f:95:1d:4d txqueuelen 1000 (Ethernet)
RX packets 781536 bytes 224464657 (214.0 MiB)
RX errors 0 dropped 184984 overruns 0 frame 0
TX packets 17923 bytes 2037451 (1.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s17u1u5i1: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC> mtu
1500
inet 169.254.45.35 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::f4dc:3cff:fe83:4503 prefixlen 64 scopeid 0x20<link>
ether f6:dc:3c:83:45:03 txqueuelen 1000 (Ethernet)
RX packets 6660 bytes 3459572 (3.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7365 bytes 3973982 (3.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
The one device can ping/ssh into the other. But I'd like the device in
host mode to setup a dhcp server and route the traffic.