joanpe
asked on
no route for internet access
i have redhat 9.0 installed into my machine with an public IP address as follow:
IP: 202.157.213.134, gateway given by ISP as: 202.157.204.77
subnet: 255.255.255.248
using XP or NT workstation, I have no problem to access into internet, however my linux machine always prompted me that host not reachable or no route. when I tried to add "deafult route", it shown "SIOCADDRT" error, anyone can help !!!!!!!!
IP: 202.157.213.134, gateway given by ISP as: 202.157.204.77
subnet: 255.255.255.248
using XP or NT workstation, I have no problem to access into internet, however my linux machine always prompted me that host not reachable or no route. when I tried to add "deafult route", it shown "SIOCADDRT" error, anyone can help !!!!!!!!
What does the output of route show?
202.157.213.134 will that subnet mask (255.255.255.248) will be unable to see a 202.157.204.xx address, you will probably need a 255.255.0.0 netmask
ASKER
the subnet mask was given by the ISP, and it works when I used XP worstation or NT. however only doesn't work in Linux.
using route -n command, screen shown as below:
202.157.213.128 0.0.0.0 255.255.255.248 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0. U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
please help !
using route -n command, screen shown as below:
202.157.213.128 0.0.0.0 255.255.255.248 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0. U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
please help !
what about
route add default gw 202.157.204.77 netmask 255.255.0.0 ?
But I don't undrstand how that IP can see the DG on the XP box with a /29 mask
route add default gw 202.157.204.77 netmask 255.255.0.0 ?
But I don't undrstand how that IP can see the DG on the XP box with a /29 mask
ASKER
the route add default gw 202.157.204.77 netmask is 255.255.255.248.
But with an IP address 202.157.213.134 and mask 248, the only devices you can see are 202.157.213.129 - .136 so I don't see how you can get to 202.157.204.77 from there
ASKER
But why the XP workstation can ping the gateway. When using the linux to ping gateway, it prompted the message "SIOCADDRT: Network is unreachable". I check my cable and everything look fine. I cant find out what are the actual problem. I just want my server can straight always access to internet.
Hope can help me.Thank you very much.
Hope can help me.Thank you very much.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That why i feel confuse with it. The gateway is given by the ISP. They are tested. Is it my server missing something?
ASKER
Dear liddler, Im now rush to go back home. Can i talk to u tomorrow morning. Now in malaysia is midnight.
Am home myself now :-)
please post
ipconfig /all
from Windows XP machine
please post
ipconfig /all
from Windows XP machine
ASKER
ok, i will send to u. But now i cant do anything. If i plug out the cable and connect to my laptop, the whole company email cannot send and receive. i will get problem management will scolding me as well. I will do it at night. Sorry for my inconvience. But i promise i will send to u.
Thank you for helping me.
Thank you for helping me.
;-) No problem
ASKER
liddler, i try already from my XP workstation the result is:
Window XP Configuration
Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix:
IP address: 202.157.213.134
Subnet mask: 255.255.255.248
Default gateway: 202.157.204.77
This is the result...weird??
Window XP Configuration
Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix:
IP address: 202.157.213.134
Subnet mask: 255.255.255.248
Default gateway: 202.157.204.77
This is the result...weird??
hmm, am confused.
Please can you do a trace from XP box to an external site
i.e. on XP box
tracert https://www.experts-exchange.com
Please can you do a trace from XP box to an external site
i.e. on XP box
tracert https://www.experts-exchange.com
ASKER
How to do it? I dont understand your answer.
hmmmm.......what should i do now? I really no idea already..This problem i cant solve it almost one month..get headache...
hmmmm.......what should i do now? I really no idea already..This problem i cant solve it almost one month..get headache...
ASKER
tomorrow i will give u the answer.
Open a cmd window on the XP machine and type:
tracert https://www.experts-exchange.com
You will get an output something like:
1 10ms 202.157.213.134
2 *
3
4
.
.
. * 64.156.132.140
tracert https://www.experts-exchange.com
You will get an output something like:
1 10ms 202.157.213.134
2 *
3
4
.
.
. * 64.156.132.140
ASKER
C:\>tracert https://www.experts-exchange.com
Tracing route to experts-exchange.com [64.156.132.140]
over a maximum of 30 hops:
1 14 ms 15 ms 15 ms 202.157.204.77
2 15 ms 14 ms 14 ms 202.157.193.28
3 134 ms 211 ms 212 ms fe0-1.icr2.c-matrix.atlaso
4 15 ms 15 ms 17 ms fe0-0.icr1.c-matrix.atlaso
5 52 ms 52 ms 52 ms 218.189.12.13
6 54 ms 55 ms 57 ms 218.189.8.161
7 55 ms 57 ms 56 ms 210.0.247.3
8 66 ms 57 ms 58 ms sl-gw10-hk-9-4.sprintlink.
9 64 ms 58 ms 57 ms sl-bb21-hk-15-3.sprintlink
10 233 ms 231 ms 231 ms sl-bb22-tac-5-0.sprintlink
11 230 ms 232 ms 233 ms sl-bb22-tac-9-0.sprintlink
12 232 ms 232 ms 235 ms sl-bb20-sea-0-0.sprintlink
13 242 ms 240 ms 242 ms so-3-0-0.gar1.seattle1.lev
14 242 ms 242 ms 241 ms so-7-0-0.mp1.seattle1.leve
15 248 ms 249 ms 251 ms so-0-0-0.bbr2.losangeles1.
16 251 ms 250 ms 248 ms ge-9-0.hsa1.losangeles1.le
17 255 ms 254 ms 253 ms experts-exch.hsa1.level3.n
18 260 ms 255 ms 253 ms www-level3.experts-exchang
Trace complete.
C:\>
This is the tracert result from my XP workstation using the stated IP address and subnet mask.
Still confused
please give me output of:
route print
..as I stll think there is something clever going on in the XP box???
You might want to post a 20 pt Q in one or more of the networking / windows networking / windows xp areas so that some of our windows experts can help explain why the XP box appears (to me) to be routing strangly
please give me output of:
route print
..as I stll think there is something clever going on in the XP box???
You might want to post a 20 pt Q in one or more of the networking / windows networking / windows xp areas so that some of our windows experts can help explain why the XP box appears (to me) to be routing strangly
Can you try
route add -net 0.0.0.0/0 dev eth0
?
route add -net 0.0.0.0/0 dev eth0
?
ASKER
ok, liddler. I will post to windows xp areas and networking areas.Have anything that i can do for it?
Has anyone noticed that the output of "route" in the 4th post from the top has a route for 202.157.213.128, whereas the assigned IP is 202.157.213.134, and the gateway is 202.157.204.77?
Also, it doesn't matter that the gateway is not in the IP/netmask range. A route to the gateway itself should exist first (see below).
joanpe, what interfaces does this machine have? Which one connects to the internet, and how? What type of internet connection is it?
Under "normal" circumstances, you should not have to manually add or change routes.
As you set up the interface itself (assuming eth0 is the interface that connects to the internet, change as appropriate!):
ifconfig eth0 202.157.213.134 netmask 255.255.255.248
or possibly like this:
ifconfig eth0 202.157.213.134 netmask 255.255.255.248 pointopoint 202.157.204.77
the routing table should be adjusted accordingly (although you may still have to specify the default route).
If you do have to or want to manually set up routes, you'd first specify a route to the gateway, and then a default route which points to the gateway:
route add -host 202.157.204.77 netmask 255.255.255.255 dev eth0 # Yes, the netmask is 255.255.255.255
route add default gw 202.157.204.77
Now, the kernel knows how to reach the gateway, and to send packets to the gateway by default, unless another route exists (which would be needed if there's another interface connected to a LAN for example).
But again, you may not have to fiddle with any of this manually. If you connect using pppd for example, or your ISP uses DHCP, these things can all be set automatically.
Please post back if you need more help, and if so, please provide more detailed information on the type of internet connection you have and any instructions or configuration information from your ISP (even if it is for Windows) which may be of help (do they have a web site with usefule information?), and information about other interfaces, LANs, etc. connected to this system.
Good luck.
Anton
Also, it doesn't matter that the gateway is not in the IP/netmask range. A route to the gateway itself should exist first (see below).
joanpe, what interfaces does this machine have? Which one connects to the internet, and how? What type of internet connection is it?
Under "normal" circumstances, you should not have to manually add or change routes.
As you set up the interface itself (assuming eth0 is the interface that connects to the internet, change as appropriate!):
ifconfig eth0 202.157.213.134 netmask 255.255.255.248
or possibly like this:
ifconfig eth0 202.157.213.134 netmask 255.255.255.248 pointopoint 202.157.204.77
the routing table should be adjusted accordingly (although you may still have to specify the default route).
If you do have to or want to manually set up routes, you'd first specify a route to the gateway, and then a default route which points to the gateway:
route add -host 202.157.204.77 netmask 255.255.255.255 dev eth0 # Yes, the netmask is 255.255.255.255
route add default gw 202.157.204.77
Now, the kernel knows how to reach the gateway, and to send packets to the gateway by default, unless another route exists (which would be needed if there's another interface connected to a LAN for example).
But again, you may not have to fiddle with any of this manually. If you connect using pppd for example, or your ISP uses DHCP, these things can all be set automatically.
Please post back if you need more help, and if so, please provide more detailed information on the type of internet connection you have and any instructions or configuration information from your ISP (even if it is for Windows) which may be of help (do they have a web site with usefule information?), and information about other interfaces, LANs, etc. connected to this system.
Good luck.
Anton