Configuration file overview

Bison Router is configured according to the configuration file. To start configuring, create /etc/bisonrouter/brouter.conf

nano /etc/bisonrouter/brouter.conf

The configuration file consists of two sections:

  • Startup. This section is intended for a one-time initial setup and cannot be changed later. It includes basic settings of ports and receive queues.
  • Runtime. This section is intended for further detailed configuration, and can be changed as needed even after Bison Router has started.

Example

The Bison Router configuration file example:

startup {
    # total number of mbufs
    sysctl set mbuf 32768

    port 0 mtu 1500 tpid 0x8100 state enabled
    port 1 mtu 1500 tpid 0x8100 state enabled

    rx_queue port 0 queue 0 lcore 1
    rx_queue port 0 queue 1 lcore 2
    rx_queue port 0 queue 2 lcore 3

    rx_queue port 1 queue 0 lcore 3
    rx_queue port 1 queue 1 lcore 2
    rx_queue port 1 queue 2 lcore 1

    sysctl set global_packet_counters 1
}

runtime {
    vif add name p0 port 0 type untagged
    ip addr add 10.0.0.1/24 dev p0

    vif add name p1 port 1 type untagged
    ip addr add 10.0.1.1/24 dev p1

    ip route add 0.0.0.0/0 via 10.0.1.2 src 10.0.1.1
}

Important to remember while working with the configuration file:

Note

If you make some adjustments using the command line, you will also need to make changes in the configuration file and save them to apply.

Note

It is important to follow the parameter sequence defined in this instruction. An exception is made for optional parameters specified in square brackets []. They can be omitted.

Note

A section line is considered as a single command. The # character is used to comment an entire line.