Database Concepts

Download Report

Transcript Database Concepts

Networks
Informatics I101
April 20, 2004
John C. Paolillo
Networks
• Any set of interacting agents
– Nodes: the agents
– Edges: the relations between nodes
• Network structure
– Graph theory (mathematics)
• Network traffic
– Dynamical systems
Telephone Network
• Many telephones
• One line per telephone number
– Any single phone engages the whole line
• Connections are made by connecting lines
“Line-switching network”
Computer Network
• Many computers
• All computers share one line
– Any single computer engages the whole line
– We make sure each transmission is short (a
packet)
• Routers interconnect networks
“Packet-switching network”
Protocol Layering
• Protocol: a standard set of procedures for handling
a connection of a given type.
• Layering: more complex protocols are built on top
of simpler ones
–
–
–
–
Hardware/Physical (physically connects computers)
Link (allows two computers to address each other)
Transport (moves data from one computer to another)
Application (accomplishes some user-oriented task)
The Protocol Stack
Application
Application
Transport
Transport
Link
Link
Physical
Physical
The Physical Layer
• Wires: twisted pair, coaxial cable, etc.
– 10 base T, 100 base T (ethernet)
– DSL
– Cable modem
• Electromagnetic waves: microwave, light, etc.
– 802.11b (WiFi)
– Cellular radio
– other microwave frequencies, etc.
The Link Layer
• Internet Protocol (IP)
• Provides addresses for hosts and routing
protocols
The IP Number
• Four Fields
• 0-255 in each field
• This is really base
256, but we use
decimal numbers in
each digit
129.79.142.114
Net
Subnet
Node
IP Numbers
IP Number
129.79.142.114
Host Name
dhcp-Memorial–142-114.memorial.indiana.edu
A Domain Name Server (DNS) has a database that
matches IP and host name
Nets and Subnets
Net
Routers
Subnet
Node
Hosts
Nets and Subnets
44
144
12
129.79
143
142
115
114
Routing a message
• Router extracts network address:
destination AND netmask = network address
e.g. 129.79.142.114 AND 255.255.255.0 = 129.79.142.0
• If the network address is the same as the
router’s, the router forwards the data to its
own network
• Else, the router forwards the data to another
router with the correct net address
The Transport Layer
• Packets (“datagrams”)
– Each message is broken into chunks
– The chunks are sequenced and numbered
– On the other end, the chunks need to be correctly
assembled into the original data
• This is usually handled by TCP (Transmission
Control Protocol)
• Hence: TCP/IP
Domain Name System
• Part application protocol and part link-layer
• Provides easy-to-remember names for hosts
– name to number
– number to name
• Used by most other protocols for addressing
– mail
– www
– etc.
Applications Protocols
And The Web
Some Applications Protocols
• Remote connection
– Telnet, rsh, rlogin, ssh
• File Transfer
– FTP, TFTP, WAIS, HTTP, Gopher, NNTP
• Internet mail
– SMTP, POP, IMAP, etc.
• Two-way communications
– IRC, ICQ, IM, etc.
• Other protocols are defined for voice-overInternet, time synchronization, network gaming,
etc.
What’s in a protocol?
• Connection mode
– synchronous (both computers pass info on the same
connection, as long as it is open)
– asynchronous (open-transfer-drop)
• Data
– headers and body
– character encodings
– markup, etc.
• Sequence
– what kinds of data/commands to expect when
The World-Wide Web
• A means for exchanging hypertext
documents
• Requirements:
– The Internet: ethernet, TCP/IP, DNS, etc.
– Hypertext (HTML)
– Browsers (GUI, display/rendering)
Web Architecture
Client Computer
Server
File System
Cache
Web Browser
TCP/IP
“stack”
port 80
Web Server
HTTP
• Hypertext Transfer Protocol
• Connection Cycle: Open connection, make
request, fulfill request, close connection
• Methods: HEAD, GET, POST, PUT,
OPTIONS, etc.
• Uniform Resource Identifier (file address)
Tunneling
• A connection inside a connection
– datagrams from one application are treated as if they
were application packets for another application
• divided (if necessary) into new packets
• new address information added to each new packet
– The host on the other end reassembles the original
packets and forwards them
• Why?
– send packets for a protocol over a network that does not
support that protocol
– security (your real communications go to a different
host from the one you send to)
Security
• Secure encryption using “trap-door functions”
– f(A,key) = B, but given B and f, it is very hard to figure
out A or its key
– “public-key” systems have two keys
• encryption key (public)
• decryption key (private and not computable)
• Data is encrypted before and possibly after being
split into packets
– works like tunneling