C114门户论坛百科APPEN| 举报 切换到宽版

亚星游戏官网

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索
查看: 3720|回复: 2

BGP联邦配置 [复制链接]

军衔等级:

亚星游戏官网-yaxin222  上等兵

注册:2007-5-18
发表于 2007-6-1 17:45:00 |显示全部楼层
BGP联邦配置
1.        实验目的
通过本实验可以掌握:
1)BGP联邦的含义;
2)BGP联邦的配置。
2.拓扑结构

按此在新窗口浏览图片
3.实验配置

本实验联邦的成员为AS 65001和AS 65002,联邦对外AS为100。
R1#sh run
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 13.13.13.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 12.12.12.1 255.255.255.0
serial restart_delay 0
!         
router bgp 65001
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
bgp confederation identifier 100             //配置联邦ID
bgp confederation peers 65002              //联邦EBGP对等的成员  
network 1.1.1.0 mask 255.255.255.0
neighbor 12.12.12.2 remote-as 200
neighbor 13.13.13.3 remote-as 65002
neighbor 13.13.13.3 next-hop-self
no auto-summary
!

R2#sh run
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
ip address 23.23.23.2 255.255.255.0
serial restart_delay 0
!
interface Serial1/2
ip address 12.12.12.2 255.255.255.0
serial restart_delay 0
!
router bgp 200
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 12.12.12.1 remote-as 100
neighbor 23.23.23.3 remote-as 100
no auto-summary
!

R3#sh run
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 13.13.13.3 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 34.34.34.3 255.255.255.0
serial restart_delay 0
!   
interface Serial1/2
ip address 23.23.23.3 255.255.255.0
serial restart_delay 0
!
router eigrp 90
network 3.3.3.0 0.0.0.255
network 34.34.34.0 0.0.0.255
no auto-summary
!
router bgp 65002
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
bgp confederation identifier 100
bgp confederation peers 65001
network 3.3.3.0 mask 255.255.255.0
neighbor 4.4.4.4 remote-as 65002
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 13.13.13.1 remote-as 65001
neighbor 13.13.13.1 next-hop-self
neighbor 23.23.23.2 remote-as 200
no auto-summary
!

R4#sh run
interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Serial1/2
ip address 34.34.34.4 255.255.255.0
serial restart_delay 0
!
router eigrp 90
network 4.4.4.0 0.0.0.255
network 34.34.34.0 0.0.0.255
no auto-summary
!
router bgp 65002
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
network 4.4.4.0 mask 255.255.255.0
neighbor 3.3.3.3 remote-as 65002
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!



BGP联邦用于将AS分割成多个子AS,是控制大型IBGP对等的另一条途径,而子AS被称为成员自治系统。每个联邦都有被分配一个联邦ID,对联邦外部来讲,这个联邦ID是代表整个联邦的AS号码。外部看不到联邦内部结构,联邦看起来就是一个AS,成员自治系统信息被隐藏起来。

4.实验调试  

R2#sh ip bgp
BGP table version is 5, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  1.1.1.0/24       23.23.23.3                             0 100 i
*>                  12.12.12.1               0             0 100 i
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*  3.3.3.0/24       23.23.23.3               0             0 100 i
*>                  12.12.12.1                             0 100 i
*  4.4.4.0/24       23.23.23.3                             0 100 i
*>                  12.12.12.1                             0 100 i
    实验表明学到的“1.1.1.0/24”,“3.3.3.0/24”和“4.4.4.0/24”网络都有两条路径,而且都是来自AS100。由此看出BGP联邦内所有成员的信息对外都被隐藏。   

R3#sh ip bgp
BGP table version is 9, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       13.13.13.1               0    100      0 (65001) i
*  2.2.2.0/24       13.13.13.1               0    100      0 (65001) 200 i
*>                  23.23.23.2               0             0 200 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i
r>i4.4.4.0/24       4.4.4.4                  0    100      0 i
     在联邦内的AS-PATH用“()”表示。

R4#sh ip bgp
BGP table version is 8, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.0/24       3.3.3.3                  0    100      0 (65001) i
*>i2.2.2.0/24       3.3.3.3                  0    100      0 200 i
r>i3.3.3.0/24       3.3.3.3                  0    100      0 i
*> 4.4.4.0/24       0.0.0.0                  0         32768 i

在联邦范围内,在成员AS加入到AS-PATH中,并且用括号扩起来,但是并不将他们公布到联邦的范围以外。AS-PATH中联邦的AS号用于避免出现路由环路。

R4#sh ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets
C       34.34.34.0 is directly connected, Serial1/2
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [200/0] via 3.3.3.3, 00:06:24
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [200/0] via 3.3.3.3, 00:02:55
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2297856] via 34.34.34.3, 00:27:37, Serial1/2
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0

举报本楼

本帖有 2 个回帖,您需要登录后才能浏览 登录 | 注册
您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系大家 |网站地图  

GMT+8, 2024-9-23 19:28 , Processed in 0.225557 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部
XML 地图 | Sitemap 地图