Archive for the ‘SDN’ Category

BGP SDN

Posted: June 12, 2017 in BGP, Routing, SDN

BGP SDN enables central control over distributed routing.
This is based on routing protocol BGP and its ability to signal third party next hop using policy based routing.

We are using standard community to set next-hop which will define path to reach destination

This approach is kind of similar to Fibbing: OSPF and SDN (Hybrid model) where we set third party next hop with help of LSA5

All devices are running EBGP with each other via directly connected interface and controller will speak IBGP with every router
Controller can be any device which is capable of speaking BGP . I am using Cisco router and local-as feature to form IBGP with all routers as controller. In below diagram R5 is contoller

BGP SDN NEW

When we try to reach IP 100.100.100.l00 from IP 40.40.40.40 we have 1 path available via path R4-R2-R1(marked with blue line)
R1 before

R2 before

R3 before

R4 before

Before Trace

Now with help of controller R5 I am sending 100.100.100.100 prefix to all routers with community set to {4:2 2:3 3:1} and local preference set to 120
we can move the traffic from IP 40.40.40.40 to IP 100.100.100.100 via path R4-R2-R3-R1(marked with red line).

These communities are user defined and locally significant to the router mapped with next hop value
e.g if you want move packet from AS4 to AS2 set community 4:2 (this community is local to R4) in controller and next hop will be set to 24.0.0.2 once R4 receives the update.
similarly to move packet frmo AS2 to AS3 set community 2:3 in controller and next hop will be set to 24.0.0.2 once R4 receives the update.

R1 after

R2 after

R3 after

R4 after

After trace

Please check below link for more information
http://blog.ipspace.net/2013/10/exception-routing-with-bgp-sdn-done.html

Fibbing is an architecture that enables central control over distributed routing.
http://fibbing.net/

This architecture is based on routing protocol OSPF and its ability to set third party next-hop with some tweak

Main trick is to create multiple LSA5 for same destination with Forward address set to IP addresses which will define path to reach destination

In LSA 5 forwarding address is set to 0.0.0.0
if the ASBR redistributes routes and OSPF is not enabled on the next hop interface for those routes

In LSA 5 forwarding address is set to non-zero address if
*OSPF is enabled on the ASBR’s next hop interface AND
*ASBR’s next hop interface is non-passive under OSPF AND
*ASBR’s next hop interface is not point-to-point AND
*ASBR’s next hop interface is not point-to-multipoint AND
*ASBR’s next hop interface address falls under the network range specified in the router OSPF command.

Controller speaks OSPF with rest of the OSPF enabled network and in turn push LSA 5 with third party next hop to influence routing centrally.
Controller can be simple computer which is capable of running OSPF and able to push LSA 5 as per our need.

For our demonstration I am using cisco router as controller. Below is the topology diagram in which R5 and switch is part of controller
We are using Secondary IP address which will resolve the third party next hop set by controller

Fibbing Topology

When we try to reach IP 100.100.100.l00 from IP 40.40.40.40 we have 2 path available one via path R4-R2-R1 and other one via R4-R3-R1(marked with blue line)
R4 Before

R1 Before

R4 Before traceroute

Now with help of controller R5 we can move the traffic from IP 40.40.40.40 to IP 100.100.100.100 via path R4-R3-R2-R1(marked with red line)
R1 after

R2 after

R3 after

R4 after

R4 after traceroute

R4 after database

Please check below link for more information
http://fibbing.net/
http://blog.ipspace.net/2015/11/fibbing-ospf-based-traffic-engineering.html
https://blog.ecitele.com/fibbing-and-sdn