Skip to content

Add support for parsing Eth-Over-GRE #27

@igorribeiroduarte

Description

@igorribeiroduarte

I'm using two machines to reproduce this problem. One of them it's used just for sending the packets via tunnel and on the other one I'm running npcapextract and n2disk.

These are the steps to reproduce this issue:

Run n2disk on the first machine

n2disk1g -I -P /var/run/n2disk/n2disk.pid -G 1 -A index_folder -p 1024 -b 1024 -i ens18f0 --disk-limit 93% -t 15 -a -o /disco03 -o /disco04

Create a GRE tunnel on the second machine and replay the pcap to it

  • sudo modprobe ip_gre
  • sudo ip link add name ${tunnel_name} type gretap local 192.168.10.2 remote 192.168.10.3
  • sudo ip link set ${tunnel_name} up
  • sudo tcpreplay -i ${tunnel_name} --mbps 10 -K --loop 1 gre-within-gre.pcap

On the first machine, try to extract the desired packets with npcapextract using inner host and/or inner port

  • npcapextract -u root -t index_folder -b '2020-05-25 16:18:56' -e '2020-05-25 16:19:31' -o test.pcap -f '(inner host 224.0.0.9 and inner port 520) and (inner host 3.3.3.2 and inner port 520)'
  • npcapextract -u root -t index_folder -b '2020-05-25 16:18:56' -e '2020-05-25 16:19:31' -o test.pcap -f '(inner host 224.0.0.9)'
  • npcapextract -u root -t index_folder -b '2020-05-25 16:18:56' -e '2020-05-25 16:19:31' -o test.pcap -f '(inner host 3.3.3.1)'
  • npcapextract -u root -t index_folder -b '2020-05-25 16:18:56' -e '2020-05-25 16:19:31' -o test.pcap -f '(inner host 3.3.3.2)'

Neither of the above extractions worked

Also, when I run npcaprintindex on the machine where n2disk is running, i get:

1917) len: 200, vlan: 0, vlan_qinq: 0, ipv4, proto: 17, 192.168.10.2:5247 -> 192.168.10.3:5247, l7proto: Unknown/Unknown, not ip
1921) len: 200, vlan: 0, vlan_qinq: 0, ipv4, proto: 17, 192.168.10.2:49772 -> 192.168.10.3:9995, l7proto: Unknown/Unknown, not ip
1923) len: 200, vlan: 0, vlan_qinq: 0, ipv4, proto: 6, 192.168.10.2:38666 -> 192.168.10.3:9100, l7proto: Unknown/Unknown, not ip

As you can see, n2disk is not identifying the tunneled ipv4.

I can assure you that the problem is not with the tunnel, since I'm monitoring the network on the first machine and I can see the traffic I was replaying.

This is the pcap I used for these tests:
gre-within-gre.pcap.zip

n2disk version: n2disk v.3.4.200414 (r5191)
pfring version: 7.6.0 (7.6.0-stable:0e07b27c0d593174584de79e273470366a91d307)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions