1、点单的描述NAT(包括其作用和特点)?

NAT(网络地址翻译)是在内部网络中使用内部地址,通过NAT把内部地址翻译成合法的IP地址,即在公网上可以通信的IP地址。
2、NAT的分类及其原理?
NAT有三种类型:静态NAT(staticNAT)、NAT池(pooledNAT)和端口NAT(PAT)。
1、静态NAT设置起来最为简单,内部网络中的每个主机都被永久映 射成 外部网络中的某个合法的地址,多用于服务器。
2、NAT池则是在外部网络中定义了一系列的合法地址,采用动态分配 的方法映射到内部网络,多用于网络中的工作站。
3、PAT则是把内部地址映射到外部网络的一个IP地址的不同端口上。
原理是:在Internet上使用其具体的做法是把IP包内的地址池(内部本地)用合法的IP地址段(内部全局)来替换。
3、掌握静态NAT以及PAT的配置方法?
静态NAT的配置方法:
#interface E0/1
#ip address 172.16.1.1 255.255.255.0
#ip nat inside   (指定内部接口)
#interface S0/1
ip address 200.1.1.1 255.255.255.0
#ip nat outside (指定外部接口)
#ip nat inside source static 172.16.1.3 200.1.1.1 (建立两个IP地址之间的静态映射)
PAT的配置方法:
#access-list 1 permit 10.1.1.0  0.0.0.255
#ip nat inside source list 1 pool dzc  overload
#interface E0/0 ip address 10.1.1.1 255.255.255.0
#ip nat inside
HDLC和PPP
1.简单描述HDLC
HDLC是用于广域网点到点专线的连接,运行于同步串行线路,对任何数据链路都有较高传输效率,它不支持验证缺乏安全性,不支持IP地址协商。
2.简单描述PPP(LCP以及NCP的作用、认证模式及其工作原理、)
ppp支持同异步线路,支持IP地址协商,支持验证,有两种验证模式。
NCP:网络控制协议 主要用于所承载网络层协议类型。
LCP:链路控制协议 主要用于管理和建立、终止链路。
PPP的两种验证模式:
PAP:被验证方发起验证请求,两次握手,密码以明文发送 支持双向验证
CHAP:主验证方主动发起验证请求,三次握手,密码是密文,安全性比PAP高。

 



R1配置如下:
R1(config)#interface Serial1/1
R1(config-if)#ip address 192.168.1.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#interface Loopback0
R1(config-if)#ip address 192.168.1.100 255.255.255.255
R1(config-if)#interface Loopback1
R1(config-if)#ip address 192.168.2.100 255.255.255.255
R1(config-if)#interface Loopback2
R1(config-if)#ip address 192.168.3.100 255.255.255.255
R1(config)#router ospf 1      
R1(config-router)#router-id 1.1.1.1
R1(config-router)#net 192.168.1.0 0.0.0.255 area 0
R1(config-router)#net 192.168.1.100 0.0.0.0 area 0
R1(config-router)#net 192.168.2.100 0.0.0.0 area 0
R1(config-router)#net 192.168.3.100 0.0.0.0 area 0
R1(config)#ip rou 0.0.0.0 0.0.0.0 192.168.1.2
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config)#enable secret level 3 cisco
R1(config)#enable password cisco

R2配置如下:
R2(config)#int s1/0
R2(config-if)#ip add 192.168.1.2 255.255.255.252
R2(config-if)#no shu
R2(config-if)#int s1/1
R2(config-if)#ip add 61.67.1.1 255.255.255.240
R2(config-if)#no shu
R2(config)#router ospf 1     
R2(config-router)#router-id 2.2.2.2
R2(config-router)#net 192.168.1.0 0.0.0.255 area 0
R2(config)#ip route 0.0.0.0 0.0.0.0 61.67.1.2
R2(config)#ip route 192.168.1.100 255.255.255.255 192.168.1.1
R2(config)#ip route 192.168.2.100 255.255.255.255 192.168.1.1
R2(config)#ip rou 192.168.3.100 255.255.255.255 192.168.1.1
R2(config)#access-list 1 permit any
R2(config)#ip nat pool 1 61.67.1.1 61.67.1.1 netmask 255.255.255.240
R2(config)#ip nat inside source list 1 poo 1 overload
R2(config)#int s1/0
R2(config-if)#ip nat inside
R2(config-if)#int s1/1
R2(config-if)#ip nat outside
R2(config)#int s1/1
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config)#username R2 password 111111
R2(config-if)#ip nAt inside source static 192.168.1.100 61.67.1.4

R3配置如下:
R3(config)#in s1/0
R3(config-if)#ip add 61.67.1.2 255.255.255.240
R3(config-if)#no shut
R3(config-if)#encapsulation ppp
R3(config-if)#ppp authentication chap
R3(config)#username R2 password 111111


R3#telnet 61.67.1.4
Trying 61.67.1.4 ... Open
User Access Verification
Password:
server>