Cannot connect to internet
Hi! I am a newbie.
I am unable to connect to the net. My Linux system (I use Suse 8.2) has the following setup Linuxsystem --> Hub --> Router --> Modem. Win98 can access Linux system as a Samba server and the Linux system can access win98. What do I need to do to connect to the net? Thanks in advance. |
Well it seems that u have network configured correctly if u can connect to W98 machine.
What IP addresses does your linux/windows machine/router use? Settings on your linux box: Do you have your router set as default gateway? (I use this command to do it: Code:
route add default gw 192.168.2.1 What about name server, how does your /etc/resolv.conf look make sure there is line Code:
nameserver 192.168.2.1 |
Linux system = 192.168.2.222
Windows system = 192.168.2.33 I am sorry but I do not know the IP of the router The /etc/resolv.conf has: domain mylan.com |
Go to your windows 98 machine and check its network settings, it should have set gateway (= router) to something (most probably 192.168.2.1). Then u will know IP address of the router, try to ping it from your linux machine, if it works add a line "nameserver 192.168.2.x" to your resolv.conf and add gateway as well (that route command i mentioned before). Then you can try to ping some server in the internet to see if it works.
|
The windows machine has two gateway IP: 192.168.2.1 and 202.54.91.33 given by the ISP
|
Important one is 192.168.2.1, use it in resolf.conf and route command.
|
When I gave route add default gw 192.168.2.1
SIOCADDRT: File exists was displayed. I added nameserver 192.168.2.1 using vi to /etc/resolv.conf |
It seems that this rule for routing already exists. What do u get when u type just "route"
If its something like default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0 it should work, try to ping some internet server. eg "ping www.linuxquestions.org" |
When I typed route I got the following:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.2.0 * 255.255.255.0 U 0 0 0 eth0 default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0 When I typed ping www.linuxquestions.org I got: ping: unknown host www.linuxquestions.org |
Try "ping 192.168.2.1"
if it works try "ping 64.179.4.146" this is IP address of linuxquestions, then we can see if its problem with dns settings or something else. |
When I typed ping 192.168.2.1 I got
PING 192.168.2.1 (192.168.2.1) from 192.168.2.222 : 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=30 time=3.13 ms 64 bytes from 192.168.2.1: icmp_seq=2 ttl=30 time=1.63 ms 64 bytes from 192.168.2.1: icmp_seq=3 ttl=30 time=1.63 ms 64 bytes from 192.168.2.1: icmp_seq=4 ttl=30 time=1.63 ms 64 bytes from 192.168.2.1: icmp_seq=5 ttl=30 time=1.63 ms 64 bytes from 192.168.2.1: icmp_seq=6 ttl=30 time=1.63 ms 64 bytes from 192.168.2.1: icmp_seq=7 ttl=30 time=1.64 ms 64 bytes from 192.168.2.1: icmp_seq=8 ttl=30 time=1.62 ms 64 bytes from 192.168.2.1: icmp_seq=9 ttl=30 time=1.62 ms 64 bytes from 192.168.2.1: icmp_seq=10 ttl=30 time=1.62 ms 64 bytes from 192.168.2.1: icmp_seq=11 ttl=30 time=1.63 ms --- 192.168.2.1 ping statistics --- 11 packets transmitted, 11 received, 0% loss, time 10096ms rtt min/avg/max/mdev = 1.625/1.769/3.137/0.432 ms When I typed ping 64.179.4.146 I got PING 64.179.4.146 (64.179.4.146) from 192.168.2.222 : 56(84) bytes of data. 64 bytes from 64.179.4.146: icmp_seq=1 ttl=45 time=387 ms 64 bytes from 64.179.4.146: icmp_seq=2 ttl=45 time=387 ms 64 bytes from 64.179.4.146: icmp_seq=3 ttl=45 time=387 ms 64 bytes from 64.179.4.146: icmp_seq=4 ttl=45 time=387 ms 64 bytes from 64.179.4.146: icmp_seq=5 ttl=45 time=386 ms 64 bytes from 64.179.4.146: icmp_seq=6 ttl=45 time=388 ms 64 bytes from 64.179.4.146: icmp_seq=7 ttl=45 time=388 ms 64 bytes from 64.179.4.146: icmp_seq=8 ttl=45 time=388 ms 64 bytes from 64.179.4.146: icmp_seq=9 ttl=45 time=387 ms 64 bytes from 64.179.4.146: icmp_seq=10 ttl=45 time=388 ms 64 bytes from 64.179.4.146: icmp_seq=11 ttl=45 time=387 ms 64 bytes from 64.179.4.146: icmp_seq=12 ttl=45 time=431 ms --- 64.179.4.146 ping statistics --- 13 packets transmitted, 12 received, 7% loss, time 12117ms rtt min/avg/max/mdev = 386.913/391.454/431.582/12.141 ms |
Well it proves that you can connect to the internet but you have problem with DNS settings. There are a few options what can be wrong:
- can u check again if "name server 192.168.2.1" has been added correctly to /etc/resolv.conf? You can also put '#' (=make it a comment) before "domain mylan.com" in it, I dont think there is a purpose for having it there. - you can also check settings on W98 machine and see what name servers it uses / and have the same in resolv.conf - maybe your router doesnt work as DNS proxy and u have to enter name servers of your ISP. |
When I typed cat /etc/resolv.conf I got:
nameserver 192.168.2.1 domain mylan.com In the Win98 machine under DNS configuration there are two IP: 202.54.12.163 and 202.54.12.3 both given by the ISP. |
try to use those IPs given by ISP then - add both of them to resolf.conf in the same way u added 192.168.2.1.
|
After adding the two IP when I typed cat /etc/resolv.conf I got:
nameserver 202.54.12.163 nameserver 202.54.12.3 nameserver 192.168.2.1 domain mylan.com |
All times are GMT -5. The time now is 06:54 PM. |