您的位置:首页 > 理论基础 > 计算机网络

4.25课堂笔记(网络)

2021-04-21 23:02 1066 查看
两台主机之间的通讯过程:

首先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.静态添加路由条目
静态路由:

2.动态添加路由条目
动态路由:

OSI参考模型:
应用层    应用程序和接口
表示层    数据转换,加密压缩
会话层    建立,管理终止会话
传输层    提供可靠的端到端的保温传输和差别控制
网络层    分组从源端传输到目的端,提供网络互连
数据链路层    将分组数据封装成帧,提供点到点方式传输
物理层    在媒体上创数比特;提供机械和电气规约

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: