Testing BGP in controller with exabgp


Moiz Raja (moraja) <moraja@...>
 

Hi Brian and Lakshman,

Here are my notes on how to setup controller and exabgp for testing. Please try it out and let me know if you run into any issues.

Regards,
-Moiz

-------------------------


Assumptions

1. You are using the open daylight test VM (https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Test_VMs)
2. The open daylight test VM has python version 2.74
3. The IP address of the open daylight test VM is 192.168.56.99
4.The IP address of the machine running the opendaylight controller is 192.168.56.101


Setup a test with exabgp

(1) Install exabgp on the opendaylight test VM. This is not required but it is pretty convenient.

> wget https://github.com/Exa-Networks/exabgp/archive/3.3.2.tar.gz
> tar zxvf 3.3.2.tar.gz
> cd exabgp-3.3.2
> python setup.py install

(2) Download the latest service provider distribution from here




(4) Copy the attached single-neighbour.txt to the mininet machine

(5) Copy the attached 41-bgp-example.xml.txt to <opendaylight directory>/configuration/initial/41-bgp-example.xml

(6) Run exabgp like so,

     env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

(7) Run controller like so,

     ./run.sh

(8) Wait for a minute or two.

(9) Now using rest conf you should be able to the see the bgp topology show up.





punal patel <punal.patel@...>
 

Hi Moiz,

I followed your steps to create single bgp peer but was unable to establish bgp session.

Do we need two seperate vm's to create bgp session?

Here is the log after executing "exabgp single-neighbor.txt".

Mon, 31 Mar 2014 14:55:02 | WARNING  | 8324   | configuration | Loaded new configuration successfully
Mon, 31 Mar 2014 14:55:02 | WARNING  | 8324   | configuration | Loaded new configuration successfully
Mon, 31 Mar 2014 14:55:02 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:02 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:03 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:03 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:04 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:04 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:06 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:06 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:09 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:09 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:13 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:13 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:18 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:18 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
^CMon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | ^C received
Mon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | ^C received
Mon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | Performing shutdown
Mon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | Performing shutdown
mininet@mininet-vm:~/exabgp\> 

Thank You,
Punal Patel






On Mon, Mar 31, 2014 at 1:34 PM, Moiz Raja (moraja) <moraja@...> wrote:
Hi Brian and Lakshman,

Here are my notes on how to setup controller and exabgp for testing. Please try it out and let me know if you run into any issues.

Regards,
-Moiz

-------------------------


Assumptions

1. You are using the open daylight test VM (https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Test_VMs)
2. The open daylight test VM has python version 2.74
3. The IP address of the open daylight test VM is 192.168.56.99
4.The IP address of the machine running the opendaylight controller is 192.168.56.101


Setup a test with exabgp

(1) Install exabgp on the opendaylight test VM. This is not required but it is pretty convenient.

> wget https://github.com/Exa-Networks/exabgp/archive/3.3.2.tar.gz
> tar zxvf 3.3.2.tar.gz
> cd exabgp-3.3.2
> python setup.py install

(2) Download the latest service provider distribution from here




(4) Copy the attached single-neighbour.txt to the mininet machine

(5) Copy the attached 41-bgp-example.xml.txt to <opendaylight directory>/configuration/initial/41-bgp-example.xml

(6) Run exabgp like so,

     env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

(7) Run controller like so,

     ./run.sh

(8) Wait for a minute or two.

(9) Now using rest conf you should be able to the see the bgp topology show up.





_______________________________________________
integration-dev mailing list
integration-dev@...
https://lists.opendaylight.org/mailman/listinfo/integration-dev



Moiz Raja (moraja) <moraja@...>
 

Punal,

I think running on the same VM would work but only if it was multi-homed. In the configuration for exabgp we have to specify the IP address of the peer. If the peer IP is the same as what I am bound to then would that work? I'm not sure but I don't think it would.

I tested this with exabgp running on a separate VM and controller running on my laptop. 

-Moiz


From: punal patel [punal.patel@...]
Sent: Monday, March 31, 2014 5:33 PM
To: Moiz Raja (moraja)
Cc: bf1936@...; Lakshman Mukkamalla (lmukkama); integration-dev@...
Subject: Re: [integration-dev] Testing BGP in controller with exabgp

Hi Moiz,

I followed your steps to create single bgp peer but was unable to establish bgp session.

Do we need two seperate vm's to create bgp session?

Here is the log after executing "exabgp single-neighbor.txt".

Mon, 31 Mar 2014 14:55:02 | WARNING  | 8324   | configuration | Loaded new configuration successfully
Mon, 31 Mar 2014 14:55:02 | WARNING  | 8324   | configuration | Loaded new configuration successfully
Mon, 31 Mar 2014 14:55:02 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:02 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:03 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:03 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:04 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:04 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:06 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:06 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:09 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:09 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:13 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:13 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:18 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
Mon, 31 Mar 2014 14:55:18 | INFO     | 8324   | network       | Peer   192.168.56.99 ASN 65533   connection to peer failed
^CMon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | ^C received
Mon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | ^C received
Mon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | Performing shutdown
Mon, 31 Mar 2014 14:55:25 | INFO     | 8324   | reactor       | Performing shutdown
mininet@mininet-vm:~/exabgp\> 

Thank You,
Punal Patel






On Mon, Mar 31, 2014 at 1:34 PM, Moiz Raja (moraja) <moraja@...> wrote:
Hi Brian and Lakshman,

Here are my notes on how to setup controller and exabgp for testing. Please try it out and let me know if you run into any issues.

Regards,
-Moiz

-------------------------


Assumptions

1. You are using the open daylight test VM (https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Test_VMs)
2. The open daylight test VM has python version 2.74
3. The IP address of the open daylight test VM is 192.168.56.99
4.The IP address of the machine running the opendaylight controller is 192.168.56.101


Setup a test with exabgp

(1) Install exabgp on the opendaylight test VM. This is not required but it is pretty convenient.

> wget https://github.com/Exa-Networks/exabgp/archive/3.3.2.tar.gz
> tar zxvf 3.3.2.tar.gz
> cd exabgp-3.3.2
> python setup.py install

(2) Download the latest service provider distribution from here




(4) Copy the attached single-neighbour.txt to the mininet machine

(5) Copy the attached 41-bgp-example.xml.txt to <opendaylight directory>/configuration/initial/41-bgp-example.xml

(6) Run exabgp like so,

     env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

(7) Run controller like so,

     ./run.sh

(8) Wait for a minute or two.

(9) Now using rest conf you should be able to the see the bgp topology show up.





_______________________________________________
integration-dev mailing list
integration-dev@...
https://lists.opendaylight.org/mailman/listinfo/integration-dev



Moiz Raja (moraja) <moraja@...>
 

Brian,

The IP addresses are reversed. Sorry about that.

-Moiz


From: FREEMAN, BRIAN D [bf1936@...]
Sent: Tuesday, April 01, 2014 4:27 AM
To: Moiz Raja (moraja); Lakshman Mukkamalla (lmukkama)
Subject: RE: Testing BGP in controller with exabgp

Moiz,

 

I haven’t finished debugging but I was getting connection failure message from exabgp.

 

I had to modify the IP addresses for my environment because of our lab setup and it looked like to me that the files had a reverse mapping of the ip addresses.

 

Steps 3 and 4 say:

3. The IP address of the open daylight test VM is 192.168.56.99

4.The IP address of the machine running the opendaylight controller is 192.168.56.101

 

But for instance the exabgp is binding on port 101

 

env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

 

I’m probably misunderstanding the setup or are the ip addresses in steps 3 and 4 reversed ?

 

Brian

 

From: Moiz Raja (moraja) [mailto:moraja@...]
Sent: Monday, March 31, 2014 4:35 PM
To: FREEMAN, BRIAN D; Lakshman Mukkamalla (lmukkama)
Cc: integration-dev@...
Subject: Testing BGP in controller with exabgp

 

Hi Brian and Lakshman,

 

Here are my notes on how to setup controller and exabgp for testing. Please try it out and let me know if you run into any issues.

 

Regards,

-Moiz

 

-------------------------

 

 

Assumptions

 

1. You are using the open daylight test VM (https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Test_VMs)

2. The open daylight test VM has python version 2.74

3. The IP address of the open daylight test VM is 192.168.56.99

4.The IP address of the machine running the opendaylight controller is 192.168.56.101

 

 

Setup a test with exabgp

 

(1) Install exabgp on the opendaylight test VM. This is not required but it is pretty convenient.

 

> wget https://github.com/Exa-Networks/exabgp/archive/3.3.2.tar.gz
> tar zxvf 3.3.2.tar.gz
> cd exabgp-3.3.2
> python setup.py install

 

(2) Download the latest service provider distribution from here

 

 

 

 

(4) Copy the attached single-neighbour.txt to the mininet machine

 

(5) Copy the attached 41-bgp-example.xml.txt to <opendaylight directory>/configuration/initial/41-bgp-example.xml

 

(6) Run exabgp like so,

 

     env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

 

(7) Run controller like so,

 

     ./run.sh

 

(8) Wait for a minute or two.

 

(9) Now using rest conf you should be able to the see the bgp topology show up.

 

 

 

 


FREEMAN, BRIAN D <bf1936@...>
 

Moiz,

 

I got ODL bgpcep to talk to exabgp in my environment. I was using a git clone of the bgpcep tree not the Hydrogen release snapshot.

 

Couple of things that I tripped over.

 

1.       As you confirmed, the IP addresses  in step 3 and 4 were reversed. This might help folks going forward for how to update their files.

41-bgp-example.xml:                    <host>EXABGP_IP_ADDRESS</host>

41-bgp-example.xml:                    <bgp-id>ODL_IP_ADDRESS</bgp-id>

single-neighbor.txt:neighbor ODL_IP_ADDRESS{

single-neighbor.txt:    router-id EXABGP_IP_ADDRESS;

single-neighbor.txt:    local-address EXABGP_IP_ADDRESS;

 

2.       ODL is not listening , it only initiates sessions,   and Exabgp is not listening by default.

a.       If in wireshark you see SYN<->RST,ACK from both side then check to make sure the Exabgp was started to listen on its IP address.

b.      The environment “exabgp.tcp.bind” needs to be set to have Exabgp listen (as indicated in your  instructions)

env exabgp.tcp.bind="EXABGP_IP_ADDRESS" exabgp.tcp.port=179 exabgp.log.all=true exabgp single-neighbor.txt
Note: env bgp.tcp.bind=… is wrong and since its an environment variable Exabgp won’t complain about the typo of leaving off the leading “exa”  
J.

 

3.       I tried some RESTCONF API to view the information but wasn’t able to see any data but I probably didn’t understand the right syntax to view the routes learned from Exabgp

a.       For example: http://xxxx:8080/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/

4.       I tried to create an LSP via the RESTCONF API
http://xxxx:8080/restconf/operations/network-topology-pcep:add-lsp (with xml) and got an Unsent message back.

osgi> 2014-04-04 20:00:45.397 GMT+00:00 [pool-14-thread-1] DEBUG o.o.b.p.t.p.ServerSessionManager - Session for node Uri [_value=pcc://yyyy] not found

I assume that because we don’t have a PCC session setup to Exabgp (and not sure it can terminate a PCC session anyway).

 

Thanks for the BGP-LS and Exabgp setup !

 

Brian

 

 

From: Moiz Raja (moraja) [mailto:moraja@...]
Sent: Monday, March 31, 2014 4:35 PM
To: FREEMAN, BRIAN D; Lakshman Mukkamalla (lmukkama)
Cc: integration-dev@...
Subject: Testing BGP in controller with exabgp

 

Hi Brian and Lakshman,

 

Here are my notes on how to setup controller and exabgp for testing. Please try it out and let me know if you run into any issues.

 

Regards,

-Moiz

 

-------------------------

 

 

Assumptions

 

1. You are using the open daylight test VM (https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Test_VMs)

2. The open daylight test VM has python version 2.74

3. The IP address of the open daylight test VM is 192.168.56.99

4.The IP address of the machine running the opendaylight controller is 192.168.56.101

 

 

Setup a test with exabgp

 

(1) Install exabgp on the opendaylight test VM. This is not required but it is pretty convenient.

 

> wget https://github.com/Exa-Networks/exabgp/archive/3.3.2.tar.gz
> tar zxvf 3.3.2.tar.gz
> cd exabgp-3.3.2
> python setup.py install

 

(2) Download the latest service provider distribution from here

 

 

 

 

(4) Copy the attached single-neighbour.txt to the mininet machine

 

(5) Copy the attached 41-bgp-example.xml.txt to <opendaylight directory>/configuration/initial/41-bgp-example.xml

 

(6) Run exabgp like so,

 

     env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

 

(7) Run controller like so,

 

     ./run.sh

 

(8) Wait for a minute or two.

 

(9) Now using rest conf you should be able to the see the bgp topology show up.

 

 

 

 


Lakshman Mukkamalla (lmukkama) <lmukkama@...>
 

Hi Brian,
    We are also trying to find where the route/subnet info mentioned in the single neighbor txt is present. The wiki that I was referring to is https://wiki.opendaylight.org/view/BGP_LS_PCEP:Models
Trying out the tables/{afi}/{safi} did not work either. May be I may be missing something here. Will have to check more on this.

Thanks.

From: <FREEMAN>, BRIAN D <bf1936@...>
Date: Friday, April 4, 2014 1:05 PM
To: "Moiz Raja (moraja)" <moraja@...>, lmukkama <lmukkama@...>
Cc: "integration-dev@..." <integration-dev@...>
Subject: RE: Testing BGP in controller with exabgp

Moiz,

 

I got ODL bgpcep to talk to exabgp in my environment. I was using a git clone of the bgpcep tree not the Hydrogen release snapshot.

 

Couple of things that I tripped over.

 

1.       As you confirmed, the IP addresses  in step 3 and 4 were reversed. This might help folks going forward for how to update their files.

41-bgp-example.xml:                    <host>EXABGP_IP_ADDRESS</host>

41-bgp-example.xml:                    <bgp-id>ODL_IP_ADDRESS</bgp-id>

single-neighbor.txt:neighbor ODL_IP_ADDRESS{

single-neighbor.txt:    router-id EXABGP_IP_ADDRESS;

single-neighbor.txt:    local-address EXABGP_IP_ADDRESS;

 

2.       ODL is not listening , it only initiates sessions,   and Exabgp is not listening by default.

a.       If in wireshark you see SYN<->RST,ACK from both side then check to make sure the Exabgp was started to listen on its IP address.

b.      The environment “exabgp.tcp.bind” needs to be set to have Exabgp listen (as indicated in your  instructions)

env exabgp.tcp.bind="EXABGP_IP_ADDRESS" exabgp.tcp.port=179 exabgp.log.all=true exabgp single-neighbor.txt
Note: env bgp.tcp.bind=… is wrong and since its an environment variable Exabgp won’t complain about the typo of leaving off the leading “exa”  
J.

 

3.       I tried some RESTCONF API to view the information but wasn’t able to see any data but I probably didn’t understand the right syntax to view the routes learned from Exabgp

a.       For example: http://xxxx:8080/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/

4.       I tried to create an LSP via the RESTCONF API
http://xxxx:8080/restconf/operations/network-topology-pcep:add-lsp (with xml) and got an Unsent message back.

osgi> 2014-04-04 20:00:45.397 GMT+00:00 [pool-14-thread-1] DEBUG o.o.b.p.t.p.ServerSessionManager - Session for node Uri [_value=pcc://yyyy] not found

I assume that because we don’t have a PCC session setup to Exabgp (and not sure it can terminate a PCC session anyway).

 

Thanks for the BGP-LS and Exabgp setup !

 

Brian

 

 

From: Moiz Raja (moraja) [mailto:moraja@...]
Sent: Monday, March 31, 2014 4:35 PM
To: FREEMAN, BRIAN D; Lakshman Mukkamalla (lmukkama)
Cc: integration-dev@...
Subject: Testing BGP in controller with exabgp

 

Hi Brian and Lakshman,

 

Here are my notes on how to setup controller and exabgp for testing. Please try it out and let me know if you run into any issues.

 

Regards,

-Moiz

 

-------------------------

 

 

Assumptions

 

1. You are using the open daylight test VM (https://wiki.opendaylight.org/view/CrossProject:Integration_Group:Test_VMs)

2. The open daylight test VM has python version 2.74

3. The IP address of the open daylight test VM is 192.168.56.99

4.The IP address of the machine running the opendaylight controller is 192.168.56.101

 

 

Setup a test with exabgp

 

(1) Install exabgp on the opendaylight test VM. This is not required but it is pretty convenient.

 

> wget https://github.com/Exa-Networks/exabgp/archive/3.3.2.tar.gz
> tar zxvf 3.3.2.tar.gz
> cd exabgp-3.3.2
> python setup.py install

 

(2) Download the latest service provider distribution from here

 

 

 

 

(4) Copy the attached single-neighbour.txt to the mininet machine

 

(5) Copy the attached 41-bgp-example.xml.txt to <opendaylight directory>/configuration/initial/41-bgp-example.xml

 

(6) Run exabgp like so,

 

     env exabgp.tcp.bind=192.168.56.101 exabgp.tcp.port=179 exabgp single-neighbor.txt

 

(7) Run controller like so,

 

     ./run.sh

 

(8) Wait for a minute or two.

 

(9) Now using rest conf you should be able to the see the bgp topology show up.