Adding default Gateway in Linux SUSE

Changing the default route permanently in SuSe Linux

To make as default route, add the following line into /etc/sysconfig/network/routes file. (Create a file if it does not exist.)

default – –

Syntax: default – –

Linux route add using route command

Route all traffic via gateway connected via eth0 network interface:

# route add default gw eth0

Linux route add using ip command

Just like above but with ip command:
# ip route add dev eth0

 route add -net default gw gateway_ip_address


Change IP address

You can change ip address using ifconfig command itself. To set IP address, enter command:
# ifconfig eth0 netmask up
# ifconfig eth0

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s