计算机网络自顶向下方法之一一一第一章 之一

Computer Networks and the Internet


第一章是呈现一个计算机网络和互联网的广泛的概述,在这里,我们的目标是绘制出一个广阔的图谱并且为这本书剩下的内容做个铺垫,to see the forest through the trees.(搜了下不知道咋翻译),在这一章我们会涵盖很多东西并且讨论很多计算机网络的零碎东西,与此同时不能丧失全局视野。

1.1 What Is the Internet?

关于什么是互联网可以有两种阐述
1).基础的软硬件部件构成了互联网
2).一种给分布式应用提供服务的网络基础设施

1.1.1 第一种讲法—基本软硬件构成

互联网是连接全球众多网络设备的计算机网络,互联网术语中,所有的网络设备都叫做hosts或者end system
终端是通过通信链路和包交换机组成的网络连接在一起的。

包交换机从它的进入的通信链路中取到包,然后把包发送到它的送出链路中。当今两个最杰出的包交换机类型是routers(路由器)和link-layer switches(链路层交换机)
Link-layer switches are typically used in access networks, while routers are typically used in the network core.
包从发出端到达目的地所经过的一系列通信链路和包交换机叫做route或者path.
end systems通过ISPs(Internet Service Providers)接入互联网.每个ISP都是一个包交换机和通信链路组成的网络.ISPs为终端提供很多类型的接入,包括住宅宽带接入例如cable modem或DSL 。高速局域网接入,无线接入,拨号接入。ISPs还为内容提供者提供网络接入,将网站直接接入互联网。
互联网就是把终端都连接起来,所以显然ISPs也得相互连接,它们通过更高层次的ISPs连接在一起,更高层次的ISPs由高速光纤连接高速路由构成。
每一个ISP网络,无论层次,都是独立管理的,执行IP协议,遵循确定的命名和地址规定。
终端,包交换机,以及其他网络设备运行协议来控制网络内信息的发送和接收,TCP(Transmission Control Protocol)和IP(Internet Protocol)是网络中最重要的两个协议。IP协议具体阐明于路由器和终端间所发送和接收的包的格式。网络的主要协议统称为TCP/IP .
互联网标准由IETF(Internet Engineering Task Force)制定,IETF标准文档叫做request for comments (RFCs),其他组织也制定网络标准,大多在互联网连接领域比较显著,The IEEE 802 LAN/MAN Standards Committee, for example ,specifies the Enthernet and wireless WiFi standards .

1.1.2 第二种讲法—–服务讲法

as an infrustructure that provides services to applications .

互联网应用运行于终端上,而不是运行于互联网中心的包交换机。尽管包交换机促进了终端间的数据交换。
那么一个终端上的程序是怎么指示互联网把数据传输到指定的另一台终端上正在运行的程序那里呢? 连接于互联网的终端提供API来详细说明这个问题。
API(Application Programming Interface)是发送端程序必须遵循的一系列规矩,这样互联网才能把数据传输到指定的目标程序。
For now, let’s draw upon a simple analogy, one that we will frequently use in this book. Suppose Alice wants to send a letter to Bob using the postal service. Alice, of course, can’t just write the letter (the data) and drop the letter out her window. Instead, the postal service requires that Alice put the letter in an envelope; write Bob’s full name, address, and zip code in the center of the envelope; seal the envelope; put a stamp in the upper-right-hand corner of the envelope; and finally, drop the envelope into an official postal service mailbox. Thus, the postal service has its own “postal service API,” or set of rules, that Alice must follow to have the postal service deliver her letter to Bob. In a similar manner, the Internet has an API that the program sending data must follow to have the Internet deliver the data to the program that will receive the data.

1.1.3 What is a Protocol

A Human Analogy

Network Protocol

互联网中所有涉及到两个或以上远程交流实体的活动都是被protocol来控制的。protocols运行在互联网的方方面面,无处不在。

A protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event.

1.2 The Network Edge

终端之所以被叫做终端,因为他们坐落于互联网的边缘。它们也被叫做host,因为它们是一些应用程序的宿主,比如web 浏览器 program,web 服务器 program . host还通常分为client和server ,

1.2.1 Access Networks

Home Access: DSL,Cable ,FTTH , Dial-Up , and Statellite 。

DSL : digital subscriber line , 使用DSL时,你的电信公司就是你的ISP .

在消费者这里,分路器将数据和电话信号分离并且把数据送入DSL modem中,DSL modem还能在发送数据时将数字信号转化为模拟信号。在电信公司,DSLAM会分离这两种信息并将数据发送到互联网。很多终端公用一个DSLAM .

DSL适用短距离连接,大约在5-10英里之间 。因为上传下载速率是不同的,所以是非对称连接。

While DSL makes use of the telco’s existing local telephone infrastructure, cable Internet access makes use of the cable television company’s existing cable television infrastructure.

Cable :A residence obtains cable Internet access from the same
company that provides its cable television.


由于这个系统中既有光纤又有同轴电缆 , 所以通常叫做HFC(光纤-同轴电缆混合系统) 。此种连接方式需要特别的cable modem ,这种猫把HFC网络分为两个通道,上传通道和下载通道 。
这种连接的重要特点是它是shared broadcast medium ,即如果很多人都在用, 网速就会慢 , 如果用的人少就快些 。

FTTH : fiber to the home ,provide an optical fiber path from the CO directly to the home .
FTTH’s PON distribution architecture

The OLT, providing conversion between optical and electrical signals,connects to the Internet via a telco router .In the home, users
connect a home router (typically a wireless router) to the ONT and access the Internet via this home router.
In the PON architecture, all packets sent from OLT to the splitter are replicated at the splitter (similar to a cable head end).

In locations where DSL, cable, and FTTH are not available (e.g., in
some rural settings), a satellite link can be used to connect a residence to the Internet at speeds of more than 1 Mbps . Dial-up access over traditional phone lines is based on the same model as DSL—a home modem connects over a phone line to a modem in the ISP. Compared with DSL and other broadband access networks, dial-up access is excruciatingly
slow at 56 kbps.

Access in the Enterprise (and the Home) :Ethernet and WiFi

在公司或者大学校园 ,或者家里 ,一般用LAN(local area network)来连接边缘路由器 ,虽然有不少LAN技术类型 , 但是以太网是目前最受欢迎的连接技术 。


以太网用户用双绞线连接到以太网交换机。
无线LAN接入以IEEE 802.11 技术为基础 , 也就是通常所说的WiFi ,

This home network consists of a roaming laptop as well as a wired PC; a
base station (the wireless access point), which communicates with the wireless PC; a cable modem, providing broadband access to the Internet; and a router, which interconnects the base station and the stationary PC with the cable modem. This network allows household members to have broadband access to the Internet with one member roaming from the kitchen to the backyard to the bedrooms.

Wide-Area Wireless Access :3G and LTE

像iPhone , Android设备用和cellular telephony一样的无线基础设施通过cellular网络提供商的基站来发送和接收数据包。范围能达到基站周围数十公里。

3G 4G LTE

1.2.2 Physical Media

物理媒介分为两类:
guided media :the waves are guided along a solid medium .
unguided media : the waves propagate in the atmosphere and in outer space .
Twisted-Pair Copper Wire 双绞线
最便宜最普及的物理媒介 。 已经在电话网络中使用了上百年 。两根绝缘铜线绞在一起来减少附近相同双绞线的电子干扰。

UTP(Unshielded twisted pair)通常被用作一幢建筑内的网络连接 。

Coaxial Cable**同轴电缆**

同轴电缆也有两根铜导线 ,但这两根是同轴的,这种结构让它获得高速传输能力
Coaxial cable can be used as a guided shared medium. Specifically, a number of end systems can be connected directly to the cable, with each of the end systems receiving whatever is sent by the other end systems.,

Fiber Optics 光纤

光纤通过光脉冲传输数据,每个脉冲代表一比特,一根光纤可以支撑庞大的比特速率 ,对电磁干扰有免疫力 ,一百公里内信号损失非常小,and are very hard to tap . 这些特点让其成为远途传输最理想的媒介,特别是跨海连接。

Terrestrial Radio Channels
radio channels 在电磁频谱中运送信号 ,它吸引人之处就是它不需要任何物理线路,能穿墙 , 向移动用户提供连接 ,并且远距离传输 。
The characteristics of a radio channel depend significantly on the propagation environment and the distance over which a signal is to be carried

Satellite Radio Channels**卫星广播**
A communication satellite links two or more Earth-based microwave transmitter/receivers, known as ground stations.它接收是一个频段 , 发送是另一个频段 。分为两种:地球同步卫星和近地卫星

同步卫星相对地球是固定的, 由于距离原因 ,来回的信息传输会产生280ms的延迟。
近地卫星

1.3 The Network Core

1.3.1 Packet Switching

从源头终端发送message到目标终端,源头终端会把message分成许多小的packets,从source到destination,每个packet都要穿过通信链路和包交换机(包括两种:路由器和链路层交换机),包在通信链路中传输都是full transmission rate 。

Store-and-Forward Transmission
这种方法要求在输出数据之前包交换机必须接收到整个packet。


每个包为L bits

我们来算一下从发送方发送包开始到接收方收到全部包为止所用的时间 ,这里我们忽略propagation delay ,也就是比特以近乎光速穿过线路的时间,0s开始发送,L/Rs第一个包都已经发出,路由器也已经接收到并保存了第一个包 ,此时,路由器便可以发送第一个包,与此同时发送方会发送第二个包 。2L/Rs,路由器接收到第二个包, 接收方收到第一个包,以此算下去, 所以总的延迟会是4L/Rs .

Queuing Dalays and Packet Loss
每个包交换机都有许多线路连接它 ,对于每一条线路 ,包交换机都有一个output buffer 也叫做 output queue ,用来存储路由器将要发送出的包 ,它在包交换中有很重要的地位 。
如果刚来到的包发现路由器繁忙 , 便需要在buffer中排队等候 ,因此会有queuing delays ,如果发现buffer已经满了 ,之后再到达的包便会引发packet loss ,会有新到达的包或者buffer中的包被丢弃 。

Forwarding Tables and Routing Protocols

互联网中 ,每个终端都有一个IP地址 ,当发送方想要发送包到目的地时 ,发送方会在包的header包含目的地的IP地址 。当包到达路由器 ,路由器会看IP地址的一部分 ,并且把包发送到相邻路由器 。 更准确的说 ,每一个路由器都有转发地址表来指示目的地地址或者目的地地址的部分 ,当包到达路由器 ,路由器查看包头的地址并查找转发地址表 ,找到合适的导出链路之后就把它发送出去 。

我们已经知道路由器利用包中的地址来查找转发表来决定合适的导出链路 ,但是这又产生另外一个问题 ,这张表是怎么被设置的呢 ?这个在第四章讲 ,但是告诉你互联网有一些路由协议用来自动的生成转发表 。

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值