Re: How to address 'ping -I <interface>' failure

Leroy Tennison <[email protected]>
Newsgroups org.kernel.vger.lartc
Message-ID <[email protected]>
Thank you for responding, I appreciate it.  That is most interesting and would explain what I'm seeing, is this "little specific thing" documented somewhere?  How did you find this out?

----- Original Message -----
From: "Anton Danilov" <[email protected]>
To: "Leroy Tennison" <[email protected]>
Cc: "lartc" <[email protected]>
Sent: Wednesday, February 14, 2018 1:58:20 AM
Subject: Re: How to address 'ping -I <interface>' failure

Hello. 
There is a little specific thing with "-I <iface>" usage in the ping tool. 
When you specify an interface name in the -I option, the ping tool work as if the destinated host is in directly-connected segment. 
If you run the tcpdump, you will see the arp requests to resolve the destinated ip address. 
So, use the -I option with interface names only to ping directly attached host or if you have proxy-arp enabled gateway. 


On 22 January 2018 at 19:55, Leroy Tennison < [ mailto:[email protected] | [email protected] ] > wrote: 


Background: 
2 wan interfaces - call them 12.14.16.18 on eth0 (not the issue) and 98.100.102.105 on eth1 (both /29), 
'ping -I 98.100.102.105 [ http://google.com/ | google.com ] ' works but 'ping -I eth1 [ http://google.com/ | google.com ] ' returns 'From 98.100.102.105 icmp_seq=1 Destination Host Unreachable' 

'cat /etc/iproute2/rt_tables' shows (leaving out commented lines) 

255 local 
254 main 
253 default 
0 unspec 
1 fbr 
3 dsl 

ip rule shows (leaving out default and ipsec) 

10000: from all fwmark 0x1/0xff lookup fbr 
10002: from all fwmark 0x3/0xff lookup dsl 
20000: from 12.14.16.18 lookup fbr 
20000: from 98.100.102.105 lookup dsl 

ip route show table dsl has (leaving out OpenVPN and other local non-Internet interfaces) 

default via 98.100.102.108 dev eth1 src 98.100.102.105 
[ http://98.100.102.104/29 | 98.100.102.104/29 ] dev eth1 proto kernel scope link src 98.100.102.105 
98.100.102.108 dev eth1 scope link src 98.100.102.105 

I'm just beginning to learn about multiple routing tables so I tried the following suspecting it wouldn't work (and it didn't): 'ip rule add from eth1 table dsl' and got 'Error: ??? prefix is expected rather than "eth1" ' 

What do I need to do to get 'ping -I eth1 [ http://google.com/ | google.com ] ' to work? Thanks for your help. 


-- 
To unsubscribe from this list: send the line "unsubscribe lartc" in 
the body of a message to [ mailto:[email protected] | [email protected] ] 
More majordomo info at [ http://vger.kernel.org/majordomo-info.html | http://vger.kernel.org/majordomo-info.html ] 






-- 
Anton.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.