随着我国路由行业的发展,同时也推动路由技术的更新升级,下面我们讲解了CISCO路由交换机基于源地址的/策略路由配置。CISCO路由交换机做策略路由,由于4507R原先的IOS映象文件不支持基于源地址的策略路由,后经过在CISCO网站上查找版本说明,升级IOS文件,CISCO4507R连接到两个ISP(internet和ISP2),下接两个小BRAS,BRAS中配置了不同ISP的IP地址段,4507R基于源地址做策略路由。CISCO路由交换机具体配置如下。
- 4507#sh run
- Building configuration...
- Current configuration : 2104 bytes
- !
- version 12.1
- no service pad
- service timestamps debug uptime
- service timestamps log uptime
- service password-encryption
- service compress-config
- !
- hostname 4507
- !
- boot system flash bootflash:cat4000-i5s-mz.121-20.EW.bin
- boot system flash bootflash:cat4000-is-mz.121-12c.EW1.bin
- enable password 7 06571E20561C1E0A1D
- !
- ip subnet-zero
- !
- spanning-tree extend system-id
- !
- redundancy
- mode rpr
- main-cpu
- auto-sync standard
- !
- !
- interface GigabitEthernet1/1
- description to Internet
- no switchport
- ip address 222.112.123.110 255.255.255.252
- !
- interface GigabitEthernet1/2
- !
- interface GigabitEthernet3/1
- description to bras1
- no switchport
- ip address 162.153.123.113 255.255.255.252
- ip policy route-map isp2
- speed nonegotiate
- !
- interface GigabitEthernet3/2
- description to bras2
- no switchport
- ip address 162.153.123.117 255.255.255.252
- ip policy route-map isp2
- speed nonegotiate
- !
- interface GigabitEthernet3/3
- !
- interface GigabitEthernet3/4
- !
- interface GigabitEthernet3/5
- !
- interface GigabitEthernet3/6
- !
- interface GigabitEthernet4/1
- description to isp2
- no switchport
- ip address 211.211.44.254 255.255.255.252
- speed nonegotiate
- !
- interface GigabitEthernet4/2
- !
- interface GigabitEthernet4/3
- !
- interface GigabitEthernet4/4
- !
- interface GigabitEthernet4/5
- !
- interface GigabitEthernet4/6
- !
- interface Vlan1
- no ip address
- !
- ip classless
- ip route 0.0.0.0 0.0.0.0 222.112.123.109
- ip route 211.211.218.0 255.255.252.0 162.153.123.113
- ip route 211.211.232.0 255.255.254.0 162.153.123.117
- ip route 222.122.16.0 255.255.252.0 162.153.123.113
- ip route 221.122.20.0 255.255.252.0 162.153.123.117
- no ip http server
- !
- access-list 10 permit 211.211.218.0 0.0.3.255
- access-list 10 permit 211.211.232.0 0.0.1.255
- route-map edu permit 10
- match ip address 10
- set ip next-hop 211.211.44.253
- !
- !
- !
- line con 0
- stopbits 1
- line vty 0 4
- exec-timeout 3 0
- password 7 06571E20561C1E0A1D
- login
- line vty 5 15
- exec-timeout 3 0
- password 7 03554A0A1C5D365F56
- login
- !
- !
- end