Wednesday, July 1, 2009

View Routing Table and Change your default Gateway

The netstat -nr command will provide the contents of the touting table.

# netstat -nr



Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

10.8.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0

169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0

0.0.0.0         10.8.0.1        0.0.0.0         UG        0 0          0 eth0



Change Your Default Gateway

You will need to update your /etc/sysconfig/network file to reflect the change. This file is used to configure your default gateway

NETWORKING=yes
HOSTNAME=newhost
GATEWAY=10.8.0.2

No comments:

sanjay's shared items

My Blog List