xlid 发表于 2013-3-4 21:40:43

BGP团体属性配置

AR1:#
interface Ethernet0/0/0
ip address 192.168.1.1 255.255.255.0
#
interface Ethernet0/0/1
ip address 192.168.2.1 255.255.255.0
#
bgp 100
router-id 1.1.1.1
peer 192.168.2.2 as-number 200
#
ipv4-family unicast
undo synchronization
network 192.168.1.0
peer 192.168.2.2 enable
#
AR3:#
interface Ethernet0/0/0
ip address 192.168.2.2 255.255.255.0
#
interface Ethernet0/0/1
ip address 192.168.3.1 255.255.255.0
#
#
bgp 200
router-id 2.2.2.2
peer 192.168.2.1 as-number 100
peer 192.168.3.2 as-number 300
#
ipv4-family unicast
undo synchronization
network 192.168.2.0
network 192.168.3.0
peer 192.168.2.1 enable
peer 192.168.3.2 enable
AR4interface Ethernet0/0/0
ip address 192.168.3.2 255.255.255.0
#
bgp 300
router-id 3.3.3.3
peer 192.168.3.1 as-number 200
#
ipv4-family unicast
undo synchronization
peer 192.168.3.1 enable
#
这样bgp就建立起来了dis bgp routing-table192.168.1.1 BGP local router ID : 2.2.2.2
Local AS number : 200
Paths:   1 available, 1 best, 1 select
BGP routing table entry information of 192.168.1.0/24:
From: 192.168.2.1 (1.1.1.1)
Route Duration: 00h14m16s
Direct Out-interface: Ethernet0/0/0
Original nexthop: 192.168.2.1
Qos information : 0x0
AS-path 100, origin igp, MED 0, pref-val 0, valid, external, best, select, acti
ve, pre 255
Advertised to such 2 peers:
    192.168.2.1
    192.168.3.2看到AR3把学到的bgp传递给AR1AR4 了现在要做的是:AR3阻止从AR1学习到的BGP发布到AR4.
AR1:#
route-policy 1 permit node 10
apply community no-export#bgp 100peer 192.168.2.2 route-policy 1 export
peer 192.168.2.2 advertise-community
#再查看AR4dis bgp rou
dis bgp routing-table BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
               h - history,i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
      Network            NextHop      MED      LocPrf    PrefVal Path/Ogn *>   192.168.2.0      192.168.3.1   0                     0      200i
      192.168.3.0      192.168.3.1   0                     0      200i
就没有到AR1的bgp了

0 发表于 2013-3-18 20:23:10

.其实我是一个天才,可惜天妒英才!

kient88 发表于 2013-5-17 08:04:38

穿别人的鞋,走自己的路,让他们找去吧。

天成1 发表于 2013-5-19 17:30:26

解释就是掩饰,掩饰就是编故事!

1397535668 发表于 2013-5-22 17:45:58

男人靠的住,母猪能上树!

2440 发表于 2013-5-26 23:14:27

走自己的路,让别人打车去吧。

kution 发表于 2013-5-31 15:18:27

人生重要的不是所站的位置,而是所朝的方向!
页: [1]
查看完整版本: BGP团体属性配置