Skip to content

Commit

Permalink
add multi-source bgp example (pre-proc and repro)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodonile committed Nov 15, 2024
1 parent 531f0c3 commit b58dc7c
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 0 deletions.
49 changes: 49 additions & 0 deletions examples/bgp-multi-sources-repeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
pcap:
- examples/pcaps/bgp-multi-sources-open.pcap
- examples/pcaps/bgp-multi-sources-update-keepalive.pcap

repeat:
count: [1,100] # number of times to repeat each of the pcaps
pattern: "round-robin" # round-robin or bulk

time_factor: 0.01 # 100x faster
keep_open: false # set to true to not stop application (-> keep sockets open)
no_sync: true # set to true to start reproducing right away (-> don't wait to sync to next full_minute)

optimize:
threading: false # assign one peer per thread -> we can process packet while sending. No order guarantee between peers
preload: false # preload pcap in memory. Faster but more ram used. Often not useful
network:
so_sndbuf: null # max possible: cat /proc/sys/net/core/wmem_max - send buffer - null for default
so_rcvbuf: null

network:
map: # map a src IP to a new source IP used for repro
- src_ip: 2001:db8:53::1
repro_ip: cafe::1
- src_ip: 2001:db8:73::1
repro_ip: cafe::2
- src_ip: 2001:db8:90::1
repro_ip: cafe::3
- src_ip: 2001:db8:91::1
repro_ip: cafe::4
- src_ip: 203.0.113.53
repro_ip: cafe::5
- src_ip: 203.0.113.73
repro_ip: cafe::6
- src_ip: 203.0.113.90
repro_ip: cafe::7
- src_ip: 203.0.113.91
repro_ip: cafe::8


interface: null # to use a VRF, give the vrf name

bgp:
select:
tcp:
dport:
- 179
collector: # collector that will receive the reproduced messages
ip: cafe::101
port: 179
Binary file added examples/pcap_processing/bgp-multi-sources.pcap
Binary file not shown.
30 changes: 30 additions & 0 deletions examples/pcap_processing/bgp-multi-sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pcap: examples/pcap_processing/bgp-multi-sources.pcap

pcap_processing:
initial_delay: 5
inter_packet_delay: 0.001
desired_tcp_payload_size: 1 # [default 1424bytes] setting it to 1 means 1 PDU per packet max in practice
# (because we don't fragment BMP/BGP messages to meet this requirement!)

bgp:
select:
ip:
src:
- 2001:db8:53::1
- 2001:db8:73::1
- 2001:db8:90::1
- 2001:db8:91::1
- 203.0.113.53
- 203.0.113.73
- 203.0.113.90
- 203.0.113.91
tcp:
dport:
- 179
bgp_h:
type:
- 1 # OPEN
- 2 # UPDATE
- 3 # NOTIFICATION
- 4 # KEEPALIVE
- 5 # ROUTE-REFRESH
3 changes: 3 additions & 0 deletions examples/pcap_processing/bgp-multi-sources/traffic-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"BGP Information": {}
}
19 changes: 19 additions & 0 deletions examples/pcap_processing/bgp-multi-sources/traffic-reproducer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pcap: examples/pcap_processing/bgp-multi-sources/traffic.pcap
bgp:
collector:
ip: <MISSING_PARAM>
port: <MISSING_PARAM>
time_factor: 1
keep_open: false
no_sync: false
optimize:
threading: false
preload: false
network:
so_sndbuf: null
so_rcvbuf: null
network:
interface: null
map:
src_ip: 203.0.113.91
repro_ip: <MISSING_PARAM>
Binary file added examples/pcaps/bgp-multi-souces-open.pcap
Binary file not shown.
Binary file not shown.

0 comments on commit b58dc7c

Please sign in to comment.