Invisible public IP of ubuntu 16.04 lts

Discussion in 'Installation/Configuration' started by Poliman, Jul 28, 2017.

  1. Poliman

    Poliman Member

    I have configured two network interfaces in my server based on Ubuntu 16.04 LTS. Below is configuration from /etc/network/interfaces:
    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto enp1s0 enp2s0
    iface enp1s0 inet static
            address 192.168.100.206
            network 192.168.100.0
            netmask 255.255.255.0
            broadcast 192.168.100.255
            #gateway 192.168.100.2
            #dns-nameservers 192.168.100.2
    
    iface enp2s0 inet static
            address X.X.X.181
            network X.X.X.176
            netmask 255.255.255.248
            gateway X.X.X.177
            dns-nameservers Y.Y.Y.Y Z.Z.Z.Z
    
    Below is routing table:
    Code:
    sadmin@scolo006:~$ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         X.X.X.177  0.0.0.0         UG    0      0        0 enp2s0
    X.X.X.176  0.0.0.0         255.255.255.248 U     0      0        0 enp2s0
    192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 enp1s0
    Code:
    sadmin@scolo006:~$ ip route
    default via X.X.X.177 dev enp2s0 onlink
    X.X.X.176/29 dev enp2s0  proto kernel  scope link  src X.X.X.181
    192.168.100.0/24 dev enp1s0  proto kernel  scope link  src 192.168.100.206
    
    I can ping public interface (ping command executed from this server, it's his public interface):
    Code:
    sadmin@scolo006:~$ ping X.X.X.181
    PING X.X.X.181 (X.X.X.181) 56(84) bytes of data.
    64 bytes from X.X.X.181: icmp_seq=1 ttl=64 time=0.027 ms
    ^C
    --- X.X.X.181 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 0.027/0.027/0.027/0.000 ms
    But I can't ping gateway, google.com, 8.8.8.8, one word - anything:
    Code:
    sadmin@scolo006:~$ ping google.com
    ping: unknown host google.com
    sadmin@scolo006:~$ ping X.X.X.177
    PING X.X.X.177 (X.X.X.177) 56(84) bytes of data.
    From X.X.X.181 icmp_seq=1 Destination Host Unreachable
    From X.X.X.181 icmp_seq=2 Destination Host Unreachable
    From X.X.X.181 icmp_seq=3 Destination Host Unreachable
    ^C
    --- X.X.X.177 ping statistics ---
    4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3016ms
    pipe 3
    sadmin@scolo006:~$ ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    From X.X.X.181 icmp_seq=1 Destination Host Unreachable
    From X.X.X.181 icmp_seq=2 Destination Host Unreachable
    From X.X.X.181 icmp_seq=3 Destination Host Unreachable
    ^C
    --- 8.8.8.8 ping statistics ---
    4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3013ms
    pipe 3
    
    I have one more Linux server based on Ubuntu 14.04. There "ip route" gives a little another output - there isn't "onlink":
    Code:
    default via X.X.X.177 dev em4
    Other things like routing table looks identical. No idea what is wrong...
     

Share This Page