两台主机之间的通信过程:
首先A主机发送数据包给B,B收到数据包后应答,应答完成后,创建连接网络
查看路由条目信息方法: [root@oldboyedu-sh01 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
说明:路由表中最后一条为静态默认网关路由 [root@oldboyedu-sh01 ~]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
[root@chenleilei ~]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0 [root@chenleilei ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
想要取其余网段 可是没有路由条目,如何增长:
1.静态添加路由条目
静态路由:ide
2.动态添加路由条目
动态路由:加密
OSI参考模型:
应用层 应用程序和接口
表示层 数据转换,加密压缩
会话层 创建,管理终止会话
传输层 提供可靠的端到端的保温传输和差异控制
网络层 分组从源端传输到目的端,提供网络互连
数据链路层 将分组数据封装成帧,提供点到点方式传输
物理层 在媒体上创数比特;提供机械和电气规约code