• 4.25课堂笔记(网络)


    两台主机之间的通讯过程:

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

  • 相关阅读:
    剑指 Offer 55
    剑指 Offer 55
    剑指 Offer 22. 链表中倒数第k个节点
    剑指 Offer 29. 顺时针打印矩阵
    剑指 Offer 17. 打印从1到最大的n位数
    剑指 Offer 57
    剑指 Offer 59
    B. Han Solo and Lazer Gun 暴力 水
    C. Number of Ways 思维
    C. Destroying Array 并查集/线段树 Intel Code Challenge Elimination Round (Div. 1 + Div. 2, combined)
  • 原文地址:https://www.cnblogs.com/superlinux/p/28ecc80e761f8131f64e4a13791fb918.html
Copyright © 2020-2023  润新知