Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dpi:dpi_options:router:start [2021/05/28 15:19] – edrudichgmailcom | en:dpi:dpi_options:router:start [2022/03/29 13:29] (current) – removed edrudichgmailcom | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 20 Router ====== | ||
- | {{indexmenu_n> | ||
- | |||
- | <note warning> | ||
- | <note important> | ||
- | |||
- | < | ||
- | | ||
- | ===== General Description ===== | ||
- | </ | ||
- | SSG itself does not build the routing table. It delegates this work to proven specialised tools. The example uses the BIRD root daemon. The router daemon processes the required routing protocols (BGP, OSPF, etc.) and uses them to build a common routing table which it loads into the kernel. SSG performs routing of packets using this table. | ||
- | {{ : | ||
- | <note tip> | ||
- | Instead of BIRD, any other daemon that builds a routing table in the Linux kernel can be used, such as [[https:// | ||
- | In future versions, in order to save memory, it is possible to introduce optional specialized APIs for communication with a particular daemon to bypass kernel route table construction and communicate with the daemon directly.</ | ||
- | |||
- | Since BIRD builds the routing table in the OS kernel, to avoid application of these rules by the Linux server itself, the BIRD root daemon runs in a separate net namespace (in the diagram it is '' | ||
- | |||
- | ==== The Internal Router Architecture ==== | ||
- | Data from the kernel route table is read (rtnetlink) in the router' | ||
- | |||
- | The worker threads use FIB. This structure is designed for multi-threaded search (LPM - longest prefix match), but is not designed for modifications (deletion/ | ||
- | |||
- | ===== System Requirements ===== | ||
- | Router mode in SSG requires quite a lot of memory, especially with BGP full view. Plus, memory is required for the BIRD daemon that builds the routing table via BGP, OSPF, etc. Router mode (especially BGP full view) requires at least 4-8G additional memory. | ||
- | |||
- | ===== Setting veth-nterface Names ===== | ||
- | The fastdpi.conf describes all TAP-interfaces associated with the devices: | ||
- | < | ||
- | # Description of one router interface | ||
- | # WARNING! ' | ||
- | router_device { | ||
- | # Device name from in_dev/ | ||
- | device= | ||
- | # TAP interface name for the device (default=' | ||
- | #tap= | ||
- | # Name of the paired TAP interface in netns for the device (default=' | ||
- | #peer= | ||
- | # WARNING! ' | ||
- | } | ||
- | </ | ||
- | |||
- | For example, for this configuration | ||
- | < | ||
- | in_dev=41-00.0 | ||
- | out_dev=41-00.1 | ||
- | </ | ||
- | where only '' | ||
- | < | ||
- | in_dev=41-00.0 | ||
- | out_dev=41-00.1 | ||
- | |||
- | router_device { | ||
- | # Device name from in_dev/ | ||
- | device=41-00.1 | ||
- | # TAP interface name for the device (default=' | ||
- | tap=tap41 | ||
- | # Name of the paired TAP interface in netns for the device (default=' | ||
- | peer=bgp41 | ||
- | } | ||
- | </ | ||
- | |||
- | It is possible not to specify the names of the '' | ||
- | < | ||
- | in_dev=41-00.0 | ||
- | out_dev=41-00.1 | ||
- | |||
- | # TAP for out_dev: | ||
- | router_device { | ||
- | device=41-00.1 | ||
- | } | ||
- | |||
- | # TAP for in_dev | ||
- | router_device { | ||
- | device=41-00.0 | ||
- | } | ||
- | </ | ||
- | In this case the TAP interface names are assumed to be as follows: | ||
- | * for '' | ||
- | * for '' | ||