# Use of ip command
ip route add 192.168.55.0/24 via 192.168.1.254 dev eth1
route add -net 192.168.55.0 netmask 255.255.255.0 gw 192.168.1.254 dev eth1
#----------------------------------------------
# Red Hat/Fedora Linux Static route file
#----------------------------------------------
cat /etc/sysconfig/network-scripts/route-eth0
GATEWAY0=192.168.1.254
NETMASK0=255.255.255.0
ADDRESS0=192.168.55.0
GATEWAY1=10.164.234.112
NETMASK1= 255.255.255.240
ADDRESS1=10.164.234.132
#------------------------------------
# Debian Linux static routes file
#------------------------------------
cat /etc/network/interface
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.254
up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
down route del -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
0 comment about "Configure static routes in Debian or Red Hat Linux systems"