colinbs / bgpsec-router

A dummy BGP(sec) router only capable to send messages to a peer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bgpsec-router

This tool is used to send (malformed) BGP(sec) messages such as Open or Update messages to a peering software router implementation to check its behaviour. This is useful in case you don't want to modify an existing software router. Open messages are hard coded and can be adjusted. Real BGPsec Updates can be generated using this tool or can be found here.

Please note that the bgpsec-"router" is rather static. Some configurations have to be hard coded and BGP messages have to be edited manually in order to tinker with them. So be sure which part of the hex-bytes-salad you are manipulating. The corresponding RFCs for BGP and BGPsec, as well as a pcap dump of a real message are very useful for this matter.

Usage

The bgpsec-router is a simple Python script that listens on a configurable local address and port. It requires the address and port of the software router it is supposed to send the messages to. The messages in question are read from a file that contains these messages in binary format.

General usage:

./router.py [-v|--verbose] <local_ip> <local_port> <remote_ip> <remote_port> <upd_file>

The -v|--verbose option enables debug output, such as received data from the peer.

Example usage:

./router.py -v 127.0.0.1 3000 10.10.10.10 179 updates.bin

Network and timing issues may cause the bgpsec-router to behave strange and inconsistent. So sending lots of messages to a peer is discuraged as it is very likely that many packages are lost.

About

A dummy BGP(sec) router only capable to send messages to a peer.


Languages

Language:Python 92.1%Language:Dockerfile 7.9%