Download presentation
Presentation is loading. Please wait.
1
April 1999Computer Networks/Habib Youssef1 The Internet and TCP/IP Habib Youssef, Ph.D. youssef@ccse.kfupm.edu.sa Department of Computer Engineering King Fahd University of Petroleum & Minerals Dhahran, Saudi Arabia
2
April 1999Computer Networks/Habib Youssef2 TCP/IP and the Internet l TCP and IP are two of the suite of data communication protocols used on the Internet. l IP: Internet Protocol. l TCP: Transmission Control Protocol. l All hosts connected to the network must speak TCP/IP.
3
April 1999Computer Networks/Habib Youssef3 l Popularity of TCP/IP »simpler than OSI-ISO standard »provides an elegant solution to world wide data communication. l Open Protocol Standards, freely available, and independent from any hardware platform. TCP/IP Features
4
April 1999Computer Networks/Habib Youssef4 TCP/IP Features (contd.) l Independence from specific network hardware »Allows TCP/IP to integrate many types of networks (Ethernet, Token Ring, X.25) »TCP/IP is used in both LANs/ and WANs »Supports dial-up connectivity l Common addressing scheme »every TCP/IP host has a unique address l Standardized high-level protocols for world wide available network services
5
April 1999Computer Networks/Habib Youssef5 TCP/IP Protocol Architecture l Layered architecture Application Layer Transport Layer Internet Layer Network Access Layer Physical Layer Message Fragment Packet Frame Signal
6
April 1999Computer Networks/Habib Youssef6 Application Layer l Includes all software programs that use the Transport Layer protocols to deliver data messages l Examples of protocols: »Telnet: Network Terminal Protocol »FTP: File Transfer Protocol »SMTP: Simple Mail Transfer Protocol »DNS: Domain Name Service »WWW: World Wide Web
7
April 1999Computer Networks/Habib Youssef7 Transport Layer l Interface between the Application and Internet layers l Two main protocols »Transmission Control Protocol (TCP) –Provides reliable end-to-end data delivery service »User Datagram Protocol (UDP) –Provides low overhead connection-less datagram delivery service
8
April 1999Computer Networks/Habib Youssef8 Internet Layer l Heart of TCP/IP »Provides basic packet delivery service on which TCP/IP networks are built l Main functions »Defines datagram, basic unit of transmission in the Internet »Provides Internet addressing »Routing of datagrams »No error control
9
April 1999Computer Networks/Habib Youssef9 Internetworking (cont.) l Internet Gateways/Routers are used to connect networks together. l Gateways have knowledge of internet topology l Gateways route packets based on destination network not on destination host G G G G
10
April 1999Computer Networks/Habib Youssef10 Internetwork Addressing l Each device on a network or an internetwork is identified by a unique address, often called a device or node address. l These addresses are frequently hard- coded into the network hardware. l Each Ethernet and Token-Ring interface possesses a 48-bit address guaranteed to be unique throughout the world. 2-10
11
April 1999Computer Networks/Habib Youssef11 l A local delivery mechanism enables devices to place messages on the medium and retrieve messages that are addressed to them. l This local delivery is performed by using the device address. l The local delivery is handled by the physical and data link layers. 2-11
12
April 1999Computer Networks/Habib Youssef12 Simple Addressing l On simple networks, delivery of messages between devices is simple. A B C From: A To: C 2-12
13
April 1999Computer Networks/Habib Youssef13 l A mechanism is also needed to deliver messages that must cross network boundaries and travel through the internetwork. l Internetworks can be very complex, so there must be a way to find out the best possible path from one node to another across the internetwork. l This process of finding the best possible paths is referred to as routing. 2-13
14
April 1999Computer Networks/Habib Youssef14 TCP/IP-based Internetworks l TCP/IP provides an excellent and simple approach with the widest acceptance. l TCP/IP consists of the layers above and including the network layer. l The lower layers (physical and data link) can be of many types, such as Ethernet, Token-Ring, X.25, Frame Relay, ATM, Serial Line, etc. 2-14
15
April 1999Computer Networks/Habib Youssef15 l TCP/IP was designed explicitly without data link and physical layer specifications because the goal was to make it adapt to most types of physical media. l TCP/IP relies on the physical layer to deliver messages on the local network. l For delivering messages across network boundaries, TCP/IP has its own addressing mechanism. 2-15
16
April 1999Computer Networks/Habib Youssef16 l This mechanism works at the network layer, and is handled by the IP (Internet Protocol) software. l In TCP/IP terminology, any device that is connected to the network is referred to as a host. l A host may be a computer, router, network printer, etc. 2-16
17
April 1999Computer Networks/Habib Youssef17 Local Message Delivery l When IP sends a message that is directed to a device on the local network, it hands the message over to the physical layer software which tags the message with the physical address of the recipient, and sends it. l The device that matches the physical address retrieves the message. 2-17
18
April 1999Computer Networks/Habib Youssef18 Message Routing l When a message is not destined for a device on the local network, it must be routed. l TCP/IP assigns an address to each host and to each network. l Each host is configured with a default router to which it sends messages that must be sent to a remote network. 2-18
19
April 1999Computer Networks/Habib Youssef19 A 2-19 Router-1 Router-2 Router-3 A BC D E E F
20
April 1999Computer Networks/Habib Youssef20 l The responsibility of determining how messages should be addressed is one of the tasks of the IP layer. l IP identifies whether a message is destined for a host on the local network or it should be sent to the default router. l It makes use of addresses called IP addresses to logically identify networks and hosts. 2-20
21
April 1999Computer Networks/Habib Youssef21 l The physical address of either a local host or the default router is added by the physical layer software to each message that is sent. l IP receives data from the higher level protocols, and attaches to each data segment a header containing addressing information. 2-21
22
April 1999Computer Networks/Habib Youssef22 l The combination of data from higher layers with the IP header is referred to as a packet. l Determining routing paths between routers is usually the responsibility of one of the following two protocols. »Routing Information Protocol (RIP) »Open Shortest Path First (OSPF) 2-22
23
April 1999Computer Networks/Habib Youssef23 Important questions l How are the machines addressed? l How do internet (IP) addresses relate to physical addresses? l How do internet gateways learn about routes?
24
April 1999Computer Networks/Habib Youssef24 Internet addresses l Internet is a universal communication system that uses a globally accepted addressing scheme to identify hosts connected to it. l IP addresses uniquely identify each host l Internet addressing helps TCP/IP software hide physical network details
25
April 1999Computer Networks/Habib Youssef25 Internet addresses (cont.) l Names, addresses, and routes refer to successively lower level representations of host identifiers »A name identifies what an object is, »its address identifies where it is, and »a route indicates how to get to it l TCP/IP addressing scheme analogous to physical network addressing
26
April 1999Computer Networks/Habib Youssef26 Internet addresses (cont.) l Each Internet host is assigned a 32- bit integer address called its Internet address or IP address l The integers are carefully structured for efficient routing l IP address = {Net-ID, Host-ID} l Gateways base routing on Net-ID
27
April 1999Computer Networks/Habib Youssef27 Internet addresses (cont.) l 32-bit address number specified in each IP datagram »Written as 4 decimal numbers separated by dots (dotted quad notation) »Each number is from 0-255 »Example: razi 196.15.69.230 l Number of bits used for Net-Id and for Host-Id depends on class of IP address
28
April 1999Computer Networks/Habib Youssef28 Classes of IP addresses l Class A: Used for the very few large networks with more than 2 16 hosts. First byte < 128 0127831 0Net-IDHost-ID
29
April 1999Computer Networks/Habib Youssef29 Classes of IP addresses (cont.) l Class B: For medium size networks that have between 2 8 and 2 16 hosts First byte is from 128 to 191 012151631 1Net-IDHost-ID0
30
April 1999Computer Networks/Habib Youssef30 Classes of IP addresses (cont.) l Class C: Small network < 2 8 hosts First byte is from 192 to 223 012232431 1Net-ID Host-ID 01 3
31
April 1999Computer Networks/Habib Youssef31 Internet addresses (cont.) l IP address »Not a host address »Each network interface has an IP address »Each IP address specifies a connection to a network not an individual machine l A gateway connecting N networks has N distinct IP addresses, one for each physical network connection
32
April 1999Computer Networks/Habib Youssef32 Special Addresses l Net-Id = 0, Host-Id = 0 »Designates this host »Allowed only at startup l Net-Id = 0 »Host on this net »Allowed only at startup
33
April 1999Computer Networks/Habib Youssef33 Special Addresses (cont.) l IP address all 1’s »Limited broadcast »Never a valid source address l Host-Id = all 1’s »Broadcast address »Never a valid source address
34
April 1999Computer Networks/Habib Youssef34 Special Addresses (cont.) l Net-Id = 127 »Loopback address (Class A address) »Used for testing »Interprocess communication on local host »Allows local host to be addressed in the same manner as a remote host »Should never appear on a network
35
April 1999Computer Networks/Habib Youssef35 Weaknesses of IP addressing l Addresses refer to physical connections not to hosts »This disallows computer mobility because the IP address assigned to that computer also identifies the network it is attached to »If a host moves from one network to another, its IP address must be changed
36
April 1999Computer Networks/Habib Youssef36 Weaknesses of IP addressing (cont.) l When any Class C network grows to more than 255 hosts, it must have its address changed to a Class B address l Routing decisions are made on the basis of the Net-Id part of IP address »The path taken by packets traveling to a host with multiple IP addresses depends on the IP address used
37
April 1999Computer Networks/Habib Youssef37 Weaknesses of IP addressing (cont.) If connection of Host B to Network 1 fails, users on Host A who specify IP4 can no longer reach B, where those that specify IP1 can still reach Host B Network 2 Network 1 IP5 IP4 IP3 IP1 IP2 Gateway Host A Host B
38
April 1999Computer Networks/Habib Youssef38 Internet Addressing Authority l All internet addresses are assigned by a central authority: The network Information Center (NIC) l The NIC assigns the Net-Id portion »Small networks (< 255 hosts) are assigned Class C addresses, since many LANs are expected »Large networks are assigned Class A addresses since only few such networks are expected
39
April 1999Computer Networks/Habib Youssef39 Example Ethernet 128.10.0.0 (Class B) ProNet-10 (Class C) 192.5.48.0 192.5.48.6 192.5.48.7 128.10.2.26 128.10.2.70128.10.2.8128.10.2.3 10.2.0.37 To Arpanet 10.0.0.0 192.5.48.1 192.5.48.3
40
April 1999Computer Networks/Habib Youssef40 Mapping IP Addresses to Physical Addresses l How does a machine map its IP address to its physical network address? »Example: – Machines A and B connected to the same network, with IP addresses IA and IB and physical addresses PA and PB. –Suppose A has has only B’s IP address, then how does A map IB to PB?
41
April 1999Computer Networks/Habib Youssef41 Address Resolution l Some protocol suites adopt one of the following: »Keep mapping tables in each machine »Hardware (physical) addresses are encoded in the high level addresses l Both are ad-hoc, awkward solutions
42
April 1999Computer Networks/Habib Youssef42 Resolution Through Dynamic Binding l Ethernet uses 48-bit physical addresses »Addresses assigned by manufacturers »Replacing a faulty interface card meant a change to the machine physical address l Can’t encode 48-bit long address into a 32-bit long IP address l TCP/IP solution: Address Resolution Protocol (ARP)
43
April 1999Computer Networks/Habib Youssef43 ARP l Exploits broadcast capability of Ethernet l Allows a host to find the Ethernet address of a target host on the same network, given the target’s IP address l Builds and maintains dynamically a table to translate IP addresses into Ethernet physical addresses
44
April 1999Computer Networks/Habib Youssef44 ARP (cont.) BAY X Z ARP_Request{[IA,PA], IB} ARP_Reply{[IB,PB], [IA, PA]}
45
April 1999Computer Networks/Habib Youssef45 ARP (cont.) l Hosts that use ARP maintain a small cache of recently acquired (IP,P) address bindings l Cache is updated dynamically »Timer for each entry »Whenever a new binding is received, update the corresponding table entry and reset the associated timer
46
April 1999Computer Networks/Habib Youssef46 Determining an IP Address at Startup l Diskless machines use IP addresses to communicate with the file server l Also, many diskless machines use TCP/IP FTP protocols to obtain their initial boot image, thus requiring that they obtain and use IP addresses l Designers keep both the bootstrap code and initial OS images free from specific IP addresses for portability
47
April 1999Computer Networks/Habib Youssef47 Determining an IP Address at Startup (cont.) l How does a diskless machine determine its IP address? l When bootstrap code starts execution on a diskless machine, it must use the network to contact a server to obtain the machine’s IP address l Usually, a machine’s IP address is kept on disk where OS finds it at startup
48
April 1999Computer Networks/Habib Youssef48 Reverse Address Resolution Protocol (RARP) l RARP is the protocol used to solve the reverse problem solved by ARP »Given a physical address, get the corresponding IP address l RARP uses the same message format as ARP l RARP messages are sent encapsulated in Ethernet frames
49
April 1999Computer Networks/Habib Youssef49 RARP (cont.) l RARP allows a host to ask about an arbitrary target »The sender supplies its HA separate from the target HA, and the server is careful to reply to the sender’s HA DAY X C RARP_RequestsRARP_Replies RARP Server
50
April 1999Computer Networks/Habib Youssef50 TCP/IP-Based Applications Remote Login (TELNET)
51
April 1999Computer Networks/Habib Youssef51 TELNET (cont.) l Internet services are provided through application level programs l Telnet is a Terminal emulation application program. l Allows a user to remote-login on to another computer.
52
April 1999Computer Networks/Habib Youssef52 TELNET (cont.) l TELNET »Allows a user at one site to establish a TCP connection to a login server at another l TELNET client software allows the user to specify a remote machine by giving its domain name or IP address »Passes keystrokes from the user terminal (client site) to the remote machine (server) »Carries output from the remote machine back to the user’s terminal
53
April 1999Computer Networks/Habib Youssef53 TELNET (cont.) TELNET Client Operating System TELNET Server Operating System TCP/IP Internet Client sends to server Server receives from client Client reads from terminal Server sends to pseudo terminal
54
April 1999Computer Networks/Habib Youssef54 TELNET (cont.) l To accommodate heterogeneity, Telnet defines how data and commands are sent across the Internet. The definition is known as the Network Virtual Terminal (NVT)
55
April 1999Computer Networks/Habib Youssef55 TELNET (cont.) Use ’ s terminal Client Client system format used Server Server ’ s system Server ’ s system format used TCP connection across the Internet NVT format used
56
April 1999Computer Networks/Habib Youssef56 TCP/IP-Based Applications File Transfer & Access
57
April 1999Computer Networks/Habib Youssef57 File Transfer l A facility to access files on remote machines l FTP is the major TCP/IP file transfer protocol l File transfer is among the most frequently used TCP/IP applications l Anonymous downloading of files.
58
April 1999Computer Networks/Habib Youssef58 File Access Model l Like most other servers, most FTP implementations allow concurrent access to multiple clients »Clients use TCP to connect to the server –Control connection carries commands telling the server which file to transfer –Data transfer connection carries data transfers »A single master server process awaits connections and creates a slave process to handle each connection
59
April 1999Computer Networks/Habib Youssef59 File Access Model (cont.) Control process Operating System Control process Operating System TCP/IP Internet Client control connection Server control connection Server data connection Data transfer Data transfer Client data connection Client SystemServer System
60
April 1999Computer Networks/Habib Youssef60 TCP Port Number Assignment l When a client forms a connection to a server »The client uses a random, locally assigned, protocol port number »But, the client contacts the server at a well known port number (Port 21) l Once the control connection is established, future TCP connections established for data transfers use other port numbers on the client machine, and Port 20 on the server machine
61
April 1999Computer Networks/Habib Youssef61 User’s View of FTP l FTP viewed as an interactive system l Once invoked, a client performs the following operations repeatedly »Read a line of input »Parse the line and extract command and its arguments »Execute the command
62
April 1999Computer Networks/Habib Youssef62 Example of FTP Session % ftp spice.ccse.kfupm.edu.sa -- Invokes ftp …….. Name (spice:youssef) CR Password: *****CR ftp> help CR -- lists various ftp commands ftp> help bell bellbeep when command completed ftp> bell Bell mode on ftp> ls-- lists remote directory ……..
63
April 1999Computer Networks/Habib Youssef63 Example of FTP Session (cont.) ftp> cd shortcourse/tcpip -- move to indicated directory …….. ftp> get RemoteFile LocalFile …….. ftp> put Localfile RemoteFile …….. ftp> close …….. ftp> quit %
64
April 1999Computer Networks/Habib Youssef64 TCP/IP-Based Applications Electronic Mail
65
April 1999Computer Networks/Habib Youssef65 Introduction l Email is the first encounter of users with computer networks l Millions connected to the Internet use it. l Low cost and fast communication. l Encourages collaboration. l "A person... can say HELP to 10,000 people... The next morning he may have 15 answers to his problem."
66
April 1999Computer Networks/Habib Youssef66 Introduction (cont.) l E-mail is delivered in few minutes. l E-mail costs half that of regular postal mail (SNAIL MAIL) and ONLY 15% that of Fax.
67
April 1999Computer Networks/Habib Youssef67 Email address youssef@ccse.kfupm.edu.sa youssef: User name @: Connects the who to where ccse: subdomain name kfupm: domain edu: segment type sa: final where segment (sa= Saudi Arabia, tn= Tunisia, ca: Canada)
68
April 1999Computer Networks/Habib Youssef68 Spooling l Mail systems use Spooling technique to handle delayed delivery »When a user sends a message, the system places a copy in its private storage (spool) area along with the identification of sender, recipient, dest machine, and time of deposit »The transfer is initiated in the background, allowing the sender to proceed with other activities
69
April 1999Computer Networks/Habib Youssef69 Conceptual Components of an Email System Outgoing mail spool area Mailboxes for incoming mail Client (background transfer) Server (to accept mail) User Inter- face TCP connection User sends mail User reads mail for outgoing mail for incoming mail TCP connection
70
April 1999Computer Networks/Habib Youssef70 Email concepts (cont.) l The background mail transfer process becomes a client »It maps the dest machine name to an IP address »It forms a TCP connection to the mail server on dest machine »It passes a copy of the message to the remote server, which stores a copy in the remote’s system spool area
71
April 1999Computer Networks/Habib Youssef71 Email concepts (cont.) »Once the client and server agree that the copy has been accepted and stored, the client removes the local copy »If TCP connection fails, the transfer process records the time it tried delivery and terminates
72
April 1999Computer Networks/Habib Youssef72 Email concepts (cont.) »The background transfer process sweeps through the spool area periodically For each undelivered or new outgoing mail –It attempts delivery again –If a mail message cannot be delivered after an extended time (3 days), it returns the mail message to the sender
73
April 1999Computer Networks/Habib Youssef73 Mailbox names and Aliases l Users specify »the mail destination machine (usually the machine’s domain name) »a mailbox at that machine (usually the user’s login Id) l Most systems provide mail forwarding software that includes alias expansion mechanism
74
April 1999Computer Networks/Habib Youssef74 Alias Expansion and Mail Forwarding l A mail forwarder allows the local site to map Ids used in mail addresses to a set of one or more new mail addresses l After a user composes a message and names a recipient »the mail interface consults the local aliases to perform necessary mappings before passing the message to the delivery system
75
April 1999Computer Networks/Habib Youssef75 Conceptual Model of a Mail System Outgoing mail spool area Mailboxes for incoming mail Client (background transfer) Server (to accept mail) User Inter- face TCP connection User sends mail User reads mail for outgoing mail for incoming mail TCP connection Alias expansion and forwarding Alias database
76
April 1999Computer Networks/Habib Youssef76 TCP/IP Standard for Email Service l TCP/IP divides its mail standard into two sets »One standard specifies the format for mail messages (RFC 822) »The other specifies the details of electronic mail exchange between two computers l This division makes it possible to build mail gateways to non TCP/IP networks while still using the same format
77
April 1999Computer Networks/Habib Youssef77 Standard Format l Headers contain readable text, divided into lines that consist of »a keyword »a colon “:” »a value l Some keywords are required, others are optional, and the rest are uninterpreted
78
April 1999Computer Networks/Habib Youssef78 Standard Format (contd.) l Examples TO: ics.faculty@ccse.kfupm.edu.sa from: youssef Reply to: elleithy@ccse.kfupm.edu.sa cc: coe.faculty, se.faculty subject: Farewell party for Dr. Osman
79
April 1999Computer Networks/Habib Youssef79 Electronic Mail Addresses l Email addresses have a simple, easy to remember form local-part@domain-name domain-name: mail exchanger of the mail destination local-part: address of a mailbox on that machine youssef@ccse.kfupm.edu.sa
80
April 1999Computer Networks/Habib Youssef80 Simple Mail Transfer Protocol (SMTP) l SMTP is the standard mail transfer protocol of TCP/IP l SMTP focuses on how the underlying mail delivery system passes messages across a link from one machine to another l SMTP is simple.
81
April 1999Computer Networks/Habib Youssef81 Finding Resources on the Internet l Archie. »Used to search for files available via anonymous ftp. l Gopher. »Friendly menu-driven search tool for browsing resources and displaying the requested information.
82
April 1999Computer Networks/Habib Youssef82 WAIS l WAIS : Wide Area Information Server l Software used to index large text files in servers. l On the client side, it finds and retrieves documents in databases, based on user-defined keywords. l Works on an index. The index is searched and the data tied to the index is retrieved.
83
April 1999Computer Networks/Habib Youssef83 WWW l WWW: World-Wide Web l Hypermedia-based system for storing and accessing hypermedia documents anywhere on the Internet. l Each Web site has a Web server. l Users (clients) access information in a Web site using a Web browser such as Netscape or Mosaic.
84
April 1999Computer Networks/Habib Youssef84 WWW (Cont.) l WWW is the most popular tool to publish on the Internet. l Already all major computer manufacturers, businesses, airlines, embassies, retail stores, etc., have Web pages. l Ex:http://www.kfupm.edu.sa/~youssef http://www.cnn.com
85
April 1999Computer Networks/Habib Youssef85 TCP/IP and the Internet Connecting to the Internet
86
April 1999Computer Networks/Habib Youssef86 Requirements l Connecting to the Internet requires the following. »Establishing physical connections to the Internet »Registering the Internet addressing scheme »Registering a domain name »Optional types of registration which might be needed 2-86
87
April 1999Computer Networks/Habib Youssef87 Getting Connected l The first thing any organization must do to get connected to the Internet is pick an approved Internet Service Provider. l The InterNIC strongly encourages all interested parties to select an ISP rather than trying to establish a direct link into the Internet. 2-87
88
April 1999Computer Networks/Habib Youssef88 Requirements for Full-Service Links l Full-service connections use full-time, dedicated telecommunications circuits between a subscribing organization and an ISP. l At least one Internet Server must be installed at the site to support the primary Internet services such as »electronic mail, file transfer, and information retrieval using tools like Gopher, WWW, and WAIS. 2-88
89
April 1999Computer Networks/Habib Youssef89 2-89 l For small scale connections this server can provide IP routing as well, acting as a gateway between the organization’s local area network and the Internet. l Larger networks will probably need to install a dedicated router instead. l In addition, security concerns might require the installation of a “firewall”.
90
April 1999Computer Networks/Habib Youssef90 Types of Links l At a minimum most organizations will require a dedicated analog dialup connection using either the “SLIP” or “PPP” protocols from an Internet Access Provider. l SLIP (the Serial Line Internet Protocol) and PPP (the Point-to-Point Protocol) are two methods to provide an Internet connection over dialup telephone lines. l Higher-speed (i.e., greater bandwidth) connections are available for organizations expecting heavier Internet usage. 2-90
91
April 1999Computer Networks/Habib Youssef91 Dedicated Internet Access LAN Gateway/ Firewall Router CSU/DSU Internet CSU/DSU 2-91 Leased/Dedicated Line
92
April 1999Computer Networks/Habib Youssef92 Personal Internet Access Internet Modem 2-92 Dialup Phone Line
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.