根据二层(数据链路层)所使用的协议来进行区分。
MA——多点接入网络
BMA——广播型多点接入网络——以太网
NBMA——非广播型多点接入网络
P2P——点到点的网络
MAC地址——区分和标识不同的设备
以太网中独有的一种地址——MAC地址
在一个二层网络中只能包含两台设备,这样的网络称为点到点的网络
同轴电缆
网线——RJ45双绞线
光纤
串线
T1——北美1.544Mbps
E1——欧洲2.048Mbps
同一时间传递不同频段的数据波
兼容性很差
标准的HDLC协议——ISO
非标的HDLC协议——各大厂商根据自身的产品,对标准的HDLC进行改进和升级
思科默认二层点到点网络使用的封装协议:HDLC
华为默认二层点到点网络使用的封装协议:PPP
[Huawei-Serial4/0/0]link-protocol hdlc -----修改接口二层封装协议
兼容性更强
存在一个版本
凡是接口或者链路支持全双工的工作模式,就可以运行PPP协议
PPP协议具备很强的可移植性
支持认证和授权——计费系统
PPP协议和TCP协议类似,在转发数据之前需求建立PPP的会话:
1、协议检测(链路两端使用的二层封装协议是一种协议)
2、链路建立阶段——LCP协议:链路控制协议——PPP协议中的一个子协议(完成PPP会话的建立)
3、认证阶段(可选阶段)
4、网络层协商阶段——NCP——网络层控制协议——一些列协议的统称 IPCP协议
链路建立阶段——LCP协议
MRU——在点到点网络中规定最大的二层数据量
MTU——规定数据来到链路层数据部分最大携带的数据量
认证:是否认证,以及如果认证使用何种认证方式(PAP/CHAP)——双向过程
认证阶段(可选阶段)
既可以做单向的认证,也可以做双向的认证——aaa
比对摘要值的方式进行认证,更加安全
HASH——将任意长度的数据转换为一个定长的输出
1、相同输入,想通输出
2、不可逆性
3、雪崩效应
IPCP协商:双向过程
1、IP报文的压缩格式
2、IP地址
当点到点网络链路配置IP地址后,路由器会自动生成一条主机路由/32
主机获取IP地址
[Huawei-Serial4/0/0]ip address ppp-negotiate ---获取方
[Huawei-Serial4/0/0]remote address 1.1.1.1 —下发地址方
认证方:
[Huawei-aaa]local-user huazhu password cipher 123456
[Huawei-aaa]local-user huazhu service-type ppp
[Huawei-Serial4/0/0]ppp authentication-mode pap
被认证方:
[Huawei-Serial4/0/0]ppp pap local-user huazhu password cipher 123456
PPP的认证是一次性会话
认证方:
[Huawei-aaa]local-user huazhu password cipher 123456
[Huawei-aaa]local-user huazhu service-type ppp
[Huawei-Serial4/0/0]ppp authentication-mode chap
被认证方:
[Huawei-Serial4/0/0]ppp chap password
[Huawei-Serial4/0/0]ppp chap user
sys - Enter system view, return user view with Ctrl+Z.
- [Huawei]sys ISP
- [ISP]interface Serial 4/0/0
- [ISP-Serial4/0/0]ip address 12.0.0.1 24
- [ISP-Serial4/0/0]link-protocol ppp
- [ISP-Serial4/0/0]q
- [ISP]aaa
- [ISP-aaa]local-user huazhu password cipher 123456
- Info: Add a new user.
- [ISP-aaa]local-user huazhu service-type ppp
- [ISP-aaa]q
- [ISP]interface serial 4/0/0
- [ISP-Serial4/0/0]ppp authentication-mode pap
- [ISP-Serial4/0/0]remote address 2.2.2.2
sys - Enter system view, return user view with Ctrl+Z.
- [Huawei]sys R2
- [R2]interface serial 4/0/0
- [R2-Serial4/0/0]ppp pap local-user huazhu password cipher 123456
- [R2-Serial4/0/0]ip address ppp-negotiate
- [R2-Serial4/0/0]
- Oct 28 2023 13:05:41-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
- IPCP on the interface Serial4/0/0 has entered the UP state.
- [R2-Serial4/0/0]display ip interface brief
- *down: administratively down
- ^down: standby
- (l): loopback
- (s): spoofing
- The number of interface that is UP in Physical is 2
- The number of interface that is DOWN in Physical is 4
- The number of interface that is UP in Protocol is 2
- The number of interface that is DOWN in Protocol is 4
-
- Interface IP Address/Mask Physical Protocol
- GigabitEthernet0/0/0 unassigned down down
- GigabitEthernet0/0/1 unassigned down down
- GigabitEthernet0/0/2 unassigned down down
- NULL0 unassigned up up(s)
- Serial4/0/0 2.2.2.2/32 up up
- Serial4/0/1 unassigned down down
- [ISP-Serial4/0/0]interface serial 4/0/1
- [ISP-Serial4/0/1]ip address 13.0.0.1 24
- [ISP-Serial4/0/1]ppp authentication-mode chap
- [ISP-Serial4/0/1]remote address 3.3.3.3
sys - Enter system view, return user view with Ctrl+Z.
- [Huawei]sys R3
- [R3]interface serial 4/0/0
- [R3-Serial4/0/0]ppp chap user huazhu
- [R3-Serial4/0/0]ppp chap password cipher 123456
- [R3-Serial4/0/0]ip address ppp-negotiate
- [R3-Serial4/0/0]
- Oct 28 2023 13:09:38-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
- IPCP on the interface Serial4/0/0 has entered the UP state.
- [R3-Serial4/0/0]display ip interface brief
- *down: administratively down
- ^down: standby
- (l): loopback
- (s): spoofing
- The number of interface that is UP in Physical is 2
- The number of interface that is DOWN in Physical is 4
- The number of interface that is UP in Protocol is 2
- The number of interface that is DOWN in Protocol is 4
-
- Interface IP Address/Mask Physical Protocol
- GigabitEthernet0/0/0 unassigned down down
- GigabitEthernet0/0/1 unassigned down down
- GigabitEthernet0/0/2 unassigned down down
- NULL0 unassigned up up(s)
- Serial4/0/0 3.3.3.3/32 up up
- Serial4/0/1 unassigned down down