Giter VIP home page Giter VIP logo

rangemaker's Introduction

# rangemaker

Create C7GSI commands with which to create routing entries for broken (and unbroken) ranges with many exceptions using convenient inputs.

Ericsson C7 routing tables do not support LPM (Longest Prefix Match), instead, a very cumbersome and time consuming method of defining every portion of the range is required. This aims to reduce the effort required by allowing for a simple and flixible input format that will be translated to C7GSI commands required to effect the routing required.

For example: NS:1212 GTRC:555 with the exception NS:1212001 GTRC:777 will result in the below:

1212000 555
1212001 777
1212002 555
1212003 555
1212004 555
1212005 555
1212006 555
1212007 555
1212008 555
1212009 555
121201 555
121202 555
121203 555
121204 555
121205 555
121206 555
121207 555
121208 555
121209 555
12121 555
12122 555
12123 555
12124 555
12125 555
12126 555
12127 555
12128 555
12129 555

usage: rangemaker -b bigpieces.txt -s smallpieces.txt -c example_config.ini
    -r will print the ranges for verification
    -t will show and add up the range sizes as a control.
    -e will print the commands you may want to run

Example files are provided:

example_config.ini
example_bigpieces.txt 
example_smallpieces.txt 
example_output.txt 

It is assumed that the NS entries will start with CC and NDC followed by MSIN.

Big Pieces File:
    Lines in the big pieces file should only have CC and NDC concatenated followed by GTRC.

Small Pieces File:
    FROM and TO values in the small pieces file may start with:
        - CC, NDC and MSIN (full or partial)
        - MCC, NS and MSIN (full or partial MSIN)
    Lines may contain:
        - FROM GTRC (TO will be set to the same value as FROM automatically)
        - FROM TO GTRC
   
I was told that the E/// software requires NS values to be sequential and never overlap. Measuring the size of each and adding that up should always be 10,000,000,000 or 1,000,000,000 per range, based on MNC length. This is for you to check. The total is printed and no warnings will appear if it is wrong. If the ranges add up nicely it shows that there are no missing or overlapping pieces only, it does not ensure correct routing. It is for you to test it until you trust it and then still check afterwards.

How it works:

1) Build "FROM TO GTRC" ranges based on the config, big pieces and small pieces.
2) Create the NS entries for each range created in 1) with the range_squash function.
3) Stich them all together and print them out based on the command line flags.

This is free stuff, there is no warranty.

rangemaker's People

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.