Error adding static route


 
Thread Tools Search this Thread
Operating Systems Solaris Error adding static route
# 1  
Old 06-23-2010
Data Error adding static route

Hi all

i have a simple question here
I'm kind of newbie on solaris development
currently i'm trying to add static route to solaris environment
and i got error, each time i add this static route to it

btw this is my command :

Code:
root@xxxxxx # ping 1.2.3.1
1.2.3.1 is alive

echo  "1.2.3.0 255.255.255.0" >> /etc/netmasks

root@xxxxxx # route add net 1.2.3.0 1.2.3.1          
add net 1.2.3.0: gateway 1.2.3.1: Network is unreachable

root@xxxxxx # netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface

doesnt show anything about 1.2.3.0 segment

what's wrong with the command ?

Last edited by pludi; 06-23-2010 at 01:52 AM.. Reason: code tags, please...
# 2  
Old 06-23-2010
use route add -net ...
# 3  
Old 06-23-2010
Hi incredible

I have add '-' in the front of net
but the result is still the same ..

need your help
...
# 4  
Old 06-23-2010
if this is your default route, use route add default <route_IP> and also include the entry<route_IP> in the /etc/defaultrouter file
if your defaultgateway is already present and you want to add a static route, use this:-
EG
Code:
route add -net 172.16.10.0 255.255.255.0 172.16.17.224


Last edited by Scott; 07-17-2010 at 07:51 AM..
# 5  
Old 06-23-2010
Hi incredible

i allready have default gateway
i run the command you suggested
but the result is still the same

Code:
root@xxxxxxxx # route add -net 1.2.3.0 255.255.255.0 1.2.3.1
add net 1.2.3.0: gateway 255.255.255.0: Network is unreachable


Last edited by Scott; 07-17-2010 at 07:51 AM.. Reason: Code tags
# 6  
Old 06-23-2010
Probably needs the "count" field.

Code:
For example:
route add net 1.2.3.0 1.2.3.1 2

# 7  
Old 06-24-2010
Hi ..

I've tried it
and the result is still the same ..


Code:
root@xxxxxx # route add -net 1.2.3.0 255.255.255.0 1.2.3.1 4
add net 1.2.3.0: gateway 255.255.255.0: Network is unreachable
root@xxxxxx # route add -net 1.2.3.0 255.255.255.0 1.2.3.1 2
add net 1.2.3.0: gateway 255.255.255.0: Network is unreachable

please help me ...

Last edited by Scott; 07-17-2010 at 07:51 AM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Static route on router

Hi all, This may be the basic question of Routing but I am a sort of new to networking so I am asking. Do I need to put route for my router's LAN port ip to WAN (serial) port ip Or the router itself can communicate between its ports without routes. lan (172.26.40.5) ... (3 Replies)
Discussion started by: dextergenious
3 Replies

2. Red Hat

Static route not added

Hello Guys.. I am facing this weird problem of static route not added after reboot!! Following is my route-<interface> file.. # cat /etc/sysconfig/network-scripts/route-eth0 ADDRESS0=172.31.0.1 NETMASK0=255.255.255.255 GATEWAY0=192.168.208.1 ADDRESS1=172.31.15.2... (3 Replies)
Discussion started by: parth_buch
3 Replies

3. AIX

Edit Static Route

Anyone know how to edit a static route in AIX? I find myself deleting and then recreating the route with the new information. Would be nice to know how to edit the route. (3 Replies)
Discussion started by: bbbngowc
3 Replies

4. Red Hat

static route not working on startup

Hi, Using Centos, under /etc/rc5.d, I wrote a quick script to add my static route when the server gets rebooted. The script doesn't get executed. I did set the permission to 777. After I reboot the server, if I execute, it works manually. I do this all the time on Solaris and never had... (5 Replies)
Discussion started by: samnyc
5 Replies

5. Solaris

Network interface down after adding static route

Please , I have a problem I have add a statis route on Solaris 10, but after this, the network interface of Server was Offline. The system is in cluster mode (3.2) route add -net 10.10.1.128 -netmask 255.255.255.128 10.10.1.51 ------------------- lo0:... (1 Reply)
Discussion started by: Ruggero
1 Replies

6. IP Networking

When to use static route on server?

Hi guys, sorry for asking noob question. When do we really need to add a static route on the server? I encounter this situation whereby a client trigger a network packet to the destination but the destination does not know how to return the traffic back to the client (source). The issue was... (4 Replies)
Discussion started by: DrivesMeCrazy
4 Replies

7. AIX

removing static route

#netstat -nr (shows the following with more static routes) 192.168.18.202 10.129.155.1 UGH 0 29 en0 - - and i just want to remove the above one i tried #smitty rmroute destination type= net dest add = 192.168.18.202 default gateway= 10.129.155.1 net... (1 Reply)
Discussion started by: pchangba1
1 Replies

8. UNIX for Dummies Questions & Answers

Static Route

Hi, Request you to please tell me the command or the process to add the static route in redhat linux. Thanks in Advance. Regards Arun (2 Replies)
Discussion started by: Arun.Kakarla
2 Replies

9. HP-UX

Static route for hpux 11.22

I want to make static route how would I proceed? I'm using "route add DestinationIP gatewayIP hop to 1 I would like to make this permanent, so when it reboots I don't want to loose it, would I do this in netconf file? If so where? I did a search got this site, it didn't help much. ... (2 Replies)
Discussion started by: catwomen
2 Replies

10. IP Networking

static route ?

Hi, I have a machine that sits on 10.2 network. I need to ssh from this to another box that is on both 10.125 & 10.140 VLANs what should I need to do? Thanks! (3 Replies)
Discussion started by: chaandana
3 Replies
Login or Register to Ask a Question