Modules

 


BalanceNG Packet Processing Modules #

The Module Chain #

The module chain controls the processing of packets at the receiving side. Packets are entering the module chain from the left, where each module can do the following:

  • Modify the packet
  • Send a packet to a BNG controlled interface
  • Stopping further processing by returning MODULE_DONE
  • Passing the packet to the next module in chain by returning MODULE_CONTINUE

If there’s no explicit module chain in the configuration, the default module chain vrrp,arp,ping,hc,master,slb,rnat becomes effective.

The module chain processing is done within one thread per interface per default (this can be extended with the interface <n> threads configuration directive).

The processing of one single packet is finished as soon as one module returns MODULE_DONE or when the end of the module chain is reached.

The module chain can be altered at any time (with modules <chain>) and becomes effective immediatly for all packet processing threads. An empty module chain can be set with modules "" interactively or in the configuration.

show modules #

The CLI command show modules allows to examine the state of the module chain:

bng-MASTER# show modules
  current global module chain:
    vrrp,arp,ping,hc,master,slb,rnat
  specific information of module "master":
    current VRRP state: MASTER
  available modules (* indicates "in use"):
  name     u description                                             
  -------- - ------------------------------------------------------- 
  arp      * ARP/ND6 request/reply processing                        
  hc       * health-check processing                                 
  ipallow    IP address allow filter                                 
  ipdeny     IP address denial filter                                
  iplocate   locate IP src+dst addresses                             
  isolate    MA-L 34-38-AF isolator                                  
  macallow   simple MAC address allow filter                         
  macdeny    simple MAC address denial filter                        
  master   * proceed only if current master                          
  ping     * ICMP echo request processing                            
  rnat     * reverse NAT                                             
  rt         IPv4 and IPv6 routing module                            
  slb      * server load balancing                                   
  strict     strict IP packet acceptance filter                      
  tap        send packet to TAP packet queue (tapsrc+tapdst applied) 
  tarpit     tarpit module for IPv4 and IPv6                         
  vrrp     * initial VRRP handling                                   
bng-MASTER# 

Module Documentation #