WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: MicroCore to replace my Router?  (Read 6713 times)

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
MicroCore to replace my Router?
« on: January 07, 2012, 01:02:07 PM »
I am interested in doing the above, but I'm not sure what .tcz packages I would need.
The functionality I would like is:

Firewall
DHCP Server
NAT
Serial Console (for headless admin)
SSH Server (for remote admin)

Can anyone please guide me on what .tczs I would need over and above those found in the default MicroCore image?
Cheers

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: MicroCore to replace my Router?
« Reply #1 on: January 07, 2012, 01:10:54 PM »
This is not a Tiny Core Base question.
You might look at iptables and dnsmasq.
The problem is that if you have to ask, you are probably not experienced enough to get it configured properly.
A misconfigured router can leave your network unprotected.
Why not just buy a $30 router off the shelf?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: MicroCore to replace my Router?
« Reply #2 on: January 07, 2012, 01:52:07 PM »
Hi PingPing
Quote
The problem is that if you have to ask, you are probably not experienced enough to get it configured properly.
A misconfigured router can leave your network unprotected.
gerald_clark makes a very good point, you might want to think very carefully before going down
this road. If you still insist on pursuing this, this thread has a brief discussion on the subject and
contains some links that might prove useful:
http://forum.tinycorelinux.net/index.php/topic,7134.msg37682.html#msg37682
I would also suggest googling  linux router  for more information, there are projects and packages
out there for this type of thing.

Offline martin

  • Jr. Member
  • **
  • Posts: 87
Re: MicroCore to replace my Router?
« Reply #3 on: January 07, 2012, 06:27:58 PM »
It's true, using it from scratch as a router is not for the faint of heart.

I've done it before, even made a nice project out of it. It involved iptables, dnsmasq, iproute and following similar hints to what is contained in that thread mentioned above.

It also involves a lot of in-depth knowledge of how to tweak the network interfaces, knowing iptables thoroughly and writing a lot of scripts to automate some stuff that you really, really do not want to type everytime you load the system.

Anything on top of that depends on what type of internet connection you are using.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: MicroCore to replace my Router?
« Reply #4 on: January 08, 2012, 09:30:32 AM »
Do yourself a favour and get a small openwrt capable router.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: MicroCore to replace my Router?
« Reply #5 on: January 08, 2012, 09:31:44 AM »
A small openwrt router couldn't handle a few 10k connections ;)
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: MicroCore to replace my Router?
« Reply #6 on: January 08, 2012, 09:35:56 AM »
I personally don't use 10k connections at one time, but I'd surely like to know how much RAM and CPU I would need for it. Do you have any figures at hand?
An other interesting point would be how much additional power iptables and traffic shaping rules would need.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: MicroCore to replace my Router?
« Reply #7 on: January 08, 2012, 12:03:22 PM »
Sorry, it's been a few years since I needed that much. My recollection is that the common 200Mhz/16mb arm and mips routers could do up to ~1k connections under linux 2.6 (half that under 2.4).

I think I had a P3 doing it, it handled the peak of ~13k fine. Granted it was simple firewalling and nat.
The only barriers that can stop you are the ones you create yourself.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: MicroCore to replace my Router?
« Reply #8 on: January 08, 2012, 01:21:22 PM »
Yeah, I've had the 16mb mips routerst failing a lot here.
How could I test this myself?

Offline martin

  • Jr. Member
  • **
  • Posts: 87
Re: MicroCore to replace my Router?
« Reply #9 on: January 08, 2012, 06:34:22 PM »
An other interesting point would be how much additional power iptables and traffic shaping rules would need.
I believe it is mostly memory bound. I have a Cisco 806 which is rumoured to be able to handle a LOT when needed and it only has a 50Mhz RISC CPU, but does carry 32MB RAM. I don't know what an equivalent x86 CPU might be, I don't know the RISC architecture.

But when it comes to x86, I've had good experiences with 350-400Mhz machines being able to handle fairly busy connections. Of course they had 64MB RAM at least. I never checked to see how many connections it peaked at. I agree with the comment regarding a P3. A high end P2 with adequate RAM should suffice as well.

Quote from: hiro
Yeah, I've had the 16mb mips routerst failing a lot here.
How could I test this myself?
A theory which I have never tested, only read about a lot, is to start a torrent, allow a lot of connections which should gradually increase the NAT table in the router memory. If it has limited memory, it should fall over within half an hour. This depends on how many different connections the torrent is able to make though.

My two cents.

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: MicroCore to replace my Router?
« Reply #10 on: January 09, 2012, 03:03:00 AM »
Thanks for your replies.
I think I need to do some more homework before I start.
The router suggestion was really an idea I had for an old Win98SE 'beige box' that a friend gave to me (650MHz AMD Athlon (K7/SlotA) processor with 128MB of RAM) as I'm out of ideas for what other uses the PC could be (I already have a TCL2.2 home file+web server).

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: MicroCore to replace my Router?
« Reply #11 on: January 09, 2012, 09:26:35 AM »
Backup server duplicating the content, for load balancing? ;)
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: MicroCore to replace my Router?
« Reply #12 on: January 09, 2012, 03:08:59 PM »
Hi PingPing
Quote
Backup server duplicating the content
Certainly a lot safer than building a router. Now, if you feel that is not challenging enough, or want to
make the project more interesting, you could turn it into a "semi-hot backup". Start with a Tinycore CD,
and a USB thumb drive for applications and settings, this will be used for running the machine most of
the time. Then, replicate the drives from your server to this machine, I read that using dd and nc is
one way this can be done. Next, you want a way to remotely power up the machine during off hours
once a day (or week) and update any files that have changed. If the machine is Wake On LAN capable,
so much the better, otherwise, you'll have to implement that function another way. Now, if your server
ever experiences a catastrophic failure, connect the machine in its place without the CD and thumb
drive. When you turn it on, you will once again have a running server that is as current as the last
backup.