0

I create a virtual network interface with:

ifconfig eth0:1 192.168.0.1 netmask 255.255.255.0

but when I ping the multicast address:

ping 224.0.0.1

my virtual interface does not respond.

Why?

  • Are you pinging 224.0.0.1 from the same host that you confgured the virtual interface on? Does any host respond to the ping? Can you ping the ip address of the virtual interface from another host? – joeqwerty Jun 08 '11 at 15:18
  • yes, everything is on my machine, and the ip addresses that reply to the ping are the ones in the family where my network card gets its ip address from dhcp (172.x.x.x) – peter roytin Jun 09 '11 at 09:24
  • Please add more information. Post the output of `ip addr`. BTW: Why should a logical IP answer to a multicast ping? – Nils Jul 27 '11 at 18:46

1 Answers1

2

224.0.0.1 is disabled by default on linux 2.6+ hosts. From http://kerneltrap.org/node/16225

echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

I was able to reproduce this with my debian desktop at home:

From my macbook:

$ ping 224.0.0.1
PING 224.0.0.1 (224.0.0.1): 56 data bytes
64 bytes from 10.4.1.84: icmp_seq=0 ttl=64 time=0.227 ms
64 bytes from 10.4.1.8: icmp_seq=0 ttl=64 time=6.676 ms

On my debian box:

# echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

Then again on the macbook:

$ ping 224.0.0.1   
PING 224.0.0.1 (224.0.0.1): 56 data bytes
64 bytes from 10.4.1.84: icmp_seq=0 ttl=64 time=0.301 ms
64 bytes from 10.4.1.12: icmp_seq=0 ttl=64 time=1.467 ms # my debian box
64 bytes from 10.4.1.8: icmp_seq=0 ttl=64 time=1.924 ms
polynomial
  • 4,016
  • 14
  • 24