[56cto网友尾巴原创]18.BGP广播默认路由
来源: 作者: 发布时间:2009-01-02 阅读次数

 

R2配置

router bgp 2

 no synchronization

 bgp log-neighbor-changes

 redistribute static

 neighbor 12.1.1.1 remote-as 1

 default-information originate

 default-metric 10(此命令只有在默认重发布度量的情况下才有作用)

 no auto-summary

ip route 3.3.3.0 255.255.255.0 23.1.1.2

R2路由

     3.0.0.0/24 is subnetted, 1 subnets

S       3.3.3.0 [1/0] via 23.1.1.2

     23.0.0.0/24 is subnetted, 1 subnets

C       23.1.1.0 is directly connected, Serial1/1

     12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected, Serial1/0

R2 BGP

   Network          Next Hop            Metric LocPrf Weight Path

*> 3.3.3.0/24          23.1.1.2                10         32768 ?

R1路由

     3.0.0.0/24 is subnetted, 1 subnets

B       3.3.3.0 [20/10] via 12.1.1.2, 00:04:07

     12.0.0.0/24 is subnetted, 1 subnets

C       12.1.1.0 is directly connected, Serial1/1

默认的3个条件:

1:必须有静态指出去。2:将静态路由重分布进BGP3:使用default-information originate广播路由到其他路由器(为EBGP邻居)

 

R2配置

router bgp 1

 no synchronization

 bgp router-id 2.2.2.2

 bgp log-neighbor-changes

 neighbor 12.1.1.1 remote-as 1

 neighbor 12.1.1.1 next-hop-self

 neighbor 12.1.1.1 default-originate(把这条默认下放给邻居12.1.1.1

 neighbor 23.1.1.2 remote-as 2

 no auto-summary

ip route 0.0.0.0 0.0.0.0 23.1.1.2(必须有条就默认指出去)

R1bgp

*>i0.0.0.0          12.1.1.2                      100      0 i

*> 1.1.1.0/24       0.0.0.0                  0         32768 i

R1路由表

B*   0.0.0.0/0 [200/0] via 12.1.1.2, 00:11:32

R4bgp

*> 0.0.0.0          192.168.1.1                            0 1 i

*> 1.1.1.0/24       192.168.1.1              0             0 1 i

R4路由表

B*   0.0.0.0/0 [20/0] via 192.168.1.1, 00:05:46

上一篇:[56cto网友尾巴原创]17.bgp的MD5加密认证  
下一篇:[56cto网友尾巴原创]19.bgp的管理距离 总结