发新话题
打印

[网络转载] Configuring the BGP Local-AS Feature

Configuring the BGP Local-AS Feature

一、实验拓扑图:


二、实验目的:
       学习使用BGP Local-AS属性,我们对这个属性进行简要的介绍。如拓扑图所示,在figure1中,ISP-AISP-B没有通信需求,网络运营没有状况,现在由于业务需求AB之间需要合并,也就是说B需要并入ISP-A的自治系统内,而B有庞大的客户群体(这里禁用ISP-C代替),所以不希望B的客户更改配置BGP Local-AS属性就是允许B在并入AS100的同时,对它的客户依然保持AS200的信息。
三、具体实验内容:
       步骤:

-实验基本配置(包括Figure1 dBGP的配置);
-配置figure2,在ISP-B上配置BGP Local-AS属性;
-结论


实验基本配置(包括BGP的配置):
ISP-A#sh run
Building configuration...

Current configuration : 1244 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP-A
interface Serial1/0

ip address 10.0.0.1 255.255.255.0


serial restart-delay 0

!
router bgp 100

no synchronization


bgp log-neighbor-changes


neighbor 10.0.0.2 remote-as 300


no auto-summary

!
end
ISP-C#sh run
Building configuration...

Current configuration : 1376 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP-C
!
interface Loopback0

ip address 192.168.9.1 255.255.255.0

!

interface Serial1/0

ip address 192.168.1.2 255.255.255.252


serial restart-delay 0

!
interface Serial1/1

ip address 10.0.0.2 255.255.255.0


serial restart-delay 0

!
router bgp 300

no synchronization


bgp log-neighbor-changes


network 192.168.9.0


neighbor 10.0.0.1 remote-as 100


neighbor 192.168.1.1 remote-as 200


no auto-summary

!

end


ISP-B#sh run
Building configuration...

Current configuration : 1333 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname ISP-B
interface Loopback0

ip address 192.168.4.1 255.255.255.0

!
interface Serial1/1

ip address 192.168.1.1 255.255.255.252


serial restart-delay 0

router bgp 200

no synchronization


bgp log-neighbor-changes


network 192.168.4.0


neighbor 192.168.1.2 remote-as 300


no auto-summary

!

end




配置
figure2,在ISP-B上配置BGP Local-AS属性:

先将A-B的链路做通:
ISP-B(config)#int s 1/0
ISP-B(config-if)#ip add 20.0.0.1 255.255.255.0
ISP-B(config-if)#no shu

ISP-A(config)#int s 1/1
ISP-A(config-if)#ip add 20.0.0.2 255.255.255.0
ISP-A(config-if)#no shu

然后就是重点:
ISP-B(config)#no router bgp 200
ISP-B(config)#router bgp 100
ISP-B(config-router)#nei 20.0.0.2 remote 100
ISP-B(config-router)#nei 192.168.1.2 remote 300
ISP-B(config-router)#nei 192.168.1.2 local-as 200
ISP-B(config-router)#net 192.168.4.0 mask 255.255.255.0
同时在A上更改:
ISP-A(config)#router bgp 100
ISP-A(config-router)#nei 20.0.0.1 remote 100
现在在C上查看BGP信息
ISP-B#sh ip bgp sum
BGP router identifier 192.168.4.1, local AS number 100
BGP table version is 6, main routing table version 6
3 network entries using 303 bytes of memory
4 path entries using 192 bytes of memory
4 BGP path attribute entries using 240 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 783 total bytes of memory
BGP activity 4/1 prefixes, 5/1 paths, scan interval 60 secs

Neighbor
V
AS MsgRcvd MsgSent
TblVer
InQ OutQ Up/Down
State/PfxRcd

20.0.0.2
4
100
19
19
6
0
0 00:13:19
2

192.168.1.2
4
300
30
29

6
0
0 00:16:20
1

再到B上看:
ISP-C#sh ip bgp sum
BGP router identifier 192.168.9.1, local AS number 300
BGP table version is 5, main routing table version 5
3 network entries using 303 bytes of memory
5 path entries using 240 bytes of memory
5 BGP path attribute entries using 300 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 891 total bytes of memory
BGP activity 6/3 prefixes, 8/3 paths, scan interval 60 secs

Neighbor
V
AS MsgRcvd MsgSent
TblVer
InQ OutQ Up/Down
State/PfxRcd

10.0.0.1
4
100
50
55
5
0
0 00:15:18
2

192.168.1.1
4
200

54
55
5
0
0 00:15:18
2

两端的显示是不一样的。
结论和问题:
1.
这样可以免去在客户端配置的麻烦,对于客户端是透明的。
问题:
ISP-B#sh ip bgp
BGP table version is 6, local router ID is 192.168.4.1

Network
Next Hop
Metric LocPrf Weight Path

*>i1.1.1.0/24
20.0.0.2
0
100
0
i

*> 192.168.4.0
0.0.0.0
0
32768
i

* i192.168.9.0
10.0.0.2


0
100
0
300 i

*>
192.168.1.2
0



0
200 300 i

这两条链路,BGP依据什么原则选择了下面那条AS路径较长的?

TOP

老兄,这么多洋文,看不懂,找内行的解析

TOP

发新话题