1834454 Members
3037 Online
110067 Solutions
New Discussion

Re: Default Gateway.

 
SOLVED
Go to solution
Jeffrey F. Goldsmith
Super Advisor

Default Gateway.

Last week I was using the Custom Patch Manager to find out how out of wack my systems are. I went through all the steps except the last one where I am to run get_patches. My server isn't connected to the Internet at this time so I couldn't download the 99 patches that my system needed. I have been using my PC to FTP the files between servers.
I decided to see if I could get to the Internet with my server but had no luck up to this point.
The question is where do I set the default gateway so I can get through my firewall and download the patches directly to my server?
Thanks for any help you can give.
8 REPLIES 8
Uday_S_Ankolekar
Honored Contributor

Re: Default Gateway.

Hi,

Are you able to surf Internet at all..?? Then Talk to your Firewall administrator to give access to HP's for (http,ftp both)

On your PC side you need to set proxy server setting in Internet option and then connection method.Or if firewall needs any kind of authentication then you need to set this up at firewall server.

Adding default network on pc
route add Mask metric #
try route add/? for more help

-USA..
Good Luck..
Patrick Wallek
Honored Contributor

Re: Default Gateway.

To set up a default gateway on your HP machine you can do:

# route add default gateway_ip 1

(for example)
# route add default 172.30.0.1 1
would set 172.30.0.1 as your default gateway. This command will take effect immediately.

To have it take effect on the next reboot you can either modify the /etc/rc.config.d/netconf file or run 'set_parms addl_netwrk' (I think that's correct. 'man set_parms' for more info.).
Ron Kinner
Honored Contributor
Solution

Re: Default Gateway.

Check your default gateway with:

netstat -rn

You should see one line with:

default A.B.C.D UG 0 lan0 1500

Check that the gateway is good by:

ping A.B.C.D

If that works then try

nslookup hp.com

You should get back:

Server: DNShostname
Address: DNSIPaddress

Name: hp.com
Addresses: 192.6.118.97, 192.6.118.128, 192.151.52.187, 192.151.52.217
192.151.53.86, 192.6.118.44


If that doesn't work then you need to look at your DNS setup.


If that works try

ping hp.com

if that fails try
tracert hp.com

That will tell you how far you can get. If you stop at the gateway then it doesn't know how to go to the internet or doesn't want you to go out. Could also be that you need to go to a proxy instead of the gateway but only your network admin can tell you that. (or you go look at someone elses machine which does work and is on the same network)

Ron






Jeffrey F. Goldsmith
Super Advisor

Re: Default Gateway.

Ron,

I tried this command
nslookup hp.com
and it didn't work. So I went to SAM to check my DNS and found that it wasn't setup. I am going to have to wait until tomarrow to get the DNS service to work. If you have any information that would help with setting up the DNS please let the information flow my way.

Thanks.
Ron Kinner
Honored Contributor

Re: Default Gateway.

I'm not real good on setting up DNS especially with SAM. It should be pretty easy. Just remember that you want all you want to do is tell it where to find the DNS server. Make sure you don't turn yourself into a DNS server.

Our HP stuff is all in the production network and doesn't go to the internet and we always remotely administer it from the command line but I know there are two files that are needed.

/etc/nsswitch.conf
and
/etc/resolv.conf

I found this example:

This is done by creating the /etc/nsswitch.conf file. The file we use is:
hosts: dns [TRYAGAIN=continue NOTFOUND=continue] files
services: files
protocols: files
networks: files
rpc: files
netgroup: files


By default network processes would also be looking to see if nis is configured. Our config drops nis out of the polling process.

CHANGE FOR /etc/resolv.conf
You must add a search sequence so that system name matches with and without the subnet name will be found. It states that too many entries on the search path may cause long delays. By just having the local domain and the "WAN" domain as entries we emulate how names were resolved under 9.x.


domain aaa.bbb.ccc
search aaa.bbb.ccc bbb.ccc
nameserver 123.123.123.123

domain is something like itrc.hp.com

search would be: itrc.hp.com hp.com

nameserver is the ip address of the DNS server you should be using. This is often but not always your gateway. Ask your network guy or if you have a WinNT box on this same network do ipconfig /all and see what it says.

Ron


Jeffrey F. Goldsmith
Super Advisor

Re: Default Gateway.

Ron,

Here are the contents of those two files:

more /etc/nsswitch.conf
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
#hosts: files [NOTFOUND=continue TRYAGAIN=continue] dns

hosts: files
services: files
protocols: files
networks: files
rpc: files
netgroup: files
automount: files

aliases: files
passwd: files
group: files
publickey: files


more /etc/resolv.conf
domain co.fairbanks.ak.us
#domain mail.co.fairbanks.ak.us
nameserver 172.16.0.41
nameserver 209.165.150.166

Does there seem to be any problem with their settings?
Ajay Sishodia
Frequent Advisor

Re: Default Gateway.

hosts: files [NOTFOUND=continue] dns

change the hosts line in /etc/nsswitch.conf to look like the one above. Add the default gateway.

# route add default a.b.c.d 1
now try nslookup and ping if these work than you are all set.

Ajay
Jeffrey F. Goldsmith
Super Advisor

Re: Default Gateway.

I want to thank everyone for all the help. Using the information that I have received I have been able to connect to hp to retrive the patches my server needs.

Thanks again for the help.