LAN Routing
cancel
Showing results for 
Search instead for 
Did you mean: 

Normal ping works but using scapy to transmit it don't

SOLVED
Go to solution
HP2920-key
Occasional Advisor

Normal ping works but using scapy to transmit it don't

 

Please Help,

I have a local network with 4 EndSystems and two Switches Hp, i updated the arp cahe of the the Endsystems.

the normal ping executed on ther terminal works but when i tried to transmit a icmp with the mac-address dest using scapy, it does'nt work. (Address mac destination not found ). Even if i have the MacAdd of the destination with the Ip address in the arp cache of my endsystems ans my switch.

Do i need to add some routing specifications on my switch?

5 REPLIES
parnassus
Honored Contributor

Re: Normal ping works but using scapy to transmit it don't

Hi!

IMHO you should always explain your testing scenario or refer to it if previously yet discussed in detail in another thread you started (which should be probably this one that belongs to ProCurve / ProVision-Based Sub-Category, right? if not...do start and explain it)...otherwise it will be very difficult - and time consuming - for other Community users to follow your actions, guess your purposes and finally try to help you (if possible)...

Edit: also changing the Community sub-category's Post starting position from ProCurve / ProVision-Based to LAN Routing probably doesn't help users who yet followed you too...

HP2920-key
Occasional Advisor

Re: Normal ping works but using scapy to transmit it don't

OK, thank you a lot,

Here is my configuration:

ES1  -(vlan3) tagged port 3                                                                    tagged port 19-   ES3 (vlan4)

                           port 3 & 5- Switch1 port 15  ------tagged-----  port 3 Switch2-port 17 & 19

ES2 - (vlan3 & 4)  tagged port 5                                                           tagged port 17-   ES4 (vlan 4 &3)

i have just validate the addressing of the Equipement :

For example ES1 with the IP Add 10.10.30.1 and ES2 with 10.10.30.2 in vlan 3, when ES1 ping ES2 just using Ip addresses it works also when i do it with scapy:

>>mon_ping =  IP(dst='10.10.30.2') / ICMP()

>>mon_ping.show()
>>rep=sr1(mon_ping)

it works, but when i specify the mac address in scapy:

>>mon_ping = Ether(dst="00:00:00:00:00:02") / IP(dst='10.10.30.2') / ICMP()

>>mon_ping.show()
>>rep=sr1(mon_ping)

it does'nt work:

WARNING: Mac address to reach destination not found. Using broadcast.
Finished to send 1 packets.

i want to no where is the problem with this, is it about the arp or routing ....?

Arp cache in ES1:

Address HWtype HWaddress Flags Mask Iface
10.10.30.2 ether 00:00:00:00:00:02 CM eth0.3

IP ARP table in Switch1

IP Address MAC Address Type Port
--------------- ----------------- ------- ----
10.10.30.1 000000-000001 dynamic 3  ---->ES1
10.10.30.2 000000-000002 dynamic 5  -->ES2

 

 

 

HP2920-key
Occasional Advisor

Re: Normal ping works but using scapy to transmit it don't

Sorry i did not understand you at the firt time, here is the firt post:

http://community.hpe.com/t5/ProCurve-ProVision-Based/configuration-of-VLANs/m-p/6875692#M10218

sorry for the mess.

 

parnassus
Honored Contributor

Re: Normal ping works but using scapy to transmit it don't

No worries mate (and good luck!).

HP2920-key
Occasional Advisor
Solution

Re: Normal ping works but using scapy to transmit it don't

If someone had a problem like mine, here is the solution.

you must verify the interface which scapy, send throught it the frames:

sudo scapy

>>conf.iface ====>  'eth0' to change it with conf.iface='eth1'

then we can send an Ethernet frame using sendp() and specifying the interface like this:

>>trame=Ether(dst="00:00:00:00:00:03",src="00:00:00:00:00:04")/IP(dst='10.10.10.3')

>>sendp(trame, iface='eth1')

Best Regards Mates,