Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

Has anyone used their Pi as a routing device? Mainly I want to use it to monitor my network and it would be great if it had an input and output for ethernet, but it doesn't so I am wondering if it is very effective to monitor the network by having the ethernet input and then using a USB dongle as a wifi router. Has anyone done anything like this? Does it slow the internet down by much?

share|improve this question
1  
Depends how fast your internet connection is. Mine is 100Mb, so I'm pretty sure it would slow it down ;) – gnibbler Apr 30 at 13:12
I've a 30Mbps internet connection, and at this time with 5Mbps of traffic, my inline raspberry pi with snort are consuming ~50-95% CPU and 85% memory. My setup is not yet finned tuned, but i want to show you some real figures. – Pipe May 6 at 13:41

2 Answers

I have used the Pi for routing, it worked well. As you say, you need at least one more network interface, as the Pi has only one ethernet port. You can add another interface connected to the USB port. I have used a GSM modem and a Wifi stick.

Things to note:

  • Use a powered hub. Wifi and GSM devices demand more power than what the Pi:s USB ports can supply.
  • If you shop for Wifi devices, get one with good Linux support. You want one that works in access point mode, not all sticks do. Check at linuxwireless.org.

Here is my blog post about routing, and another about setting up a WiFi access point. This guide helped me with the routing setup. The routing stuff is not very specific to the Pi, anything that works on Linux in general should be possible. The details depend a bit on which distribution you use.

share|improve this answer

Having a little network background, the first thing that comes to mind is use it as a Snort box, and then you don't have to worry about only having one interface. You would setup your switch/router to forward all traffic to the Pi, but also pass it onto the end device. This is known as a switchport monitor, but your device may not support it. You may need a managed switch to do this. Snort would then analyze the traffic and report on it. More information on Snort http://www.snort.org/

The nice thing about this kind of setup is your Pi is sitting off to the side watching everything that is being run through the switch, rather than sitting inline with the data. If you have a software glitch this way, traffic can still flow, just not be monitored. With what you are describing with two interfaces, your program crashes, your network crashes.

This does not use the pi as a router, but does allow you to monitor and report on traffic that is moving across your network.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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