http://blog.sina.com.cn/ccie2007[订阅]
字体大小: 正文
BGP Bestpath Selection – MED(2007-08-11 01:17:26)
Objective: Configure the BGP MED in AS 1 so that traffic from R3’s Ethernet
segment going to VLAN 5 is first sent to R1
Directions
" Configure the topology per the diagram
" Configure BGP on R1, R3, R4, and R5 per the diagram
" R1 should peer with R3 and R4
" R5 should peer with R3 and R5
" Advertise R3’s Ethernet segment into BGP
" Advertise R5’s Ethernet segment into BGP
" Configure BGP MED outbound on R4 and R5 towards AS 2
配置:
R1:
interface FastEthernet0/0
ip address 155.1.146.1 255.255.255.0
!
interface Serial0/1
ip address 155.1.13.1 255.255.255.0
!
router bgp 2
neighbor 155.1.13.3 remote-as 2
neighbor 155.1.13.3 next-hop-self
neighbor 155.1.146.4 remote-as 1
 
R3:
interface Serial1/2
ip address 155.1.13.3 255.255.255.0
clockrate 64000
!
router bgp 2
network 155.1.37.0 mask 255.255.255.0
neighbor 155.1.0.5 remote-as 1
neighbor 155.1.13.1 remote-as 2
neighbor 155.1.13.1 next-hop-self
 
R4:
interface Ethernet0/1
ip address 155.1.146.4 255.255.255.0
half-duplex
!
interface Serial0/1
ip address 155.1.45.4 255.255.255.0
!
router bgp 1
neighbor 155.1.45.5 remote-as 1
neighbor 155.1.45.5 next-hop-self
neighbor 155.1.146.1 remote-as 2
neighbor 155.1.146.1 route-map MED out
!
route-map MED permit 10
set metric 100
R5:
interface Serial0/0
ip address 155.1.0.5 255.255.255.0
encapsulation frame-relay
frame-relay map ip 155.1.0.3 503 broadcast
no frame-relay inverse-arp
!
interface Ethernet0/1
ip address 155.1.5.5 255.255.255.0
interface Serial0/1
ip address 155.1.45.5 255.255.255.0
clockrate 64000
!
router bgp 1
network 155.1.5.0 mask 255.255.255.0
neighbor 155.1.0.3 remote-as 2
neighbor 155.1.0.3 route-map MED out
neighbor 155.1.45.4 remote-as 1
neighbor 155.1.45.4 next-hop-self
!
route-map MED permit 10
set metric 200
测试:
Rack1R3#traceroute 155.1.5.5 source 155.1.37.3
Type escape sequence to abort.
Tracing the route to 155.1.5.5
1 155.1.13.1 16 msec 16 msec 16 msec
2 155.1.146.4 16 msec 16 msec 16 msec
3 155.1.45.5 32 msec * 28 msec

Rack1R3#show ip bgp 155.1.5.0 255.255.255.0
BGP routing table entry for 155.1.5.0/24, version 8
Paths: (2 available, best #1, table Default-IP-Routing-
Table)
Flag: 0x800
Advertised to update-groups:
2
1
155.1.13.1 from 155.1.13.1 (155.1.146.1)
Origin IGP, metric 100, localpref 100, valid,
internal, best
1
155.1.0.5 from 155.1.0.5 (155.1.45.5)
Origin IGP, metric 200, localpref 100, valid,external
转载请注明出处!
加载中,请稍候...
  • 评论加载中,请稍候...

验证码:请点击后输入验证码  收听验证码

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

相关博文
读取中...
推荐博文
读取中...