网络已经成为了我们生活中不可或缺的一部分,它连接了世界各地的人们,让信息和资源得以自由流动。随着互联网的发展,我们可以通过网络学习、工作、娱乐,甚至是社交。因此,学习网络知识和技能已经成为了每个人都需要掌握的重要能力。
本课程博主将带领读者深入了解网络的基本原理、结构和运作方式,帮助读者建立起对网络的全面理解。我们将介绍网络的发展历程、网络的分类和组成、网络的安全和隐私保护等内容,帮助读者掌握网络知识,提高网络素养。
通过学习本篇博客,读者将能够更好地利用网络资源,提高工作效率,拓展人际关系,甚至是保护自己的网络安全。网络世界充满了无限的可能,希望本课程能够帮助读者更好地驾驭网络,享受网络带来的便利和乐趣。
PPP(Point to Point Protocol)数据链路层协议。两种认证方式:一种是PAP,一种是CHAP。相对来说PAP的认证方式安全性没有CHAP高。PAP在传输password是明文的,而CHAP在传输过程中不传输密码,PAP认证是通过两次握手实现的,而CHAP则是通过3次握手实现的。
1)了解PPP协议的作用是什么
2)在网络中使用PPP协议
用户身份验证:PPP认证可用于验证用户的身份信息,确认其是否具有访问网络的权限。这有助于防止未经授权的用户接入网络资源,并确保网络的安全性。常见的PPP认证方式包括PAP(Password Authentication Protocol)和CHAP(Challenge Handshake Authentication Protocol)等。
数据完整性验证:通过PPP认证,数据传输过程中可以使用加密和校验技术来保证数据的完整性。这意味着数据在传输过程中不会被篡改或损坏,从而确保数据的可靠性和准确性。
密钥协商与管理:PPP认证还可以用于密钥的协商和管理。通过安全认证过程,双方可以协商生成加密所需的密钥,以保障数据的安全性。这样可以防止敏感信息在传输过程中被窃取或泄漏。
(2)配置PC机及路由器接口IP地址
(3)在各路由器上配置静态路由协议,让PC间能相互Ping通;
PC基础配置
PC1
IP 地址:192.168.1.1
子网掩码:255.255.255.0
默认网关:192.168.1.254
PC2
IP 地址:192.168.2.1
子网掩码:255.255.255.0
默认网关:192.168.2.254
PC3
IP 地址:172.16.1.1
子网掩码:255.255.255.0
默认网关:172.16.1.254
PC2
IP 地址:172.16.2.1
子网掩码:255.255.255.0
默认网关:172.16.2.254
SW1 ,SW2 ,R1 ,R2基础配置加路由
SW1
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#h SW1
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
SW1(config-vlan)#int f0/1
SW1(config-if)#sw acc vlan 10
SW1(config-if)#int f0/2
SW1(config-if)#sw acc vlan 20
SW1(config-if)#int f0/3
SW1(config-if)#sw mo t
R1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#h R1
R1(config)#int f0/0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f0/0.1
R1(config-subif)#en d 10
R1(config-subif)#ip add 192.168.1.254 255.255.255.0
R1(config)#int f0/0.2
R1(config-subif)#en d 20
R1(config-subif)#ip add 192.168.2.254 255.255.255.0
R1(config)#ip route
R1(config)#int s1/0
R1(config-if)#clock r 64000
R1(config-if)#ip add 10.0.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 10.0.1.2
R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#h R2
R2(config)#int s1/0
R2(config-if)#no shut
R2(config-if)#ip add 10.0.1.2 255.255.255.0
R2(config)#int f0/0
R2(config-if)#no shut
R2(config)#int f0/0.1
R2(config-subif)#en d 10
R2(config-subif)#ip add 172.16.1.254 255.255.255.0
R2(config-subif)#int f0/0.2
R2(config-subif)#en d 20
R2(config-subif)#ip add 172.16.2.254 255.255.255.0
R2(config)#ip route 0.0.0.0 0.0.0.0 10.0.1.1
SW2
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#h SW2
SW2(config)#vlan 10
SW2(config-vlan)#vlan 20
SW2(config-vlan)#int f0/1
SW2(config-if)#sw acc vlan 10
SW2(config-if)#int f0/2
SW2(config-if)#sw acc vlan 20
SW2(config-if)#int f0/3
SW2(config-if)#no shut
SW2(config-if)#sw mo t
R1
R1(config)#int s1/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R1(config-if)#exit
R1(config)#user R1 pass 123456 //R1的密码要和R2的一样不然不会通
R1(config)#int s1/0
R1(config-if)#ppp pap sent-username R2 password 123456
只配置一个PPP协议时,Ping超时
R2
R1(config)#int s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
R2(config-if)#exit
R2(config)#user R2 pass 123456 //R2的密码要和R1的一样不然不会通
R2(config)#int s1/0
R2(config-if)#ppp pap sent-username R1 password 123456
R1
R1(config)#int s1/0
R1(config-if)#en ppp
R1(config-if)#ppp a chap
R1(config)#user R2 passw 123456 //设置对方的账号密码数据库
R2
R2(config)#int s1/0
R2(config-if)#en ppp
R2(config-if)#ppp a chap
R2(config)#user R1 passw 123456 //设置对方的账号密码数据库
(1)点对点协议,既支持异步链路,也支持同步链路。
(2)PPP是面向字节的。