Sunday, August 26, 2018

BGP INBOUND TRAFFIC ENGINEERING - Gaining control over your inbound traffic


Inbound Traffic Engineering is an increasingly important problem for the edge networks with multiple upstream ISPs nowadays. To influence the inbound traffic path, such networks can use several methods including:

AS_PATH Prepending
BGP Multi-Exit-Discriminator
The use of BGP Communities with Local Preference
BGP Conditional Route Injection

Download eBook which covers all of the methods (with configuration samples) mentioned above as well as the Automated method of Inbound and Transit Traffic Engineering using Noction Intelligent Routing Platform (IRP).
Click Here To Read Rest Of The Post...

Saturday, August 25, 2018

What is Service Mesh?


Containers are lightweight, efficient and standard way for applications to move between and among the environments.

Micro services is a architectural design for building a distributed application using containers. Micro services are modular in terms of supporting any kind of business requirements. Monolithic code can be divided into smaller parts known as micro services. Micro Services can communicate to each other by using RPC calls.

While implementing Applications require a set of services from their infrastructure like load balancing, traffic managing, routing, health monitoring, security policies and user authentication. These services are often implemented as discrete appliances. Providing an application with these services required going to the appliance to implement and configure the service.

This process was possible when managing dozens of monolithic applications, but as these monoliths become modernized into micro services it isn’t practical to provision hundreds or thousands of containers in the same way. Monitoring, scalability, and high availability can no longer be provided by discrete appliances. These discrete appliances will be from different OEMs and every OEM has different EMS and NMS. It's a big bottle neck for a customer to manage these discrete appliances.

The solution for this problem is call a service mesh — a new way to deliver these services integrated from within the compute cluster itself through APIs that doesn’t require any additional or discrete appliances. This flexible framework removes the operational complexity associated with modern applications.


Click Here To Read Rest Of The Post...

Sunday, June 10, 2018

Checking Advertised BGP Routes To Peers - With PYEZ’S TABLE/VIEW


BGP doesn’t need any introduction because whenever we talk out highly scalable networks or Internet, we talk about BGP only. This is the best protocol to transport any number of routes. Whenever service provider or any customer runs BGP with its internal or external neighbors, they want to see what the BGP advertised routes to the neighbors are.

Every service provider or end customer wants to know what are the advertised routes towards the upstream peering so that during time of outages routes manipulation can be taken care. In this post, I have written a script by using the BGP Table View which can be used to dynamically create a view what is being advertised to peers by using different attributes mentioned in XML table.

Previous post “Display Static Routes With PyEZ Table and View” helps to understand how PYeZ framework can be used to display the static routes. I am using the same framework with different RPCs to show how dynamically we can display per peer neighbor advertised routes.

To achieve this, we need to know how many BGP neighbors we have and how many prefixes are advertised to each BGP neighbor.
Below is the python code which has been written to get the desired output of advertised route per neighbor.
       

from jnpr.junos import Device
from jnpr.junos.factory.factory_loader import FactoryLoader
import yaml
from jnpr.junos.op.xcvr import XcvrTable

yml = """
---
bgpAdvertiseRoutes:
 rpc: get-route-information
 args:
  advertising-protocol-name: bgp
  extensive: True
 item: route-table/rt 
 key:  rt-destination
 view: bgpAdvertiseView

bgpAdvertiseView:
 fields:
  rt_destination: rt-destination
  rt_prefix_length: rt-prefix-length
  rt_protocol_name: rt-entry/protocol-name
  bgp_group_name: rt-entry/bgp-group-name
  bgp_nh: rt-entry/nh/to
  rt_med: rt-entry/med
  rt_local_preference: rt-entry/local-preference
  rt_as_path: rt-entry/as-path
  rt_communities: rt-entry/communities/community
  
bgpSummary:
 rpc: get-bgp-summary-information
 
 
  """
globals().update(FactoryLoader().load(yaml.load(yml)))

with Device('your device ip address', port='7020', user='useryourname',passwd='yourpassword') as dev:
 op = dev.rpc.get_bgp_summary_information()
 for i in op.xpath('bgp-peer/peer-address'):
  #print(i.text)
  load_bgp = bgpAdvertiseRoutes(dev).get(neighbor=i.text)
  print("\n-----------------BGP Advertising Routes For:", i.text, "-----------------")
  for item in load_bgp:
   print('----------------------------------------------')
   print("Advertising_Route:",item.rt_destination,"Prefix_Lengh:",item.rt_prefix_length,"MED:",item.rt_med,"LP:",item.rt_local_preference,"AS_Path:",item.rt_as_path, "Communities:",item.rt_communities)



After running the above code, below is the output which can be visible on your python screen. Do ignore the public ip addresses, this is the lab network and only reachable in lab and has nothing to do with internet routes. In my lab, I have two peers and I am advertising the same routes to both the peers with communities.
       
C:\Python34>python c:\Lab\PyEZ\vmx_facts.py

-----------------BGP Advertising Routes For: 22.22.22.22 -----------------
----------------------------------------------
Advertising_Route: 2.2.2.8 Prefix_Lengh: 30 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 2.2.2.12 Prefix_Lengh: 30 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 2.2.2.16 Prefix_Lengh: 30 MED: 3 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 2.2.2.20 Prefix_Lengh: 30 MED: 3 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 22.22.22.22 Prefix_Lengh: 32 MED: 3 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 33.33.33.33 Prefix_Lengh: 32 MED: 1 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 44.44.44.44 Prefix_Lengh: 32 MED: 1 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 55.55.55.55 Prefix_Lengh: 32 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 66.66.66.66 Prefix_Lengh: 32 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']

-----------------BGP Advertising Routes For: 33.33.33.33 -----------------
----------------------------------------------
Advertising_Route: 2.2.2.8 Prefix_Lengh: 30 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 2.2.2.12 Prefix_Lengh: 30 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 2.2.2.16 Prefix_Lengh: 30 MED: 3 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 2.2.2.20 Prefix_Lengh: 30 MED: 3 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 22.22.22.22 Prefix_Lengh: 32 MED: 3 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 33.33.33.33 Prefix_Lengh: 32 MED: 1 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 44.44.44.44 Prefix_Lengh: 32 MED: 1 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 55.55.55.55 Prefix_Lengh: 32 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']
----------------------------------------------
Advertising_Route: 66.66.66.66 Prefix_Lengh: 32 MED: 2 LP: 100 AS_Path: AS path: [100] I Communities: ['65001:11', '65001:33', '65001:172']

References: STEPHAN BEHRENS has written great post on "CHECKING BGP WITH PYEZ’S TABLE/VIEW".
Click Here To Read Rest Of The Post...