1834188 Members
2635 Online
110064 Solutions
New Discussion

default router

 
SOLVED
Go to solution
Michael O'brien_1
Regular Advisor

default router

Hi,

I'm trying to add a default route on server, the interface is configure as

192.168.244.136
255.255.255.240

But when I try to add a default route I get the following error.

#route add default 192.168.244.129
add net default: gateway 192.168.244.129: Network is unreachable

Output of netstat is shown below for reference.

#netstat -in
Name Mtu Network Address Ipkts Opkts
lan0 1500 192.168.244.128 192.168.244.136 589522 218958
lo0 4136 127.0.0.0 127.0.0.1 154021 154021

Thanks
Michael
4 REPLIES 4
likid0
Honored Contributor

Re: default router

you need to add a 1 at the end:

#route add default 192.168.244.129 1
Windows?, no thanks
Johnson Punniyalingam
Honored Contributor
Solution

Re: default router

if its a "perm" route you need also add an entry to below file

# vi /etc/rc.config.d/netconf

ROUTE_DESTINATION[0]="default"
ROUTE_GATEWAY[0]="192.168.244.129"
ROUTE_COUNT[0]="1"

or you can use

SAM - NETWORK CONFIGURATION -> ADD DEFAULT ROUTE,

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Michael O'brien_1
Regular Advisor

Re: default router

Thanks for the replys, I should have remembered that I need the metric even if it was on the same subnet.

Apologies on assigning the points, I clicked to quickly I ment to give both of you 10 points.

Thanks
Michael
Michael O'brien_1
Regular Advisor

Re: default router

adding metric fix problem