IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

WAN – 数据在广域网中的传输 – Ponit-to-Point 协议

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

广域网,也就是大家俗称的外网,公网。一般是连接不同区域的局域网或者城域网的进行通信的网络。通过跨越了很大的物理范围,有时甚至跨越几个洲进行通信。通常广域网由 ISP 提供。

但在 ISP 内部 TCP/IP 协议栈并不在适合,但由于 TCP/IP 在局域网中占了很大比重,所以对于 ISP 来说,就需要一种方式来传递 TCP/IP 协议。

46_1.png

于是就出现了一种协议 – Serial Ponit-to-Point 协议,提供了一种串行链路的通信方式,属于同步链路。通过 P-t-P 上海的公司就可以实现和在纽约的分公司实现通信了。

同步链路:可以同时传输不同公司的流量,但不能强占其他公司流量的带宽,类似专线。

异步链路:同时传输不同的流量,可以强占其他类型流量的带宽,类似共享。

PPP

实现 Point-to-Point 的协议常见有:PPP 和 HDLC 两种,可以看做是数据链路层的协议。
46_2.png

NCP: 用来和网络层打交道

LCP: 用来和物理层打交道

PPP 通信过程

在运行 PPP 的路由器中,会先发送 LCP 消息,建立连接。

成功后会再次发送 NCP 消息建立连接。并且 NCP 中包含 32 位的主机 IP.

在之前 TCP/IP 的局域网中,我们知道直连的两台路由器,如果配置了不同网段的接口地址,是无法交互的,因为在路由表中没有直连网段的路由。

但是在 PPP 协议中,直连的接口是可以交互的,因为在连接 NCP 连接时,已经将 IP 告诉了对方,生成了路由。

PPP 认证

PPP 支持单向和双向的 PAP 认证。
46_3.png

在建立起 LCP 连接后,

如果走单向认证:比如这里 Branch 想要和 HQ 建立连接,就会在 HQ 先配置用户名密码。然后再给 Branch 配置用户名密码。然后 Branch 会将消息发给 HQ 如果验证通过,则表示 Branch 到 HQ 这一方向的连接建立成功,进而继续发送 NCP 消息。

如果是双向认证:则需要在 Branch 和 HQ 双向都配置一次密码,然后再配置一次连接的密码。如果双向认证都过了,NCP 的连接才会建立。

但 PAP 认证有个缺点,就是在发送密码时,发送的是明文密码,这就意味着如果中间有攻击者的话,就存在安全隐患。

因此 PPP 还有另外一种通信方式 CHAP 认证。

先来看一下上面 PAP 的认证的隐患就在于,明文传输用户名和密码,让中间人可以截获。自然想解决这个问题,就希望不直接传输密码。于是就有了如下的方案 – CHAP 认证:
46_4.png

CHAP 认证和 PAP 认证不同,这里假设还是 Branch 想要和 HQ 建立连接:

1、 注意,HQ 会先发起一个请求给到 Branch,请求的内容是一段随机的字符串共 16 bit
2、 Branch 在收到后,会将自己的用户名和密码和该随机的字符串一起通过哈希加密,得到另外的一个字符串。然后将该字符串传给 HQ.
3、 HQ 在收到后,由于之前已经配置了用户名和密码,将之前发给 Branch 的字符串和用户名密码一起加密,然后和 Branch 发给自己的字符串进行对比。
4、 如果一致则认证成功,否则认证失败。

这里假如存在一个攻击者,截获了 Branch 和 HQ 之间的全部消息,首先受到 HQ 给 Branch 的 16 bit 的随机数。然后又截获了 Branch 发给 HQ 的加密后的密文。

由于 hash 加密的特点,这里即使知道加密后的结果,采用的算法,已经其中的一段随机数,也无法得到配置的用户名密码。

PPP 配置

PPP 配置

# R1
R1(config)#interface serial 1/0
R1(config-if)#ip addr 1.1.1.1 255.255.255.0
R1(config-if)#no shutdown

# R1
R2(config)#interface serial 1/0
R2(config-if)#ip addr 2.1.1.1 255.255.255.0
R2(config-if)#no shutdown

# 由于默认是 HDLC,所以这里配置不同网段是无法进行通信的 
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
# 查看路由表,没有去往 R1 的路由
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, Serial1/0
L        2.1.1.1/32 is directly connected, Serial1/0

# 将 R1 和 R2 改成 ppp 认证方式,这时就可以通信了
R1(config)#int s 1/0
R1(config-if)#encapsulation ppp

R2(config)#int s 1/0
R2(config-if)#encapsulation ppp

R2#show
*Aug  7 07:41:57.693: %SYS-5-CONFIG_I: Configured from console by console
R2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Serial1/0
      2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        2.1.1.0/24 is directly connected, Serial1/0
L        2.1.1.1/32 is directly connected, Serial1/0

PAP 认证配置 R1 想和 R2 建立连接:

# R2
R2(config)# hostname R2
R2(config)#username cisco password cisco
R2(config)#int s 1/0
R2(config-if)#ppp authentication pap

# R1
R1(config)# hostname R1
R1(config)# int s 1/0
R1(config-if)# ppp pap sent-username cisco password cisco

CHAP 配置

# R2 配置 R1 作为用户名
R2(config)# hostname R2
R2(config)#username R1 password cisco
R2(config)#in s 1/0
R2(config-if)#ppp authentication chap

# R1 配置 R2 作为用户名
R1(config)#username R2 password cisco
R1(config)#int s1/0
R1(config-if)#ppp authentication chap

如果配置双向认证,两端起的密码必须一致,并且 username 应该等于对方的 hostname

总结

由于在广域网的环境下,TCP/IP 协议栈不在合适,但由于其在局域网中被普遍使用,所以需要在 ISP 的网络中传输。为了进行传输,PPP 协议被发明出来。

onit-to-Point 本身是一种链路的同步协议,常见 Ponit-to-Point 认证协议有两种,PPP 和 HDLC。

文章永久链接:https://tech.souyunku.com/?p=44972


Warning: A non-numeric value encountered in /data/wangzhan/tech.souyunku.com.wp/wp-content/themes/dux/functions-theme.php on line 1154
赞(99) 打赏



未经允许不得转载:搜云库技术团队 » WAN – 数据在广域网中的传输 – Ponit-to-Point 协议

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367