# Flowspec (RFC5575)
GoBGP supports [RFC5575](https://tools.ietf.org/html/rfc5575),
[draft-ietf-idr-flowspec-redirect-rt-bis-05](http://tools.ietf.org/html/draft-ietf-idr-flowspec-redirect-rt-bis-05)
and [draft-ietf-idr-flow-spec-v6-06](https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06).
## Prerequisites
Assume you finished [Getting Started](https://github.com/osrg/gobgp/blob/master/docs/sources/getting-started.md).
## Contents
- [Configuration](#section0)
- [Add Flowspec routes through CLI](#section1)
## Configuration
To advertise flowspec routes, enumerate `ipv4-flowspec` to neighbor's
afi-safi-list like below.
```toml
[Global]
[Global.GlobalConfig]
As = 64512
RouterId = "192.168.255.1"
[Neighbors]
[[Neighbors.NeighborList]]
[Neighbors.NeighborList.NeighborConfig]
NeighborAddress = "10.0.255.1"
PeerAs = 64512
[Neighbors.NeighborList.AfiSafis]
[[Neighbors.NeighborList.AfiSafis.AfiSafiList]]
AfiSafiName = "ipv4-flowspec"
```
## Add Flowspec routes through CLI
CLI syntax to add flowspec is
```shell
% global rib add match then -a [ipv4-flowspec|ipv6-flowspec]
: { destination | source |
protocol ... | fragment | tcp-flags ... |
{ port | destination-port | source-port | icmp-type | icmp-code | packet-length | dscp } - ... }...
: ipip, sctp, unknown, igmp, tcp, egp, rsvp, pim, icmp, igp, udp, gre, ospf
: not-a-fragment, is-a-fragment, first-fragment, last-fragment
: push, ack, urgent, fin, syn, rst
- : &?{<|>|=}
: { accept | discard | rate-limit | redirect