Archive for July, 2014

BGP ECMP VS BGP best & advertised route

BGP ECMP can have multi bgp routes be installed in the routing table;

but only ONE bgp route will be choose as the BEST and ACTIVE bgp route, and advertised to eligible neighbors!!

All other equal cost bgp routes, although installed in the routing table, it will not be advertised.

If multi routes should be installed && advertised, then “ADD PATH” feature should be enabled and used.


Leave a comment

Useful command: traffic capture on interface level and show compare the rollback difference

1. how to capture the traffic on the interface level on MX devices?
A: run monitor traffic interface xe-2/3/0 no-resolve

2. how to check the rollback compare:
show | compare rollback 5

XXXXXXXXXXXX#how | compare rollback 5
[edit interfaces xe-2/3/0 unit 0 family inet]
– address;
[edit routing-options static]
route { … }
+ route discard;
[edit policy-options policy-statement default-to-arista term 10 from]
route-filter exact { … }
+ route-filter exact;

Leave a comment


tuple and list:
元组和列表十分类似,只不过元组和字符串一样是 不可变的 即你不能修改元组。元组通过圆 括号中用逗号分割的项目定义。元组通常用在使语句或用户定义的函数能够安全地采用一组值 的时候,即被使用的元组的值不会改变。

print “the number of animals in the zoo is”, len(zoo)
new_zoo =(“monkey”,”dolphin”,zoo)
print “number of animals in the new_zoo is”, len (new_zoo)
print “all animals in the new_zoo is “, new_zoo
print “animals bring from the old zoo is “, new_zoo[2]
print “last animal in the old zoo is “, new_zoo[2][2]
del zoo[2]
print zoo
print new_zoo


python tuple 不支持删除,不可修改。list 可以

list使用 [], tuple 使用()

error message of the above is:

the number of animals in the zoo is 3
number of animals in the new_zoo is 3
all animals in the new_zoo is (‘monkey’, ‘dolphin’, (‘wolf’, ‘elephant’, ‘penguin’))
animals bring from the old zoo is (‘wolf’, ‘elephant’, ‘penguin’)
last animal in the old zoo is penguin
Traceback (most recent call last):
File “C:/Python27/test/”, line 14, in <module>
del zoo[2]
TypeError: ‘tuple’ object doesn’t support item deletion

Leave a comment

load-ballancing per-flow

for bgp route/traffic, first enable the multipath in the bgp group:
set protocol bgp grou x multipath,

then multi bgp routes will be installed in the routing table. but at the very beginning, only one will be used/selected to forward traffic.

we need to define a load ballance policy to do per-packet (actually per flow load ballancing)

term 10 {
then {
load-balance per-packet;

then export this to routing-options forwarding-table.

Leave a comment