思科路由器--nat
来源:互联网 发布:ubuntu ssh 离线安装包 编辑:程序博客网 时间:2024/05/19 02:39
思科设备需要定义接口方向
R1(config)#int fa0/0
R1(config-if)#ip nat inside
R1(config-if)#ip add 192.168.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int fa0/1
R1(config-if)#ip nat outside
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no shut
静态nat:一对一
R1(config)#ip nat inside source static 192.168.10.30 12.0.0.3 配置命令 其中12.0.0.3 是公网地址
R1上R1#debug ip nat
在R2上使用debug测试:
R2#debug ip icmp
当公网地址 R2路由器不知道网段时,需要做回程路由
R1(config)#ip nat inside source static 192.168.10.20 218.8.8.8
R2(config)#ip route 218.8.8.8 255.255.255.255 12.0.0.1 在R2上做回程路由
查看信息:动态nat:多对多
R1(config)#ip nat pool test 12.0.0.10 12.0.0.20 netmask 255.255.255.0 建立地址池
R1(config)#access-list 10 permit 192.168.10.0 0.0.0.255 访问控制列表
R1(config)#ip nat inside source list 10 pool test 应用
Pc1测试:
当地址池里地址不够用,在后面加 overload 这个地址池可以反复使用 但是端口号是不相同的。
R1#clear ip nat translation * 清空转换关系 需要先清空转换关系在添加
动态端口地址转换:只有一个外网口可以上网
R1(config)#access-list 10 permit 192.168.10.0 0.0.0.255
R1(config)#ip nat inside source list 10 interface fa0/1 overload
静态端口映射:
sw1#conf t
sw1(config)#int vlan 1
sw1(config-if)#ip add 192.168.10.40 255.255.255.0
sw1(config-if)#no shut
sw1(config)#ip default-gateway 192.168.10.1
开启远程管理
sw1(config)#line vty 0 4
sw1(config-line)#password abc
sw1(config-line)#login
将192.168.10.40 23端口映射到fa0/1的23端口
R1(config)#ip nat inside source static tcp 192.168.10.40 23 interface fa0/1 23
在R2上:
当R1也开启telnet时,R2 telnet 12.0.0.1的地址时,是telnet sw1的,由此得出静态端口映射优先。
如果内网有许多的设配需要远程管理,可以使用跳板来完成,只需要开启R1的远程管理,通过R1来远程其他设备,不用做端口映射
- 思科路由器--nat
- NAT和GRE tunnel在思科路由器上的实现
- 路由器NAT
- NAT思科实验
- 思科 NAT配置
- 思科多nat顺序
- 思科 800 系列路由器
- 思科 1800 系列路由器
- 思科 2600 系列路由器
- 思科 3200 系列路由器
- 思科 7201 系列路由器
- 思科 7300 系列路由器
- 思科 7500 系列路由器
- 思科 7600 系列路由器
- 思科 12400 系列路由器
- 思科路由器配置命令
- 思科路由器配置命令
- 思科发布新款路由器
- html5
- 高速缓存dns
- XCode项目设置引入头文件路径之绝对路径(系统路径)/相对路径
- redis分布式锁
- 什么是跨域?怎样解决跨域问题
- 思科路由器--nat
- Python系统编程1:进程
- elasticsearch(1)总体架构
- java定时器之Timer问题汇总
- OpenStack All-In-One模式部署(初学OpenStack必备)
- Android 代码设置WIFI连接方式是静态IP还是DHCP
- sql的简单批处理,保证语句一样只参数不同
- LintCode 第413题 反转整数 【整数】
- bitmap等比例缩小