2 网段 Vlan+NAT 配置
拓扑概述:
SW1 划分 Vlan 10、20,分别连接 PC1 和 PC2。
Vlan10: 172.16.1.0/24,网关 172.16.1.254
Vlan20: 172.16.2.0/24,网关 172.16.2.254
Vlan1 网关 172.16.3.1,连接 RT1。
在 RT1 上做 NAT。RT1 fa0/0 ip=172.16.3.2
RT2 作为一台 PC 测试用,IP=172.16.4.2。
记录:
基本调试成功。
1,需要在 RT1 上做回程路由。
能不能通过路由汇聚什么的,简化配置?
已知:可以通过配置 Rip 等路由协议简化路由配置。
2,为什么 PC1 和 PC2 能 ping 通 172.16.4.2,而不能 ping 通 172.16.4.1?
2,为什么 RT2 也不能 ping 通 172.16.4.1?
PC1>en
PC1#copy run start
Destination filename [startup-config]?
Building configuration…
[OK]
PC1#sh run
Building configuration…
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname PC1
!
!
memory-size iomem 15
ip subnet-zero
!
!
interface Loopback0
no ip address
!
interface FastEthernet0/0
ip address 172.16.1.100 255.255.255.0
speed auto
full-duplex
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.1.254
no ip http server
!
no cdp run
!
line con 0
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
PC1#
==================================
PC2#sh run
Building configuration…
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname PC2
!
!
memory-size iomem 15
ip subnet-zero
!
!
interface Loopback0
no ip address
!
interface FastEthernet0/0
ip address 172.16.2.100 255.255.255.0
speed auto
full-duplex
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.2.254
no ip http server
!
no cdp run
!
line con 0
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
==================================
SW1#sh run
Building configuration…
Current configuration : 1090 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
switchport access vlan 10
!
interface FastEthernet1/12
switchport access vlan 20
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
ip address 172.16.3.1 255.255.255.0
!
interface Vlan10
ip address 172.16.1.254 255.255.255.0
!
interface Vlan20
ip address 172.16.2.254 255.255.255.0
!
ip http server
ip route 0.0.0.0 0.0.0.0 172.16.3.2
!
no cdp run
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
==================================
RT1#sh run
Building configuration…
Current configuration : 1151 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RT1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
multilink bundle-name authenticated
!
!
interface FastEthernet0/0
ip address 172.16.3.2 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 172.16.4.1 255.255.255.0
ip nat outside
ip virtual-reassembly
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
ip route 172.16.1.0 255.255.255.0 172.16.3.1
ip route 172.16.2.0 255.255.255.0 172.16.3.1
!
!
ip http server
no ip http secure-server
ip nat pool pool1 172.16.4.1 172.16.4.1 netmask 255.255.255.0
ip nat inside source list 1 pool pool1 overload
!
!
access-list 1 permit 172.16.1.0 0.0.0.250
access-list 1 permit 172.16.2.0 0.0.0.250
control-plane
!
line con 0
line aux 0
line vty 0 4
!
!
end
===============================
RT2#sh run
Building configuration…
Current configuration : 874 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RT2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
multilink bundle-name authenticated
!
interface FastEthernet0/0
ip address 172.16.5.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 172.16.4.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
!
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
转载于:https://blog.51cto.com/itwatch/286605
2 网段 Vlan+NAT 配置相关推荐
- HCL实验-配置VLAN+NAT模拟内外网
文章目录 HCL实验-配置VLAN+NAT模拟内外网 1.网络拓扑图 2.VLAN配置 交换机SW-center 交换机SW-ex 路由器Router 3.NAT配置 文章最后 HCL实验-配置VLA ...
- 静态路由和DHCP/NAT/VLAN的配置实例
华为HCNA数通工程师实战类实验(每个实验配有视频 请联系QQ1306633412索取) 本套实验为华HCNA数通网络工程师复习实验 请学习后再做此实验 另本套实验为定期更新 实验描述: 1.AR1为 ...
- [网络工程师]-路由配置-NAT配置
华为路由器配置NA的方式有很多种,最常见的基本配置方式有Easy IP和NAT地址池. 1.通过Easy IP进行NAT 如下图所示,Router的出接口GE0/0/1的IP地址为200.100.1. ...
- 网络系统集成实验(三)| 系统集成虚拟局域网(VLAN)配置
目录 一.前言 二.实验目的 三.实验需求 四.实验步骤与现象 Step1:需求分析及配置思路 Step2:实验拓扑设计 Step3:实验配置 Part1:公网IP配置 Part2:链路聚合 Part ...
- 【实验】DHCP、NAT配置案例
拓扑图 规格 适用于所有版本.所有形态的AR路由器. 组网需求 Router作为某企业出口网关.该企业包括两个部门A和B,分别为部门A和B内终端规划两个地址网段:10.10.1.0/25和10.10. ...
- Cisco 双出口NAT配置
Cisco 双出口NAT配置 目的:模拟拥有双出口链路情况下基于原地址策略路由功能,实现不同原内部地址从不同出口对外部网络的访问,由于多数实际情况下路由器在外部端口使用NAT对内网地址进行翻译,所以本 ...
- 网管必学之交换机VLAN的配置
有关VLAN的技术标准IEEE 802.1Q早在1999年6月份就由IEEE委员正式颁布实施了,而且最早的VLNA技术早在1996年Cisco(思科)公司就提出了.随着几年来的发展,VLAN技术得到广 ...
- 华为eNSP防火墙NAT配置
NAT技术的基本原理 NAT技术通过对IP报文头中的源地址或目的地址进行转换,可以使大量的私网IP地址通过少量的公网IP地址来访问公网. NAT是将IP数据报文报头中的IP地址转换为另一个IP地址的过 ...
- ENSP中ACL,NAT配置
一.Acl是什么?Acl怎么用 1. ACL即Access control list 访问控制列表是由permit,deny组成的一系列有顺序的规 ...
- linux之lsv—NAT配置
linux之lsv-NAT配置 路由机:eth0:192.168.8.185(公网ip) eth1:192.168.7.1(内网ip) pc1:eth0:192.168.7.2(内网ip) pc2:e ...
最新文章
- 算法导论 6.2-5
- 单位阶跃信号是周期信号吗_手机信号变成“HD”,是代表没有信号吗?你的手机正在被扣费...
- android defStyleAttr/defStyleRes
- 集合詳細學習 包括Vector ArrayList List等等的比較與實例
- python获取未读邮箱数目_python imaplib 获取未读邮件,email解析并按照原名下载附件...
- C++的性能C#的产能?! - .Net Native 系列向导
- visual studio粘贴html代码.会自行添加一些未知代码(自动格式化)
- 啊,久违的 win7 开机画面!
- GitHub中文社区
- 01使用ILDasm.exe将可执行文件反编译成IL代码
- 迅捷pdf编辑器是如何编辑pdf文件的
- Pycharm+Django之Django学习(1)(初学者)
- MSE(误差平方和)/RMSE/R²/TSS/RSS
- 用户路径分析之利器“桑基图”
- 用户登录,并验证验证码以及密码
- 月份, 星期的英语简写
- [Unity3D]Unity3D游戏开发之Xml解析实现NPC对话系统
- Mac教程:如何开启任何来源选项?
- ARM汇编指令立即数规范和判断
- MTK平台安卓Q 10.0 camera驱动移植——sensor