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

电信网通双线接入配置案例

[复制链接]
发表于 2010-10-8 12:33:49 | 显示全部楼层 |阅读模式
配置能够实现自动切换,,,前一阵我也做过类似的双ISP的接入,,配置类似,,可以实现自动切换

跟我以前做的一个项目很类似,当时就是用了静态路由+默认来实现的。
只有从内往外的访问需求,连策略路由都不用,倒是完全满足负载分担和链路备份的需求。
只有如果有外部访问内部的需求,就做不到优选电信或网通线路了。有钱还是上个F5吧

很早就有类似配置了。。
1:NAT要做对,根据出口和IP一起来定制
2:路由作对就OK

建议加SLA,否则还不如默认路由来的快
PBR根本没必要指定下一条,NAT已经指定了

Router#show run
Building configuration...!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable password ciscocisco
!
no aaa new-model
!
resource policy
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
ip subnet-zero
ip cef
!
no ip dhcp use vrf connected
interface Ethernet0

description wt

ip address ... 255.255.255.0
设置网通ip地址

ip nat outside
设置广域网口

full-duplex
!
interface Ethernet1

description dx

ip address ... 255.255.255.240
设置电信ip地址

ip nat outside
设置广域网口

full-duplex
!
interface FastEthernet0

ip address 192.168.1.254 255.255.255.0

ip nat inside
设置内网口

speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0  ...
将电信设置为出口默认路由



网通静态路由地址段,费了不少劲儿才收集到的

ip route 58.16.0.0 255.248.0.0 ...

ip route 58.100.0.0 255.254.0.0 ...

ip route 58.240.0.0 255.240.0.0 ...

ip route 60.0.0.0 255.248.0.0 ...

ip route 60.8.0.0 255.252.0.0 ...

ip route 60.12.0.0 255.255.0.0 ...  

ip route 60.13.0.0 255.255.192.0 ...

ip route 60.13.128.0 255.255.128.0 ...

ip route 60.16.0.0 255.240.0.0 ...

ip route 60.24.0.0 255.248.0.0 ...

ip route 60.31.0.0 255.255.0.0 ...

ip route 60.208.0.0 255.248.0.0 ...

ip route 60.216.0.0 255.254.0.0 ...

ip route 60.220.0.0 255.252.0.0 ...

ip route 61.48.0.0 255.252.0.0 ...

ip route 61.52.0.0 255.254.0.0 ...

ip route 61.54.0.0 255.255.0.0 ...

ip route 61.55.0.0 255.255.0.0 ...

ip route 61.133.0.0 255.255.128.0 ...

ip route 61.134.64.0 255.255.192.0 ...

ip route 61.134.128.0 255.255.128.0 ...

ip route 61.135.0.0 255.255.0.0 ...

ip route 61.136.0.0 255.255.0.0 ...

ip route 61.138.0.0 255.255.128.0 ...

ip route 61.139.128.0 255.255.192.0 ...

ip route 61.148.0.0 255.255.0.0 ...

ip route 61.149.0.0 255.255.0.0 ...

ip route 61.156.0.0 255.255.0.0 ...

ip route 61.158.0.0 255.255.0.0 ...

ip route 61.159.0.0 255.255.192.0 ...

ip route 61.161.0.0 255.255.192.0 ...

ip route 61.161.128.0 255.255.128.0 ...

ip route 61.162.0.0 255.255.0.0 ...

ip route 61.163.0.0 255.255.0.0 ...

ip route 61.167.0.0 255.255.0.0 ...

ip route 61.168.0.0 255.255.0.0 ...

ip route 61.176.0.0 255.255.0.0 ...

ip route 61.179.0.0 255.255.0.0 ...

ip route 61.180.128.0 255.255.128.0 ...

ip route 61.181.0.0 255.255.0.0 ...

ip route 61.182.0.0 255.255.0.0 ...

ip route 61.189.0.0 255.255.128.0 ...

ip route 124.90.0.0 255.254.0.0 ...

ip route 124.162.0.0 255.255.0.0 ...

ip route 202.32.0.0 255.224.0.0 ...

ip route 202.96.64.0 255.255.224.0 ...

ip route 202.97.128.0 255.255.128.0 ...

ip route 202.98.0.0 255.255.224.0 ...

ip route 202.99.0.0 255.255.0.0 ...

ip route 202.102.128.0 255.255.192.0 ...

ip route 202.102.224.0 255.255.254.0 ...

ip route 202.106.0.0 255.255.0.0 ...

ip route 202.107.0.0 255.255.128.0 ...

ip route 202.108.0.0 255.255.0.0 ...

ip route 202.110.0.0 255.255.128.0 ...

ip route 202.110.192.0 255.255.192.0 ...

ip route 202.111.128.0 255.255.192.0 ...

ip route 203.79.0.0 255.255.0.0 ...

ip route 203.80.0.0 255.255.0.0 ...

ip route 203.81.0.0 255.255.224.0 ...

ip route 203.86.32.0 255.255.224.0 ...

ip route 203.86.64.0 255.255.224.0 ...

ip route 203.90.0.0 255.255.128.0 ...

ip route 203.90.128.0 255.255.192.0 ...

ip route 203.90.192.0 255.255.224.0 ...

ip route 203.92.0.0 255.254.0.0 ...

ip route 210.12.0.0 255.255.128.0 ...

ip route 210.12.192.0 255.255.192.0 ...

ip route 210.13.0.0 255.255.255.0 ...

ip route 210.14.160.0 255.255.224.0 ...

ip route 210.14.192.0 255.255.192.0 ...

ip route 210.15.0.0 255.255.128.0 ...

ip route 210.15.128.0 255.255.192.0 ...

ip route 210.16.128.0 255.255.192.0 ...

ip route 210.21.0.0 255.255.0.0 ...

ip route 210.22.0.0 255.255.0.0 ...

ip route 210.51.0.0 255.255.0.0 ...

ip route 210.52.0.0 255.254.0.0 ...

ip route 210.52.128.0 255.255.128.0 ...

ip route 210.53.0.0 255.255.0.0 ...

ip route 210.74.64.0 255.255.192.0 ...

ip route 210.74.128.0 255.255.192.0 ...

ip route 210.78.0.0 255.255.224.0 ...

ip route 210.82.0.0 255.254.0.0 ...

ip route 211.100.0.0 255.255.0.0 ...

ip route 211.101.0.0 255.255.192.0 ...

ip route 211.147.0.0 255.255.0.0 ...

ip route 211.167.96.0 255.255.224.0 ...

ip route 218.4.0.0 255.252.0.0 ...

ip route 218.10.0.0 255.254.0.0 ...

ip route 218.21.128.0 255.255.128.0 ...

ip route 218.24.0.0 255.254.0.0 ...

ip route 218.26.0.0 255.255.0.0 ...

ip route 218.27.0.0 255.255.0.0 ...

ip route 218.28.0.0 255.254.0.0 ...

ip route 218.56.0.0 255.252.0.0 ...

ip route 218.60.0.0 255.254.0.0 ...

ip route 218.62.0.0 255.255.128.0 ...

ip route 218.67.128.0 255.255.128.0 ...

ip route 218.68.0.0 255.254.0.0 ...

ip route 218.109.159.0 255.255.255.0 ...

ip route 219.141.128.0 255.255.128.0 ...

ip route 219.142.0.0 255.254.0.0 ...

ip route 219.154.0.0 255.254.0.0 ...

ip route 219.156.0.0 255.254.0.0 ...

ip route 219.158.0.0 255.255.0.0 ...

ip route 219.159.0.0 255.255.192.0 ...

ip route 220.248.0.0 255.252.0.0 ...

ip route 220.252.0.0 255.255.0.0 ...

ip route 221.0.0.0 255.252.0.0 ...

ip route 221.4.0.0 255.254.0.0 ...

ip route 221.6.0.0 255.255.0.0 ...

ip route 221.7.128.0 255.255.128.0 ...

ip route 221.8.0.0 255.254.0.0 ...

ip route 221.10.0.0 255.255.0.0 ...

ip route 221.11.0.0 255.255.128.0 ...

ip route 221.12.0.0 255.252.0.0 ...

ip route 221.12.0.0 255.255.128.0 ...

ip route 221.12.128.0 255.255.192.0 ...

ip route 221.192.0.0 255.252.0.0 ...

ip route 221.195.0.0 255.255.0.0 ...

ip route 221.196.0.0 255.254.0.0 ...

ip route 221.199.0.0 255.255.224.0 ...

ip route 221.199.32.0 255.255.240.0 ...

ip route 221.199.128.0 255.255.192.0 ...

ip route 221.199.192.0 255.255.240.0 ...

ip route 221.200.0.0 255.252.0.0 ...

ip route 221.204.0.0 255.254.0.0 ...

ip route 221.207.0.0 255.255.192.0 ...

ip route 221.208.0.0 255.240.0.0 ...

ip route 221.208.0.0 255.252.0.0 ...

ip route 221.213.0.0 255.255.0.0 ...

ip route 221.214.0.0 255.254.0.0 ...

ip route 222.128.0.0 255.252.0.0 ...

ip route 222.132.0.0 255.252.0.0 ...

ip route 222.136.0.0 255.248.0.0 ...

ip route 222.160.0.0 255.252.0.0 ...

ip route 222.163.0.0 255.255.224.0 ...

!



no ip http server

ip nat translation timeout 120

ip nat translation tcp-timeout 60

ip nat translation icmp-timeout 180

ip nat inside source route-map dx interface Ethernet1 overload   通过电信接口NAT转换

ip nat inside source route-map wt interface Ethernet0 overload   通过网通接口NAT转换

!

access-list 101 permit ip 192.168.1.0 0.0.0.255 any

access-list 102 permit ip 192.168.1.0 0.0.0.255 any

route-map wt permit 10  网通策略路由地址段匹配101

match ip address 101

match interface Ethernet0  匹配接口E0

set ip default next-hop ...

!

route-map dx permit 10  电信策略路由地址段匹配102

match ip address 102

match interface Ethernet1   匹配接口E1

set ip default next-hop ...

!

!

control-plane

!

!

line con 0

line aux 0

line vty 0 4

password ########

login

!

end
发表于 2010-10-8 21:48:27 | 显示全部楼层
................................................
沙发 2010-10-8 21:48:27 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2010-10-12 11:30:16 | 显示全部楼层
板凳 2010-10-12 11:30:16 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-2-15 10:35:34 | 显示全部楼层
MS不错。 。 看看先,。 。谢谢。。
地板 2011-2-15 10:35:34 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-2-15 11:37:55 | 显示全部楼层
成功做完。。谢谢。。 。
5# 2011-2-15 11:37:55 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-7-28 08:25:02 | 显示全部楼层
6# 2012-7-28 08:25:02 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-30 22:23:14 | 显示全部楼层
7# 2013-5-30 22:23:14 回复 收起回复
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-23 22:02 , Processed in 0.067851 second(s), 22 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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