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
    1. Advertising

  2. In article <>,
    Leigh8 <> wrote:
    >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


    >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).


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

    http://www.uclinux.org/ports/


    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
    #2
    1. Advertising

  3. Leigh8

    Guest

    Walter Roberson wrote:
    > In article <>,
    > Leigh8 <> wrote:
    > >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

    >
    > >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).

    > I don't know about "carrier grade", but you can install linux on
    > some Cisco routers.
    > http://www.uclinux.org/ports/


    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.
     
    , Jun 7, 2006
    #3
  4. In article <>,
    <> wrote:

    >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).


    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
    #4
  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

    Thanks
    Leigh
     
    Leigh8, Jun 14, 2006
    #5
  6. Leigh8

    Guest

    Leigh8 wrote:
    > 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


    http://www.cisco.com/en/US/products...figuration_guide_chapter09186a00800df28c.html
    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.
     
    , Jun 15, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Howard

    Wireless PEAP/MSCHAPV2 client programming question

    Jim Howard, Jun 28, 2005, in forum: Wireless Networking
    Replies:
    6
    Views:
    1,698
    Arkady Frenkel
    Jul 2, 2005
  2. cameron

    XSLT programming

    cameron, Jan 4, 2004, in forum: Firefox
    Replies:
    0
    Views:
    520
    cameron
    Jan 4, 2004
  3. Mark  Chen
    Replies:
    0
    Views:
    692
    Mark Chen
    Mar 24, 2005
  4. rgarvind

    Regarding perl programming. How 2 make HTTP request?

    rgarvind, Jan 10, 2005, in forum: Microsoft Certification
    Replies:
    1
    Views:
    708
  5. Tom
    Replies:
    6
    Views:
    2,817
Loading...

Share This Page