Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ping to local interface v4 address works, even though it's admin/line down

30 views
Skip to first unread message

anja...@gmail.com

unread,
Sep 15, 2012, 10:15:54 PM9/15/12
to
Can somebody help me understand why ping works to a local interface, even if it's admin and line protocol down in linux.

I have a eth1 interface, i assign v4 address to it.
I make the interface down.
try ping to the v4 address, and ping is success.

Please find the logs for the bahaviour.

root@avi:/home/avinash# uname -a
Linux avi 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux
root@avi:/home/avinash#

root@avi:/home/avinash# ifconfig eth1 22.0.0.1
root@avi:/home/avinash# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:30:48:b1:ee:33
inet addr:22.0.0.1 Bcast:22.255.255.255 Mask:255.0.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:65 errors:0 dropped:0 overruns:0 frame:0
TX packets:17082 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5926 (5.9 KB) TX bytes:3841723 (3.8 MB)
Interrupt:44 Base address:0xe000

root@avi:/home/avinash# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.16.48.1 0.0.0.0 UG 100 0 0 eth0
10.16.48.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
22.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
root@avi:/home/avinash# ifconfig eth1 down
root@avi:/home/avinash# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.16.48.1 0.0.0.0 UG 100 0 0 eth0
10.16.48.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
root@avi:/home/avinash# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:30:48:b1:ee:33
inet addr:22.0.0.1 Bcast:22.255.255.255 Mask:255.0.0.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:65 errors:0 dropped:0 overruns:0 frame:0
TX packets:17082 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5926 (5.9 KB) TX bytes:3841723 (3.8 MB)
Interrupt:44 Base address:0xe000

root@avi:/home/avinash# ping 22.0.0.1
PING 22.0.0.1 (22.0.0.1) 56(84) bytes of data.
64 bytes from 22.0.0.1: icmp_req=1 ttl=64 time=0.027 ms
64 bytes from 22.0.0.1: icmp_req=2 ttl=64 time=0.019 ms
^C
--- 22.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.019/0.023/0.027/0.004 ms
root@avi:/home/avina

Tauno Voipio

unread,
Sep 16, 2012, 3:06:09 AM9/16/12
to
This has already been answered to you in another newsgroup.
Are you not happy with the answers?

The IP stack is smart enough to route packets destined to
*any* of the local addresses via the loopback interface lo.
The local ping never gets so far that it could detect that
the interface is downed.

--

Tauno Voipio


0 new messages