Why Internet working?

  1. To build a “network of networks” or internet.
  2. operating over multiple, coexisting(共存的), different networks
  3. providing ubiquitous(无处不在的) connectivity through IP packet transfer .
  4. achieving huge economies of scale.

TCP/IP Protocol Suite

Encapsulation(封装)

  • Base:HTTP Request ->TCP header->IP header->Ethernet header

Internet Addresses

  • Each host has globally unique logical IP address
  • Separate address for each physical connection to a network
  • Routing decision is done based on destination IP address
  • IP address has two parts:
  1. netid(网络标识符) and hostid
  2. netid unique, facilitates routing
  • Dotted Decimal(十进制) Notation(记号):
    int1.int2.int3.int4
    (intj = jth octet)
    128.100.10.13

Internet Protocol

  1. Provides best effort, connectionless packet delivery
  • motivated by need to keep routers simple and by adaptibility to failure of network elements
  • packets may be lost, out of order, or even duplicated(复制)
  • higher layer protocols must deal with these, if necessary
  1. IP also includes:
  • Internet Control Message Protocol (ICMP)
  • Internet Group Management Protocol (IGMP)

IP Packet Header

  1. Minimum 20 bytes
  • Up to 40 bytes in options fields
  1. Version: current IP version is 4.
  2. Internet header length (IHL): length of the header in 32-bit words.
  3. Type of service (TOS): traditionally priority of packet at each router. Recent Differentiated Services redefines TOS field to include other services besides best effort.
  4. Total length: number of bytes of the IP packet including header and data
  5. Identification, Flags, and Fragment Offset: for fragmentation and reassembly.
  6. Time to live (TTL): number of hops packet is allowed to traverse(穿过) in network.
  • Each router along the path to the destination decrements this value by one.
  • If the value reaches zero before the packet reaches the destination, the router discards the packet and sends an error message back to the source.
  1. Protocol: specifies upper-layer protocol that is to receive IP data at the destination. Examples include TCP (protocol = 6), UDP (protocol = 17), and ICMP (protocol = 1).
  2. Header checksum(校验和): verifies the integrity of the IP header.
  3. Source IP address and destination IP address: contain the addresses of the source and destination hosts.
  4. Options: Variable length field, allows packet to request special features such as security level, route to be taken by the packet, and timestamp at each router. Detailed descriptions of these options can be found in [RFC 791].
  5. Padding: This field is used to make the header a multiple of 32-bit words.

IP Header Processing

  1. Compute header checksum(校验和) for correctness and check that fields in header (e.g. version and total length) contain valid values
  2. Consult routing table to determine next hop
  3. Change fields that require updating (TTL, header checksum)

TCP-IP Architecture and IP Packet的更多相关文章

  1. TCP/IP——内外网IP+子网掩码作用+PING(网络总结)

    目录: 1.如何区分内网IP和外网IP? 保留字段 2.子网掩码是起什么作用的? 将DNS和IP异或,表示哪段起作用 3.ping到底起什么作用? ping本地.ping远程 下面针对上面三个问题分别 ...

  2. TCP/IP 协议:IP 协议

    首先来看一下IP协议在实际中的位置: 我们只关系流程,不关系当前具体的服务类型 1.IP协议概述 作用: 从上图或从应用层->运输层->网络层->链路层来看,IP协议属于网络层,也就 ...

  3. TCP/IP笔记(四)IP协议

    前言 IP相当于OSI参考模型的第3层--网络层:主要作用是"实现终端节点之间的通信"又称"点对点通信". IP作为整个TCP/IP中至关重要的协议,主要负责将 ...

  4. TCP/IP笔记(五)IP协议相关技术

    IP旨在让最终目标主机收到数据包,但是在这一过程中仅仅有IP时无法实现通信的.必须还要又能够解析主机名称和MACdivide功能,以技术包在发送过程中异常情况处理的功能. 这篇主要介绍下DNS.ARP ...

  5. TCP/IP协议栈 --- 网络层(IP 首部 和分片)

    IP 是TCP/IP协议栈中重要的层次, TCP UDP ICMP IGMP都是依赖IP层进行传输的.首先它是一种不可靠,无连接的协议.不可靠:它不保证IP包能正确到达目的地,无连接:表示IP并不会维 ...

  6. tcp、udp、ip、icmp报文格式分析

    TCP .UDP .IP. ICMP协议报文格式分析 Tcp报文格式: Wireshark抓包如图: 源端口/目的端口(16bit): 在TCP报文中包涵了源端口/目的端口,源端口标识了发送进程,目的 ...

  7. TCP/IP协议族——IP工作原理及实例具体解释(上)

     IP协议具体解释 本文主要介绍了IP服务特点,头部结构,IP分片知识,并用tcpdump抓取数据包.来观察IP数据报传送过程中IP的格式,以及分片的过程. IP头部信息:IP头部信息出如今每一个 ...

  8. 常见协议TCP、UDP、IP图

    ip tcp udp icmp help ip tcp http icmp

  9. tcp/iP协议族——IP工作原理及实例具体解释(下)

     IP协议具体解释 上一篇文章文章主要介绍了IP服务的特点,IPv4头部结构IP分片.并用tcpdump抓取数据包,来观察IP数据报传送过程中IP的格式,以及分片的过程.本文主要介绍IP路由,IP ...

随机推荐

  1. 百度富文本Ueditor将图片存在项目外路径并回显

    我的毕设中需要一个类似新闻发布的功能,使用到百度富文本编辑器,不过百度富文本编辑器有点坑(只是我太菜了),粘贴图片和回显这个坑坑了我两天时间.效果是这样的: 就是可以在文本中粘贴图片并显示出来,直接说 ...

  2. 结构型--代理模式(Proxy)

    一.代理模式是什么? 代理模式属于GOF23设计模式中结构型中的设计模式,通过代理对象来屏蔽(部分或者屏蔽)对真实对象的直接访问,下图为UML图: 在代理模式中组件包括:抽象角色接口.代理角色类.真实 ...

  3. MobileWeb 适配总结

    开门见山,本篇将总结一下 MobileWeb 的适配方法,即我们常说的H5页面.手机页面.WAP页.webview页面等等. 本篇讨论的页面指专门针对手机设备设计的页面,并非兼容全设备的响应式布局. ...

  4. css3阴影

    <!DOCTYPE html> <html> <head> <style> div { margin-top:100px; margin-left:10 ...

  5. UMTSkeeper: keep your UMTS/GPRS/GSM connection alive automatically

    UMTSkeeper: keep your UMTS/GPRS/GSM connection alive automatically by Elias from Mintaka This page i ...

  6. 【Web crawler】print_all_links

    How to repeat Procedures&Control CS重要概念 1.1 过程procedures 封装代码,代码重用 1.2 控制Control DEMO # -*- codi ...

  7. scrum心得和团队作业

    一.学习scrum心得 敏捷的介绍 最近上课我们了解到了敏捷,很多人开始谈论敏捷开发.研究敏捷开发,那么究竟什么才是敏捷开发呢? 简单的说,敏捷开发是一种以人为核心.迭代.循序渐进的开发方法.在敏捷开 ...

  8. C# 3.0-c#5.0 变化

    最近发现对于C#的使用水平一只停留在3.0的程度 对于4.0 5.0的新特性使用的很少,写一篇文章记录一下增加一下认识. C# 3.5 扩展方法 扩展方法所在的类和扩展方法必须是静态的 并且扩展方法第 ...

  9. HTML 段落p

    可以把 HTML 文档分割为若干段落. HTML 段落 段落是通过 <p> 标签定义的. 实例 <p>This is a paragraph</p> <p&g ...

  10. sqlserver数据库使用空间监控

    数据库使用空间监控,并且每周发邮件预警,下面是操作步骤: 1:建立一张表 ), database_name ), file_group ), logical_name ), physical_name ...