Skip to main content
SUSE

SUSE Lesson 15 Routing

By October 2, 2013September 12th, 2022No Comments



Many branch offices use Private IP Address ranges that do not route automatically. So in these lesson we look at enabling routing on our SUSE Linux hosts and adding static routes to link two offices together. the network map that we are working with is shown in the graphic below:

So we have have a host in Office 2 and a host in Office 1 that need to be able to talk. They are connected by routers in each office but as we are working with private address ranges we need to advertise the routes as well as enabling routing on the routers. Using the /etc/sysctl.conf file we can enable routing with the directive net.ipv4.ip_forward = 1 as seen below:

To make those setting current use the command: sysctl -p. Finally to make sure that these settings are miantained as persistent after reboots, edit/etc/sysconfig/sysctl. Set IP_FORWARD = “yes”. This then handles the routing, or forwarding of IP packets. Now we need to look at adding in the routes

To add routes at the command line we would use, on the Office1 router:

ip r a 192.168.2.0/24 via 192.168.3.2

To make this persistent edit the /etc/sysconfig/network/routes file as below: