Operating System - HP-UX
1834804 Members
2461 Online
110070 Solutions
New Discussion

Re: Unable to get to the internet from my HP-UX box

 
SOLVED
Go to solution
Alfred Asebiomo
Frequent Advisor

Unable to get to the internet from my HP-UX box

Iam trying to configure my system to have access to the internet via a home based router

Can anyone please help

Thank you
Alfred
45 REPLIES 45
David_246
Trusted Contributor

Re: Unable to get to the internet from my HP-UX box

route add net default

Regs David
@yourservice
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Or use SAM to add the default gateway to the network configuration. But the route command that David posted is much faster.

If you like this to be the default gateway during startup edit /etc/rc.config.d/netconf
Edit next part:
ROUTE_GATEWAY[0]=
ROUTE_COUNT[0]=1
ROUTE_DESTINATION[0]=default

Do also edit the /etc/resolv.conf and add your ISP's DNS-servers.
nameserver
nameserver


Regards,
Peter
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Regs,
Thanks for replying but I tried that.
I have a linksys router; the ip address is 192.168.1.1

So I did

route add default 192.168.1.1

This gives the error message:

Unable to locate the router ( something like that ) even though the cable are connected right and the light is green on the router.

Alfred
Virgil Chereches_2
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Correct command should be:
route add default 192.168.1.1 1
---------------------------------------------
From man route:
count An integer that indicates whether the gateway is a
remote host or the local host. If the route leads
to a destination through a remote gateway, count
should be a number greater than 0. If the route
leads to destination and the gateway is the local
host, count should be 0. The default for count is

Hewlett-Packard Company - 2 - HP-UX Release 11.00: October 1997

route(1M) route(1M)

zero. The result is not defined if count is
negative.

---------------------------------------------

If you don't specify count it takes a local route.
Fabio Ettore
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Hi,

just a thought: if 192.168.1.1 is reachable then

# route add default 192.168.1.1 1

with 1 at the end of command.

Best regards,
Ettore
WISH? IMPROVEMENT!
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

What is the IP-address(and its netmask) of the HP-UX box.
Is it on the same subnet and can you ping the linksys router?
(check netconf file for IP config)

Regards,

Peter
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Thank you Peter,
I will try this as soon as I get home

Alfred
G. Vrijhoeven
Honored Contributor
Solution

Re: Unable to get to the internet from my HP-UX box

HI Alfred.

If you have a link it means you have a phisical connection with the router. Now you need to setup an ipadress on the interface in the same network. The linksys has: 192.168.1.1 so if you provide the HPUX server with 192.168.1.2 and condifure the same subnetmask it hould work. Howto configure the ipadress.

Once:
ifconfig lan ( check with lanscan) 192.168.1.2

route add default 192.168.1.1

Allways:
edit /etc/rc.config.d/netconf file:


INTERFACE_NAME[0]="lan"
IP_ADDRESS[0]="192.168.1.2"
SUBNET_MASK[0]="0xffffff00"
BROADCAST_ADDRESS[0]="192.168.1.255"
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]="default"
ROUTE_GATEWAY[0]="192.168.1.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""

HTH,

Gideon
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Peter,
The IP address of the HP box is 10.1.96.66 and the netmask is 255.255.255.0

If I do: route add default 192.168.1.1
I get an error message and I can't ping the router ( 192.168.1.1 )

But if I do: router add default 10.1.96.66,
it takes it and then I can ping the router but I can't ping any site on the internet

Alfred
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Like Gideon also posted, the router and the HP-box IP-addresses need to bee in the same subnet. So make the HP-BOX's IP 192.168.0.2 with subnet 255.255.255.0 and it will work.

Wy did you conigure the HP box with a different IP or was it already configured(do you need 2 subnets at home?)

The route command that worked fine was because you added the default route to its own IP address.

Regards,

Peter
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Sorry I meant 192.168.1.2 for the HP box.

Regards,

Peter
V. Nyga
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Hi Alfred,

you should use similar IP's or you have to change your subnet-mask or route-mask in your netconf (to 0.0.0.0 ?).

Regards
Volkmar

(Better input here, haven't I told you?) ;-)
P.S.
Don't forget assigning points to the guys.
*** Say 'Thanks' with Kudos ***
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Gideon,
I will try what you suggested. I think it should fix it.

Thank you so much

Peter,
I shouldn't have used the 10.1.96.66 IP address. I will try what you suggested.

No, I don't need 2 subnet mask at home.

Thanks

Alfred
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Mr. Nyga,
Thanks for your help.
I am assigning points to the each respose.
The input is great

Alfred
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Hello guys,

I am almost pinging internet sites but not quite. When I pinged www.yahoo.com, I get
www.yahoo.akadns.net then it hangs

any clue?

Alfred
Bill Hassell
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Once you can ping your router, you need to handle DNS because yahoo and all the other Internetnames out there must be translated into IP addresses. So start with a known IP address. Here are some well-known servers: 208.69.188.187 and 209.123.109.175. Ping those and if they work, you're connected. Now you just have to specify your hosts file and DNS servers. First, edit /etc/nsswitch.conf and replace the hosts: line with this line:

hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns

and finally, you'll need to create /etc/resolv.conf with the DNS servers you want to use. Your ISP can supply you with a list of DNS addresses. Once you have the addresses, use nslookup to see if they work, soemthing like this:

nslookup hp.com 12.34.56.78

where 12.34.56.78 is the address of your DNS server. Your resolv.conf will then look something like this:

nameserver 12.34.56.78
nameserver 207.69.188.185
nameserver 207.69.188.187

n


Bill Hassell, sysadmin
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Hi Alfred,

Just back at work and saw it did still not work correct.
Did it work with Bill's advice?
Configure DNS in resolv.conf and configure nsswitch.conf?

Can you now ping a FQDN like www.yahoo.com?

Regards,
Peter
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

Hello Bill / Peter,
I did what you suggested but I can't still ping any site.
Also, in my linksys router, there only 1 DNS IP. That's the one I used.

Another question, in the host line of nsswitch.conf, do I use the word dns or the actual dns IP

Thank you guys

Alfred
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

You use the IP of the dnserver in this resolv.conf file.

Can you ping the DNS server (i hope you use the DNS server from your ISP?)

Regards,

Peter
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

No, I can't ping the DNS server
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

ps. do you have another system behind your linksys router that can access the internet correct?
If that's a windows box (like win2000) do an ipconfig /all to see the specific settings like DNS-ip's

Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

The DNS server IP I used is from the WAN page of my linksys router. It may not be aol's dns server. I have to check with them
Alfred Asebiomo
Frequent Advisor

Re: Unable to get to the internet from my HP-UX box

That's right. The DNS shown from windows is the same as the one I used..
Hoefnix
Honored Contributor

Re: Unable to get to the internet from my HP-UX box

Try to ping an IP on the internet to see if you can access it. The next example should work:
ping 62.69.162.7
PING 62.69.162.7: 56 data bytes
64 bytes from www.startpagina.nl (62.69.162.7): icmp_seq=0. time=7. ms
64 bytes from www.startpagina.nl (62.69.162.7): icmp_seq=1. time=6. ms

Then if that works you have to figure out what DNS servers you can use(DNS from your ISP will do)
If the ping did not work, try from another system beheind your linksysrouter and check it's IP configuration.


Ps. Did you reboot after you made changes in the /etc/rc.config.d/netconf ?

Regards,
Peter