NIC Channel Bonding in RHEL 5 & 6 (CentOS & Oracle Linux) Routing IP Traffic on Linux; Use iptables to Implement Packet Filtering and Configure Network Address Translation (NAT) Networking Files. The "/etc/sysconfig/network" file holds top-level networking configuration, including the hostname and gateway settings.
Mar 01, 2019 · Add & Delete default gateway 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 . Add route & Delete route. You can add routing and gateway settings like below. route add -net 192.168.63 ... Linux Example: route add -net 192.168.5.0 netmask 255.255.255.0 gw 192.168.2.2 You can add multiple "static" routes through one router, or routes can use as many routers/gateways as needed. You can view the table of known routes with the command. netstat -rn The Linux specific command will show the same information in a slightly different format.
SUBSCRIBE TO NEWSLETTER Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials. In this example we will add the the static route to the destination network subnet 172.16../24 via the network gateway 192.168.1.100 on the interface...On a newer machine using the ip binary the syntax to add a route is slightly different (but thankfully really consistent for hosts/networks/etc). ip route add 10.0.1.3 via 10.0.0.1 dev eth0 If you were going to add a new default route for a new 10.0.2.0 network through the eth1 interface it might be something like this.