Logo

EcoRouter

EcoNAT

EcoQOE

EcoBypass

English

  • Release Notes_EN
  • Billing console and EcoBRAS protocol EcoNAT Documentation / BRAS functionality / Billing console and EcoBRAS protocol

     

     

    Specialized EcoBRAS proprietary protocol is used to download information from billing to the EcoNAT. It is a simple text protocol.

    For its work, you need to establish a connection to port 2225 of the EcoNAT control interface. Then there is the exchange of query strings (to EcoNAT) and answers by EcoNAT. In the case of an incorrect query string EcoNAT immediately and forcibly closes the connection without sending a response string.

    The query string cannot exceed 64 kilobytes.

    Request and response string are ended with ASCII LF (code 0x0A) symbol.

    Request string may contain ASCII CR (code 0x0D) symbol, but they will be ignored.

    The protocol supports the following commands:

    • testRID

    • add

    • ads
    • statall
    • remove

    • clearall

    TestRID

    B: testRID
    E: 1-40 18-8 19-8 24-8 26-21 27-16 31-41 35-21 37-28 40-21 41-8 55-28 82-34 135-21 143-40 146- 40 147-31 155-34 163-45 182-34 202-41 207-40 209-16 212-34 213-34 215-41 217-43 220-34 227-16
    228-31 231-40 232-16 240-34 242-28 244-34
    On testRID request you are given in a row a list of pairs of CONTRACTNUMBER-TARIFNUMBER. Billing uses this information to sync lists to determine which number of the contract is not in EcoNAT, and which is superfluous.
    B: testRID
    E:

    If EcoNAT not offer contracts (for example, if he had just loaded), it responds with an empty string.

    Immediately after BRAS loading the mode of transmission of all traffic is switched on (in order to serve the users at the time, not yet loaded information from the billing). After receiving of the first testRID the timer, which for 600 seconds keeps the transmission of all traffic switched on. At this time, it may receive new testRID, and after 10 minutes finally BRAS switches to the main mode (when traffic is prohibited from those subscribers which is not allowed explicitly in the billing). To see the status of the timer use time command.

    Add

    B: add 24372 {oid} LIM10M/LIM10M 10.21.0.208, 10.210.0.207, // RULE43
    E:

    Add command adds policy for a subscriber with the specified contract number.

    In case of success BRAS returns an empty string. In case of failure BRAS closes the connection. Detailed format of add command is described in a table below.

    № 

    Field

    Content type

    Description

    1

    add 
    3 symbolsCommand – add a contract

    2


    TAB Delimiter

    3

    24372
    DigitsContract number

    4


    TAB Delimiter

    5

    {oid} 
    5 symbols stringContract type (in our case, always the fixed string '{oid}')

    6


    SPACE Delimiter  

    7

    LIM10M 
    String: LIM speed K/M/G or UNLIM Upstream speed (to the Internet). K/M/G – means kilo/mega/giga bit. For example: LIM64K – 64 Kbps. UNLIM – means no speed limit

    8

    Symbol '/'Delimiter  

    9

    LIM10M 
    StringDownstream speed (from the Internet)

    10


    SPACE Delimiter

    11

    10.21.0.208, 
    IP address, delimiter‘,’

    Subscriber IP address (may follow a few in a row, each of the IP addresses gets the speeds that are set for this contract)

    12


    SPACE Delimiter  

    13

    // 
    2 symbols

    14


    SPACE Delimiter

    15

    RULE 
    4 symbols

    16

    43
    NumberSubscriber tariff number (ID of the tariff in the billing)

    17


    LF The end of the query string 

    Ads

    With the help of the EcoBRAS protocol, the addition of clients of the shared contract is carried out by the ads command.

    B: ads 24372 {oid} LIM10M/LIM10M 10.21.0.208, 10.21.0.207, // RULE43
    E:  

    The syntax of the ads command is described in the table below.

    FieldContentDescription

    1

    ads 
    charactersCommand - add a shared contract 

    2


    TAB Delimiter

    3

    24372
    FiguresNumber of the contract

    4


    TAB Delimiter

    5

    {oid} 
    String 5 characters Type of contract (in our case always a fixed line '{oid}')

    6


    SPACE Delimiter

    7

    LIM10M 
    String: LIM speed value K/M/G or UNLIM Downstream speed (from the Internet). K / M / G - means kilo/mega/giga bit. For example, LIM64K is 64 Kbps. UNLIM - without speed limits

    8

    Character '/'Delimiter 

    9

    LIM10M 
    String Speed upstream (to the Internet)

    10


    SPACE Delimiter

    11

    10.21.0.208, 
    IP address, delimiter ‘,’  IP-address of the subscriber (can follow a few in a row, each of the IP-addresses gets those speeds that are set for this contract) 

    12


    SPACE Delimiter

    13

    // 
    characters

    14


    SPACE Delimiter

    15

    RULE 
    characters 

    16

    43
    NumberNumber of the specific rule in the EcoBRAS table

    17


    LF End of query string

    Remove

    B: remove 24372 {oid} LIM10M/LIM10M 10.21.0.208, 10.210.0.207,
    E:

    Syntax of remove command is close to the add command, but instead of adding it removes the contract and the associated subscriber address.

    № 

    Field

    Content

    Description

    1

    remove 
    6 symbolsCommand – remove a contract

    2


    TAB Delimiter

    3

    24372
    DigitsContract number

    4


    TAB Delimiter

    5

    {oid} 
    5 symbols stringContract type (in our case, always the fixed string '{oid}')

    6


    SPACE Delimiter

    7

    LIM10M 

    String: LIM speed K/M/G or UNLIM

    Upstream speed (to the Internet). K/M/G – means kilo/mega/giga bit. For example: LIM64K – 64 Kbps. UNLIM – means no speed limit

    8

    Symbol '/'

    Delimiter

    9

    LIM10M 
    StringDownstream speed (from the Internet)

    10


    SPACE Delimiter

    11

    10.21.0.208, 
    IP address, delimiter‘,’Subscriber IP address (may follow a few in a row, each of the IP addresses gets the speeds that are set for this contract)

    12


    LF 

    The end of the query string

    If in the remove query is specified the list of IP-addresses, other than the previously specified in the add request, the BRAS deauthorize all IP previously registered in all add commands to this contract number. If add command was issued again (without the remove), then for IP addresses in the re-add it will be set the speed specified in the second request (update speed rate).

    Statall

    At the port 2225 is also available a statall service command, that displays a list of all users traffic information.

     $ telnet 2.2.2.2 2225
    Trying 2.2.2.2...
    Connected to 2.2.2.2.
    Escape character is '^]'.
    statall
    10.210.0.81: rx_bytes=5630281 tx_bytes=1211117 rx_packets=6201 tx_packets=11017
    10.210.0.82: rx_bytes=133560825 tx_bytes=7870065 rx_packets=109851 tx_packets=53843
    10.210.0.83: rx_bytes=0 tx_bytes=0 rx_packets=0 tx_packets=0

    Clearall

    This command is used to delete all policies added through the billing console.