Header Shadow Image

connect: Network is unreachable

Getting this?

[root@mdskvm-p01 yum.repos.d]# ping
connect: Network is unreachable
[root@mdskvm-p01 yum.repos.d]# ip route add default via

Solve it by donig this:

[root@mdskvm-p01 yum.repos.d]# ip route show
default via dev enp2s0f0 dev enp2s0f0  proto kernel  scope link  src
[root@mdskvm-p01 yum.repos.d]#
[root@mdskvm-p01 yum.repos.d]#
[root@mdskvm-p01 yum.repos.d]# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=55 time=15.9 ms
— ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 15.902/15.902/15.902/0.000 ms
[root@mdskvm-p01 yum.repos.d]#

Another solution to this issue is very basic.  Suppose you ran the following command to add an IP:

ip addr add dev eno1

What it actually does is this:

2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 2c:44:fd:96:82:74 brd ff:ff:ff:ff:ff:ff
    inet scope global eno1

Notice the /32.  That means only that specific IP is accessible, the rest isn't.  What you need to do is add the IPv4 CIDR notation as follows:

ip addr add dev eno1


Leave a Reply

You must be logged in to post a comment.

  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License