Configuring static routes

ucs-4
route
static_routes

#1

Problem:

For specific hosts or networks, static routes should be defined. To realize such task without touching the Univention template '/etc/network/interfaces' follow these steps.

Solution:

UCR Variables with the prefix 'interfaces/ethX/route/' allow to define routing entries for network interfaces according to the syntax of the 'route' command.

e.g.:

univention-config-registry set interfaces/eth0/route/route1="net 10.0.2.0 netmask 255.255.255.0 gw 10.0.1.254"
univention-config-registry set interfaces/eth0/route/singleroute="host 217.89.70.193"

You can choose the names for the routes (here route1 and singleroute) on your own. Thus, you can add multiple routes.
Please be aware that by setting these variables some system daemons like ntp, bind9, nscd and S4-Connector might be automatically restarted.

By the following network initializationthe newly defined routes become active.

/etc/init.d/networking restart

related Articles


Two network interfaces UCS configuration