Add a Static Route on CentOS - eSecureData Inc.

Mar 04, 2019 4.5. Configuring Static Routes in ifcfg files Red Hat where 10.10.10.0/24 is the network address and prefix length of the remote or destination network. The address 192.168.1.1 is the IP address leading to the remote network. It is preferably the next hop address but the address of the exit interface will work. The “ next hop ” means the remote end of a link, for example a gateway or router. The dev option can be used to specify the exit 4.2. Configuring Static Routes Using nmcli Red Hat To configure a static route for an existing Ethernet connection using the command line: ~]# nmcli connection modify enp1s0 +ipv4.routes "192.168.122.0/24 10.10.10.1" This will direct traffic for the 192.168.122.0/24 subnet to the gateway at 10.10.10.1

How to Add and Delete Static Route in Linux using IP

You can add default gateway to the linux like below. route add default gw 192.168.163.1 . If you want to delete default gateway you can execute like following script. route delete default gw 192.168.163.1 eth1 . You can add routing and gateway settings like below. route add -net 192.168.63.0/24 gw 192.168.163.1 IP Route command: Create static routes or Change the Check the current routing table. To check the current routing table of the system, we can use the … How to Add and Delete Static Route in Linux using IP

Linux for freshers: how to add or delete routes in linux

command line - Can't delete a route with 0.0.0.0 gateway