User avatar
Shoka
Posts: 143
Joined: Sat Jul 12, 2014 8:35 pm
Location: Manchester, UK

musing on ethernet hardware

Tue Sep 23, 2014 8:54 pm

Is anyone considering a hat type hardware for the Pi with something like a 88e6155 gigabit switch chip and a cluster of rj45 ports?

Given any thought to how that could be interfaced to the Pi?

If there is a practical way to make that work, the Pi would make a cracking home router.
Cheers Harry

User avatar
rpdom
Posts: 15408
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: musing on ethernet hardware

Wed Sep 24, 2014 6:34 am

The Pi's standard Ethernet is only 100Mbs. It can't handle a Gigabit interface because it is limited by the USB speed of 480Mbs (which includes handshakes and protocol overheads). There are no other interfaces on the Pi that are usable for connecting network hardware any faster than that.

So Gigabit would be pointless. If you are wanting the Pi to route traffic to multiple Gigabit interfaces you will probably get speeds of much less than 100Mbs.

Better to get cheap(ish) dedicated router or use an old PC.

User avatar
Shoka
Posts: 143
Joined: Sat Jul 12, 2014 8:35 pm
Location: Manchester, UK

Re: musing on ethernet hardware

Wed Sep 24, 2014 12:41 pm

I'm aware of the pi's limited ethernet capability. However I was not considering extending the existing ethernet.
If you look at say the small Mikrotic routers they are based on a similar concept. The the ethernet chip can switch traffic between its interfaces at gigabit speeds, and a slower interface connects the cpu interface provided by the ethernet chip to the remainder of the hardware. So all that is needed from the pi hardware is sufficient resource to provide that cpu interface.

Providing some hardware on the gpio bus can provide that interface with a throughput of around the same as the existing ethernet on the pi, the ethernet port on the pi is quite capable of providing the upstream port on the router. The rest of the ethernet traffic need not pass the pi at all.
You can prototype the set up by plugging in a usb to ethernet adapter, and linking that to a gigabit switch. However that put's the upstream traffic over the pi's usb hardware twice, so does not give representative performance for what i was musing about. The pi hardware is substantially more powerful than the hardware in most small routers and the versions of Linux available for the pi are well developed, so given a reasonably effecient way to couple an ethernet switch chip to the pi, I see no reason to believe that the combination would not be comparable in capability with a small router, and much much more flexible.
Cheers Harry

gdt
Posts: 85
Joined: Thu Jul 19, 2012 10:19 am

Re: musing on ethernet hardware

Sun Oct 05, 2014 2:00 am

What you are talking about is using the Pi to maintain the TCAM forwarding hardware on a switch's chipset.

The 100Mbps connection is an issue for that, as the CPU still has to handle all "extraordinary" traffic. This would include the BPDUs on a switch and the ICMP and maybe even IPv4 fragmentation on a router. Still, as long as you're not looking at production traffic, then why not?

The bigger issue is gaining access to the TCAM. Documentation of the available devices is best described as "limited", and documentation of the proprietary devices (as Cisco might use in one of their switches) isn't available at all.

There is a API to the TCAM on some devices, called "OpenFlow". I haven't been able to find any switches at a hobbyist level which offer that. The Pica8 switches are the cheapest I've seen.

gdt
Posts: 85
Joined: Thu Jul 19, 2012 10:19 am

Re: musing on ethernet hardware

Sun Oct 05, 2014 2:08 am

Oh, I meant to add. I am happily using a RPi as a "OpenDaylight" OpenFlow controller to a handful of 10port 10GBase-SPF+ switches. So your idea not only has merit, but works in practice.

The RPi is a good choice for experimenting with this sort of thing as issues aren't hidden by the abundant CPU and abundant RAM of a modern server. For example, it is very evident that control place protocol "hello" packets don't scale well and some software re-organisation will be needed to make controllers handle a reasonable number of adjacent routers.

Because of the heat issues, the chip on the RPi isn't a world removed from what you want to run within real networking hardware. So optimising for the RPi allows you to confidently claim that the software will work within modern networking equipment.

User avatar
Shoka
Posts: 143
Joined: Sat Jul 12, 2014 8:35 pm
Location: Manchester, UK

Re: musing on ethernet hardware

Sun Oct 05, 2014 1:34 pm

I think what I'm contemplating is simpler than that. (but I could be wrong :) )

https://wikidevi.com/files/Atheros/spec ... R8327N.pdf is the sort of device I'm thinking of.

I think that is capable of handling all the switch level functionality, even nat translation in the case of the N variant.

The data flow from the majority of users WAN connection is well inside 100mbit, so if it is possible to implement a 100mbit capable port from the GPIO bank on the Pi to interface between the Pi and the Atheros, with presumably an additional path for talking to the control registers on the chip for set up, the Pi could provide routing and presumably firewalling for the upstream traffic, without becoming a crippling bottleneck on the local LAN traffic.

As I mentioned, using a USB gigabit LAN interface on a Pi to attach a Gigabit switch works, for some definition of works, but makes the Pi even more of a bottleneck, because the USB path is used both in and out.

It is surprisingly functional however, I'm using a pi with a serial usb connection and a gigabit Lan interface, as a tool for remote set up of Cisco switches, very successfully.

Pi runs Peter Anvins tftp server, I can set up a minimum config on a "raw" switch via its serial console. (ser2net works ace), bring up a private Ethernet from the switch to the gigabit adapter on eth1 on the Pi. and run software upgrades and install configs. All done remotely via the Pi's eth0 interface, with the Pi keeping all the set up traffic off the real network.
Cheers Harry

Return to “Networking and servers”