Add a Static Route on CentOS - eSecureData Inc.

Mar 04, 2019 4.5. Configuring Static Routes in ifcfg files Red Hat where is the network address and prefix length of the remote or destination network. The address 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 "" This will direct traffic for the subnet to the gateway at

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 . If you want to delete default gateway you can execute like following script. route delete default gw eth1 . You can add routing and gateway settings like below. route add -net gw 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 gateway