From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Manually configure routing using iproute2

Manually configure routing using iproute2 - Linux Tutorial

From the course: Cert Prep LPIC-1 Exam 102 (Version 5.0)

Start my 1-month free trial

Manually configure routing using iproute2

- We can add static routes using the IP route command. We can also add static routes using the legacy route command, although it needs to be installed first. However, if you want your static routes to survive a reboot, you'll need to add them to configuration files in /etc/sysconfig/network-scripts. When we create a network interface configuration file, we name it ifcfg-interface name, such as ifcfg-eth0. For static routes, we name the configuration file route-interface name. For instance, if we wanted to add a static route for the eth0 interface, we'd create a file called route-eth0. To add a route manually using the IP command, we'd type ip route add 192.168.100.0, which is the network address, /24 which is the subnet mask, 192.168.100.1, which is the gateway, dev team0, which is the interface. If you typed in ip route, you would see the results of this line. The legacy route version of this command line is a bit…

Contents