Router programming

Is there any way to run code (e.g. compiled c) on routers

I believe Cisco IOS is closed, and I have looked at JunOS but the API is XML based and seems to be just for configuration

What I want to do is stop, allow, count, redirect etc. packets on a per user basis

Or am I barking up the wrong tree here?

Obviously I could do this on a pc running linux but i want carrier grade handling, e.g. a big data plane (if that's the correct term).

thanks very much

Reply to
Leigh8
Loading thread data ...

I don't know about "carrier grade", but you can install linux on some Cisco routers.

formatting link

What I'm wondering is how you are going to be able to distinguish between the users, considering that: a) IP does not have any kind of security or identification field b) the most commonly used IP protocols do not have any kind of security or identification field c) Any given IP address might be in use by multiple users d) Any given user might be using multiple IP addresses

For example, I'm logged on to 6 different computers simultaneously at the moment. For one of those, I am the only authorized user; for another I am the only user in practice (the systems administrator could log on in theory); the others are all multi-user, some of which I

-happen- to be the only user of at the moment, and others of which there -happen- to be additional users of at the moment.

Reply to
Walter Roberson

IIRC someone did a port of Linux to the 2500 years ago. This did not interact with IOS but replaced it. For sure you would be able to build a better router from a PC.

The high capacity routers (say 10s of millions of packets per second) all do their work in hardware. My guess is that this hardware is programmable (well maybe re-configurable) e.g. FPGA (Field programmable Gate Array) however not in any way that I understand it (I can do a bit of C).

So, even if you had a compiler and libraries for IOS I doubt that it would get you very far in your quest.

Obviously back to Plan A. Alternatively find a different way to solve your problem.

What is the problem?

Good luck.

Reply to
anybody43

Yup, distributed programming with hardware assist.

If you look at the CPU clock rates on Cisco routers, they aren't very high. For example, the 7206VXR is controlled by a MIPS R7000 at 350 MHz.

Reply to
Walter Roberson

Thanks for the replies, sorry for the delay

The basic problem is i am interested in writing a GGSN which is basically a data access gateway for GPRS mobile phones. They control access, and also charging at a packet level (plus some deep/shallow packet inspection stuff for identifying flows).

The TCP comes in tunneled through GTP (allowing you to identify users and apply IP addresses to the clients).

You can take in GTP traffic and forward on the internal TCP traffic using a C program on Linux for example. But it seems to me that all the vendors base their GGSNs on routers which is probably due to the fact that they must handle millions of users. So i'm not sure how they turn the routers into GGSNs

Thanks Leigh

Reply to
Leigh8

formatting link
chapter describes how to configure a Cisco router as a Gateway GPRS Support Node (GGSN).

I was going to suggest that you looked into getting perhaps some sort of source licence from Cisco however even if you were not going to compete with an existing product I am sure that there would be difficulties.

If you really are serious about this then you would probably need to partner with a router provider.

Reply to
anybody43

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.