Operating System - HP-UX
1834882 Members
1887 Online
110071 Solutions
New Discussion

Problems in adding static route

 
Jieming Wang
Occasional Contributor

Problems in adding static route

 
7 REPLIES 7

Re: Problems in adding static route

Can you post the contents of the file /etc/rc.config.d/netconf (minus the comments)

There may be an error in you IP configuration.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Arockia Jegan
Trusted Contributor

Re: Problems in adding static route

Try ...

# route add net 10.4.144.0 netmask 255.255.255.0 10.4.143.254 1

You should include count. count is the integer that indicates whether the gateway is a remote host or the local host.
Arockia Jegan
Trusted Contributor

Re: Problems in adding static route


route add net 10.4.144.0 netmask 255.255.255.0 10.4.143.254

is missing in the syntax. Replace the count with 1 it will work.
Jieming Wang
Occasional Contributor

Re: Problems in adding static route

 
PIYUSH D. PATEL
Honored Contributor

Re: Problems in adding static route

Hi,

You should add a count...it is missing at the end of the command for local or remote.


# route add net 10.4.144.0 netmask 255.255.255.0 10.4.143.254 1

Piyush

Arockia Jegan
Trusted Contributor

Re: Problems in adding static route

Hi,

It should show INTERFACE_STATE[0]=up. Did you try command "ifconfig lan0 up"? Try that and see whether the interface is up.
Jieming Wang
Occasional Contributor

Re: Problems in adding static route

It worked after add count (1). Howevere, /etc/rc.config.d/netconf did contain the count, and they were ignored during system startup.

Before I rebuilt the kernel, I didn't need to manually add the route. So I suspect that something wrong the kernel.

Thanks for all replies.

--Jieming