学习目标:
- NAT
学习内容:
- NAT
1.要求——基本的
2.模型
3.IP分配、规划、优化
1)思路
R2为ISP路由器,其上只能配置ip地址,不得冉进行其他的任何配置—ospf配置
认证 、汇总、沉默接口、加快收敛、缺省路由
PC1-PC2可以ping通客户平板和DNS服务器;——NAT 动态
客户端可以通过域名访问http1,通过地址访问HTTP2——DNS
R1为边界路由器,其上只有一个公有ip地址——端口映射r1—— 空接口防止被动黑洞
骨干——mask30
2)模型
ospf、 NET
3.输入命令和检测
1)IP配置
2)DNS
isp
ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 192.168.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/26/30 ms
r1
ping 192.168.2.1
PING 192.168.2.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 192.168.2.1: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 192.168.2.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/26/30 ms
地址访问HTTP2
3)Ip配置、ospf配置的命令
骨干
r1
interface GigabitEthernet 0/0/1
ip address 12.1.1.1 30
quit
interface GigabitEthernet 0/0/0
ip address 192.168.1.25 30
quit
r2
interface GigabitEthernet 0/0/0
ip address 12.1.1.2 30
quit
interface GigabitEthernet 0/0/1
ip address 192.168.2.1 30
quit
开启ospf、宣告
r1
ospf 1 router-id 1.1.1.1
area 0
network 192.168.1.0 0.0.0.255
quit
area 1
network 12.1.1.1 0.0.0.0
r2
ospf 1 router-id 2.2.2.2
area 1
network 12.1.1.2 0.0.0.0
quit
area 2
network 192.168.2.0 0.0.0.255
认证
r1
interface GigabitEthernet0/0/1
ospf authentication-mode md5 1 plain 666
quit
r2
interface GigabitEthernet0/0/0
ospf authentication-mode md5 1 plain 666
quit
缺省路由
r1
ospf 1
default-route-advertise always
quit
汇总
r1
ospf 1
area 0
abr-summary 192.168.1.0 255.255.255.128
修改带宽
r1、r2、lsw1、lsw2
ospf 1
bandwidth-reference 1000
quit
加快收敛
r1
interface GigabitEthernet 0/0/1
ospf timer hello 5
quit
interface GigabitEthernet 0/0/0
ospf timer hello 5
quit
r2
interface GigabitEthernet 0/0/0
ospf timer hello 5
quit
interface GigabitEthernet 0/0/1
ospf timer hello 5
quit
空接口——防止被动黑洞
r1
ip route-static 192.168.1.0 25 NULL 0
4)NAT的配置命令
动态NAT
acl 2000
rule permit source 192.168.1.0 0.0.0.255
quit
interface GigabitEthernet 0/0/1
nat outbound 2000
端口映射
interface GigabitEthernet 0/0/1
nat server protocol tcp global current-interface 80 inside 192.168.1.4 80
y
quit
interface GigabitEthernet 0/0/1
nat server protocol tcp global current-interface 8888 inside 192.168.1.5 80
PC1
ping 192.168.2.3
Ping 192.168.2.3: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.3: bytes=32 seq=2 ttl=253 time=47 ms
From 192.168.2.3: bytes=32 seq=3 ttl=253 time=47 ms
From 192.168.2.3: bytes=32 seq=4 ttl=253 time=47 ms
From 192.168.2.3: bytes=32 seq=5 ttl=253 time=47 ms
--- 192.168.2.3 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/47/47 ms
学习时间:
学习时间为不运动的时候,作者咕咕了是去运动(无氧运动和有氧运动都做最好)了,请饶恕。
学习产出:
画工
计算机网络第1章:计算机网络的概念、组成与功能;计算机网络的分类、标准化工作及相关组织
http://t.csdnimg.cn/uZOAM
计算机网络第一章:性能指标:带宽、时延、时延带宽积、RTT、吞吐量、速率、信道利用率
http://t.csdnimg.cn/avNeb
计算机网络体系结构——PDU、SDU、PCI、协议、访问、接口、SAP
http://t.csdnimg.cn/x3Uar
计算机网络分层结构——OSI/ISO、TCP/IP http://t.csdnimg.cn/hLrqY
1章选择 http://t.csdnimg.cn/cnmdJ
2章选择、解答 http://t.csdnimg.cn/ONrER
通信基本概念:数据、信号、码元、信源、信道、信宿、速率、波特、带宽 http://t.csdnimg.cn/TKnyM
- 技术笔记 1遍
- 有错误请指出,作者会及时改正