Build a router

Started by sergeyrar, August 22, 2015, 12:36:23 PM

Previous topic - Next topic

sergeyrar

Hi all,

I want to build a router from scratch, chip by chip ... and program everything - just for fun.

Does anyone have any idea how can I get started? Is there any comprehensive guide for this ?


Thanks !




deanwebb

Old PC running Linux with a bunch of network cards can become a router... but if you want custom ASICs and stuff, maybe taking apart and reassembling an 1841ISR would do?
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

sergeyrar

I want to build it from scratch.
To program all hardware and software from zero.
I know it is a lot of work, but I have a lot of free time now :-)

deanwebb

Well, for software, look at some of the FreeBSD router projects to get an idea of what code to use.

For hardware, you'll build out a PC, basically. If you want to actually get chips to burn ROMs into, I can't help you there. Too much hardware for me.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

AnthonyC

On the hardware side look at Raspberry Pi and if you want to look deeper than that look around for embedded systems.  Also it would help tons if you are already an expert at programming; otherwise it will be a challenging project. :)
"It can also be argued that DNA is nothing more than a program designed to preserve itself. Life has become more complex in the overwhelming sea of information. And life, when organized into species, relies upon genes to be its memory system."

sergeyrar

I'm not an expert at programming,
I took some curses in C/C++/assembly .. have written few codes in some other weird languages that worked quite well.. I'm basically OK with programming.

Not an expert on hardware part either, once I've build a robot which was controlled via a transmitter I attached to the RS-232 exit... it even worked - but it was quite a long time ago.


If there was some comprehensive guide on how to get started... It would be great.. it would give me the first push I need.

wintermute000

I'd start with a bloody switch first before graduating with a router :)

Perhaps get your feet wet with a stock standard openflow switch. go from there.

Reggle

I've got an Intel NUC here running Linux for a router. Many possibilities and tools, much to learn. Custom encryption and the like.
But I suppose you want to go deeper than that, after all iptables is just another premade package.

Someone once told me that you can do it all from scratch on an Arduino. It does not have a lot of processing power, but the ability to play with the circuits directly would allow some ASIC-like behaviour.
If you want to use it for professional purposes eventually, I would follow wintermute and check Openflow.

deanwebb

I can say that you should absolutely NOT run your own encryption code in an environment exposed to the Internet. When you encrypt, use a standardly-available package that has been tried and tested by the mathematicians.
Take a baseball bat and trash all the routers, shout out "IT'S A NETWORK PROBLEM NOW, SUCKERS!" and then peel out of the parking lot in your Ferrari.
"The world could perish if people only worked on things that were easy to handle." -- Vladimir Savchenko
Вопросы есть? Вопросов нет! | BCEB: Belkin Certified Expert Baffler | "Plan B is Plan A with an element of panic." -- John Clarke
Accounting is architecture, remember that!
Air gaps are high-latency Internet connections.

that1guy15

For data plan you might start with Broadcom as they provide most open hardware chipsets. This will give you your data plane.

For the control plane I would assume any x86 based system would work.

Now if you just throw em all in a toaster or glue them together with elmers is beyond me :)

Have fun and hope that gives you a start!
That1guy15
@that1guy_15
blog.movingonesandzeros.net

hizzo3

Pfsense boxes aren't too bad either.

icecream-guy

guy here where I work is writing code for a router in Java.
:professorcat:

My Moral Fibers have been cut.

Reggle

Quote from: ristau5741 on August 24, 2015, 08:00:29 AM
guy here where I work is writing code for a router in Java.
For the love of mankind, don't do that.

that1guy15

Quote from: Reggle on August 24, 2015, 08:07:56 AM
Quote from: ristau5741 on August 24, 2015, 08:00:29 AM
guy here where I work is writing code for a router in Java.
For the love of mankind, don't do that.
+1 everyone knows you do this type of stuff in Visual Basic. Duh...
That1guy15
@that1guy_15
blog.movingonesandzeros.net

fortworthtechs

pfSense is to be installed on hardware on the software or firmware part of the router. pfSense is a free network firewall distribution  which is based on the FreeBSD OS and has a custom kernel with third party software packages or "add-ons" to add more functionality and features to your high performance router.