免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 994 | 回复: 0
打印 上一主题 下一主题

Configuring Basic BGP [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-15 19:19 |只看该作者 |倒序浏览
实验目的:
1、掌握BGP的基本配置方法。
2、掌握如何查看BGP的各种配置信息。

实验拓扑图:


实验步骤及要求:
1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。
2、在R1、R2和R3配置BGP路由协议,具体配置如下:
R1(config)#router bgp 64512
[stanley1]

R1(config-router)#neighbor 172.16.255.2 remote-as 64512
[stanley2]

R1(config-router)#
R1(config-router)#network 172.16.255.0 mask 255.255.255.252
[stanley3]

R1(config-router)#network 172.16.0.0 mask 255.255.255.0
R1(config-router)#network 172.16.1.0 mask 255.255.255.0
R1(config-router)#network 172.16.2.0 mask 255.255.255.0
R1(config-router)#network 172.16.3.0 mask 255.255.255.0
R1(config-router)#exit
R1(config)#

R2(config)#router bgp 64512
R2(config-router)#neighbor 172.16.255.1 remote-as 64512
R2(config-router)#neighbor 10.1.255.2 remote-as 64513
[stanley4]

R2(config-router)#
R2(config-router)#network 172.16.255.0 mask 255.255.255.252
R2(config-router)#network 10.1.255.0 mask 255.255.255.252
R2(config-router)#exit
R2(config)#exit
R2#

R3(config)#router bgp 64513
R3(config-router)#neighbor 10.1.255.1 remote-as 64512
R3(config-router)#
R3(config-router)#network 10.1.255.0 mask 255.255.255.252
R3(config-router)#network 192.168.0.0
[stanley5]

R3(config-router)#network 192.168.1.0
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.3.0
R3(config-router)#exit
R3(config)#
3、查看BGP的邻居关系:
R1#show ip bgp neighbors
BGP neighbor is 172.16.255.2,  remote AS 64512, internal link
[stanley6]

  BGP version 4, remote router ID 172.16.255.2
  BGP state = Established, up for 00:29:25
[stanley7]

  Last read 00:00:24, hold time is 180, keepalive interval is 60 seconds
[stanley8]

  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  1          1
    Notifications:          0          0
    Updates:                1          4
    Keepalives:            32         32
    Route Refresh:          0          0
[stanley9]
     Total:                 34         37
  Default minimum time between advertisement runs is 5 seconds
…………
4、查看简洁BGP汇总信息:
R2#show ip bgp summary
BGP router identifier 172.16.255.2, local AS number 64512
BGP table version is 19, main routing table version 19
10 network entries using 1010 bytes of memory
11 path entries using 528 bytes of memory
3 BGP path attribute entries using 180 bytes of memory
1 BGP AS-PATH entries using 24 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 1742 total bytes of memory
BGP activity 14/4 prefixes, 16/5 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.255.2      4 64513      47      49       19    0    0 00:10:15        5
172.16.255.1    4 64512      42      45       19    0    0 00:37:53        4
[stanley10]
R2#
5、查看R1的路由表:
R1#show ip route

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
C       172.16.255.0/30 is directly connected, FastEthernet0/0
C       172.16.0.0/24 is directly connected, Loopback0
C       172.16.1.0/24 is directly connected, Loopback0
C       172.16.2.0/24 is directly connected, Loopback0
C       172.16.3.0/24 is directly connected, Loopback0
     10.0.0.0/30 is subnetted, 1 subnets
B       10.1.255.0 [200/0] via 172.16.255.2, 00:48:22
B    192.168.0.0/24 [200/0] via 10.1.255.2, 00:22:27
B    192.168.1.0/24 [200/0] via 10.1.255.2, 00:22:27
B    192.168.2.0/24 [200/0] via 10.1.255.2, 00:22:27
B    192.168.3.0/24 [200/0] via 10.1.255.2, 00:22:27
[stanley11]
R1#
6、另外一些命令:
R1#clear ip bgp *
[stanley12]


R1#clear ip bgp 172.16.255.2
[stanley13]


R1#clear ip bgp * soft
[stanley14]

7、实验完成。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/99768/showart_1997394.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP