设为首页收藏本站language 语言切换
查看: 1673|回复: 1
收起左侧

[求助] BGP 本地优先级的问题

[复制链接]
发表于 2013-12-11 10:41:19 | 显示全部楼层 |阅读模式
两台服务器我是直接用的两个接口模拟,我用模拟的客户端去ping服务器的接口地址可以PING通,但

是RTA去ping客户端不通,我用客户端traceroute服务器接口地址都是走的上面,但是需求是访问192


走上面,访问172走下面。大家看一下我的配置是不是有问题。



RTA:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 20.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet3/0
ip address 30.1.1.1 255.255.255.0
duplex auto
speed auto
!
router bgp 100
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 20.1.1.0 mask 255.255.255.0
network 30.1.1.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
network 192.168.1.0
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 ebgp-multihop 2
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
ip http server
no ip http secure-server
!
ip route 2.2.2.2 255.255.255.255 FastEthernet2/0
ip route 3.3.3.3 255.255.255.255 FastEthernet1/0



RTB:
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 40.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 20.1.1.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 40.1.1.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
network 40.1.1.0 mask 255.255.255.0
network 50.1.1.0 mask 255.255.255.0
network 100.1.1.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Loopback0
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 update-source Loopback0
neighbor 4.4.4.4 remote-as 200
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 route-map jiang out
no auto-summary
!
ip http server
no ip http secure-server
!
ip route 1.1.1.1 255.255.255.255 FastEthernet1/0
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 172.16.1.0 0.0.0.255
!
route-map jiang permit 10
match ip address 1
set local-preference 200
!
route-map jiang permit 20
match ip address 2
set local-preference 100


RTC:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 50.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 30.1.1.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 50.1.1.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
network 40.1.1.0 mask 255.255.255.0
network 50.1.1.0 mask 255.255.255.0
network 100.1.1.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 200
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 route-map xinzhi out
no auto-summary
!
ip http server
no ip http secure-server
!
ip route 1.1.1.1 255.255.255.255 FastEthernet1/0
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 172.16.1.0 0.0.0.255
!
route-map xinzhi permit 10
match ip address 1
set local-preference 100
!
route-map xinzhi permit 20
match ip address 2
set local-preference 200
!



RTD:
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 40.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 50.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet2/0
ip address 100.1.1.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 40.1.1.0 0.0.0.255 area 0
network 50.1.1.0 0.0.0.255 area 0
network 100.1.1.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
network 40.1.1.0 mask 255.255.255.0
network 50.1.1.0 mask 255.255.255.0
network 100.1.1.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 update-source Loopback0
no auto-summary
!
ip http server
no ip http secure-server
!


路由器模拟的客户端:
interface FastEthernet0/0
ip address 100.1.1.2 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
ip default-gateway 100.1.1.1
ip http server
no ip http secure-server






QQ图片20131210111633.jpg
发表于 2013-12-12 10:32:24 | 显示全部楼层
回复 支持 反对

举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-7-12 16:25 , Processed in 0.133016 second(s), 21 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表