计算机网络第七部分--因特网协议(英文版本)

Internet

在这里插入图片描述
信息经过传输协议,再经过网络协议,再到底层的协议,最终才到达目的地。

TCP / IP suite

在这里插入图片描述
应用协议—>传输协议—>网络协议
IP (Internet protocol): roughly the network layer
TCP (transmission control protocol): roughly the transport layer

Transmitting packets over different networks:在这里插入图片描述

  1. At station A:
    TCP creates a TCP segment containing data, then ‘sends’ to station D.
    IP intercepts拦截 the TCP segment, and creates an IP packet containing the TCP segment. It also determines route(s).
    data link layer creates a frame and send it to router B via network1.
  2. Router B’s IP examines the address in the packet and determines that it should go to router C via network 2
  3. The procedure repeats till it reaches the destination.

Internet Protocols

  • IP (Internet Protocols) provides a connectionless service to the transport layer protocols.(c.f.请比较 connection-oriented service 面向连接的服务)
  • IP forms形成 IP packet (IP datagram数据包), given a TCP(传输控制协议)/UDP(用户数据协议) segment, then transmits through a router to its destination
  • Internet address (IP address)
    unique internet wide identification assigned to the host
    – consisting of a network number identifier (netid) and a host number identifier (hostid)
    – centrally managed by the Internet Corporation for Assigned Names and Numbers (ICANN).
  • IP routing algorithm to decide the route to the final destination
  • IP packet
    在这里插入图片描述
    – header length: specifies the number of 32-bit words in the packet header**
    – datagram length: specifies the number of octets in the entire packet, maximum 65536 octets
    – protocol: indicates the higher layer protocol using this packet (e.g., 6 for a TCP segment, 17 for a UDP segment)
    – header checksum: used for error detection of packet header only. 其他的有自己的error detection
    – source/destination IP address: contains IP addresses for the sending and receiving stations
    – options: not always required, but can be used for special treatment ( record route: trace the route a packet takes; timestamp: records the time at each router handles the packet; source route: allows the sender to specify具体说明 the route to be taken)
    – data: contains the data provided by the higher layer

IP addresses and IP routing

IP addresses

  • domain name
    – typical form: host . subdomain(s) . domain (e.g. hazel . dcs . shef . ac . uk)
    – e−mail is delivered by a host to a user specified by ‘ @ ’.
  • IP addresses
    translated from domain name using a protocol called the DNS (domain name server).
    – form of four 8-bit binary numbers. this 32-bit IP address is unique to each host
    在这里插入图片描述
    e.g.10001111−10100111−00001000−01010100 ( equivalently, ‘ 143 . 167 . 8 . 84 ’ by a dotted decimal notation)
  • Physical address
    – used by the underlying下层的 physical network (different from IP addresses)
    – only local significance, but none on a global IP scale

在这里插入图片描述
Name server:
– provides scalability可伸缩性 to the entire name space
administrate管理 names and IP addresses of hosts within the zone
– knows domain names and IP addresses of lower/higher level name servers in the hierarchy
– searches a resource record of a given destination host name, located in a different zone 搜索其他域的资源记录

Class based addresses:
在这里插入图片描述
Subnetting
在这里插入图片描述

  • a single netid is allocated分配 for each site
  • a site may contain multiple LANs with their own routers
  • each LAN (with a router) in a single site is assigned a subnetid
  • an address mask defines the boundary between a network address (netid and subnetid) and the hostid

其实就是说一个site可能会有很多LAN,每个LAN都给一个自己的subnetid

IP Routing

Address resolution protocol (ARP) 地址解析协议:

  • to find a physical address of a target host. 寻找目标的物理地址
    记忆的时候考虑收发者分别的IP地址和物理地址。发送的时候其实是索要接收者的物理地址,回应的时候会被fill in
    在这里插入图片描述
  • ARP request
    broadcasting a frame to the local network, containing sender’s physical and IP addresses and recipient’s IP address.
  • ARP response
    – reply using the same format, but now with the recipient’s physical address filled in
    – a router replies when the recipient is not in the same LAN
    – ARP response is a unicast 单播
    a response is addressed to the sender of an ARP request, all other hosts do not need additional processing time and cache. ARP request/response traffic appears at each time a network connection is required
    – Suppose that ARP response was a broadcast 广播
    all hosts within a local network could learn a combination of physical and IP addresses and store in a ARP cache for future use, reduce the ARP request/response traffic, but increase processing time and cache at hosts

Router
when a frame is received.

  • extract提取 a packet, and examine the destination’s IP address 验证IP
  • determines where to send next, using the ARP 寻找下一个地址
  • build a new frame, with the next recipient’s physical address, and send it 添加目的地物理地址重建帧

在这里插入图片描述
在这里插入图片描述

  • suppose router A receives a packet containing an IP address of ‘130.0.x.y’, then the packet can be delivered to the destination directly.
  • suppose A receives a packet with a destination address ‘140.8.p.q’, it should create a frame containing an IP address ‘130.0.0.6’, that specifies router B via network ‘130.0.0.0’.

IP routing algorithm

  1. when a router receives a packet, it determines the IP address of the destination network
  2. if the destination matches any of directly connected networks, the router sends the packet there
  3. else if a route is specified by a sending station, the packet is sent accordingly
  4. else if the destination appears in the router’s routing table, the packet is sent according to the table
  5. else if a default router默认路由 exists, the router sends the packet there
  6. else the router declares a routing error

接收的时候IP地址已经有了,接下来有四种情况。如果说目的地是某个直接连接的网络,送过去。如果发送站已经给出了一个特定的路径,发过去。如果目的地出现在了路由器的routing table,按照哪个发过去。如果是有个默认路由,发过去。以上四种情况都不是的话,报错。

ICMP (Internet control message protocol) 因特网控制消息协议

forms an integral必需的 part of whole IP implementation, and is used for network management.

六个功能:

  • Error reporting:
    – destination unreachable: the destination may be down, or may not exist
    – time exceeded
    – parameter error: packet’s header parameter is not recognized
  • Reach-ability testing:
    – echo request/reply: to find whether a particular destination is reachable
  • Congestion control
    – source quench抑制: to request a host to reduce the number of packets
  • Route exchange
    – redirect: to inform a host to use the alternative route
  • Performance measuring
    – time stamp request/reply: to determine the transmission delay between hosts
  • Subnet addressing
    – address mask request/ reply: to find the address mask associated with a subnet

Transport protocols

TCP (transmission control protocol) 传输控制协议

provide the perception感知 of a connection-oriented (i.e., reliable, 上面的IP是connectionless) service by interfacing between the user and network protocols
provides the handshaking by establishing, maintaining, and releasing connections
handles requests to deliver information to a destination reliably
– receives data or requests from its user, stores it in a TCP segment, and gives it to the IP
在这里插入图片描述
the maximum size of the receive buffer is typically 4098, 8192, or 16 384 bytes, thus larger size data must be fragmented.

Connection establishment:
– a three-way handshake protocol is used
a TCP connection is fully duplex 全双工 (i.e., data can be transmitted in both direction simultaneously同时)
– in a client-server applications, a client always initiates开始 a TCP connection

Data transfer

  • error control
    – successful transmission of TCP segment is acknowledged, using ACK signal
    – a failed TCP segment is retransmitted
  • flow control
    use of buffer allocation scheme to ensure the sufficient buffer space at the recipient side
  • congestion control
    (initially the congesti8on status is not know, hence)
    – starts transmission with the small number of TCP segments, while monitoring the return of ACK
    gradually increase the number of TCP segments

Connection termination
one host initiates发起 the closure关闭 of connection (active close), and the other side follows (passive close).

UDP (user datagram protocol) 用户数据报协议

UDP is a connectionless service (TCP是connection-oriented, IP是connectionless)
– little more than interfacing between the user and the lower layer 用户和底层之间的接口
no handshake is established
– data or requests is stored in a UDP segment – which has limited abilities – then passed to the IP for delivery.
no mechanisms机制 for acknowledging error, nor completion or transmission 没有ACK的传输,完成,检错的机制
– used for realtime实时 applications (e.g., internet telephony with audio/ video data)

Internet applications

client-server / peer-to-peer

Client-server model
client: any program that makes requests to a server.
server: any application that provides a service to network users.

e.g.

  • file server:
    – stores, manages, and provides access to files.
    – allows users to share files kept in the network.
  • communication server:
    establishes connection between a user and a network host computer once such request is made.

Peer-to-peer model
人人平等的感觉

  • distributed network with shared resources such as processing power and storage.
  • resources are available directly without intermediate中间的 network hosts.
  • peers are both suppliers and users of resources.

在这里插入图片描述
Advantages for client-server model:
– clear roles and responsibilities.责任清楚
– ease of maintenance.易于维持
– greater security controls in servers than most clients.更好进行安全控制

Advantages for peer-to-peer model:
– network traffic is spread over the network.交通分散
– robust — failure in some nodes or part of networks will not cause serious effect 一个点失败不太影响整体

TELNET / FTP (file transfer protocol)

TELNET
在这里插入图片描述

  • a local and a remote computer run the TCP/IP to establish a connection. 和远程电脑通过TCP/IP 建立联系
  • once connected, TELNET works in the background, thus transparent to the user and appears much like a local login. 后台运行,因此对用户来说像是local login

File Transfer Protocol (FTP)

  • initiated by a user to transfer various files.用户想发大量文件
  • two TCP connections (control/data connections).两个TCP连接,记住那个图
  • port numbers — server side: 20/21 (fixed固定的), client side: one-time use. 客户端固定接口号码,客户端一次性接口号码
    在这里插入图片描述

electronic mail

SMTP (simple mail transfer protocol)
记住下面那个图,主要是记住感觉数据是如何传输的,先是传输层的TCP,然后网络层的IP这两个可以写一起TCP/IP,然后才是更底层物理层的传输。

在这里插入图片描述

  • SMTP (sender’s side) first call TCP to establish a connection with the remote远程 site
  • when the connection is made, both sides exchange packets and eventually the mail is delivered

POP3 (post office protocol, version 3)

  • provide a simple mailbox manipulation操作: copy a message from the mailbox (on server) to the local host, then delete from the mailbox (i.e., once accessed, a message is deleted permanently from the server)

IMAP (internet message access protocol)

  • allow accesses to the mailbox from multiple places
  • more advanced, flexible secure
  • treat a message as a collection of MIME body parts
  • MIME (multipurpose internet mail extensions)
    – a header plus a structured message body
    – encoding rule for non-ascii text, audio, visual data
  • port numbers — server MTA: 25 (fixed), client MTA: one-time use

在这里插入图片描述

WWW (world wide web)

Web model:
在这里插入图片描述
A view from a web client

  • the web consists of a vast worldwide collection of documents, usually just called ‘pages’ for short.
    – each page may contain links (pointers) to the other related pages, anywhere in the world.
    – users can follow a link (by clicking on it), which then takes them to the page pointed to.
  • pages are viewed with a program called a ‘browser’ (e.g., Firefox).
    HTML (hypertext超文本 markup language) describes how documents are properly formatted.
    – the browser fetches the page (HTML document), interprets text and formatting commands that it contains, and display on the screen.

URL (uniform resource locator):
http://www.dcs.shef.ac.uk/teaching/

  • assigned to each page, uniquely in worldwide.
  • consisting of
    – protocol (e.g., http)
    – name of the server where the page is located (e.g., www.dcs.shef.ac.uk)
    – file name (e.g., teaching/index.html).

HTTP (hypertext transfer protocol):

  • typically used with the TCP for transport connection.
  • consisting of a set of requests from browsers to servers, and a set of responses going back to the other direction.

CGI script (common gateway interface script):

  • filled-in form integrated into a client’s web page.
  • CGI script at the server processes an input from the client.

Java applets:

  • separate programs called from an HTML page, downloaded from a web server, and run on the client’s machine.

Java script:

  • a program code included in an HTML page.

Plug-ins:

  • process multimedia applications (e.g., audio, video).

在这里插入图片描述
port numbers for WWW — server HTTP: 80 (fixed), client HTTP: one-time use.
port number for DNS server — 53.

What may happen if someone clicks a link on the browser:

  1. the browser will
    determine the URL of the link.
    ask DNS for the IP address.
    determine the protocol, then make a TCP connection to the web server specified by the IP address.
    – send commands to get the specified page.
    先是获得了URL,然后找DNS要IP地址,决定协议,TCP connection到刚才要到的IP地址指向的网页服务器,最后发送给那个网页发送命令
    这个最好记一记

  2. the server will send the requested page. 服务器把用户要求的那个页面发过去

  3. the browser will
    (a) release the TCP connection. 解除TCP连接
    (b) display the formatted page on the screen. 在屏幕上显示格式化的页面

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值