Cisnu

From openIdeas.info

Introduction to Cisnu

Cisnu is a project to add new commands to shell of Quagga project. [1]

Quagga is a routing software suite, providing implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for *nix platforms with a shell like Cisco IOS. However this project doesn't make up another network commands like bridging, QoS, NAT, etc.

We start off Cisnu to provide a new suite to work in this approach.

Cisnu is GPL licensed

Overview devel documentation

Components in Cisnu.

The CLI provides the human-to-computer interface for routing daemon. An operator can use the CLI terminal to input commands to change or view configuration.

Cisnu and Quagga Components

More: http://wiki.cs.uiuc.edu/cs427/Components+in+Zebra

Cisnu architecture has been geared towards achieving modularity, extensibility, and maintainability.

Zebra protocol is used between protocol daemon and zebra. Each protocol daemon sends selected routes to the zebra daemon. The zebra daemon manages which route is installed into the forwarding table. Zebra protocol is a TCP based protocol.

All the daemons listen on a particular port for incoming VTY (Virtual Terminal Interface). VTY is a command line interface (e.g. telnet) to change or view the current configuration. Zebra’s daemon’s have their own VTY.

The main advantage is modularity. Due to the multi-process nature of the Cisnu each protocol can be developed separately. We can develop a new daemon make a fork from a rip daemon.

Rip daemon detail

Zebra mimics the client-server model in which the protocol daemons are clients and the Zebra daemon is a server that allocates and distributes services and resources (routing table information) from the kernel to its client.

Mechanisms that Zebra daemon (user-space) can use to communicate with the kernel or read information exported by it:

Rip daemon detail

More: http://dcn.ssu.ac.kr/~softgear/prog_sw_report_summer_99.pdf

and source files about this topic:

ZEBRA: zebra_rib.c, zebra_routemap.c, zebra_snmp.c, zebra_vty.c

IOCTL: ioctl_null.c, if_ioctl.c, rt_ioctl.c, ioctl.c

SYSCTL: if_sysctl.c, ipforward_sysctl.c, rtread_sysctl.c

NETLINK: if_netlink.c, kernel_netlink.c, rt_netlink.c, rtread_netlink.c

/PROC: if_proc.c, ipforward_proc.c, rtread_proc.c

ROUTING SOCKET: kernel_socket.c, rt_socket.c


web interface to CVS of soruce: http://cvs.quagga.net/cgi-bin/viewcvs.cgi/

Code Connections.

The architecture identifies all the inter-component connections and describes the connection properties on soruce code. A connection may be a simple function call or data flow through a pipe.

We approch to rip daemon code to undestand some concepts about code on Cisnu

Daemon detail on RIP

Code RIP daemon detail

The command code:

Code RIP daemon detail

Build a new protocol to Cisnu

0. Configure bootstrap

1. Set up a new daemon

2. Write a Makefile

3. Define shell commands

4. Make up within vtysh

5. Intentify API via library or sysFS (and Zebra communication)

6. Coding interface

7. Build it and run it

A example of name file:

  • <protocol_name>d.c. 'show' and another root commands.
  • <protocol_name>_debug.c. Debug code of protocol
  • <protocol_name>_interface.c. Code inside of interface
  • <protocol_name>_main.c. Daemon code and calls initialition fuctions.
  • <protocol_name>_zebra.c If daemon cominicate with zebra built this file
Documentation