Академический Документы
Профессиональный Документы
Культура Документы
Internetworking
15-213: Introduction to Computer Systems
19th Lecture, Oct. 28, 2010
Instructors:
Randy Bryant and Dave OHallaron
Carnegie Mellon
A Client-Server
Transaction
1. Client sends request
Client
Server
Resource
process
process
4. Client
2. Server
3. Server sends response
handles
handles
response
request
Note: clients and servers are processes running on hosts
(can be the same or different hosts)
Hardware Organization of a
Network
Host
CPU chip
Carnegie Mellon
register file
ALU
system bus memory bus
main
memory
I/O
bridge
MI
Expansion slots
I/O bus
USB
controller
graphics
adapter
disk
controller
network
adapter
disk
network
mouse
keyboard monitor
3
Carnegie Mellon
Computer Networks
room
Switched Ethernet, Quadrics QSW,
LAN (Local Area Network) spans a building or campus
Ethernet is most prominent example
WAN (Wide Area Network) spans country or world
Typically high-speed point-to-point phone lines
An internetwork (internet) is an
interconnected set of networks
The Global IP Internet (uppercase I) is the most
famous example of an internet (lowercase i)
Carnegie Mellon
host
hub
host
100 Mb/s
port
Operation
Each Ethernet adapter has a unique 48-bit address (MAC
address)
E.g., 00:16:ea:e3:54:e6
Hosts send bits to any other host in chunks called frames
Hub slavishly copies each bit from each port to every other port
Carnegie Mellon
host
B
host
host
host
X
hub 100 Mb/sbridge100 Mb/s hub
1 Gb/s
host
100 Mb/s
100 Mb/s
bridge
hub
Y
host
host
host
host
hub
host
host
C
Carnegie Mellon
Carnegie Mellon
host
LAN
LAN
router
WAN
router
WAN
router
Carnegie Mellon
Logical Structure of an
internet
host
router
host
router
router
router
router
router
Carnegie Mellon
Solution:
protocol software running on each host and router
smooths out the differences between the different
networks
Carnegie Mellon
11
Carnegie Mellon
LAN1
(1)
client
server
(8)
protocol
software
data
data
(7)
LAN1
adapter
PH FH1
LAN2
data
protocol
software
PH FH1
LAN1 frame
(3)
Host B
data
internet packet
(2)
Host A
Router
data
PH FH2
data
PH FH2
LAN2
adapter
(6)
LAN1
LAN2
adapter adapter
LAN2 frame
(4)
data
PH FH1
data
PH FH2 (5)
protocol
software
12
Carnegie Mellon
Other Issues
13
Carnegie Mellon
Global IP Internet
14
Carnegie Mellon
Server
TCP/IP
Network Hardware
adapter and firmware
Network
adapter
Sockets interface
(system calls)
Hardware interface
(interrupts)
Global IP Internet
15
Carnegie Mellon
Basic Internet
Components
Internet backbone:
Regional networks:
smaller backbones that cover smaller geographical areas
(e.g., cities or states)
Carnegie Mellon
NAP-Based Internet
Architecture
NAPs link together commercial backbones
17
Carnegie Mellon
Internet Connection
Private
Hierarchy
NAP
NAP
NAP
peering
agreements
between
Colocation
wo backbone
sites
Backbone
Backbone
Backbone
Backbone
companies
often bypass
NAP
POP POP POP
POP
POP POP POP
T3
Regional net
POP POP
T1
ISP
Big Business
Small Business
ISP (for individuals)
POP
Cable
modem
POP
DSL
MCI/WorldCom/UUNET Global
Backbone
Carnegie Mellon
Source: http://personalpages.manchester.ac.uk/staff/m.dodge/cybergeography/atlas/
20
Carnegie Mellon
Original Idea
Shortcomings
There aren't enough IP addresses available
Don't want everyone to have access or knowledge of all
other hosts
Security issues mandate secrecy & authentication
21
Carnegie Mellon
Evolution of Internet:
Naming
Example:
My laptop at CMU (wired connection)
IP address 128.2.213.29 (bryant-tp4.cs.cmu.edu)
Assigned statically
My laptop at home
IP address 192.168.1.5
Only valid within home network
22
Carnegie Mellon
Evolution of Internet:
Firewalls
10.2.2.2
1
4
176.3.3.3
Firewa
ll
2
3
216.99.99.99
Corporation X
Internet
Firewalls
Hides organizations nodes from rest of Internet
Use local IP addresses within organization
For external service, provides proxy service
1. Client
23
Carnegie Mellon
Firewa
10.6.6.6 198.3.3.3
ll
Corporation X
Internet
Carnegie Mellon
Carnegie Mellon
IP Addresses
byte order
(big-endian byte order)
True in general for any integer transferred in a packet
header from one machine to another.
/* Internet
address
structure
E.g.,
the port
number*/used to identify an Internet
struct in_addr {
connection.
unsigned
int s_addr; /* network byte order (big-endian) */
};
convert
convert
convert
convert
uint32_t
uint16_t
uint32_t
uint16_t
from
from
from
from
host to network
host to network
network to host
network to host
byte
byte
byte
byte
order
order
order
order
26
Carnegie Mellon
Carnegie Mellon
IP Address Structure
16
24
31
Host ID
Host ID
Net ID
Host ID
Class B address
Carnegie Mellon
.net
mit
.edu
.gov
.com
cs
ece
www
2007.171.166.252
ics
sp
greatwhite i386-f7
128.2.220.10 128.2.200.47
29
Carnegie Mellon
*/
official domain name of host */
null-terminated array of domain names */
host address type (AF_INET) */
length of an address, in bytes */
null-terminated array of in_addr structs
Carnegie Mellon
Carnegie Mellon
Carnegie Mellon
33
Carnegie Mellon
Querying DIG
34
Carnegie Mellon
35
Carnegie Mellon
Internet Connections
36
Carnegie Mellon
Server socket
address
208.216.181.15:8
0
Server
(port 80)
Connection socket pair
(128.2.194.242:51213, 208.216.181.15:80)
Client
37
Carnegie Mellon
Next Time
38