1 / 39

An Introduction to the Internet and TCP/IP

An Introduction to the Internet and TCP/IP. Web Technology course Day 1 Joost van Dijk. Overview. What is a network? What is an internet? What is the Internet? What is the World Wide Web? What is TCP/IP? What is a client? What is a server? … See http://whatis.com.

donald
Download Presentation

An Introduction to the Internet and TCP/IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introductionto the Internetand TCP/IP Web Technology course Day 1 Joost van Dijk

  2. Overview • What is a network? • What is an internet? • What is the Internet? • What is the World Wide Web? • What is TCP/IP? • What is a client? • What is a server? • … • See http://whatis.com

  3. Networks: connecting computers • Connecting computers enables sharing of resources • Can be done in many ways: serial cable, telephone line, wireless connection, etc. • A Local Area Network (LAN) is a computer network where many computers connect via a shared medium (e.g. Ethernet) • Most networks use packet switching to minimize delays: • Data is sent in discrete chunks; multiple data streams can be sent simultaneously by interleaving packet streams.

  4. Connectivity Direct connections only work For small amounts of machines

  5. LAN LAN Local Area Networks connect nearby computers, e.g. in an office Example: Ethernet All computers have a hard- ware address so that they can send messages to one another

  6. Connecting Networks • Sharing resources can be improved by connecting individual networks. BUT • Different LAN technologies are incompatible: • Different addressing • Different packet sizes • Different frame formats • Etc. • Ad hoc solutions exist, but a better solution is to build a virtual network on top of physical ones: an internet network

  7. Obstacles for an internet • Create the illusion of a single network by • Universal addressing (mask differences in underlying addressing schemes) • Routing packets across networks (forward packets to neighbouring networks) • Handling different packet sizes (mask differences in underlying maximum packet sizes) • All this is handled by the Internet Protocol (IP)

  8. Internet Concept • the illusion of a single • network • (b) the underlying physical • structure

  9. An Internet • A Router connects two or more physical networks • A router is part of each network • Traffic can move from network to network through a router • The router is responsible for forwarding traffic to the right destination

  10. Example network: Surfnet4

  11. The Internet • The world’s largest computer network • “Computers” can be PCs, mainframes, pocket PCs, mobile phones, microwave ovens, toasters, … • … can be based on Intel, AIX, SPARC, … • … can run Windows, UNIX, Linux, Mac OS X, … • … can be connected by Ethernet, Token Ring, FDDI, ADSL, ATM, Frame Relay, … • Started as research network, connecting 4 computers • Exponential growth: See Internet Domain Survey at www.nw.com

  12. Internet

  13. Internet

  14. Client / Server • Server : Provider of a service • Client : Consumer of a service Examples: • A Web Client a.k.a. browser (e.g. Internet Explorer) retrieving pages from a Web Server (e.g. Apache) • A Mail client (e.g. Outlook) retrieving e-mail from a Mail Server (e.g. Exchange) • An FTP client retrieving files from an FTP server • A telnet client connecting to a telnet server • etc…

  15. Protocol Stacks • A Protocol Stack is a partitioning of communication features • Each layer solves problems on its own level of abstration • Application Layer – e.g. HTTP: exchange HTML • Transport Layer – e.g. TCP: provide Reliability • Internet Layer – e.g. IP: connect networks • Host to Network Layer – e.g. Ethernet: connect computers

  16. IP: Internet Protocol What does IP do? • addressing: give each machine a unique ID (and map these onto hardware addresses) • routing: glue smaller networks together to form one huge network, and let data traverse networks one by one • fragmentation: where needed, divide packets in smaller parts when they are forwarded. Note that IP is connectionless and unreliable: • data is transferred in independent units called IP datagrams • packets can get lost, duplicated, delayed or corrupted • Much like the postal system

  17. IP addressing • An IP address is a 32 bit number • Consists of a network number and a host number • Host and network numbers have variable lengths: divide address space into 5 classes • Addresses assigned to hosts are either class A, B, or C. • The prefix identifies a network, while the suffix is unique to a host on that network.

  18. IP addressing • IP Addresses are written using dotted decimal notation: • 4 groups of 8 bits • Each group can be 0 – 255 • Example:

  19. IP addressing Note: nowadays additional techniques are used to save IP addresses (e.g. subnetting and CIDR). See http://www.iana.org/assignments/ipv4-address-space

  20. Routing http://netbook.cs.purdue.edu/anmtions/anim09_3.htm

  21. Routing

  22. Routing tables

  23. Hop-by-hop Routing http://netbook.cs.purdue.edu/anmtions/anim17_1.htm

  24. TCP: Transmission Control Protocol What does TCP do? • addressing applications within a machine using port numbers • provide virtual connections (although underlying network layer is connectionless) • provide reliability: • resend lost, damaged, or delayed packets • sort into original order • much like telephone system Well known port numbers: • 80: HTTP (WWW) • 25: SMTP (Mail) • 21: FTP (File transfer) • etc

  25. TCP • TCP uses IP’s services to abstract from underlying networks: • TCP sees one virtual internetwork • TCP doesn’t know about underlying infrastructure

  26. TCP and reliablitity TCP uses acknowledgements to track delivery of data (called segments in TCP) TCP resends a segment when an acknowledgement is not received in time

  27. TCP and Client/Server • A machine can run multiple servers (using different ports) • Each application uses a different application layer protocol • Multiple clients can contact multiple servers on the same machine

  28. DNS • Domain Name System • Give computers a name that is easier to remember • Map computer names to IP addresses using a distributed database • Computer names are organized into a hierarchy called domains • e.g. krypton.liacs.nl is the name for 132.229.132.11 • Example top-level domains: • .com .edu .gov .mil .org .net • countries: .nl .de .fr etc. • See http://www.iana.org/cctld/cctld-whois.htm • recently: .name .pro .museum etc.

  29. DNS is hierarchical Example Hierarchy:

  30. DNS is a distributed database

  31. % nslookup www.liacs.nl Server: titanium.liacs.nl Address: 132.229.131.11 Name: enyo.liacs.nl Address: 132.229.44.15 Aliases: www.liacs.nl % nslookup -type=mx liacs.nl Server: titanium.liacs.nl Address: 132.229.131.11 liacs.nl preference = 5, mail exchanger = mailgate.wi.leidenuniv.nl liacs.nl preference = 10, mail exchanger = noc.liacs.nl liacs.nl nameserver = zeus.wi.leidenuniv.nl liacs.nl nameserver = apollo.liacs.nl liacs.nl nameserver = titanium.liacs.nl liacs.nl nameserver = rulway.leidenuniv.nl liacs.nl nameserver = sidestreet.leidenuniv.nl liacs.nl nameserver = noc.liacs.nl liacs.nl nameserver = atlas.liacs.nl mailgate.wi.leidenuniv.nl internet address = 132.229.128.1 noc.liacs.nl internet address = 132.229.44.11 …

  32. WWW • The World Wide Web is a network of Hypertext documents (not of computers) • Hypertext is text containing hyperlinks • A hyperlink is a pointer from a document to another • WWW actually uses hypermedia: not restricted to text documents • The application layer protocol used is called HTTP

  33. Web Browser Internals

  34. HTTP • Hypertext Transfer Protocol • Transfers hypertext documents written in Hypertext Markup Language (HTML) between clients and servers • Runs on TCP port 80 • Scenario: • The client browser connects to the server • The client sends a request to the server • The server responds by sending a response • The server disconnects

  35. % telnet www 80 Trying 132.229.44.15... Connected to www. Escape character is '^]'. GET / HTTP/1.0 HTTP/1.1 200 OK Date: Wed, 07 Nov 2001 23:52:42 GMT Server: Apache/1.3.12 (Unix) (Red Hat/Linux) PHP/3.0.18 mod_perl/1.23 Last-Modified: Tue, 23 Oct 2001 11:44:04 GMT ETag: "31aaf-1a2a-3bd55804" Accept-Ranges: bytes Content-Length: 6698 Connection: close Content-Type: text/html <HTML> <HEAD> <META name="description" content="LIACS, Leiden Institute of Advanced Computer Science, Universiteit Leiden"> ...

  36. HTTP Transaction

  37. SMTP • Simple Mail Transfer Protocol • Sender’s Mail client connects to a mail server, and specifies sender, recipient, email message etc. • Client disconnects • Mail server connects recipient’s mail server, forwards message • recipient’s mail server stores message in mailbox • Recipient’s mail client connects to mailbox (using Post Office Protocol) and retrieves email.

  38. > telnet noc 25 Trying 132.229.44.11... Connected to noc.liacs.nl. Escape character is '^]'. 220 noc.liacs.nl ESMTP Sendmail 8.9.3/8.9.3/LIACS 1.0; Wed, 7 Nov 2001 14:44:45 +0100 (MET) HELO liacs.nl 250 noc.liacs.nl Hello joostd@krypton.wi.leidenuniv.nl [132.229.132.11], pleased to meet you MAIL FROM: george@whitehouse.gov 250 george@whitehouse.gov... Sender ok RCPT TO: joostd@liacs.nl 250 joostd@liacs.nl... Recipient ok DATA 354 Enter mail, end with "." on a line by itself Hi Joost! Wanna grab a beer after lunch?See ya! GWB . 250 OAA11521 Message accepted for delivery QUIT 221 noc.liacs.nl closing connection Connection closed by foreign host.

  39. References • The Internet Engineering Task Force: www.ietf.org • The World Wide Web Consortium: w3.org • Internet Assigned Numbers Authority (IANA): www.iana.org; ICANN www.icann.net • Regional Registries: • RIPE – Europe: www.ripe.net • ARIN – USA: www.arin.net • APNIC – Asia/Pacific: www.apnic.net • Stichting Internet Domeinregistratie: www.sidn.nl • Tools • Visual Route: www.visualroute.nl • www.whois.org

More Related