Router programming

Discussion in 'Cisco' started by Leigh8, Jun 7, 2006.

  1. Leigh8

    Leigh8 Guest

    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
    Leigh8, Jun 7, 2006
    1. Advertisements

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

    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.
    Walter Roberson, Jun 7, 2006
    1. Advertisements

  3. Leigh8

    anybody43 Guest

    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 <g> back to Plan A.
    Alternatively find a different way to solve your problem.

    What is the problem?

    Good luck.
    anybody43, Jun 7, 2006
  4. 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.
    Walter Roberson, Jun 7, 2006
  5. Leigh8

    Leigh8 Guest

    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

    Leigh8, Jun 14, 2006
  6. Leigh8

    anybody43 Guest
    This 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.
    anybody43, Jun 15, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.