Stefan Lieberth

Network Consultant / Solution Architect

 

 

 

Some note on playing around with GOBGP, a new BGP implementation written in Golang.

 

Interesting to me is the configuration of GOBGP, which uses the the openconfig syntax.

 

I am sharing my setup, maybe it is useful for others.

 

 

For installing go and gobgo, please follow the instructions under:

 

https://golang.org/doc/install

https://github.com/osrg/gobgp/blob/master/docs/sources/getting-started.md

 

 

Please see the snippets below, which injects a IPv4 route on each peer:

 

Junos VM config:

 

admin@vMX1> show configuration routing-options          

static {

    route 192.168.199.0/24 discard;

}

autonomous-system 200;

 

admin@vMX1> show configuration policy-options policy-statement STATIC-TO-BGP    

term ACCEPT-STATIC {

    from protocol static;

    then accept;

}

 

admin@vMX1> show configuration protocols bgp

group gpbgp1 {

    export STATIC-TO-BGP;

    neighbor 192.168.56.1 {

        peer-as 100;

    }

}

 

admin@vMX1> show bgp summary   

Groups: 1 Peers: 1 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0              

                       1          1          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...

192.168.56.1            100         78         98       0       4          34 1/1/1/0              0/0/0/0

 

GOBGP config, program-call and route-injection:

 

bin sl$ cat  gobgpd-configs/gobgpd.yaml

global:

    config:

        as: 100

        router-id: 192.168.56.1

neighbors:

    - config:

        neighbor-address: 192.168.56.248

        peer-as: 200

 

 

bin sl$ sudo -E ./gobgpd -t yaml -f gobgpd-configs/gobgpd.yaml

{"level":"info","msg":"gobgpd started","time":"2016-03-07T12:31:49+01:00"}

{"level":"info","msg":"finished reading the config file","time":"2016-03-07T12:31:49+01:00"}

{"level":"info","msg":"Peer 192.168.56.248 is added","time":"2016-03-07T12:31:49+01:00"}

{"Key":"192.168.56.248","State":4,"Topic":"Peer","level":"info","msg":"Peer Up","time":"2016-03-07T12:32:04+01:00“}

 

Wireshark Trace snapshot