Josh Stone, Blog

Josh’s projects and security nerdery

Ethernet Hardware Options

This is a post in a series about my Ethernet Project

So I want to play hands-on with Ethernet. I thought it would be worth pointing out some of the hardware choices I’ve made for this project, especially considering the other ways that people do small-scale ethernet. I’m targeting something that’s about Arduino complexity, so that ecosystem is a good place to start.

There are a bunch of ethernet boards out there. For example, there’s the classic Ethernet Shield. This will run about $10-20 or so, and will pair well with any standard Arduino. In my case, though, this isn’t really a good option for several reasons. First, it’s based on a highly integrated solution, the Wiznet 5100, which takes the whole TCP/IP stack over for you, and provides a serial “sockets-like” interface. While very cool for doing Internet of Things projects with your Arduino, it’s not so good for what I’m aiming for. I think there might be some raw packet options, but by the time you factor in the SPI interface and everything, it’s just not the ideal solution.

There are some breakout boards based on the Microchip ENC28J60 chip, which is a nice SPI-based combination MAC and PHY. These work well, but are somewhat limited in speed – the SPI interface is capped at 20MHz, which means you can’t get more than 20mbps out of it. That isn’t such a big deal, but there’s another very nice option…

There’s the ENC28J60’s bigger brother, the ENC424J600, which has a snazzy parallel interface. The timings for the ENC424 allow a microcontroller to approach a full 80 megabits per second, which is pretty close to what anyone will practically see on a real network. If I want to build a man-in-the-middle inline device or something, this should be about ideal.

Another key consideration is the processor. I can’t do this with an 8-bit AVR, such as is used in most Arduinos, because they don’t have enough memory. If you have only 3KB of RAM, you’re not going to be able to store many packets in memory! The ARM Cortex microcontrollers, however, usually have many kilobytes of RAM and run at nice, fast speeds (like 100MHz+). That gives me the horsepower I need to implement a TCP/IP stack, keep packets in memory, and make decisions about what to do with those packets in real-time!