首页 > 其他 > 详细

(一)IP协议

时间:2018-09-11 10:41:12      阅读:186      评论:0      收藏:0      [点我收藏+]

IP是TCP/IP协议族中最为核心的协议。所有的TCP、UDP、ICMP、IGMP数据都是以IP数据报格式传输。

1. IP协议特点

IP协议的特点是,提供不可靠、无连接的数据报传送服务。

  • 不可靠,它不能保证IP数据报能成功地到达目的地。任何要求的可靠性必须由上层来提供(如TCP)。
  • 无连接,IP并不维护任何关于后续数据报的状态信息。每个数据报的处理是相互独立的。

三个有用的命令:ifconfignetstatroute

IP协议要求在网络中传输时要求以 big endian 字节序,即网络字节序。在传输数据前必须转换成网络字节序。

2. IP路由选择

2.1 路由表

# 查看和修改IP路由表
route - show / manipulate the IP routing table

1) route命令

[root@thor ]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.66.91.254    0.0.0.0         UG    0      0        0 bond0
10.66.91.0      0.0.0.0         255.255.255.0   U     0      0        0 bond0
link-local      0.0.0.0         255.255.0.0     U     1004   0        0 bond0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

2)netstat -r命令

[root@thor ]# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         10.66.91.254    0.0.0.0         UG        0 0          0 bond0
10.66.91.0      0.0.0.0         255.255.255.0   U         0 0          0 bond0
link-local      0.0.0.0         255.255.0.0     U         0 0          0 bond0
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0

2.2 IP路由选择过程

(一)IP协议

原文:https://www.cnblogs.com/walkinginthesun/p/9625501.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!