Networking and Internetworking i206 Fall 2010 John Chuang
John Chuang IS206 UC Berkeley 2
Network
Bits & BytesBinary Numbers
Number Systems
Gates
Boolean Logic
Circuits
CPU Machine Instructions
Assembly Instructions
Program Algorithms
Application
Memory
Data compression
Compiler/Interpreter
OperatingSystem
Data Structures
Analysis
I/O
Memory hierarchy
Design
Methodologies/Tools
Process
Truth tableVenn DiagramDeMorgan’s Law
Numbers, text,audio, video, image, …
Decimal, Hexadecimal, Binary
AND, OR, NOT, XOR, NAND, NOR,etc.
Register, CacheMain Memory,Secondary Storage
Context switchProcess vs. ThreadLocks and deadlocks
Op-code, operandsInstruction set arch
Lossless v. lossyInfo entropy & Huffman code Adders, decoders,
Memory latches, ALUs, etc.
DataRepresentation
Data
Data storage
Principles
ALUs, Registers,Program Counter, Instruction Register
Network
Distributed Systems Security
Cryptography
Standards & Protocols
Inter-processCommunication
Searching, sorting,Encryption, etc.
Stacks, queues,maps, trees, graphs, …
Big-O
UML, CRC
TCP/IP, RSA, …
ConfidentialityIntegrityAuthentication…
C/S, P2PCaching
sockets
Formal models
Finite automataregex
John Chuang IS206 UC Berkeley 3
Lecture Outline
Different abstractions of a network
Network architecture- Layered protocol architecture- Message encapsulation
John Chuang IS206 UC Berkeley 4
Network as Communication Channel
process p process q
Communication channel
send
Outgoing message buffer Incoming message buffer
receivem
Source: Coulouris, Dollimore and Kindberg
John Chuang IS206 UC Berkeley 6
Network: Routers & Links
Hosts Linksor local networks
A
D E
B
C
1
2
5
43
6
Routers
Network utility: traceroute/tracert
Source: Coulouris, Dollimore and Kindberg
John Chuang IS206 UC Berkeley 7
LocalExchangeCarrier(LEC) Router
ISP
BackboneProvider 1
Router
Client
TandemSwitch
Inter-exchangeCarrier (IXC) Long-
Distance Network
Corporate LAN
Firewall
AnalogModem
ContentProvider
Server
Router
Remote ISP
Point of Presence
xDSLModem
CableModem
Packet Network HeadendCable ISP
LocalLoop
DNS
Local Ingress Switch
Exchange Point
Router
Internet Service ProvidersCustomer Premises
Internet backbonesTelephone Network
Local Egress Switch
BackboneProvider 2
router
Mobile Client
Wireless ISP
Network: More Details
John Chuang IS206 UC Berkeley 8
Network Types
Range Bandwidth (Mbps)Latency (ms)
LAN 1-2 kms 10-1000 1-10WAN worldwide0.010-600 100-500MAN 2-50 kms 1-150 10
Wireless LAN0.15-1.5 km2-11 5-20Wireless WANworldwide0.010-2 100-500Internet worldwide0.010-2 100-500
An internet: a set of interconnected networks The Internet: the global internetwork based upon
the Internet Protocol (IP)
Source: Coulouris, Dollimore and Kindberg
circa 2000
John Chuang IS206 UC Berkeley 9
Network Building Blocks
Transmission media- Copper (coax, twisted pair), optical fiber, free space (wireless)
Signals- Electrical currents, light, RF (radio-frequency), microwave
Hardware devices- End hosts, network interfaces- Routers, switches, hubs, bridges, repeaters
Software components- Communication protocol stack
John Chuang IS206 UC Berkeley 10
Lecture Outline
Different abstractions of a network
Network architecture- Layered protocol architecture- Message encapsulation
John Chuang IS206 UC Berkeley 11
Network Architecture
Networking can be quite complex and requires a high degree of cooperation between the involved parties.
Cooperation is achieved by forcing parties to adhere to a set of rules and conventions (protocol).
The complexity of the communication task is reduced by using multiple protocol layers:
- Each layer is implemented independently.- Each layer is responsible for a specific subtask.- Layers are grouped in a hierarchy.
A structured set of protocols is called a network architecture, protocol architecture, or protocol suite.
John Chuang IS206 UC Berkeley 12
What each layer does
Application (layer 7): specific to application need
Presentation (layer 6): conversion of data representation
Session (layer 5): access mgt, synchronization
Transport (layer 4): end-to-end delivery, congestion and flow control
Network (layer 3): addressing, routing
Data Link (layer 2): framing, error detection
Physical (layer 1): bits (0/1), voltages, frequencies, wires, pins, …
Application layer
Presentation layer
Session layer
Transport layer
Network layer
Data link layer
Physical layer
Layer 1
Layer 2
Layer 7
Layer 6
Layer 5
Layer 4
Layer 3
ISO/OSI Reference Model
John Chuang IS206 UC Berkeley 13
Layered Protocol Architecture
Application layer
Transport layer
Network layer
Link layer
TCP/IP Model
Physical layerLayer 1
Layer 2
Layer 7
Layer 4
Layer 3
Software
OperatingSystem
Hardware
Application layer
Presentation layer
Session layer
Transport layer
Network layer
Data link layer
Physical layer
Layer 1
Layer 2
Layer 7
Layer 6
Layer 5
Layer 4
Layer 3
ISO/OSI Reference Model
Socket API
John Chuang IS206 UC Berkeley 14
The “IP Hourglass”
IP
TCP, UDP
HTTP, FTP, SSH, SMTP,Your python program, ...
coax, twisted pair, fiber,wireless, pigeons, ...
Ethernet,WiFi, SONET
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Application Layer
A single protocol
John Chuang IS206 UC Berkeley 15
TCP/IP ModelAppl
Transport
Network
Link
Network
Link
Network
Link
Appl
Transport
Network
Link
Host A Host BRouter 1 Router 2
end-to-end
point-to-point
point-to-point
end-to-end
John Chuang IS206 UC Berkeley 16
TCP/IP ModelAppl
Transport
Network
Link
Network
Link
Network
Link
Appl
Transport
Network
Link
Host A Host BRouter 1 Router 2
end-to-end
point-to-point
point-to-point
end-to-end
client server(ping)
John Chuang IS206 UC Berkeley 17
TCP/IP ModelAppl
Transport
Network
Link
Network
Link
Network
Link
Appl
Transport
Network
Link
Host A Host BRouter 1 Router 2
end-to-end
point-to-point
point-to-point
end-to-end
(traceroute)
John Chuang IS206 UC Berkeley 18
Message FlowAppl
Transport
Network
Link
Network
Link
Network
Link
Appl
Transport
Network
Link
Host A Host BRouter 1 Router 2
John Chuang IS206 UC Berkeley 19
Encapsulation Example: Sending HTTP message using TCP/IP over Ethernet
HTTP message
TCP header
IP header
Ethernet header
Ethernet frame
port
TCP
IP IP datagram/packet
TCP segment
HTTP message
Adapted from Coulouris, Dollimore and Kindberg
John Chuang IS206 UC Berkeley 20
EncapsulationAppl
Transport
Network
Link
Network
Link
Network
Link
Appl
Transport
Network
Link
Host A Host BRouter 1 Router 2
Data
Data
Data
Data
John Chuang IS206 UC Berkeley 21
Summary
Layering:- Hourglass: many different applications and underlying network technologies, but Internet Protocol establishes universal addressing scheme
- Envelope/Encapsulation: layer-specific functionalities; isolation between layers
Reliable communication over unreliable network- IP provides “best-effort” packet delivery service
- TCP supports retransmission of lost packets