+广播喇叭+

+自言自语+

+评头论足+

+留言蜚语+

+友情客串+

+博客信息+


BGP--路由放射器
飞天小雄 发表于 2008-6-29 11:30:50

1)  底层的基本配置:

R1#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

Serial2/1                  12.0.0.1        YES manual up                    up     

Loopback0                1.1.1.1         YES manual up                    up 

 

R2#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol

Serial2/1                  12.0.0.2        YES manual up                    up     

Serial2/2                  23.0.0.2        YES manual up                    up      

Loopback0                2.2.2.2         YES manual up                    up  

 

R3#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol 

Serial2/1                  23.0.0.3        YES manual up                    up     

Serial2/2                  34.0.0.3        YES manual up                    up     

 

R4#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol 

Serial2/1                  34.0.0.4        YES manual up                    up     

Serial2/2                  45.0.0.4        YES manual up                    up       

Loopback0                4.4.4.4         YES manual up                    up 

 

R5#sh ip int b

Interface                  IP-Address      OK? Method Status                Protocol 

Serial2/2                  45.0.0.5        YES manual up                    up      

Loopback0                5.5.5.5         YES manual up                    up 

 

2)  R1R2建立EBGP邻居关系并传递路由:

R1(config)#router bgp 100

R1(config-router)#neighbor 12.0.0.2 remote-as 200

R2(config)#router bgp 200

R2(config-router)#neighbor 12.0.0.1 remote-as 100

 

查看邻居关系:

R1#sh ip bgp summary

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

12.0.0.2        4   200       6       6        1    0    0 00:02:07        0

R1#

R2#sh ip bgp su

R2#sh ip bgp summary

BGP router identifier 2.2.2.2, local AS number 200

BGP table version is 1, main routing table version 1

 

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

12.0.0.1        4   100       4       4        1    0    0 00:00:02        0

\\ R1R2的邻居关系建立起来\\

 

R1#sh ip rou

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

     12.0.0.0/24 is subnetted, 1 subnets

C       12.0.0.0 is directly connected, Serial2/1

 

R2#sh ip rou

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, Serial2/2

     12.0.0.0/24 is subnetted, 1 subnets

C       12.0.0.0 is directly connected, Serial2/1

可见建立邻居但R2没学习到R1的路由

 

R1上手动汇总1.1.1.0网段路由:

R1(config)#router bgp 100

R1(config-router)#network 1.1.1.0 mask 255.255.255.0

 

 

查看R1R2  bgp

R1#sh ip bgp

BGP table version is 2, local router ID is 1.1.1.1

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       0.0.0.0                  0         32768 i

可见1.1.1.0网段被优化且下一跳为0.0.0.0及下一跳为自己(可达)

 

R2#sh ip bgp

BGP table version is 2, 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       12.0.0.1                 0             0 100 i

可见1.1.1.0网段被优化且下一跳为12.0.0.1(可达)

 

 

R2#sh ip rou

     1.0.0.0/24 is subnetted, 1 subnets

B       1.1.1.0 [20/0] via 12.0.0.1, 00:06:27

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, Serial2/2

     12.0.0.0/24 is subnetted, 1 subnets

C       12.0.0.0 is directly connected, Serial2/1

可见R2学习到1.1.1.0的网段

 

 

3)  R2.R3,R4之间跑eigrp并关闭自动汇总:

R2(config)#router eigrp 10

R2(config-router)#network 23.0.0.0

R2(config-router)#net 2.2.2.0

R2(config-router)#no auto-summary

 

R3(config)#router eigrp 10

R3(config-router)#net 23.0.0.0

R3(config-router)#net 34.0.0.0

R3(config-router)#no auto-summary

 

R4(config)#router eigrp 10

R4(config-router)#net 34.0.0.0

R4(config-router)#net 4.4.4.0

R4(config-router)#no auto-summary

 

R2#ping 4.4.4.4

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/88/152 ms

确保R2ping4.4.4.4

 

 

R2R4之间建立IBGP


阅读全文 | 回复(0) | 引用通告 | 编辑
 

发表评论:

    昵称:
    密码:
    主页:
    标题:
Powered by Oblog.