LSU/SLIS Networks Session 2 LIS 7008 Information Technologies Review Questions • CPU, cache, RAM, Hard Disk • What to memorize? – Conceptual, experiential, factual learning – Open book.

Download Report

Transcript LSU/SLIS Networks Session 2 LIS 7008 Information Technologies Review Questions • CPU, cache, RAM, Hard Disk • What to memorize? – Conceptual, experiential, factual learning – Open book.

LSU/SLIS
Networks
Session 2
LIS 7008
Information Technologies
Review Questions
• CPU, cache, RAM, Hard Disk
• What to memorize?
– Conceptual, experiential, factual learning
– Open book exams
• Transfer 160GB to CA by Modem 56kbps
– 1GB=1024MB
Types of Software
• Application programs (e.g., Internet Explorer)
– What you normally think of as a “program”
• Compilers and interpreters (e.g., JavaScript)
– Interpret programs to 1s and 0s
– Allow programmers to create new behavior
• Operating system (e.g., Windows XP)
– Moves data between disk and RAM (+lots more!)
• Embedded program (e.g., BIOS)
– Permanent software inside some device
• Which is more expensive – software or hardware?
Installing Applications
• Copy to a permanent place on your hard drive
– From a CD, the Internet, …
• Installs any other required programs
– “DLL” files can be shared by several applications; associate
programs.
• Register the program’s location/path on your computer
– Associates icons/start menu items with it
– Configures the uninstaller for later removal
• Configure it for your system
– Where to find data files and other programs
Virus
• Virus characteristics
– Initiation
• Copied or downloaded from somewhere
– Behavior
• Do unsolicited things to your computer
– Propagation
• May infect other programs on your computer or other computers on
the network
• Spyware
– A virus to some extent
– How about IE? Google Toolbar? Windows Vista?
• They collect your behavior information and send back to their host
• Virus detection
– Registration of bad programs
Goal
• By the end of this class, you will…
– Have a better understanding of networking
– Have your very own Web site! Yay!
Reminder
• Do the required readings before reading the
slides so that you will get a better
understanding of the slides.
Network
• Computers and devices connected via
– Communication devices
– Transmission media
WAN
Why Network?
Why party?
•
•
•
•
•
•
•
Sharing data
Sharing information
Sharing hardware
Sharing software
Increasing robustness
Facilitating communications
Facilitating commerce
Packet vs. Circuit Networks
• Telephone system (“circuit-switched”)
– Fixed connection between caller and called
– High network load results in busy signals
• Internet (“packet-switched” system)
– Each transmission is routed separately
– High network load results in long delays
Packet Switching
• Break long messages into short “packets”
– Keeps one user from hogging a line
– Each packet includes sender, destination, sequence
information
• Route each packet separately
–
–
–
–
Number them for easy reconstruction
Send packets along the best route available
Reassemble the packets
(How post office routes a letter from UK to US?)
– Many possible mail routes are available!
• Request retransmission for lost packets
– Unless the first packet is lost!
Networks of Networks
• Local Area Networks (LAN)
– Connections within a room, or perhaps a building
• Metropolitan Area Network (MAN)
– Covers a smaller geographic area than a WAN
• Wide Area Networks (WAN)
– Provide connections between LANs
– (ISPs need to pay routing between LANs)
• Internet
– Collection of WANs across multiple organizations
– World’s largest WAN
Local Area Networks (LAN)
• Within a campus or an office complex
– Short-distance lines are fast and cheap
– Fast communications makes routing simple
• Ethernet is a common LAN technology
– All computers are connected to the same cable
•
•
•
•
Ordinary phone lines can carry 10 Mbps
Cable Modem: 10Mbps (security is poor)
Fast Ethernet: 100 Mbps connections require special cables
Gigabit Ethernet: 1 Gbps connections require special switches
– Every host broadcasts everything to all others
• No computer on the network controls
• Collisions limit throughput to about 50% utilization
Shared (Bus) Network
• All attach to the same cable
– Ethernet and “cable modems”
• Transmit anytime
– Has collision detection
– Automatic retransmission
• Inexpensive and flexible
– Easy to add new machines
– Robust to computer failure
• Practical for short distances
– Half the bandwidth is wasted
Switched (“Star”) Network
• All attach directly to a hub
– Switched Ethernet
– Digital Subscriber Lines (DSL)
• Higher cost
– Line from hub to each machine
– Hub must handle every packet
– Hub requires backup power
• Much higher bandwidth
– No sharing, no collisions!
– Allows disks to be centralized
Local Area Networks (Examples)
CS
www
rac2
rac3
rac4
ttclass
SLIS Lab
sam
kim
ann
mine
joe
SLIS
Wireless Networks
• Radio-based Ethernet
– Effective for a few rooms within buildings
• “Access Point” gateways to wired networks
– Available throughout most of the LSU campus
– Commercial providers offer “hot spots” in airports, etc.
• “WiFi WLAN” is available in several speeds
– IEEE 802.11b: 10Mbps (good enough for radio & most users)
– IEEE 802.11g: 54Mbps (required for wireless video)
– IEEE 802.11n: 248Mbps (and longer range)
• Computer-to-computer networks are also possible
– “Bluetooth” is the most common (very short range)
Wide Area Networks (WAN)
• Campus, regional, national, or global scale
– Expensive communications must be used well
• Limiting to two hosts allows 100% utilization
– Routing is complex with point-to-point circuits
• Which path is shortest? Which is least busy? …
• Remember how packet switching works.
• Internet routers exchange “routing tables”
– Stores information about which routes seem fast, which
seem slow, then take the fast routes.
Routing Tables
IP Prefix
Next Router
Estimated Delay
216.141.xxx.xxx
120.0.0.0
18 ms
216.xxx.xxx.xxx
121.0.0.0
34 ms
101.42.224.xxx
120.0.0.0
21 ms
xxx.xxx.xxx.xxx
121.0.0.0
250 ms
45.0.2.10
121.0.0.0
120.0.0.0
router
Packet Routing
128.0.1.5
63.6.9.12
computer
4.8.15.2
52.55.64.2
18.1.1.4
192.28.2.5
(Much simplified) Routing table for 4.8.15.2
Destination
Next Hop
52.55.*.*
63.6.9.12
18.1.*.*
192.28.2.5/63.6.9.12
4.*.*.* (other than itself) 128.0.1.5
…
Campus Network
CS
www
rac2
rac3
rac4
ttclass
SLIS Lab
sam
kim
ann
joe
If Ring network, no
routing needed.
mine
SLIS
The Internet
• Global collection of public “IP” networks
– Private networks are often called “intranets”
– Intranets are connected to Internet via firewalls.
• Independent
– Each organization maintains its own network
• Cooperating on Internet resources and issues:
–
–
–
–
Internet Protocol (IP) address blocks
Domain names
World-Wide Web Consortium (W3C)
Computer Emergency Response Team (CERT)
Internet  Web
• Internet: collection of global networks
– Just the physical network!
• Web = particular way of viewing information on Internet
– Uses the HTTP protocol
– (What is Google?)
• There are many other uses for the Internet
–
–
–
–
–
FTP
email (SMTP, POP, IMAP, etc.)
Internet Relay Chat
Internet phone
…
A Short History of the Internet
• 1969: Origins in government research
– Advanced Research Projects Agency (ARPAnet)
– Created key standards: UDP, TCP, DNS
• 1983: Design adopted by other agencies
– Created a need for inter-network connections
– Key standards: IP
• 1991: World-Wide Web added point-and-click
– Now 150 million Internet “hosts”
– Key standards: HTTP, URL, HTML, XML
Foundations of the Web
• TCP/IP (Transmission Control Protocol/Internet Protocol)
• DNS (Domain Name System)
– Associate domain name with IP address; translator.
– IP Address: http://64.233.169.103/ (Domain name:
www.google.com), or http://209.85.225.103
– >ping www.google.com to get IP address
• HTTP (Hypertext Transfer Protocol)
– Web site
• URL
– Each doc is a Web page
• http://www.us-parks.com/grand_canyon/scenic_vistas.html
• (protocol, domain name, path, web page name)
Client/Server Concepts
•
•
•
•
•
What is a server? Client?
What are file servers? What are Web servers?
What is FTP? FTP server?
Where does a file go when you FTP it?
What are protocols?
– Standard (data format, error handling, sequencing…)
• What is P2P (Peer-to-Peer)?
– BT
Request a Web Page from Internet
http://www.geog.ucl.ac.uk/casa/martin/atlas/isp_maps.html
Types of Internet “Nodes”
• Hosts
– provides services and connections to other computers on a
network
• Routers
– Specialized computers that route packets
– Read routing tables, decide sending what to where
• Gateway
– Routers that connect two networks
• Firewall
– Gateways that pass packets selectively
– Kills suspicious packets!
Intranets
Intranet
Gateways
What are firewalls?
Why can’t you do certain things behind firewalls?
Intranet
IP Address
• Every computer on the Internet is identified
by an IP address
• 32 bit number, divided into four “octets”
128.8.11.33
216.239.39.99
199.181.132.250
Example: go in your browser and type “http://66.249.93.99/”
Are there enough IP addresses to go around?
2^32 = 4,294,967,296 addresses available.
Next generation: 128 bits
What is the difference between static and dynamic IP?
An Internet Protocol (IP) Address
Identifies a LAN
IP address:
216.183.103.150
Identifies a specific computer
Domain Name Service (DNS)
Phone directory?
• “Domain names” improve usability
– Easier to remember than numeric IP addresses
– DNS coverts between names and numbers
– Written like a postal address: general-to-specific
• Each name server knows one level of names
–
–
–
–
“Top level” name server knows .edu, .com, .mil, …
.edu name server knows lsu, umd, stanford, …
.lsu.edu name server knows slis, cs, lib, math, …
.cs.umd.edu name server knows more (e.g., a server
for a lab under the CS department: hcil.cs.umd.edu)
IP Addresses and Domain Names
IP address:
216.183.103.150
Domain Name: www.howstuffworks.com
Hands-on:
Learn About Your IP Address
• Find the IP address of your computer
– One approach
• Select “start” on the taskbar, then “Run”
OR: Start  All Programs  Accessories  Command Prompt
• Type in “cmd” and click “OK”
• Type “ipconfig /all” (and press enter)
• See who “owns” that address
– Use Reverse DNS Lookup: http://remote.12dt.com/
– Type in IP address, then click “Lookup”
• See how packets get from South Africa to you
– Traceroute: http://www.dnsstuff.com
– Use example http://utl-lnx1.puk.ac.za/cgi-bin/webutil as query
• Useful for HW2
The TCP/IP “Protocol Stack”
• Link layer moves bits (see next slide for a figure)
– Ethernet, cable modem, DSL
• Network layer moves packets
– IP
• Transport layer provides services to applications
– TCP: guarantees delivery of packets, does not know when
– UDP: deliver instantly, but no guarantee of delivery
– Web page, streaming video
• Application layer uses those services
– DNS, SFTP, SSH, …
• Note: Good enough to get a general understanding of
TCP/IP Protocol Stack; not necessary to know too much
detail.
TCP/IP “Protocol Stack”
From: http://uw713doc.sco.com/en/NET_tcpip/tcpN.tcpip_stack.html
Transmission Control Protocol (TCP)
• Built on the network-layer version of UDP
• Guarantees delivery all data
– Retransmits missing data
• Guarantees data will be delivered in order
– Sender, destination, sequence/order
– “Buffers” subsequent packets if necessary
• No guarantee of delivery time
– Long delays may occur without warning
User Datagram Protocol (UDP)
• The Internet’s basic transport service
– Sends every packet immediately
– Passes received packets to the application
• No delivery guarantee
– Collisions can result in packet loss
• Example: sending clicks on web browser
HTTP
• HTTP: Hypertext Transfer Protocol
– A set of rules that defines how pages transfer on the
Internet
– Used by browsers to access Web pages for viewing
• HTTPS: Secure HTTP
– Banks use https, e.g.,
https://www.campusfederal.org/
Path
• How do you specify the location of files on your
hard drive?
• The folder metaphor
– Hierarchically nested directories
– Absolute vs. relative paths (relative to current
working directory)
On my UMIACS Web Server: /fs/www/users/wuyj
On my PC: C:\Documents and Settings\wuyj\My Music
Relative path:
../pub: go to the parent directory of my current directory, then down to pub
..\My Music
..\..\My Documents: this means go to the grandparent directory,
then to down to My Documents
Universal Resource Locator (URL)
• A Web page’s unique address, or Web address
• Has 4 parts:
–
–
–
–
Protocol (part 1)
Domain name (part 2)
Path (part 3)
Web page name (part 4)
http://www.usps.com/household/stampcollecting/welcome.htm
Example copied from text Chapter 2 The Internet and World Wide Web, p.77
File Transfer Program (FTP)
• Used to move files between machines
– Upload (put) moves from client to server
– Download (get) moves files from server to client
• Available using command line and GUI interfaces
• Normally requires an account on the server
– Userid “anonymous” provides public access (/pub)
– Web browsers incorporate anonymous FTP
• Automatically converts end-of-line conventions
– Unless you select “binary”
Hands On: FTP/SFTP
• Try it first with a graphical FTP program
– FileZilla Tutorial on accessing the SLIS server:
• http://csc.lsu.edu/~wuyj/Teaching/7008/su09/Tutorial/FileZilla/File
Zilla_FTP.html (please read this if you do not know how to ftp)
– More FileZilla tutorials available on the Syllabus page
(under “Useful Resource” of Session 1)
• Or try it with IE built-in FTP
– http://www.docstoc.com/docs/2548777/How-to-use-theInternet-Explorer-7-built-in-FTP-client
Note: instead of entering ftp.webforce.ws, you enter:
sftp://slis.lsu.edu (currently not working because it is a Web
server, not an FTP server)
– OR:http://www.aamu.edu/portal/page/portal/IT_Services/H
ow_tos/ftpexplorer.pdf
Virtual Private Networks
a secure private network over the public Internet
Public Internet
Intranet
virtual “leased line”
VPN = Virtual Private Network
a secure private network over the public Internet
E.g., encrypted transmission b/t Zurich and Washington
Intranet
Network Abuse
• Flooding
– Excessive activity, intended to prevent valid activity
• Worms
– Like a virus, but self-propagating
• Sniffing
– Monitoring network traffic (e.g., for passwords)
Behind the scenes…
• Tell me what happens:
– From the moment you click on “check
messages” to the moment you start reading
your email
– From the moment you click “send” to the
moment the other party receives the email
– From the moment you type a URL and hit
“enter” to the moment you see the Web page
Why Code HTML by Hand?
• The only way to learn is by doing!
• WSIWYG editors (e.g., Dreamweaver, FrontPage)
– Often generate unreadable code
– Ties you down to that particular editor
– Cannot help you connect to backend databases
• Hand-coding HTML allows you to have finergrained control
• HTML is merely demonstrative of other important
concepts:
– Structured documents
– Metadata
Totay’s Tutorial
• Your first HTML page
• Uploading a file to the Web server via FTP
“Hello World” HTML
This is the header
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<p>Hello world! This is my first webpage!
</body>
</html>
This is the actual content of the HTML document
How to create a .html file
on Windows?
• On a Windows machine
– (Also see a screenshot on the next slide)
– Use NotePad (under All Programs  Accessories)
– Type your html code
•
•
•
•
You can copy/paste the html code from the previous slide
Click “File”  Save As:
“File name”: type in filename ended with .html (e.g., test.html)
“Save as type”: select “All Files”. This step is very important! If you
forgot to do this, you will get a .txt file rather than a .html file.
How to create a .html file (on Windows)
How to create a .html file (on Mac)
• Open TextEdit Program - comes
standard with Mac OS
• Create Document
• Go to File
• Choose Save As
• Select "HTML” in drop down menu for
"File Format"
• Name and save document
Before Uploading HTML Files to
a Web Server
• Use a browser (such as IE, Firefox) to read
the html file on your local computer.
– File  Open  Browse
• Revise it if you are not happy with them.
Uploading Your Page
• Use FTP to connect to “slis.lsu.edu”
– FileZilla
– F-Secure SSH File Transfer
– IE Built-in FTP (if an FTP server is running)
• Change directory to your_userid
• Upload files
Tips
• Edit files on your own machine
– Save as html (a bit tricky)
• Save early, save often, just save!
• FTP (upload) when you’re happy
– Once you have uploaded your HTML file (e.g., mypage.html)
onto the root directory of the SLIS server, your URL is:
– http://slis.lsu.edu/faculty/wu/7008/su09/your_folder/mypage.html where
your_folder is your first initial followed by your last name (in lower case)
• Reload/Refresh your browser to view your page
Posting Homework 2 onto SLIS
Web Server
<html>
<head>
<title>John Smith’s LIS7008 Homework 2</title>
</head>
<body>
John Smith Homework 2
<p>Question 1 …
<p>Question 2 …
<p>Question 3 …
<p>Question 4 …
……
</body>
</html>
Save as FirstName_LastName_hw2.html (e.g., John_Smith_hw2.html)
Backup slides
• You do NOT need to read the slides behind
this.
Encryption
• Secret-key systems (e.g., DES)
– Use the same key to encrypt and decrypt
• Public-key systems (e.g., PGP)
– Public key: open, for encryption
– Private key: secret, for decryption
• Digital signatures
– Encrypt with private key, decrypt with public key
• Strong (128 bit), weak (64 bit)
– Longer time to guess
– Insurance is statistical
Encrypted Standards
• Secure Shell (SSH)
– Replaces Telnet
• Secure FTP (SFTP)/Secure Copy (SCP)
– Replaces FTP
• Secure HTTP (HTTPS)
– Used for financial and other private data
• Wired Equivalent Protocol (WEP)
– Used on wireless networks
• Virtual Private Network (VPN)
– Not really a “standard”