Home  >  Article  >  Database  >  用Cisco路由器实现IP地址翻译一例

用Cisco路由器实现IP地址翻译一例

WBOY
WBOYOriginal
2016-06-07 15:06:261800browse

目前,全国统计系统计算机网络必须统一通过国家统计局从中科院出口访问Internet,这就需要利用中科院分配的Internet合法 地址 210.X.X.X,而统计系统内部使用的IP 地址 是11.X.X.X.,这样使用起来会存在以下主要问题: 1. 每个省统计局分配到的210 地址 资源

目前,全国统计系统计算机网络必须统一通过国家统计局从中科院出口访问Internet,这就需要利用中科院分配的Internet合法地址210.X.X.X,而统计系统内部使用的IP地址是11.X.X.X.,这样使用起来会存在以下主要问题:

1. 每个省统计局分配到的210地址资源十分有限,不能满足上网需求。

2. 210地址是Internet合法地址,因此配置210地址的机器安全性差,易受Internet用户的攻击。

为解决这些问题,我们考虑用Cisco7206路由器在内部地址11.X.X.X 到Internet合法地址210.X.X.X之间进行翻译,程序如下:

1 interface Ethernet0/0

2 ip address

11.35.181.1 55.255.240.0

3 no ip directed?

broadcast

4 ip nat inside

5 !

6 interface Serial0/0.1 point?to?point

7 ip address 210.72.49.1

255.255.255.252 secondary

8 ip address 11.35.1.38 255.255.255.252

9 no ip directed?broadcast

10 ip nat outside

11 !

12 router eigrp 130

13 passive?interface Ethernet0/0

14 network 11.0.0.0

15 network 210.72.49.0

16 !

17 ip nat pool 163net 210.72.49.17

210.72.49.30 netmask 255.255.255.240

18 ip nat inside source list 100 pool 163net

overload

19 ip classless

20 !

21 access?list 100 deny ip any 11.0.0.0

0.255.255.255

22 access?list 100 permit ip any any

23 !

24 end

在以上配置中,有两点需要解释:

1. 第7、17行中的IP地址210.72.49.1,210.72.49.17~ 210.72.49.30是分配给省统计局的Internet合法地址

2. 由于国家统计局内网(11.X.X.X)和外网(210.X.X.X)是通过防火墙进行隔离,因此需要配置第21行,才能使得省局配置11.X.X.X地址的机器既能访问国家统计局内部网,又能访问Internet。否则只能访问Internet而不能访问国家统计局内部网。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn