登录站点

用户名

密码

自由联盟 - 思科大使-无边界网络

  • 分享

    bgp inject-map 预期不成功问题

    wangzhijun 2012-02-11 20:14
    bgp相关配置:
    router bgp 65518
     bgp router-id 204.0.0.18
     no bgp default ipv4-unicast
     bgp log-neighbor-changes
     neighbor 192.168.2.1 remote-as 65517
     !
     address-family ipv4
     neighbor 192.168.2.1 activate
     no auto-summary
     no synchronization
     bgp suppress-inactive
     bgp inject-map inject exist-map existmap copy-attributes
     network 204.0.11.0
     network 204.0.16.0
     network 204.0.32.0
     network 204.200.0.0 mask 255.255.0.0
     aggregate-address 204.0.0.0 255.0.0.0 summary-only
     exit-address-family
    学习到的bgp以及本机路由:
         204.0.0.0/32 is subnetted, 1 subnets
    C       204.0.0.18 is directly connected, Loopback0
    C    204.0.16.0/24 is directly connected, Loopback16
    C    204.0.32.0/24 is directly connected, Loopback32
    C    204.0.11.0/24 is directly connected, Loopback11
    B    192.168.16.0/24 [20/0] via 192.168.2.1, 00:11:09
         192.168.2.0/30 is subnetted, 1 subnets
    C       192.168.2.0 is directly connected, Ethernet1/2
    B*   0.0.0.0/0 [20/0] via 192.168.2.1, 00:11:39
    C    204.200.0.0/16 is directly connected, Loopback200
    S    204.0.0.0/8 is directly connected, Null0
    B    203.0.0.0/8 [20/0] via 192.168.2.1, 00:11:39
    B    192.168.0.0/16 [20/0] via 192.168.2.1, 00:11:09
    route-map配置:
    ip prefix-list exist19216816 seq 5 permit 192.168.16.0/24
    !
    ip prefix-list nexthop seq 5 permit 192.168.2.1/32
    ip prefix-list permitenject seq 5 permit 204.0.11.0/24
    ip prefix-list permitenject seq 10 permit 204.0.16.0/24
    route-map existmap permit 10
     match ip address prefix-list exist19216816
     match ip route-source prefix-list nexthop
    route-map inject permit 10
     set ip address prefix-list permitenject
     set community 65518:100 additive
    对端邻居路由:

         192.168.0.0/32 is subnetted, 1 subnets
    C       192.168.0.17 is directly connected, Loopback0
    C    192.168.16.0/24 is directly connected, Loopback16
         192.168.1.0/30 is subnetted, 2 subnets
    C       192.168.1.0 is directly connected, Ethernet1/1
    C       192.168.1.4 is directly connected, Ethernet1/3
         192.168.2.0/30 is subnetted, 1 subnets
    C       192.168.2.0 is directly connected, Ethernet1/2
    B    204.0.0.0/8 [20/0] via 192.168.2.2, 00:10:03
    B    203.0.0.0/8 [20/0] via 192.168.1.2, 00:10:03
    S    192.168.0.0/16 is directly connected, Null0
     
    结果:
    inject效果没有体现。
    打开ip bgp update看不到这个inject的任何相关报文。
    r18#  show ip prefix-list detail exist19216816
    ip prefix-list exist19216816:
       count: 1, range entries: 0, sequences: 5 - 5, refcount: 2
       seq 5 permit 192.168.16.0/24 (hit count: 56, refcount: 1)
    r18#  show ip prefix-list detail permitenject
    ip prefix-list permitenject:
       count: 2, range entries: 0, sequences: 5 - 10, refcount: 3
       seq 5 permit 204.0.11.0/24 (hit count: 0, refcount: 2)
       seq 10 permit 204.0.16.0/24 (hit count: 0, refcount: 1)
    显示permitenject匹配有点不正常。
     
    不知何故?
     
     
你还不是该群组正式成员,不能参与讨论。 现在就加入。