宽带接入应用的核心-NAT配置模版
近期论坛中很多用户都在询问关于NAT的相关配置和问题,事实上,这也是绝大多数宽带接入用户会面临的问题。
注:虽然我们后来提供的1705等宽带路由器是可以通过Web界面来设置的,但本帖还是以CLI命令行来说明问题。
配置模版:
NAT的配置分为四段:
1、指定接口
通常需要至少两个以太网接口,分别设定为inside和outside,顾名思义,分别连接内网和外网;如:
interface FastEthernet0/0
ip address 10.111.12.13 255.255.255.0
no ip directed-broadcast
ip nat outside
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
no ip directed-broadcast
ip nat inside
!
interface FastEthernet0/0
ip address 10.111.12.13 255.255.255.0
no ip directed-broadcast
ip nat outside
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
no ip directed-broadcast
ip nat inside
!
2、指定用户群
注:一般是根据IP段来定义用户,如果要根据TCP、UDP端口号等信息来区分,需要使用扩展型ACL
ip access-list standard NATACL
permit 192.168.1.0 255.255.255.0
ip access-list standard NATACL
permit 192.168.1.0 255.255.255.0
3、具体NAT翻译
ip nat inside source list NATACL interface FastEthernet0/0
ip nat inside source list NATACL interface FastEthernet0/0
这条指令的意思是:“路由器从inside口上收到的数据包,如果其符合NATACL定义的规则,就将其Source源地址改为F0/0口的地址,即公网地址,然后继续转发”。
4、当然上面说转发的时候,还需要配合路由设置,对于大多数单线路接入的情况,使用默认路由即可!
ip route default 10.111.12.14
ip route default 10.111.12.14
有些时候,外网接入是ADSL的,请使用相关的PPPoE模版来替代外网口模版,具体请参阅此贴:
http://bbs.bdcom.com.cn/dispbbs.asp?boardid=3&id=120
Router#show ip nat translations
Pro. Dir Inside local Inside global Outside local Outside global
TCP OUT 192.168.1.3:2951 10.11.12.13:2951 22.168.213.90:445 22.168.213.90:445
Pro. Dir Inside local Inside global Outside local Outside global
TCP OUT 192.168.1.3:2951 10.11.12.13:2951 22.168.213.90:445 22.168.213.90:445
输出信息的前两项就是数据包的源地址被转换(前和后)的变化,后两项是目的地址,大多数情况下是不会变化的;本次转换的是TCP报文。
当然,在一个实际运行的路由器网络中,这样的条目会非常多,少则几百,多则上千上万;
查看时,可以将指令改为:
show ip nat translations
host <PC_IP_Addr>
这样可以大大减少输出的信息量。
注意:数据包的转发通常是有去有回的,对于一个引用的两个方向的数据包,其源、目的IP通常是对称相反的,但信息总量是一致的,所以这两个方向的数据包可以匹配同一个NAT转换条目。
很多时候,用户不仅仅是要进行共享(一个公网IP地址)上网,还需要将内网的几个服务器开放/映射到公网上去,以供外面的用户进行访问,这就需要使用NAT的
端口映射功能。
其本质就是手工写入一条静态的NAT转换条目。
指令,在上述配置的基础上增加:
ip nat inside source static TCP <Local_IP> <Local_Port> <Global_IP | interface> <Global_IP>
ip nat inside source static UDP <Local_IP> <Local_Port> <Global_IP | interface> <Global_IP>
其中的四个参数分别为转换前后的IP地址和转换前后的TCP/UDP端口号。
其中,公网地址可以使用对应的端口名字来替代,主要用在adsl拨号的情况中,应对IP地址不固定的问题
状态查看,
Router#show ip nat translation
Pro. Dir Inside local Inside global Outside local Outside global
TCP --- 192.168.1.5:21 10.11.12.13:21 --- ---
Pro. Dir Inside local Inside global Outside local Outside global
TCP --- 192.168.1.5:21 10.11.12.13:21 --- ---
TCP --- 192.168.1.5:20 10.11.12.13:20 --- ---
可以看到:
1、在静态转换的条目中,没有目的地址的相关信息的;就目的地址是不需要匹配的,任何外网的用户都可以过来访问这个被映射的端口;
2、由于很多的网络服务需要使用多个端口,所以映射条目应该写多条;
常见的端口罗列,大家可以跟帖补充:)
FTP(port模式),TCP:20、21
SMTP,TCP:25
POP3,TCP:110
HTTP,TCP:80
![200812811302932554.jpg](http://bbs.bdcom.com.cn/p_w_upload/2008-12/200812811302932554.jpg)
如图,红色线条的流量即表示外网的用户能够通过
端口映射功能访问到内网的服务器;除此以外,局域网的用户可能也希望通过路由器的公网接口地址来访问到这个内网的服务器,这就是接下来要讨论的
特殊NAT功能,也称私服NAT功能。
这种情况通常是因为服务器通常会对应一个域名,而大多数的中小型用户,不愿意在内×××资建设自己的DNS服务器,转而借用公网上的电信、网通的DNS,但是这样做有一个缺陷,就是域名对应的IP地址只能是公网地址。在上面的典型拓扑中,就是路由器的外网口IP。
要解决这个问题,还是需要设置NAT的翻译表项,只不过比较“特殊”。
参考配置模版:
在一楼配置模版的情况下增加如下条目:
ip nat service privateservice
ip nat outside destination static TCP <Global_IP | interface> <Global_IP> <Local_IP> <Local_Port>
ip nat outside destination static TCP <Global_IP | interface> <Global_IP> <Local_IP> <Local_Port>
显然,其中的四个参数跟上面的NAT端口映射是一直的,只是前后的顺序反了一下。
另外,要使用私服NAT功能,还需要一个service的软件使能开关
通常NAT应用环境中,用户比较关心网络的效率和安全。
为了提高效率,我们一般会建议用户对局域网中的每个PC进行一系列的管理,参考配置指令如下(Config全局模式):
ip nat translation max-entries host any 200
给每个PC的NAT并发连接数(即转换条目的数量)加个上限,200是一个经验中比较合适的值,不宜太大,也不一太小;
此外,还建议用户搭配
GBSC功能对内网流量进行必要的管理,具体请参阅:
有些时候,网络中会比较常见ARP欺骗问题,引起网络中断、QQ账号失窃等问题,这个请参阅后续的专题“ARP专题”
双线路NAT
实际上,三、四线路也是一样的情况,只不过双线路比较典型罢了。
大多数情况下,组建双线路NAT有两种可能性:
1、“
带宽捆绑”
这种情况大多出现在用户希望获得高较高带宽,但又不愿意付出更多的租用费的环境中。比如某小型企业,可以以普通家庭用户身份向电信或者网通同时租用两根ADSL线路,然后将其“捆绑”起来,以获得相当于4M的带宽;
2、“
专网专用”
大家都知道,电信和网通之间的互访是很慢的,尤其是网络高峰期,尤其如此。当然我们现在讨论的不是其原因,而是在这种情况下,作为普通的internet接入用户,如何在这种情况下避免出现跨网带宽瓶颈。
其实方法很简单,就是该路由器向电信和网通个租用一根线路,连接到路由器。然后在路由器上面做一个判断机制,如果访问的目标主机(服务器)在电信网内,就把相应的数据包发到电信的线路上;反之就发送到网通的线路上。
注意:
事实上,除了电信和网通以外,还有其他的一些运营商,如移动、联通等;但在宽带接入市场里面,它们占的比重非常小,所以一般不做分类讨论了。
双线路NAT2
实际上,双线路的NAT配置非常简单,掌握一个原则就好了。
1、双线路指的是两个外线,即有两个端口要设置为ip nat outside,而局域网通常只有一个,设置为ip nat inside,即路由器至少要有3个接口。
2、第二部分是ACL,即对应用户权限;通常情况下,两路NAT可以公用一个ACL;
3、由于两条外线具有不同的公网地址,所以NAT转换的源地址是不同的,所以NAT转换的ip nat insdie source...指令应该是不同的。
显然,双线路NAT配置的实质就是配置两份NAT,只是有些内容可以公用,通常为:
ip nat inside和NAT的acl...
两种双线路配置的关键点在于:
路由
对于“带宽捆绑”情况,由于用户访问是不区分重点目标的,只需要设置两条等价路由即可,之后路由器会按照以“
流”为单位进行负载均衡;
对于“专网专用”,前面也分析到,关键是识别、判断其网络归属。那么如何归属呢?方法很简单,就是进行
路由穷举。
参考配置信息:
1、“带宽捆绑”,此处以双路ADSL为例
interface Virtual-tunnel0
mtu 1492
ip address negotiated
no ip directed-broadcast
ppp chap hostname <username1>
ppp chap password 0 <password1>
ppp pap sent-username <username1>password 0 <password1>
ip nat outside
ip nat mss 1452
!
interface Virtual-tunnel1
mtu 1492
ip address negotiated
no ip directed-broadcast
ppp chap hostname <username2>
ppp chap password 0 <password2>
ppp pap sent-username <username2>password 0 <password2>
ip nat outside
ip nat mss 1452
!
interface FastEthernet0/0
no ip address
no ip directed-broadcast
!
interface FastEthernet0/1
no ip address
no ip directed-broadcast
!
interface FastEthernet0/2
ip address 192.168.1.1 255.255.255.0
no ip directed-broadcast
ip nat inside
!
ip route default Virtual-tunnel0
ip route default Virtual-tunnel1
!
ip access-list standard online
permit 192.168.1.0 255.255.255.0
!
vpdn enable
!
vpdn-group 0
request-dialin
port Virtual-tunnel0
protocol pppoe
pppoe bind FastEthernet0/0
!
vpdn-group 1
request-dialin
port Virtual-tunnel1
protocol pppoe
pppoe bind FastEthernet0/1
!
ip nat translation max-entries host any 200
ip nat inside source list online interface Virtual-tunnel0
ip nat inside source list online interface Virtual-tunnel1
ip nat inside source list online interface Virtual-tunnel0
ip nat inside source list online interface Virtual-tunnel1
!
2、“专网专用”,此处以电信+网通的光纤转以太网为例子
interface FastEthernet0/0 //电信接口和地址
ip address 1.1.1.1 255.255.255.252
no ip directed-broadcast
ip nat outside
!
interface FastEthernet0/1 //网通接口和地址
ip address 2.2.2.1 255.255.255.252
no ip directed-broadcast
ip nat outside
!
interface FastEthernet0/2
ip address 192.168.1.1 255.255.255.0 //局域网网关
ip address 192.168.2.1 255.255.255.0 secondary //管理地址
no ip directed-broadcast
ip nat inside
!
ip route default FastEthernet0/0
ip route default FastEthernet0/1 20
ip route 58.16.0.0 255.252.0.0 FastEthernet0/1
ip route 58.20.0.0 255.255.0.0 FastEthernet0/1
ip route 58.22.0.0 255.254.0.0 FastEthernet0/1
ip route 58.240.0.0 255.252.0.0 FastEthernet0/1
ip route 58.246.0.0 255.254.0.0 FastEthernet0/1
ip route 58.248.0.0 255.248.0.0 FastEthernet0/1
ip route 60.0.0.0 255.224.0.0 FastEthernet0/1
ip route 60.208.0.0 255.240.0.0 FastEthernet0/1
ip route 61.48.0.0 255.248.0.0 FastEthernet0/1
ip route 61.133.0.0 255.255.128.0 FastEthernet0/1
ip route 61.134.96.0 255.255.224.0 FastEthernet0/1
ip route 61.134.128.0 255.255.128.0 FastEthernet0/1
ip route 61.135.0.0 255.255.0.0 FastEthernet0/1
ip route 61.137.128.0 255.255.128.0 FastEthernet0/1
ip route 61.138.0.0 255.255.128.0 FastEthernet0/1
ip route 61.138.128.0 255.255.192.0 FastEthernet0/1
ip route 61.139.128.0 255.255.192.0 FastEthernet0/1
ip route 61.148.0.0 255.254.0.0 FastEthernet0/1
ip route 61.156.0.0 255.255.0.0 FastEthernet0/1
ip route 61.159.0.0 255.255.192.0 FastEthernet0/1
ip route 61.161.0.0 255.255.192.0 FastEthernet0/1
ip route 61.161.128.0 255.255.128.0 FastEthernet0/1
ip route 61.162.0.0 255.254.0.0 FastEthernet0/1
ip route 61.167.0.0 255.255.0.0 FastEthernet0/1
ip route 61.168.0.0 255.255.0.0 FastEthernet0/1
ip route 61.176.0.0 255.255.0.0 FastEthernet0/1
ip route 61.179.0.0 255.255.0.0 FastEthernet0/1
ip route 61.181.0.0 255.255.0.0 FastEthernet0/1
ip route 61.182.0.0 255.255.0.0 FastEthernet0/1
ip route 61.189.0.0 255.255.128.0 FastEthernet0/1
ip route 122.192.0.0 255.252.0.0 FastEthernet0/1
ip route 122.196.0.0 255.254.0.0 FastEthernet0/1
ip route 202.96.0.0 255.255.192.0 FastEthernet0/1
ip route 202.96.64.0 255.255.240.0 FastEthernet0/1
ip route 202.97.128.0 255.255.192.0 FastEthernet0/1
ip route 202.97.224.0 255.255.248.0 FastEthernet0/1
ip route 202.97.240.0 255.255.240.0 FastEthernet0/1
ip route 202.98.0.0 255.255.240.0 FastEthernet0/1
ip route 202.99.64.0 255.255.224.0 FastEthernet0/1
ip route 202.99.96.0 255.255.248.0 FastEthernet0/1
ip route 202.99.128.0 255.255.192.0 FastEthernet0/1
ip route 202.99.208.0 255.255.240.0 FastEthernet0/1
ip route 202.99.224.0 255.255.224.0 FastEthernet0/1
ip route 202.102.128.0 255.255.248.0 FastEthernet0/1
ip route 202.102.224.0 255.255.240.0 FastEthernet0/1
ip route 202.106.0.0 255.255.0.0 FastEthernet0/1
ip route 202.107.0.0 255.255.128.0 FastEthernet0/1
ip route 202.108.0.0 255.255.0.0 FastEthernet0/1
ip route 202.110.0.0 255.255.128.0 FastEthernet0/1
ip route 202.111.128.0 255.255.192.0 FastEthernet0/1
ip route 203.93.8.0 255.255.255.0 FastEthernet0/1
ip route 203.93.192.0 255.255.192.0 FastEthernet0/1
ip route 210.13.128.0 255.255.128.0 FastEthernet0/1
ip route 210.14.160.0 255.255.224.0 FastEthernet0/1
ip route 210.14.192.0 255.255.224.0 FastEthernet0/1
ip route 210.15.32.0 255.255.224.0 FastEthernet0/1
ip route 210.15.96.0 255.255.224.0 FastEthernet0/1
ip route 210.15.128.0 255.255.192.0 FastEthernet0/1
ip route 210.21.0.0 255.255.0.0 FastEthernet0/1
ip route 210.52.128.0 255.255.128.0 FastEthernet0/1
ip route 210.53.0.0 255.255.0.0 FastEthernet0/1
ip route 210.74.96.0 255.255.224.0 FastEthernet0/1
ip route 210.74.128.0 255.255.224.0 FastEthernet0/1
ip route 210.82.0.0 255.254.0.0 FastEthernet0/1
ip route 218.8.0.0 255.252.0.0 FastEthernet0/1
ip route 218.12.0.0 255.255.0.0 FastEthernet0/1
ip route 218.21.128.0 255.255.128.0 FastEthernet0/1
ip route 218.24.0.0 255.252.0.0 FastEthernet0/1
ip route 218.56.0.0 255.252.0.0 FastEthernet0/1
ip route 218.60.0.0 255.254.0.0 FastEthernet0/1
ip route 218.67.128.0 255.255.128.0 FastEthernet0/1
ip route 218.68.0.0 255.254.0.0 FastEthernet0/1
ip route 218.104.0.0 255.252.0.0 FastEthernet0/1
ip route 219.154.0.0 255.254.0.0 FastEthernet0/1
ip route 219.156.0.0 255.254.0.0 FastEthernet0/1
ip route 219.158.0.0 255.255.0.0 FastEthernet0/1
ip route 219.159.0.0 255.255.192.0 FastEthernet0/1
ip route 220.252.0.0 255.255.0.0 FastEthernet0/1
ip route 221.0.0.0 255.240.0.0 FastEthernet0/1
ip route 221.192.0.0 255.224.0.0 FastEthernet0/1
ip route 222.128.0.0 255.240.0.0 FastEthernet0/1
ip route 222.160.0.0 255.254.0.0 FastEthernet0/1
ip route 222.162.0.0 255.255.0.0 FastEthernet0/1
ip route 222.163.0.0 255.255.224.0 FastEthernet0/1
!
ip access-list extended cnc
permit ip 192.168.1.0 255.255.255.0 any
!
ip access-list extended telcom
permit ip 192.168.1.0 255.255.255.0 any
!
!
ip nat translation max-entries host any 200
ip nat inside source list telcom interface FastEthernet0/0
ip nat inside source list cnc interface FastEthernet0/1
interface FastEthernet0/0 //电信接口和地址
ip address 1.1.1.1 255.255.255.252
no ip directed-broadcast
ip nat outside
!
interface FastEthernet0/1 //网通接口和地址
ip address 2.2.2.1 255.255.255.252
no ip directed-broadcast
ip nat outside
!
interface FastEthernet0/2
ip address 192.168.1.1 255.255.255.0 //局域网网关
ip address 192.168.2.1 255.255.255.0 secondary //管理地址
no ip directed-broadcast
ip nat inside
!
ip route default FastEthernet0/0
ip route default FastEthernet0/1 20
ip route 58.16.0.0 255.252.0.0 FastEthernet0/1
ip route 58.20.0.0 255.255.0.0 FastEthernet0/1
ip route 58.22.0.0 255.254.0.0 FastEthernet0/1
ip route 58.240.0.0 255.252.0.0 FastEthernet0/1
ip route 58.246.0.0 255.254.0.0 FastEthernet0/1
ip route 58.248.0.0 255.248.0.0 FastEthernet0/1
ip route 60.0.0.0 255.224.0.0 FastEthernet0/1
ip route 60.208.0.0 255.240.0.0 FastEthernet0/1
ip route 61.48.0.0 255.248.0.0 FastEthernet0/1
ip route 61.133.0.0 255.255.128.0 FastEthernet0/1
ip route 61.134.96.0 255.255.224.0 FastEthernet0/1
ip route 61.134.128.0 255.255.128.0 FastEthernet0/1
ip route 61.135.0.0 255.255.0.0 FastEthernet0/1
ip route 61.137.128.0 255.255.128.0 FastEthernet0/1
ip route 61.138.0.0 255.255.128.0 FastEthernet0/1
ip route 61.138.128.0 255.255.192.0 FastEthernet0/1
ip route 61.139.128.0 255.255.192.0 FastEthernet0/1
ip route 61.148.0.0 255.254.0.0 FastEthernet0/1
ip route 61.156.0.0 255.255.0.0 FastEthernet0/1
ip route 61.159.0.0 255.255.192.0 FastEthernet0/1
ip route 61.161.0.0 255.255.192.0 FastEthernet0/1
ip route 61.161.128.0 255.255.128.0 FastEthernet0/1
ip route 61.162.0.0 255.254.0.0 FastEthernet0/1
ip route 61.167.0.0 255.255.0.0 FastEthernet0/1
ip route 61.168.0.0 255.255.0.0 FastEthernet0/1
ip route 61.176.0.0 255.255.0.0 FastEthernet0/1
ip route 61.179.0.0 255.255.0.0 FastEthernet0/1
ip route 61.181.0.0 255.255.0.0 FastEthernet0/1
ip route 61.182.0.0 255.255.0.0 FastEthernet0/1
ip route 61.189.0.0 255.255.128.0 FastEthernet0/1
ip route 122.192.0.0 255.252.0.0 FastEthernet0/1
ip route 122.196.0.0 255.254.0.0 FastEthernet0/1
ip route 202.96.0.0 255.255.192.0 FastEthernet0/1
ip route 202.96.64.0 255.255.240.0 FastEthernet0/1
ip route 202.97.128.0 255.255.192.0 FastEthernet0/1
ip route 202.97.224.0 255.255.248.0 FastEthernet0/1
ip route 202.97.240.0 255.255.240.0 FastEthernet0/1
ip route 202.98.0.0 255.255.240.0 FastEthernet0/1
ip route 202.99.64.0 255.255.224.0 FastEthernet0/1
ip route 202.99.96.0 255.255.248.0 FastEthernet0/1
ip route 202.99.128.0 255.255.192.0 FastEthernet0/1
ip route 202.99.208.0 255.255.240.0 FastEthernet0/1
ip route 202.99.224.0 255.255.224.0 FastEthernet0/1
ip route 202.102.128.0 255.255.248.0 FastEthernet0/1
ip route 202.102.224.0 255.255.240.0 FastEthernet0/1
ip route 202.106.0.0 255.255.0.0 FastEthernet0/1
ip route 202.107.0.0 255.255.128.0 FastEthernet0/1
ip route 202.108.0.0 255.255.0.0 FastEthernet0/1
ip route 202.110.0.0 255.255.128.0 FastEthernet0/1
ip route 202.111.128.0 255.255.192.0 FastEthernet0/1
ip route 203.93.8.0 255.255.255.0 FastEthernet0/1
ip route 203.93.192.0 255.255.192.0 FastEthernet0/1
ip route 210.13.128.0 255.255.128.0 FastEthernet0/1
ip route 210.14.160.0 255.255.224.0 FastEthernet0/1
ip route 210.14.192.0 255.255.224.0 FastEthernet0/1
ip route 210.15.32.0 255.255.224.0 FastEthernet0/1
ip route 210.15.96.0 255.255.224.0 FastEthernet0/1
ip route 210.15.128.0 255.255.192.0 FastEthernet0/1
ip route 210.21.0.0 255.255.0.0 FastEthernet0/1
ip route 210.52.128.0 255.255.128.0 FastEthernet0/1
ip route 210.53.0.0 255.255.0.0 FastEthernet0/1
ip route 210.74.96.0 255.255.224.0 FastEthernet0/1
ip route 210.74.128.0 255.255.224.0 FastEthernet0/1
ip route 210.82.0.0 255.254.0.0 FastEthernet0/1
ip route 218.8.0.0 255.252.0.0 FastEthernet0/1
ip route 218.12.0.0 255.255.0.0 FastEthernet0/1
ip route 218.21.128.0 255.255.128.0 FastEthernet0/1
ip route 218.24.0.0 255.252.0.0 FastEthernet0/1
ip route 218.56.0.0 255.252.0.0 FastEthernet0/1
ip route 218.60.0.0 255.254.0.0 FastEthernet0/1
ip route 218.67.128.0 255.255.128.0 FastEthernet0/1
ip route 218.68.0.0 255.254.0.0 FastEthernet0/1
ip route 218.104.0.0 255.252.0.0 FastEthernet0/1
ip route 219.154.0.0 255.254.0.0 FastEthernet0/1
ip route 219.156.0.0 255.254.0.0 FastEthernet0/1
ip route 219.158.0.0 255.255.0.0 FastEthernet0/1
ip route 219.159.0.0 255.255.192.0 FastEthernet0/1
ip route 220.252.0.0 255.255.0.0 FastEthernet0/1
ip route 221.0.0.0 255.240.0.0 FastEthernet0/1
ip route 221.192.0.0 255.224.0.0 FastEthernet0/1
ip route 222.128.0.0 255.240.0.0 FastEthernet0/1
ip route 222.160.0.0 255.254.0.0 FastEthernet0/1
ip route 222.162.0.0 255.255.0.0 FastEthernet0/1
ip route 222.163.0.0 255.255.224.0 FastEthernet0/1
!
ip access-list extended cnc
permit ip 192.168.1.0 255.255.255.0 any
!
ip access-list extended telcom
permit ip 192.168.1.0 255.255.255.0 any
!
!
ip nat translation max-entries host any 200
ip nat inside source list telcom interface FastEthernet0/0
ip nat inside source list cnc interface FastEthernet0/1
使用注意点(双线路):
1、比较上述的两个案例,无论是“带宽捆绑”,还是“专网专用”,其NAT的配置部分基本都是一样的。不同指出就是在于路由的设置上面。
2、在“带宽捆绑”案例中,两条路由的目的网段和Metric(默认为1)都是相等的,即它们的权限相等,此时访问外网的流量将在两个出口上按照统计平均的原则,在两条线路上面负载均衡。
也就是说,对于某个个体用户的单个流来说,它不能确定当前是从那个接口走的(事实上也不需要区分),但同时只能走一个出口;对于整个局域网的所有流量而言,是平均分配在两个接口上面的。
所以,
单个用户的最大可用带宽是≤单个接口的带宽(本例中为2M),但有如果使用P2P方式下载除外;
对于整个局域网而言,其流量是可以分为多个流的,所以其流量是平均分配在两条线路上面的。
----对于每个出口而言,其总带宽只需要为一半的内网用户服务即可,这就减少了带宽拥塞带来的影响。
3、在“专网专用”中,所有的路由条目被分为三组:
其中
ip route default FastEthernet0/0为①,ip route default FastEthernet0/1 20为②,剩余的一大堆路由条目为③;
其优先权是
③>①>②
③内容中描述的一大堆的网段集合,就是网通的路由数据库;即路由器受到数据包之后,首先要判断它是否是访问访问网通,如果是就转发;否则进行下一步判断;
如果网通的相关条目判断失败,就根据①路由全部默认转发到F0/0即电信的网络中;
正常情况下②这个路由是没有用的,只有当电信网络出现问题,即①路由条目消失的时候才起到作用。
----也就是说,上述的配置可以实现专网专用的时候,还可以实现相互备份。
4、为什么只罗列网通的网段地址,而没有电信呢?
前面提过,电信+网通就基本涵盖了绝大多数的宽带网;
且网通的数据库量比较小,罗列起来相对比较简单。除了网通之外的所有流量就归结为“大电信网”中;
5、电信网通的ISP路由数据库可能会有变更,所以如果定期更新。
源地址: http://bbs.bdcom.com.cn/read.php?tid=136
转载于:https://blog.51cto.com/mmfrancis/256169