1847069 Members
5333 Online
110261 Solutions
New Discussion

Routing problem

 
SOLVED
Go to solution
hangyu
Regular Advisor

Routing problem

I am new to IP routing . I have a server which the ip is 192.168.0.2 , the gateway is 192.168.0.5 , the server can directly connect ISP . Now , I would like to change the gateway of this server to another IP -192.168.0.8 ( for some reasons ) , but I found that the server can't connect the ISP again .
If I want to make it can connect the ISP , what can I do ? add another routing entry ? or can a server has two gateway IP ? thx
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: Routing problem

Shalom,

A server can have two gateways, but only one default gateway.

To maintain Internet Access change the default gateway back to 192.168.0.5

Use the route add command to set up a route to the 192.168.0.8 system. You say you changed this for some reason. You need to know the reason.

man route
# to help compose the route command.

There really should not be a reason to add a route here unless the systems are on separate physical networks or there is a router involved.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Peter Godron
Honored Contributor

Re: Routing problem

Hi,
did you change the default gateway or did you add a gateway address ?
Check your /etc/rc.config.d/netconf.

Machines have 1 default and normally only one gateway per card, but you could add another gateway.

what does netstat -rnv show ?
hangyu
Regular Advisor

Re: Routing problem

thx replies ,

it works .

Peter Godron
Honored Contributor

Re: Routing problem

Hi,
as the problem is now resolved, could you please complete the thread by awarding points to helpful answers and summarising the solution for you.

This will help resolution of similar problems in the future.