≡ Menu

route command

Red Hat Linux Static Routing Configuration

Q. I've two network interface connected to two different routers as follows:
[a] eth0 LAN network - gateway IP -

[b] eth1 ISP assigned network - gateway IP -

I can only ping to public server but not to another servers inside LAN? I'm not able to route traffic via How do I configure static routing under Red Hat Enterprise Linux 5.x or CentOS Linux 5.2?
[click to continue…]

OpenBSD Set / Change Default Gateway

Q. How do I change or set a default gateway under OpenBSD operating system?
[click to continue…]

Solaris UNIX Add Static Routes

Q. How do I add Static Routes under Solaris UNIX? My default gateway configured in /etc/defaultrouter, but what is the proper place to configure static routes for a Solaris UNIX server? Can you tell me exact configuration file name for a static routing?
[click to continue…]

FreeBSD Configure NIC Jumbo Frames

Q.Under Linux I can set Jumbo Frames by modifying configuration file. How do I configure FreeBSD network card to enable Jumbo frames on all of my NIC for 1000 Mbps speed and make MTU configuration persistence?
[click to continue…]

Understanding Routing Table

Q.What is a routing table? Can you explain its usage under Linux / UNIX operating system?
[click to continue…]

Linux route Add Command Examples

I am a new Linux user. How do I add a new or default gateway using route command on Linux operating systems? How can I use route command to show or set a new route on Linux based server or desktop system?
[click to continue…]

FreeBSD Static Routing Configuration

Q. How do I configure FreeBSD for static routing? I'd like to set default route to and static route for network using router. How do make configuration persistence?
[click to continue…]

FreeBSD Set a Default Route / Gateway

How do I modify or set a default route for my FreeBSD server? How do I make default route configuration persistent?
[click to continue…]

How Do I Find Out My Linux Gateway / Router IP Address?

How do I find out my gateway IP for a computer or a network device that allows or controls access to another computer or network under Linux / UNIX operating systems?
[click to continue…]

Debian / Ubuntu Linux Setting a Default Gateway

Q. How do I setup a default gateway on Debian or Ubuntu Linux? My router IP is and I'd like to setup this as a default gateway for Debian Linux.

A. You can use command line tool such as
a] ip command - show / manipulate routing, devices, policy routing and tunnels

b] route command - show / manipulate the IP routing table

c] Save routing information to a configuration file so that after reboot you get same default gateway.

ip command to set a default router to

Login as the root and type:
# ip route add default via
$ sudo ip route add default via

route command to set a default router to

Login as the root and type:
# route add default gw
$ sudo route add default gw

Save routing information to a configuration file /etc/network/interfaces

Open /etc/network/interfaces file
# vi /etc/network/interfaces
$ sudo vi /etc/network/interfaces
Find eth0 or desired network interface and add following option
Save and close the file. Restart networking:
# /etc/init.d/networking restart
$ sudo /etc/init.d/networking restart