≡ 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 10.0.0.0/8 – gateway IP – 10.8.2.65

[b] eth1 ISP assigned network 202.54.22.128/28 – gateway IP – 202.54.22.129

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

Sysadmin because even developers need heroes!!!

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 60.1.2.3 and static route for network 192.168.1.0/24 using 192.168.1.254 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 192.168.1.254 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 192.168.1.254

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

route command to set a default router to 192.168.1.254

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

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

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