170 likes | 300 Views
CS120: Lecture 8. MP Johnson Hunter mpjohnson@gmail.com. Agenda. networks Basics, def Internet/web Internet Applications FTP telnet HTTP/HTML Internet protocols/arch TCP/IP HTML language. Internet Arch. Each gp/company/school has domain microsoft.com cuny.edu
E N D
CS120: Lecture 8 MP Johnson Hunter mpjohnson@gmail.com
Agenda • networks • Basics, def • Internet/web • Internet Applications • FTP • telnet • HTTP/HTML • Internet protocols/arch • TCP/IP • HTML language
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
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
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
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
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)
Internet apps: mail, telnet • Email • Each domain has a mail server • Receives/stores mail for users in domain • matt@mail.ccny.cuny.edu • Or mapped to matt@ccny.cuny.edu • Telnet: telnet://addr • Access one machine from another • After login, get a command prompt • Run programs, etc. • Secure version: ssh
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!
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
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
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
Security issues • Access: • Privacy of communication • Public-key encryption • Integrity of machine exposed to internet • Attacks: viruses and worms • Defense: firewall
Security issues • Viruses/Trojan horse • Worms • DoS • Mitnick: worm DoS
html • Stephenson handout on HTML…
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
Future • future: lab session/hw2 • Goal: create and post a webpage • Also written portion (done independently)