用route-map实现双ISP接入

以下实验是从我前面发的实验中剥离出来的,希望对各位网友有所帮助

如拓扑所示,在实验室环境下,R5,R6,R7为CISCO2509路由器,和CISCO4000一起,一边模拟帧中继网络,一边用PPP chap认证,下面的局域网采用OSPF,均已配置成功,此来模拟两种不同的ISP接入,目前实验已经完成,成功的实现了线路冗余和负载均衡。

下面发下4000上的配置

r9#show run
Building configuration...

Current configuration : 1777 bytes
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r9
!
!
username r7 password 0 123
!
!
!
!
ip subnet-zero
!
!
!
!
!
!
interface Loopback0
ip address 9.9.9.9 255.255.255.0
!
interface Ethernet0
ip address 172.16.1.1 255.255.255.0
ip nat inside
media-type 10BaseT
!
interface Ethernet1
ip address 172.16.4.1 255.255.255.0
ip nat inside
media-type 10BaseT
!
interface Serial0
no ip address
shutdown
no fair-queue
!
interface Serial1
ip address 172.16.2.1 255.255.255.0
ip nat outside
encapsulation frame-relay
ip policy route-map fuzai
frame-relay map ip 172.16.2.2 100 broadcast
frame-relay interface-dlci 100
!
interface Serial2
ip address 172.16.3.1 255.255.255.0
ip nat outside
encapsulation ppp
ip policy route-map fuzai
shutdown
!
interface Serial3
no ip address
shutdown
!
router ospf 1
log-adjacency-changes
network 172.16.1.1 0.0.0.0 area 0
network 172.16.4.1 0.0.0.0 area 0
default-information originate
!
ip nat inside source route-map isp1 interface Serial1 overload
ip nat inside source route-map isp2 interface Serial2 overload
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.3.2
ip route 0.0.0.0 0.0.0.0 172.16.2.2
no ip http server
!
access-list 1 permit 192.168.3.0 0.0.0.255
access-list 1 permit 192.168.4.0 0.0.0.255
access-list 2 permit 192.168.3.0
access-list 3 permit 192.168.4.0
route-map isp2 permit 20
match ip address 1
!
route-map isp1 permit 20
match ip address 1
match interface Serial1
!
route-map fuzai permit 10
match ip address 2
set ip default next-hop 172.16.2.2
!
route-map fuzai permit 20
match ip address 3
set ip default next-hop 172.16.3.2

!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
!
end

转载于:https://my.oschina.net/lintur/blog/4854

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值