Operating System - HP-UX
1751716 Members
5690 Online
108781 Solutions
New Discussion юеВ

Re: Static route query to add into routing table

 
Becke
Super Advisor

Static route query to add into routing table


Hi Guys

I'm trying to add static route so my unix box can talk to the tsm server as the route for subnet 128 is missing, below is an extract from netstat -rn and arp cache

172.31.144.128 172.31.144.152 UHSb 0 0 en1 - - =>
172.31.144.128/26 172.31.144.152 U 0 5 en1 - -
172.31.144.152 127.0.0.1 UGHS 0 8 lo0 - -
172.31.144.191 172.31.144.152 UHSb 0 4 en1 - -

arp -an
and grep 172 ?
(172.31.144.129) at (incomplete)
ping 172.31.144.191
then arp -an |egrep 172
PING 172.31.144.191 (172.31.144.191): 56 data
#arp -an|grep 172
? (172.31.144.129) at (incomplete)

I have then added the above static route whic shows as incomplete in arp table by using following command

# route add 172.31.128.3/24 172.31.144.129

The routing table now shows

172.31.128/24 172.31.144.129 UG

so the route is added successfuly but I still can't get to it, any suggestions if I'm not adding it properly with route add command...

destination server address is 172.31.128.3
2 REPLIES 2
Becke
Super Advisor

Re: Static route query to add into routing table


Please be aware that the default route is set correctly and the firewall rules are in place so it's not a firewall which is blocking this
AnthonySN
Respected Contributor

Re: Static route query to add into routing table

it should be of the form

route add net 172.31.128.0 netmask 255.255.255.0 dest ip 1

note the 1 at the end

to make it permanent you need to add it to the /etc/rc.config.d/netconf file