Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

Computer Networking: a Top-Down Approach (8th ed.) :

Select Lectures Notes

Navigator

1    Resources and Introduction

2    Chapter 1: Introduction

3    Chapter 2: Application Layer

 

Chapter 1: introduction

1.1 What is the Internet? What is a protocol?

1.1.1 The Internet: a "nuts and bolts" view

Billions of connected computing devices:

hosts (主机)= end systems (端系统)

running network apps (应用) at Internet's "edge" (边缘)

Packet switches (分组交换机) : forward packets (分组) (chunks of data)

routers (路由器) , switches (交换机)

Communication links (通信链路)

fiber (光纤) , copper (铜) , radio (无线电) , satellite (卫星)

transmission rate (传输速率): bandwidth (带宽)

Networks

collection of devices, routers, links: managed by an organization

Internet: "network of networks"

Interconnected ISPs (Internet Service Providers, 因特网服务提供商)

protocols are everywhere

control sending, receiving of messages (报文)

e.g., HTTP (Web), streaming video, Skype, TCP, IP, WiFi, 4G, Ethernet

Internet standards

RFC: Request for Comments (请求评论)

IETF: Internet Engineering Task Force (因特网工程任务组)

1.1.2 The Internet: a "services" view

Infrastructure that provides services to applications:

Web, streaming video, multimedia teleconferencing, email, games, e-commerce, social media, inter-connected appliances, …

provides programming interface to distributed applications (分布式应用程序):

"hooks" allowing sending/receiving apps to "connect" to, use Internet transport service

provides service options, analogous to postal service

1.1.3 What's a protocol?

Network protocols:

computers (devices) rather than humans

all communication activity in Internet governed by protocols

Protocols (协议) define the format, order of messages sent and received among network entities, and actions taken on message transmission, receipt

1.2 Network edge: hosts, access network, physical media

1.2.1 A closer look at Internet structure

Network edge (网络边缘) :

hosts (主机): clients and servers

servers often in data centers (数据中心)

Access networks (接入网), physical media (物理媒体):

wired, wireless communication links

Network core (网络核心) :

interconnected routers

network of networks

1.2.2 Access networks and physical media

Q: How to connect end systems to edge router?

residential access nets

institutional access networks (school, company)

mobile access networks (WiFi, 4G/5G)

1.2.2.1 Access networks: cable-based access

frequency division multiplexing (FDM, 频分复用): different channels transmitted in different frequency bands

HFC: hybrid fiber coax (混合光纤同轴)

asymmetric: up to 40 Mbps – 1.2 Gbps downstream transmission rate, 30-100 Mbps upstream transmission rate

network of cable, fiber attaches homes to ISP router

homes share access network to cable headend

1.2.2.2 Access networks: digital subscriber line (DSL, 数字用户线)

use existing telephone line to central office DSLAM (digital subscriber line access multiplexer, 数字用户线接入复用器)

data over DSL phone line goes to Internet

voice over DSL phone line goes to telephone net

24-52 Mbps dedicated downstream transmission rate

3.5-16 Mbps dedicated upstream transmission rate

1.2.2.3 Access networks: home networks

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

1.2.2.4 Wireless access networks

Shared wireless access network connects end system to router

via base station (基站) aka "access point" (接入点)

Wireless local area networks (WLANs)

typically within or around building (~100 ft)

802.11b/g/n (WiFi): 11, 54, 450 Mbps transmission rate

Wide-area cellular access networks

provided by mobile, cellular (蜂窝) network operator (10's km)

10's Mbps

4G cellular networks (5G coming)

1.2.2.5 Access networks: enterprise networks

companies, universities, etc.

mix of wired, wireless link technologies, connecting a mix of switches and routers

Ethernet: wired access at 100Mbps, 1Gbps, 10Gbps

WiFi: wireless access points at 11, 54, 450 Mbps

1.2.2.6 Access networks: data center networks

high-bandwidth links (10s to 100s Gbps) connect hundreds to thousands of servers together, and to Internet

1.2.2.7 Host: sends packets of data

host sending function:

takes application message

breaks into smaller chunks, known as packets, of length L bits

transmits packet into access network at transmission rate R

link transmission rate, aka link capacity, aka link bandwidth

packet transmission delay = time needed to transmit L-bit packet into link = L (bits) /R (bits/sec)

1.2.2.8 Links: physical media

bit: propagates (传播) between transmitter/receiver (发射器—接收器) pairs

physical link: what lies between transmitter & receiver

guided media (导引型媒体):

signals propagate in solid media: copper, fiber, coax

unguided media (非导引型媒体):

signals propagate freely, e.g., radio

Twisted pair (TP, 双绞铜线)

two insulated (绝缘的) copper wires

Category 5: 100 Mbps, 1 Gbps Ethernet

Category 6: 10Gbps Ethernet

Coaxial cable (同轴电缆)

two concentric (同心的) copper conductors

bidirectional

broadband:

multiple frequency channels on cable

100's Mbps per channel

Fiber optic cable (光纤电缆)

glass fiber carrying light pulses, each pulse a bit

high-speed operation:

high-speed point-to-point transmission (10's-100's Gbps)

low error rate:

repeaters spaced far apart

immune to electromagnetic noise

Wireless radio

signal carried in various "bands" in electromagnetic spectrum

no physical "wire"

broadcast, "half-duplex" (半双工,sender to receiver)

propagation environment effects:

reflection

obstruction by objects

interference/noise

Radio link types:

Wireless LAN (WiFi)

10-100's Mbps; 10's of meters

wide-area (e.g., 4G cellular)

10's Mbps over ~10 Km

Bluetooth: cable replacement

short distances, limited rates

terrestrial (陆地的) microwave

point-to-point (点对点); 45 Mbps channels

satellite

up to 45 Mbps per channel

270 msec end-end delay

1.3 Network core: packet/circuit switching, internet structure

1.3.1 The network core

Mesh (网状物) of interconnected routers

packet-switching (分组交换): hosts break application-layer messages into packets

network forwards packets from one router to the next, across links on path from source to destination

1.3.2 Two key network-core functions

Forwarding (转发) :

aka "switching" (交换)

local action: move arriving packets from router's input link to appropriate router output link

Routing (路由):

global action: determine source-destination paths taken by packets

routing algorithms

1.3.3 Packet-switching: store-and-forward (存储转发)

packet transmission delay (时延): takes L/R seconds to transmit (push out) L-bit packet into link at R bps

store and forward: entire packet must arrive at router before it can be transmitted on next link

One-hop (跳) numerical example:

L = 10 Kbits

R = 100 Mbps

one-hop transmission delay = 0.1 msec

1.3.4 Packet-switching: queueing

Queueing occurs when work arrives faster than it can be serviced

Packet queuing and loss: if arrival rate (in bps) to link exceeds transmission rate (bps) of link for some period of time:

packets will queue, waiting to be transmitted on output link

packets can be dropped (lost) if memory (buffer) in router fills up

1.3.5 Alternative to packet switching: circuit switching (电路交换)

end-end resources allocated to, reserved for "call" between source and destination

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

in diagram, each link has four circuits.

call gets 2nd circuit in top link and 1st circuit in right link.

dedicated (专用的) resources: no sharing

circuit-like (guaranteed) performance

circuit segment idle if not used by call (no sharing)

commonly used in traditional telephone networks

1.3.6 Circuit switching: FDM and TDM

Frequency Division Multiplexing (FDM, 频分复用)

optical, electromagnetic frequencies divided into (narrow) frequency bands

each call allocated its own band, can transmit at max rate of that narrow band

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

Time Division Multiplexing (TDM, 时分复用)

time divided into slots

each call allocated periodic slot(s), can transmit at maximum rate of (wider) frequency band (only) during its time slot(s)

1.3.7 Packet switching versus circuit switching

Is packet switching a "slam dunk winner" (必定成功的事;稳操胜券的事) ?

great for "bursty" data – sometimes has data to send, but at other times not

resource sharing

simpler, no call setup

excessive congestion possible: packet delay and loss due to buffer overflow

protocols needed for reliable data transfer, congestion control (拥塞控制)

1.3.8 Internet structure: a "network of networks"

hosts connect to Internet via access Internet Service Providers (ISPs)

access ISPs in turn must be interconnected

so that any two hosts (anywhere!) can send packets to each other

resulting network of networks is very complex

evolution driven by economics, national policies

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

At "center": small # of well-connected large networks

"tier-1" commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage

content provider networks (e.g., Google, Facebook, 内容提供商网络): private network that connects its data centers to Internet, often bypassing tier-1, regional ISPs

1.4 Performance: loss (丢包) , delay (时延) , throughput (吞吐量)

1.4.1 How do packet delay and loss occur?

packets queue in router buffers, waiting for turn for transmission

queue length grows when arrival rate to link (temporarily) exceeds output link capacity

packet loss occurs when memory to hold queued packets fills up

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

1.4.2 Packet delay: four sources

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

dnodal = dproc + dqueue + dtrans + dprop

dproc: nodal processing (节点处理)

check bit errors

determine output link

typically < microsecs

dqueue: queueing delay (排队时延)

time waiting at output link for transmission

depends on congestion level of router

dtrans: transmission delay (传输时延)

L: packet length (bits)

R: link transmission rate (bps)

dtrans = L/R

dprop: propagation delay (传播时延)

d: length of physical link

s: propagation speed (~2x108 m/sec)

dprop = d/s

dtrans and dprop

very different

1.4.3 Packet queueing delay (revisited)

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

a: average packet arrival rate

L: packet length (bits)

R: link bandwidth (bit transmission rate)

La/R : arrival rate of bits / service rate of bits "traffic intensity"

La/R ~ 0: avg. queueing delay small

La/R -> 1: avg. queueing delay large

La/R > 1: more "work" arriving is more than can be serviced - average delay infinite!

1.4.4 "Real" Internet delays and routes

what do "real" Internet delay & loss look like?

traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i:

sends three packets that will reach router i on path towards destination (with time-to-live (生存时间) field value of i)

router i will return packets to sender

sender measures time interval between transmission and reply

1.4.5 Packet loss

queue (aka buffer) preceding link in buffer has finite capacity

packet arriving to full queue dropped (aka lost)

lost packet may be retransmitted by previous node, by source end system, or not at all

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

1.4.6 Throughput

throughput: rate (bits/time unit) at which bits are being sent from sender to receiver

instantaneous (瞬时) : rate at given point in time

average (平均): rate over longer period of time

bottleneck link (瓶颈链路)

link on end-end path that constrains end-end throughput

1.4.6.1 Throughput: network scenario

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

per-connection end-end throughput: min(Rc, Rs , R/10)

in practice: Rc or Rs is often bottleneck

1.5 Network security

Internet not originally designed with (much) security in mind

original vision: "a group of mutually trusting users attached to a transparent network" 

Internet protocol designers playing "catch-up"

security considerations in all layers!

We now need to think about:

how bad guys can attack computer networks

how we can defend networks against attacks

how to design architectures that are immune to attacks

1.5.1 Bad guys

1.5.1.1 Bad guys: packet interception

packet "sniffing" (嗅探分组):

broadcast media (shared Ethernet, wireless)

promiscuous network interface reads/records all packets (e.g., including passwords!) passing by

1.5.1.2 Bad guys: fake identity

IP spoofing (IP哄骗): injection of packet with false source address

1.5.1.3 Bad guys: denial of service

Denial of Service (DoS, 拒绝服务): attackers make resources (server, bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus (伪造的) traffic

1. select target

2. break into hosts around the network (see botnet)

3. send packets to target from compromised hosts (受害主机)

1.5.2 Lines of defense

Authentication (鉴别): proving you are who you say you are

cellular networks provides hardware identity via SIM card; no such hardware assist in traditional Internet

confidentiality (机密性): via encryption

integrity checks (完整性检查): digital signatures prevent/detect tampering (篡改)

access restrictions: password-protected VPNs

firewalls: specialized "middleboxes" (中间盒) in access and core networks:

off-by-default: filter incoming packets to restrict senders, receivers, applications

detecting/reacting to DOS attacks

1.6 Protocol "layers" and reference models

Networks are complex, with many "pieces":

hosts

routers

links of various media

applications

protocols

hardware, software

layers: each layer implements a service

via its own internal-layer actions

relying on services provided by layer below

1.6.1 Why layering?

Approach to designing/discussing complex systems:

explicit structure allows identification, relationship of system's pieces

layered reference model for discussion

modularization eases maintenance, updating of system

change in layer's service implementation: transparent to rest of system

e.g., change in gate procedure doesn't affect rest of system

1.6.2 Layered Internet protocol stack (协议栈)

Application Layer

application: supporting network applications

HTTP, IMAP, SMTP, DNS

Transport Layer

transport: process-process data transfer

TCP, UDP

Network Layer

network: routing of datagrams from source to destination

Link Layer

IP, routing protocols

link: data transfer between neighboring network elements

Physical Layer

Ethernet, 802.11 (WiFi), PPP

physical: bits "on the wire"

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

1.6.3 Services, Layering and Encapsulation

Application exchanges messages (报文) to implement some application service using services of transport layer

Transport-layer protocol transfers M (e.g., reliably) from one process to another, using services of network layer

transport-layer protocol encapsulates application-layer message, M, with transport layer-layer header Ht to create a transport-layer segment (报文段)

Ht used by transport layer protocol to implement its service

Network-layer protocol transfers transport-layer segment [Ht | M] from one host to another, using link layer services

network-layer protocol encapsulates transport-layer segment [Ht | M] with network layer-layer header Hn to create a network-layer datagram (数据报)

Hn used by network layer protocol to implement its service

Link-layer protocol transfers datagram [Hn| [Ht |M] from host to neighboring host, using network-layer services

link-layer protocol encapsulates network datagram [Hn| [Ht |M], with link-layer header Hl to create a link-layer frame (帧)

Encapsulation: an end-end view

Computer Networks COMPSCI 453: Select Lectures Notes (Chapter 1: Computer Networks and the Internet)

1.7 Internet history

1961-1972: Early packet-switching principles

1972-1980: Internetworking, new and proprietary networks (专用网络)

1980-1990: new protocols, a proliferation (激增) of networks

1990, 2000s: commercialization, the Web, new applications

2005-present: scale, SDN, mobility, cloud

 

上一篇:chapter 1 引论


下一篇:Java用通配符 获得泛型的协变和逆变