HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

no internet

 
Piotr Kirklewski
Super Advisor

no internet

Hi there
My network looks like this

INTERNET
|
|
Gateway(10.20.0.1)
|
|
LINUX-MACHINE(Centos 5.5 64bit)

I issued following commands:

ifconfg eth0 10.20.0.2 netmask 255.255.0.0
route add default gw 10.20.0.1 netmask 255.255.0.0

I can ping the gateway (10.20.0.1) but not the outside world (4.2.2.2).

'Network is unreachable'

Why would that be ?

Regards

Peter
Jesus is the King
7 REPLIES
Steven Schweda
Honored Contributor

Re: no internet

> My network looks like this

> I issued following commands:

Your opinions are interesting, but what does
the machine have to say? As usual, showing
actual commands with their actual output can
be more helpful than vague descriptions or
interpretations.

ifconfig eth0
netstat -rn
Matti_Kurkela
Honored Contributor

Re: no internet

Since you can ping the gateway and your default gateway configuration command looks correct, the most likely cause is a problem at some point between the Internet side of your gateway and your Internet destination (4.2.2.2). Without knowing anything about your gateway and your Internet connection, it's hard to say anything more.

You probably already know that 10.*.*.* IP addresses are not globally unique and therefore a system using one of those addresses cannot access Internet without some kind of NAT in between, right?

MK
MK
Alzhy
Honored Contributor

Re: no internet

If you have other devices on your network taht is pointed to your gateway, acn those devices ping/access nodes on the Internet?

What kind of Gateway do you have? Is it a normal/ typical consumer Gateway/Router?


INTERNET
|
| (WAN-IP from ISP)
GATEWAY (Router)
| (Gateway IP)
|
| Your Local LAN


Hakuna Matata.
Piotr Kirklewski
Super Advisor

Re: no internet

[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:EC:6D:DD
inet addr:10.20.0.2 Bcast:10.20.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4457 errors:0 dropped:0 overruns:0 frame:0
TX packets:1783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2880399 (2.7 MiB) TX bytes:216505 (211.4 KiB)

[root@localhost ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.20.0.1 255.255.0.0 UG 0 0 0 eth0
10.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0

[root@localhost ~]# ping 10.20.0.1
PING 10.20.0.1 (10.20.0.1) 56(84) bytes of data.
64 bytes from 10.20.0.1: icmp_seq=1 ttl=64 time=4.65 ms
64 bytes from 10.20.0.1: icmp_seq=2 ttl=64 time=0.925 ms
--- 10.20.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.925/2.790/4.656/1.866 ms


[root@localhost ~]# ping 4.2.2.2
connect: Network is unreachable




Jesus is the King
Piotr Kirklewski
Super Advisor

Re: no internet

It's a home network.
I use Linksys WRT54GL for gateway - there is no problem with the connection if I get the settings from DHCP or even set them manually.
But I was trying to set the IP and gateway fast form command line while doing certain installation and it did not work which made me curious on why ?
Jesus is the King
Alzhy
Honored Contributor

Re: no internet


If you do it via DHCP.. what values are you getting for IP and route?

Hakuna Matata.
Piotr Kirklewski
Super Advisor

Re: no internet


[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:EC:6D:DD
inet addr:10.20.20.198 Bcast:10.20.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7860 errors:0 dropped:0 overruns:0 frame:0
TX packets:2836 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3288249 (3.1 MiB) TX bytes:459431 (448.6 KiB)

[root@localhost ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.20.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.20.0.1 0.0.0.0 UG 0 0 0 eth0


So what is this:

169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0

?
Jesus is the King