Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server with two IP addresses. The main IP address is 81.21.136.5. And I later added 81.21.136.8 with ifconfig eth0:1 81.21.136.8 up.

Everything works. Except, certain adresses are unreachable. I can't reach those addresses from my server, and those machines cannot reach my server at all in a similar fashion. If I remove eth0:1 with ifconfig eth0:1 down

To be honest, I'm not sure what is going wrong.

First, let me show you a "normal" (abbreviated) traceroute to a random working address:

[~]# traceroute arp242.net
traceroute to arp242.net (94.142.245.225), 30 hops max, 40 byte packets
 1  son-er-dc1.signet.nl (81.21.136.254)  0.681 ms  0.540 ms  0.820 ms
 2  ams-er8-sara.v92.signet.nl (217.21.246.50)  12.668 ms  14.177 ms  14.856 ms
 3  amsix.true.nl (195.69.144.171)  1.973 ms  2.212 ms  2.208 ms
  [...etc...]

And now a traceroute to a "broken" address:

[~]# traceroute 81.204.228.205
traceroute to 81.204.228.205 (81.204.228.205), 30 hops max, 40 byte packets
 1  vps-aragorn0.signet.nl (81.21.136.8)  3002.364 ms !H  3002.368 ms !H  3002.067 ms !H

The first step starts with 81.21.136.8. Why? And why only for (As near as I can figure out) this particular block of addresses?

This is the (full) traceroute to the same "broken" address after setting the eth0:1 state to down:

[~]# traceroute 81.204.228.205
traceroute to 81.204.228.205 (81.204.228.205), 30 hops max, 40 byte packets
 1  son-er-dc1.signet.nl (81.21.136.254)  0.610 ms  0.791 ms  0.842 ms
 2  ams-er8-sara.v92.signet.nl (217.21.246.50)  2.169 ms  3.123 ms  3.996 ms
 3  iawxsrt-rt2.bb21.wxs.nl (195.69.144.62)  4.554 ms  4.554 ms  4.508 ms
 4  nl-rt-dc2-gsi-cr01b.kpn.net (213.75.64.187)  4.351 ms nl-rt-dc2-isp-cr01a.wxs.nl (213.75.64.25)  4.425 ms nl-rt-dc2-gsi-cr01b.kpn.net (213.75.64.23)  4.207 ms
 5  nl-asd-dc2-gsi-cr01a.kpn.net (213.75.64.67)  4.499 ms  4.983 ms  4.499 ms
 6  213.75.14.140 (213.75.14.140)  4.983 ms nl-asd-dc2-gsi-br01a.kpn.net (213.75.14.1)  4.499 ms nl-asd-dc2-isp-bb21.wxs.nl (213.75.14.76)  4.983 ms
 7  iawxsrt-dc2-acc04.wxs.nl (213.75.1.70)  4.983 ms 213.75.1.14 (213.75.1.14)  4.951 ms 213.75.1.62 (213.75.1.62)  4.685 ms

Any advice would be much appreciated!


Some info about the system configuration:

[~]% uname -a
Linux vps-aragorn0 2.6.18-238.9.1.el5 #1 SMP Tue Apr 12 18:10:13 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux


[/etc]% cat /etc/issue 
CentOS release 5.6 (Final)
Kernel \r on an \m


[~]# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
81.21.136.0     *               255.255.255.0   U         0 0          0 eth0
169.254.0.0     *               255.255.0.0     U         0 0          0 eth0
81.0.0.0        *               255.0.0.0       U         0 0          0 eth0
default         son-er-dc1.sign 0.0.0.0         UG        0 0          0 eth0



[~]# service iptables status
Table: filter
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
2    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
3    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 8
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
5    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80
6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443
7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:2844
8    ACCEPT     tcp  --  80.246.203.133       0.0.0.0/0           tcp dpt:3306
9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:21

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain RH-Firewall-1-INPUT (0 references)
num  target     prot opt source               destination


[~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 52:54:00:23:6C:9F
          inet addr:81.21.136.5  Bcast:81.21.136.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:63276899 errors:0 dropped:1113 overruns:0 frame:0
          TX packets:28898565 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6736496489 (6.2 GiB)  TX bytes:30255467302 (28.1 GiB)
          Interrupt:10 Base address:0xa000

eth0:1    Link encap:Ethernet  HWaddr 52:54:00:23:6C:9F
          inet addr:81.21.136.8  Bcast:81.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:10 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4656156 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4656156 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7034068633 (6.5 GiB)  TX bytes:7034068633 (6.5 GiB)
share|improve this question
    
Who downvoted this question by the way? And why? If you feel I did something wrong, please elaborate :) –  Carpetsmoker Aug 16 '11 at 14:17

1 Answer 1

up vote 4 down vote accepted

You have this in your routing table:

81.0.0.0        *               255.0.0.0       U         0 0          0 eth0

Specify a correct netmask for the IP address on eth0:0, otherwise it seems to be using a /8 netmask, hence every connection to an IP address that starts with 81 will be considered within the same broadcast domain and request will not be sent to the default gateway but rather attempted to connect as if it were in the same area with your network interface.

Changing the netmask for the IP address on eth0:0 to the correct one will solve this.

share|improve this answer
    
Thanks, that was it! Can't believe I didn't think of this myself ... –  Carpetsmoker Aug 16 '11 at 10:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.