1

Trying to bind a /28 to my Ubuntu 14.04 dedicated server. Everything looks good, but I can't ping any IP from my server except its own .82. I'm baffled.

My resolv.conf is set to Google's DNS (I even had the primary IP first, both don't work).

My /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address xxx.xxx.42.82
        netmask 255.255.255.240
        gateway xxx.xxx.42.81
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers xxx.xxx.42.82

user@ubuntu:~$ ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:25:90:3a:c2:36 brd ff:ff:ff:ff:ff:ff
    inet xxx.xxx.42.82/28 brd xxx.xxx.42.95 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::225:90ff:fe3a:c236/64 scope link
       valid_lft forever preferred_lft forever

       user@ubuntu:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:25:90:3a:c2:36  
          inet addr:xxx.xxx.42.82  Bcast:xxx.xxx.42.95  Mask:255.255.255.240
          inet6 addr: fe80::225:90ff:fe3a:c236/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1988597 errors:0 dropped:1277940 overruns:0 frame:0
          TX packets:562121 errors:198 dropped:0 overruns:0 carrier:198
          collisions:16020 txqueuelen:1000
          RX bytes:281303904 (281.3 MB)  TX bytes:121464307 (121.4 MB)
          Interrupt:16 Memory:fb5e0000-fb600000

Also ran /etc/init.d/networking restart

Tried below too, still can't ping anything except .82 primary.

# The primary network interface
auto eth0
iface eth0 inet static
        address xxx.xxx.42.82
        netmask 255.255.255.240
        gateway xxx.xxx.42.81
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8

eth0      Link encap:Ethernet  HWaddr 00:25:90:3a:c2:36  
          inet addr:xxx.xxx.42.82  Bcast:xxx.xxx.42.95  Mask:255.255.255.240
          inet6 addr: fe80::225:90ff:fe3a:c236/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14425 errors:0 dropped:12092 overruns:0 frame:0
          TX packets:911 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1118063 (1.1 MB)  TX bytes:212166 (212.1 KB)
          Interrupt:16 Memory:fb5e0000-fb600000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1210 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1210 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:66658 (66.6 KB)  TX bytes:66658 (66.6 KB)

UPDATE FOR GUNTBERT

user@ubuntu:~$ sudo ip addr add xxx.xxx.42.80/28 dev eth0
user@ubuntu:~$ ip addr show 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:25:90:3a:c2:36 brd ff:ff:ff:ff:ff:ff
    inet xxx.xxx.42.82/28 brd xxx.xxx.42.95 scope global eth0
       valid_lft forever preferred_lft forever
    inet xxx.xxx.42.80/28 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::225:90ff:fe3a:c236/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:3a:c2:37 brd ff:ff:ff:ff:ff:ff
Fabby
  • 34,259
  • Based on your outputs you have to many dropped packets. Try to change port on switch or cable. Maybe you have ip .82 on two hosts? – 2707974 Aug 13 '15 at 06:17
  • Updated post, Still can't connect. –  Aug 13 '15 at 20:49
  • 1
  • Welcome to Ask Ubuntu! ;-) I'm sorry and, please, blame it on me: I'm confused and confusing... But... What's your question??? :/ You only have one IP address... – Fabby Aug 13 '15 at 20:57
  • @Fabby what do you mean I have only one IP? I have a /28, it's mine. It's routed at the core switch. I see it. But, it's not pinging in the Ubuntu server, except primary .82. –  Aug 13 '15 at 21:01
  • @guntbert Just updated my post, tried that method too. –  Aug 13 '15 at 21:03
  • Ah! Now I understand! You're ON the server trying to ping the router! Can you see a link up in the core switch for your NIC? Can you do a sudo ethtool --change eth0 speed 10 duplex half autoneg off on the server and see if that changes anything? – Fabby Aug 13 '15 at 21:18
  • Leave a comment @Fabby with the reply. – Fabby Aug 13 '15 at 21:25
  • @fabby, I am not trying to ping the router. I am trying to ping the IPs that are ROUTED to the server. I have a /28 routed to the server (this Ubuntu server). The problem is, none of the IPs in the /28 subnet are pinging EXTERNALLY to the server except the primary .82 one. That command you told me to run just brought down the network and screwed things up. –  Aug 14 '15 at 00:08
  • Your router lan port is on ip xxx.xxx.42.81 with network mask 255.255.255.240? – 2707974 Aug 14 '15 at 06:07
  • @2707974 I just fixed the subnetting to .64/28 correctly. But, even after updating the network config and restarting network, still no ping. –  Aug 14 '15 at 11:06
  • You have my answer – 2707974 Aug 14 '15 at 11:15
  • Fixed it, it was the prefix but only the networking config file had to be individually set IPs like auth etho:0, auto eth0:1, etc. –  Aug 14 '15 at 11:21

1 Answers1

1

xxx.xxx.xxx.64 / 28 mean host from xxx.xxx.xxx.65 - xxx.xxx.xxx.79. One address from this range must be on lan port of router.

Example

Router config for lan port

ip: xxx.xxx.xxx.65
nm: 255.255.255.240

Host config

ip: xxx.xxx.xxx.66
nm: 255.255.255.240
gw: xxx.xxx.xxx.65
2707974
  • 10,553
  • 6
  • 33
  • 45