I use a USB-Ethernet Adapter which gets recognized as eth1 in the target.
I then set an IP for eth1 using the command 
ifconfig eth1 YY.YY.YY.YY
When I use
ping -I eth1 XX.XX.XX.XX
OUTPUT :
mx6q:~# ping -I eth1 192.168.2.35
PING 192.168.2.35 (192.168.2.35): 56 data bytes
^C
--- 192.168.2.35 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss
it's not working, whereas when I use
ping -I YY.YY.YY.YY XX.XX.XX.XX
OUTPUT :
mx6q:~# ping -I 192.168.2.99 192.168.2.35
PING 192.168.2.35 (192.168.2.35) from 192.168.2.99: 56 data bytes
64 bytes from 192.168.2.35: seq=0 ttl=64 time=0.765 ms
64 bytes from 192.168.2.35: seq=1 ttl=64 time=0.437 ms
^C
--- 192.168.2.35 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
it is working.
What should I do to ping through interface name?
IFCONFIG
eth1      Link encap:Ethernet  HWaddr 00:07:40:53:dd:1b  
          inet addr:192.168.2.99  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::207:40ff:fe53:dd1b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
      RX bytes:4754 (4.6 KiB)  TX bytes:1376 (1.3 KiB)