Introduction to Computer Science CS50 Section 001 Session 26
Download
Report
Transcript Introduction to Computer Science CS50 Section 001 Session 26
Introduction to Computer Science
CSCI 150 Section 002
Session 26
Dr. Richard J. Bonneau
IONA Technologies
[email protected]
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
1
Today’s Outline
Today’s ‘notices’
Tonight’s Topics
– Chapter 11 - Computer Communications
– aka
– Computer Networking
Next Class (OPTIONAL) – Thursday – Same
Time, Same
– Open-ended Course Review and Exam Preview
Session!
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
2
Today’s Notices
Office
Extension
Office hours
Swords 339
2284
Tu-Th 4 – 6:30
Homework 7 Results Available Today
Homework 8 Results Status?
Final Exam: Fri May 3, 2:30 Haberlin 408 Lab
Open book, open notes, open homework
Covers all material of course with
emphasis on second half topics:
»
»
»
»
4/29/2003
Digital design and binary arithmetic concepts
P88 Architecture and Assembly Language
Intro to HTML and Web Pages
Operating Systems and Computer Networks
CSCI 150:Introduction to Computer Science - Session 26
3
Summary of Last Session
Virtual Environments = Operating System
Operating Systems - a (complex!) computer
program to manage computer resources
–
–
–
–
access to system resources (hardware and programs)
file systems
security
time sharing/processes through interrupts
Operating System manages the precious CPU
resource through process control mechanisms
and interrupt responses
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
4
Chapter 11 - Computer Communications
Exploration
Layers and Local Area Networks (LANs)
Wide Area Networks (Wand)
Internet Protocol Layer
More on Addressing
Other Network Applications
Exploring on the Internet
Problems in Paradise!
Summary
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
5
Exploration
What if ????
– You had a problem with your congresswoman? How to
communicate the problem to her?
– What if she replied asking you to meet her immediately
in her office in Washington? How to make (quick and
cheap) reservations for this unexpected trip?
– But you are afraid to travel in bad weather. How to get
a weather forecast for Washington DC?
You could get help with all of these questions
today through the capabilities of
interconnected computer networks - a.k.a. the Internet
How and why did this come about? Topic for
this chapter and (last) session!!!
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
6
Layers and Local Area Networks (LANs)
A recurring theme in computer science is that of
layers or layering
Seen already in layers of language between
Pascal, assembly language and machine language
Now see it in layers of (Network) Communication
Software Systems
Lowest layer = communications hardware - aka
Network Interface Card (NIC)
Most common types of comm hardware are
Ethernet and Token Ring (IBM) and now
Wireless
Systems connected directly by hardware are often
called Local Area Networks (LANs) because
usually physically connected by wires - hence
local!
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
Host
Computer
NIC
Network
cable =
‘bus’
7
LANs (cont.)
Ethernet - developed by Xerox and others
Example of a bus architecture
LAN
– See example diagram on page 351 - all components
connected
Host
computer
Host
computer
B
Host
computer
NIC
CSCI 150:Introduction to Computer Science - Session 26
A
NIC
4/29/2003
=
Coaxial
Cable
NIC
How does communication work on a bus?
Consider human analogy of many people
talking in a single room - a polite ‘protocol’!
Ethernet same idea except using electrical
signals along a single coaxial cable.
How to identify each participant ? Each
controller/NIC has a unique hardware
address - a 12 digit hexadecimal number
Senders indicates address of destination and
controllers ‘listen’ for messages destined only
for their address
Bus
C
8
LANs (cont. Again!)
What about if two messages sent out at the
same time? Collisions
Algorithm to detect and have colliding senders
back off and each waits a random amount of
time before trying to resend - CDSMA
algorithm??
How to send lots of information across the
network? Especially if messages between
hosts are limited physically by hardware?
Break up big messages into smaller sized
ones - called packets - and network systems
are called PSN - packet switching networks
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
9
LANs (What else?)
Each packet must then have the following
packet information
–
–
–
–
destination address - where are we sending this packet
source address - so the receiver can know who sent it
message itself - or at least one chunk of it
check info - additional info to guarantee validity of data
being transmitted
– sequencing info - typically - this is packet n of m packets
in a message with identifier ID
1
message
ether
dest
addr
Multiple
Packets
ether
src
addr
Ethernet data packet = part
of original message to be
sent
ether
control
info
The last information is needed to allow the
receiver to know how much data to expect in the
overall message
So sender breaks up message into packets and
transmits them = receiver gets them and puts
them back into the original message
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
10
LANs- what might be wrong here?
Everybody can see EVERYTHING on a bus
system! At least each n/w card on the bus ...
We are relying on the fact that each host
SHOULD only look at the packets addressed
to it and ignore everything else
But …
The real world is not always so ‘honest’ and a
lot of extra work has to go into bus systems to
provide a level of security above the hardware
level!
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
11
Wide Area Networks (WANs)
Host
computer
NIC
NIC
Host
computer
X
A
Y
Host
computer
NIC
Host
computer
NIC
B
Z
LAN #1
CSCI 150:Introduction to Computer Science - Session
X,26 Y, Z
Host
computer
NIC
Host
computer
NIC
4/29/2003
Gateway
2 NICs
NIC
LANs are all well and good provide interconnectivity among
systems relatively close together
(strict restrictions on how long
Ethernet cables can be …)
But what if we have a LAN in each
of the departments in a company and we want to have
communications between the
departments!
What’s needed are (some) hosts
which are connected to two
networks simultaneously!
Such a system is a gateway
(hardware only called a router)
C
LAN #2
12 C
A, B,
WANs, gateways and routers in action!!
Let’s assume we have WAN of two LANs
– See diagram on last page!
Let’s trace how we can now get messages
from any host to any other host within this
WAN - say from Z on left to C on right!
A collection of networks connected through a
WAN are often called an internet
The collection of ALL the computer networks
which are publicly connected and accessible
are called THE Internet (capital I)
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
13
Internet Protocol (IP) Layer
So far all the discussion has been the physical
networking medium of the Ethernet bus
There are other networking alternatives - the
IBM token ring and the Asynchronous
Transfer Mode (ATM) (for large data transfers
over long distances) and Wireless (WiFi)
Each has some advantages and
disadvantages with respect to the Ethernet
hardware approach
But average user doesn’t need to care because of another (higher level) - layer - in
our network system
This is the Internet Protocol or IP layer
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
14
IP Layer (Continued)
Provides a standard way of handling packets
of information between source and destination
computers regardless of the underlying
transport hardware (e.g. Ethernet, Token
Ring, ATM, Wireless, …)
For IP to work, each computer is given an IP
Address - regardless of how it is connected to
the network! (Not the same as the Ethernet
controller address!)
IP addr
Higher
layers
make lower
layers
transparent.
IP Layer
Ethernet, token
ring, or atm
If you know just the IP address of a h/w addr
computer somewhere, you can request to
send a message there and the IP layer of the
systems will take care of getting it there!
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
15
IP Layer (cont.)
The Envelope principle:
– If an IP packet is sent over an Ethernet network, the
complete IP packet (with source and destination
address and other control information) appears as
simple data message to the ethernet layer
– So the IP packet may be broken up into the smaller
ethernet packets with their own Ethernet addresses
– It’s like putting one packet inside the envelope of
another packet
– Example of layered/nested message protocols/packets
This entire IP packet
fits into
IP
dest
addr
IP
src
addr
IP ‘message’ = information
that user wants to send
elsewhere ...
IP
control
info
the envelope
of this Ethernet
packet
4/29/2003
ether
dest
addr
ether
src
addr
IP ‘message’ - including
data packet and control
information too
CSCI 150:Introduction to Computer Science - Session 26
ether
control
info
16
More on Addressing
We have seen the word address several times essential in a network environment when trying to
locate/identify other computers within the overall
system
We have already seen Ethernet addresses and IP
addresses
Both types of addresses are user-non-friendly:
e.g. ethernet address: 12-34-56-43-21-45
IP address:
196.128.1.135
How to make addresses more usable (easier to
remember?) by average (non-computer-literate)
user?
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
17
Addressing (cont)
Domain Name
System
Domain
Name
IP Layer
IP addr
Consider a person Tom using ah/w addr
machine named math at Holy Cross
His ‘address’ should be like:
Ethernet, token
ring, or atm
[email protected]
This is high-level addressing scheme:
aka
domain naming
Hierarchical addressing (left to right)
Rightmost component(domain):
com
org
net
mil
edu
gov
Then company/school/organization
name - e.g. holycross
Finally a computer/host name - e.g. math
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
18
Other Network Applications
Beyond mail … (aka SMTP)
Also N/W
News - access to newsgroups
Telnet - using remote computers as if local Utility
Programs:
FTP - accessing files on remote computers
WAIS - wide area information search
Ping (!)
Gopher - another information source service TraceRt
…
WINIPCFG
For less technically oriented users –
ICQ, AIM, chat programs and
World Wide Web - easy to navigate around,
get access to lots of information using the
browser programs (Netscape Navigator or
Internet Explorer)
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
19
Exploring Information on the Internet
Information stored in units of web pages
Major feature of WWW is the hypertext
– This is ability to navigate from one web page to
another page by just clicking on the hypertext reference
Uses naming convention known as the URL Uniform Resource Locator to identify things,
e.g. - http://www.microsoft.com/com
Language used to compose web
pages - HTML - HyperText Markup
Language
Allows for different text sizes and
emphases, headers, links, images,
frames, animation, audio, ...
4/29/2003
URLs
Domain
Name
ANOTHER
LAYER!!
World Wide
Web
Domain Name
System
IP addr
IP Layer
h/w addr
Ethernet, token
ring, or atm
CSCI 150:Introduction to Computer Science - Session 26
20
Problems in Network ‘Paradise’!
All is not rosy in computer communications!
Easy access in communications leads to
increased chances to break security or
confidentiality in data within communications
messages
Two main problems:
– some people think breaking security is a challenge or
game
– bus-oriented systems by nature are built on sharing
data but with rules - not everyone abides by the rules
Two ways to insure privacy:
– Encryption - code the message using a secret key
known only between sender and receiver - need
ANOTHER channel to communicate keys!
– Password protection - but snooper might listen for
password - more general problem of authentication
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
21
Summary of Chapter 11
Networks - and layers of software
Local Area Networks - with n/w cards and
hardware technology
Wide Area networks
Hardware Network Addressing
Internet Protocol (IP) Layer and IP Address
Messages broken into Packets
Network Programs
The Internet and WWW
Browsers and Web Pages and Hypertext Links
The ‘dark side’ of the network
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
22
(Optional) Review Session
Thursday – May 1, 2003 – 6:30 – 7:45
Course Review
– Quick run through of major topics from the semester
» Slides will be available on the course web site
–
–
–
–
–
Open ended – questions will be taken at any point
Questions and Answer session
Answer any questions about homework assignments
Answer any questions about any lecture topics
Answer any questions about possible content of the final exam
You can send areas you would like covered in a mail
message ([email protected]) before hand so that
it can be prepared – or just to ask specific questions
about course material – any answers will be sent to the
whole class
How many are thinking of attending??? Show of
hands??
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
23
Thanks!!!
Thanks for a great semester!
Hope you enjoyed the class, topics, lab
sessions … and learned a little something
about the mysteries and capabilities of
computers along the way, too!
Good luck in the final exam!!!
Feel free to contact me at any time in the
future - here at Holy Cross or at my corporate
address: [email protected]
4/29/2003
CSCI 150:Introduction to Computer Science - Session 26
24