Lec 0 - Preliminaries
Computer Network
Course Aims:
- To introduce networked computer systems in general and Internet in particular:
- The basic operating principles
- The design and organization priciples of successful computer networks
- The key protocols and technologies used in the Internet
Learning Outcomes:
- be able to describe and justify the OSI Reference Model and the key protocols that govern the Internet
- be able to program application and protocols for computer networks
- be able to illustrate and debate the use and need of cryptographic techniques in network security
Assessment
- Coursework: 30%
- 2 JAVA programming assignments, 10% each
- A1 Deadline: 21 OCtober 2021
- A2 Deadline: 4 Novermber 2021
- 1 class test, 10%
- 22 Novermber 2021
- 2 JAVA programming assignments, 10% each
- Exam: 70%
Lec 1
Chapter goal:
- Get “feel”, “big picture,” Intruduction to terminology
- more depth, detail later in course
- Approach:
- use Internet as example
- Overview/roadmap:
- What is the Internet?
- What is a protocol?
- Network edge: hosts, access network, physical media
- Network core: packet/circuit switching, internet structure
- Performace: loss, delay, throughput
- Security
- Protocol layers, service models
- History
The Internet: a “nuts and bolts” view
- connected computing devices:
- Packet switches
- Communication links
- Networks
- Internet: “network of networks”
- protocols are everywhere
- Internet standards
- RFC: Request for Comments
- IETF: Internet Engineering Task Force
The Internet: a “service” view
- 为应用程序提供服务的基础设施
- 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
PROTOCOL协议
- Human protocols
- “what’s the time?”
- “I have a questin”
- introductions
- Network protocols:
- computers(devices) rather than humans
- all communication activity in Internet governed by protocols
Protocols define the format, orderof messages sent and received among network entities, and actions taken
on msg transmission, receipt
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
- wired, wireless communication links
- Network core:
- interconnected routers
- network of networks
Access networks and physical media
- connect end systems to edge router
- residential access nets
- institutional access networks(school, company)
- mobile sccess networks(WiFi, 4G/5G)
- 寻找需求:
- transmission rate(bits per second) of acces network?
- shared or dedicated access among users?
- cable-based access:
通过线缆连接从供应商到各户
frequency division multiplexing(FDM): different channels transmitted in different frequency bands
- HFC: hybrid fiber coax 混合光纤同轴
- asymmetric: up to 40 Mbps- 1.2Gbs Gbsdownstream transmission rate, 30-100 Mbps upstream transmission rate
- network of cable, fiber attaches homes to ISP router
- homes share access network to cable headend
- digital subscriber line(DSL):
电话上网
- use existing telephone line to central office DSLAM
- 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
- home networks
- Wireless access networks Shared wirelessaccess network connects end system to router
- via base station aka”access point”
- Wireless local area networks
- typically within or around building(~30 m)
- 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)
- enterprise networks
- companies, universities, etc.
- mix of wired, wireless link technologies, connecting a mix of switches and routers (we’ll cover differences shortly)
- Ethernet” wired access at 100Mbps, 1Gbps, 10Gbps
- WiFi: wireless access points at 11, 54, 450 Mbps
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
delay = L/R
Links: physical media
- bit: propagates between transmitter/receiver pairs
- physical link:
- guided media:
- unguided media:
- Twisted pair(TP)网线接口
- physical media
- 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 electromagnetic spectrum
- no physical “wire”
- propagation environment effects:
- reflection
- obstruction by objects
- interference
- Radio link types:
- terrstrial microwave
- Wireless LAN
- wide-area
- 4G cellular: ~ 10’s Mbps
- satellite
- up to 45 Mbps per channel
- 270 msec end-end delay
- geosynchronous versus low-earth-orbit
- Coaxial cable:
- physical media
The network core
- mesh of interconnected routers
- packet-switching: hosts break application-layer messages into packets
- forward packetsfrom one router to the next, across links on path from source to destination
- each packet transmitted at full link capacityIntroduction: 1-25mobile networkhome network
Packet-switching:
- store-and-forward
- Transmission delay:takes L/Rseconds to transmit (push out) L-bit packet into link at Rbps 传输延迟等于 L/R
- store and forward: entirepacket must arrive at router before it can be transmitted on next link 一存一进
- End-end delay: 2L/R (above), assuming zero propagation delay (more on delay shortly) 端端延迟
- queueing delay, loss
*packet queuing and loss: if arrival rate (in bps) to link exceeds transmission rate (bps) of link for a 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 丢包
Two key network-core functions
- Forwarding:
- local: 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
Alternative to packet switching: circuit switching
end-end resources allocated to, reserved for “call” between source and destination
- in diagram, each link has four circuits.
- call gets 2nd circuit in top link and 1stcircuit in right link.
- dedicated resources: no sharing
- circuit-like(guaranteed)
performance
- circuit-like(guaranteed)
- circuit segment idle if not used by call
- commonly used in trafitional telephone networks
Packet switching versus circuit switching
- packet switching allows more users to use network!
- circuit switching good at:
- 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
- How to provide circuit-like behavior?
- bandwidth guarantess traditionally needed for audio/video applications
Internet strucutre: a “network of networks” 由小到大逐渐组成互联网
- Hosts connect to Internet via access Internet Service Providers (ISPs)
- residential, enterprise (company, university, commercial) ISPs
- Access ISPs in turn must be interconnected•so that any two hosts can send packets to each other
- Resulting network of networks is very complex•evolution was driven by economicsand national policies
- Let’s take a stepwise approach to describe current Internet structure
组成形式 - global ISP
- company ISP
- IXP ( Internet exchange point): to connet each ISP
- peering link
- regional ISP
- access ISP
Packet loss and delay
packets queue in router buffers
- packets queue, wait for turn
- arrival rate to link exceeds output link capacity: packet loss
Packet delay: four sources
- “transmission”, “propagation”, “nodal processing”, “queueing”
- d(nodal) = d(proc) + d(queue) + d(trans) + d(prop)
d(proc): nodal processing
- check bit errors
- determine output link
- typically < msec
d(queue): queueing delay
- time waiting at output link for transmission
- depends on congestion level of router
d(tran): transmission delay:
- L: packet length(bits)
- R: link transmission rate(bps)
- d(trans) = L/R
d(prop): propagatin delay:
- d: length of physical link
- s: propagation speed
- d(prop) = d/s
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
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
- Rs < Rc & Rs > Rc
bottleneck link: link on end-end path that constrains end-end throughput
- network scenario
- per-connection end-end throughput: min(Rc,Rs,R/10)
- in practice: Rc or Rs is often bottleneck
Network security
- field of network security:
- under attacks
- defend attacks
- immune to attacks
- Internet not originally designed with(much) security in mind
malware
virus:self-replicating infection by receiving/executing object (e.g., e-mail attachment)
worm: self-replicating infection by passively receiving object that gets itself executed
spyware malware can record keystrokes, web sites visited, upload info to collection site
infected host can be enrolled in botnet,used for spam or distributed denial of service (DDoS) attacks
denial of service
Denial of Service(Dos): attackers make resources (server, bandwidth) unavailable to legitimate traffic by overwhelming resource with bogus traffic
- select target
- break into hosts
- send packets to target from compromised hosts
packet interception
packet “sniffing”
- broadcast media(shared Ethernet, wireless)
- promiscuous network interface reads/records all packets(e.g.,including passwords!) passing by
fake identity
IP spoofing: send packet with false source address
Protocol “layers” and reference models
- Networks are complex, with many “pieces”:
- hosts
- routers
- links of various media
- applications
- protocols
- hardware, software
Internet protocol stack
- application
- treansport
- network
- link
- physical
ISO/OSI reference model
- presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions
- session: synchronization, checkpointing, recovery of data exchange
- Internet statck “missing” these layers!
- Internet history