Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

routing problem found but can't fix

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I've been trying to connect to the internet via a server.
But I found out why I was unable to:
basically when i typed netstat -nr the following was produced:
Dest=192.168.0.0 Gateway=192.168.0.178

The correct settings should my
Dest=192.169.0.178 Gateway=192.168.0.1
I've tried route-f but it does not clear it.
My ip address(192.168.0.178) needs to connect to the gateway(192.168.0.1)
What are the procedures
thanx
 
modify /etc/defaultrouter to put 192.168.0.1
then do : route add default 192.168.0.1
 
Noop it don't work.
Even though it adds it into the routing table netstat still places 192.168.0.0 as the primrary. It seems that the hme0 interface it attached to the 192.168.0.0, and not the one I want.
However I did notic when I did a reboot that during booting it seems to automatacially add 192.168.0.178(which if the machines ip address not the routers) as the gateway.
Also I changed the hostname in hosts of the machine to sun.
However during reboot it uses the old hostname Sol which was used during install.
Where are those booting scripts.
I searched most of /etc. But can't find them.
That seems to be the problem, startup scripts.
 
for your hostname, look at the file :
/etc/hostname.interface where interface = interfact_name (le0 or hme0 or ...).
Do you have a process called in.routed running . If yes then your machine is considered a router and will try to do the routing.
 
I have checked all the hostname, host files and have mad sure that routing is disabled on the machine.
I can't seem to find the hostname Sol in any of the files in etc. Sol is the name that solaris automatically gives to the system(Sol name was used during installation).
 
I've narrowed down the problem. Heres a output of netstat
Destination Gateway Flags Ref Use Interface
192.169.0.0 192.168.0.178 u 1 0 hme0
default 192.168.0.1 UG 1 0
localhost localhost UH 12 172 lo0

I need to get the 'default' item to use hme0 . I need to get rid of the 192.168.0.0 line. Tried route flush but that only gets rid of default.
 
to remove the old route do :
route delete destination gateway
in you case do

route delete 192.169.0.0 192.168.0.178

then ifconfig hme0 down
ifconfig hme0 up

check the routes. netstat -nr

PS : it is normal to see your machine beeing the gateway for itself on the same subnet.
The default gateway is used to access other subnets.
 
Hi again,

After reading carefully the original message, It seems that you would llike to see a route that the destination is the workstation and the gateway the same subnet.0
You do not need a routing table on the workstation that points to itself. it does not make sense unless the workstation is a router itself.

Could you please explain again what you are trying to achieve.
Also give output from ifconfig -a.
 
thanx for replying
To make the objective sound simple the is what i am trying to achieve.
My win2000 has winproxy installed, to allow my other machines to connect to the internet. Winproxy gives my a ip address(192.158.0.1) to add to the DNS and gateway on the client machines.
Well i'v done this in my linux machine. So it does work, but not on the sun machine.
I have done touch /etc/notrouter. And added 192.158.0.1 to /etc/defaultrouter and resolv.conf. I also did route add -interface 192.168.0.178 192.168.0.1. But I got an error saying could not find network.
When I do nslookup I get an erro saying 'can't find server name for 192.168.0.1....'
However if i enter 192... into the proxy setting of netscape i can browse the internet. But I need the entire system to be proxyed to the win2000 box.

Thats the basic problem.
 
PROBLEM SOLVED

It was stupid windoze and winproxy. I installed openbsd, and after a few script configs everything was sorted.
Don't blame the unix's. It was seems the problem lies with windoze.

Thank god unix is here to save the world.

Thanx to everyone who tried.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top