Comment 33 for bug 1518047

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15925
Committed: http://github.org/Juniper/contrail-controller/commit/b515dbf5beb6f04bf6111533cc879c318d0a80e1
Submitter: Zuul
Branch: master

commit b515dbf5beb6f04bf6111533cc879c318d0a80e1
Author: Manish Singh <email address hidden>
Date: Fri Jan 8 14:14:00 2016 +0530

BGP as a service agent changes.

Function:
When a VM tries to establish BGP session it will connect o its gateway or DNS
ip. For example in subnet of 1.1.1.0/24, VM will try to connect on well defined
BGP port to either 1.1.1.1(=gw) or 1.1.1.2(=DNS). Agent sees this traffic and
creates a NAT. The calculation of NAT is done as follows:
Pkt from VM:
source: VM-SIP, destination: DIP(gw/dns), source port: VM-sport, destination
port: BGP-port.

After NAT:
source: vrouter IP, destination: Control-node#1(if DIP was gw),
Control-node#2(if DIP was DNS), source port: BGP-router port,
destination port: BGP-port.

Config object(bgp-router) will provide BGP-router port used in NAT.
If new set of control-node changes flows should use new set given.

In this feature agent implements following:
- Add dependency between VM interface, BGP as service.
- BGP as a service node resides under VmInterface. Using adjacencies it travels
to bgp-as-a-service to extract IP for SNAT and bgp-router (adjacent
to for source port nat.
- Flow - Keeping track of bgp-as-a-service object in VMI to populate
flow.
For destination it uses control-node for destination IP.
- Control-node - rebake all Vm interfaces to reflect changes.
- ifmap - white-listing of nodes bgp-as-a-service, vmi, bgp-router.
- Reserves a set of BGP port which can potentially be used in
bgp-router object.
This is provided via contrail-vrouter-agent.conf and agents binds on
to these ports, so that host does not use it.

Pending items:
- UT.

Closes-Bug: 1518047

Conflicts:
 src/ifmap/ifmap_graph_walker.cc
 src/vnsw/agent/oper/agent.sandesh
 src/vnsw/agent/pkt/pkt_flow_info.h

Change-Id: I12c8d019b4b6805cc5517ad595f4d2c8e9956100