Skip to content

vr_router4

Michal Opala edited this page Feb 6, 2024 · 5 revisions

Router4

This feature selectively controls IP forwarding via sysctl. This is a basic feature to forward network packets across the virtual router network, and it is enabled by default, you can select which interfaces are used.

Important

This module is enabled by default. You only need to add some configuration attributes to fine tune its operation.

Virtual Router Configuration

The following attributes control the basic forwarding configuration:

  • ONEAPP_VNF_ROUTER4_ENABLED enabled by default.
  • ONEAPP_VNF_ROUTER4_INTERFACES list of interface names to forward packets

For exaxmple, when three NICs (eth0, eth1, eth2) are attached to a VR:

CONTEXT = [
  ...
  ONEAPP_VNF_ROUTER4_ENABLED    = "YES",
  ONEAPP_VNF_ROUTER4_INTERFACES = "eth0 eth1", # same as "!eth2"
  ...
]

Gives:

$ cat /etc/sysctl.d/98-Router4.conf
net.ipv4.ip_forward = 0
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.eth0.forwarding = 1
net.ipv4.conf.eth1.forwarding = 1
net.ipv4.conf.eth2.forwarding = 0

Context Configuration Attributes

Parameter Default Description
ONEAPP_VNF_ROUTER4_ENABLED YES Enable/Disable Router feature (YES/NO)
ONEAPP_VNF_ROUTER4_INTERFACES all NICs List of routed NICs (<[!]ethX> ...)
Clone this wiki locally