PPT - NYU Stern School of Business

Download Report

Transcript PPT - NYU Stern School of Business

CS120: Lecture 8
MP Johnson
Hunter
[email protected]
1
Agenda
• networks
– Basics, def
– Internet/web
– Internet Applications
• FTP
• telnet
• HTTP/HTML
– Internet protocols/arch
• TCP/IP
• HTML language
2
Internet Arch
• Each gp/company/school has domain
– microsoft.com
– cuny.edu
• Names registered with ICANN
– Internet Corp for Assigned Names & Netws
• Domain connected to Internet cloud w/ gateway
3
Network topologies
•
•
•
•
Ethernet – bus-based
To send msg, machine broadcasts to all
2 machines cannot send a msg at once
If 2 try at once, both stop,
– Wait random amount of time
• Like conversation
4
Internet organization
• Phone system: circuit-switched
– Create connection between endpts for each call
– Each node connects to only 1 other node at a time
(usually)
– Too many calls --> circuits overloaded
– But usually ok
• Computer networks different
– Each node connects to many other nodes at once
– Want near-instant access to every other node (web
browsing)
– But circuit-switched --> # conns grows quadratically
5
Internet & TCP/IP
• Internet’s TCP/IP is packet-switched
–
–
–
–
Protocols for communication on the internet
Don’t have direct conns
--> msg must hop from node to node - “routing”
In practice: each node knows “next hop” for msg
• To send msg:
– Msg broken up into many small packets
– Packets sent individually - maybe with diff paths
– Packets reassembled after received
• Different packets may take different routes
• Cold War motivation.: no partic node essential
6
C-S v. P2P
• Most apps: client-server
– Many machines requests info/service
– One central machine responds
– Websites, print server, file server
• Peer-to-peer
– Machines comm. as peers
– Grokster, Kazaa
– Napster (but with central directory)
7
Internet apps: mail, telnet
• Email
–
–
–
–
Each domain has a mail server
Receives/stores mail for users in domain
[email protected]
Or mapped to [email protected]
• Telnet:
–
–
–
–
telnet://addr
Access one machine from another
After login, get a command prompt
Run programs, etc.
Secure version: ssh
8
Internet apps: FTP
• FTP: file transfer protocol
ftp://addr
– Transfer file between machines on network
• Text v. binary
• On old teletype machines:
– End-of-line needed LF (10) and CR (13)
• Displays aren’t physical, don’t need both
• Unix: only LF, Mac: only CR, Win: both
• So for text transfer, must translate EOLs
• But not for binary!
9
Internet apps: HTML
• Html: hypertext transfer protocol
• Transmit webpages, etc
– Written in HTML
• URL/URI: http://www-cs.ccny.cuny.edu/~mjohnson/100/
• Invented by Tim Berners-Lee, CERN/W3C
– Originally just text, Lynx, 1989-1991
– Marc Andreesen, NCSA, Illinois, 1993: Mosiac
–  Netscape, IE, Firefox
10
HTML
• Mark-up language
– Consists of data in tags
– Tags contain tags
– Has text, but also format/display info
• Html called source
• Describes what browser displays
– Also pictures
• Pages link to one another
• Use CSS to enforce look
11
Dynamic web
• Regular webpages static
– textfiles
• Many apps require dynamic info
– Web-based email
– Search engines
– Shopping
• Many solutions:
– Srv-side progs: CGI, PHP, ASP, servlets
– Client-side progs: Java applets, ActiveX comps, Flash
– Client-side scripting: JavaScript, DHTML
12
Security issues
• Access:
• Privacy of communication
– Public-key encryption
• Integrity of machine exposed to internet
– Attacks: viruses and worms
– Defense: firewall
13
Security issues
•
•
•
•
Viruses/Trojan horse
Worms
DoS
Mitnick: worm  DoS
14
html
• Stephenson handout on HTML…
15
Html
• Nice reference here:
• http://hotwired.lycos.com/webmonkey/reference/
html_cheatsheet/
• Common tags:
• Html, body, title, b, I, u, font, p, br, ol,li, ul
• More complicated: form, table
16
Future
• future: lab session/hw2
– Goal: create and post a webpage
– Also written portion (done independently)
17