danilogio / ostinato

Automatically exported from code.google.com/p/ostinato
GNU General Public License v3.0
0 stars 0 forks source link

Send 1 packet but receive 2 #118

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Configure ethertype 0800. Source mac=00000000001 and destination 
mac=02060b123402
2.Send packets and capture packets on PC with mac address 02060b123402.
3.The remote PC receives two packets. One is from 00000000001 and the other is 
from the sender's original NIC's mac address.

What is the expected output? What do you see instead?
The remote PC should receive only one packet which is from mac 00000000001.

What version and revision of the product are you using (available in the
About dialog)? On what operating system?
Ostinato Win32, 0.5.1 on Win 7

I tried to turn on or turn off the Windows firewall and repeat the test and got 
the same result.

Original issue reported on code.google.com by fengming...@gmail.com on 22 Jan 2014 at 3:49

GoogleCodeExporter commented 9 years ago
This is strange. Some questions -
* Are the 2 PCs directly connected back to back?
* What's the NIC on the transmit PC?
* Did you try "exclusive mode" for the port?

Original comment by pstav...@gmail.com on 25 Jan 2014 at 5:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, the 2 PCs are connected directly.
I've tried Realtek 8139 and Intel 82579V and both have the same issue.
And it seems that exclusive mode is not workable on Win7. When I enabled 
exclusive mode and tried to send the packets, there was not a packet sent.

Steps to reproduce are as below.
The test env.
PC1 (192.168.1.1, mac=000000000001)-----Switch------- PC2(192.168.1.2, 
mac=00000000002)

1. Configure PC1 IP address as 192.168.1.1 and PC2 192.168.1.2.
2. On PC2, perform "ping 192.168.1.1" and "arp -a" and write down the mac 
address of PC1.
3. Open Ostinato on PC2 and then add a stream protocol stacks as Ethernet II, 
IPv4 and UDP.
4. On PC2, go to Protocol Data tab and fill in source MAC address as 
00000000099 which is a fake one and destination MAC address as 000000000001 
which is PC1's real MAC address we wrote it down on step 2.
5. On PC2, fill in source IP address as "192.168.1.100" which is a fake one and 
destination IP address as "192.168.1.1" which is PC1's IP address. After that, 
configure UDP source and destination ports as 11111.
6. Capture packets on both PC1 and PC2 and then start to send the packets on 
PC2.

*Result: PC2 sends two packets. One is from 000000000002 to 000000000001 and 
the other is from 000000000099 to 000000000001.

7. On PC2, modify destination IP address to a non-existing one, e.g. 
192.168.1.200.
8. Capture packets on both PC1 and PC2 and then start to send the packets on 
PC2.

*Result: PC2 behaves correctly. This time, it only send one packet out.

Please see my attached packets for reference. (Please look at source IP 
192.168.1.45 and UDP source port 12454)

Original comment by fengming...@gmail.com on 27 Jan 2014 at 2:07

Attachments: