Computer Networking Chapter #1 Dr. Abdulrhaman Alameer
What is Computer Network? It is a collection of computers and devices interconnected by communications channels that facilitate communications among users and allows users to share resources. What is goal Computer Network? The goal of computer network is as follows: Resource Sharing Physical Resources - Printers, Storages like tape backup systems Information/Date High Reliability Saving Money and time What are types of Network? Personal Area Networks(PAN) Local Area Network(LAN) Metropolitan Area Networks (MAN) Wide Area Networks(WAN) Internet Personal Area Networks: It is a computer network that enables communication between devices near a person typically within a range of 10 meters.
Local Area Network (LAN): It is a computer network that interconnects computers via workstation within a limited area such as a residence, school, laboratory, university campus or office building. Metropolitan Area Networks (MAN): It is a large computer network that interconnects several LAN in buildings in the same city or town. Wide Area Networks(WAN): It is a large computer network that interconnects several LAN that spans a wide geographical area between cities, states, or even countries.
Internet: A collection of interconnected networks is called an internetwork or Internet. The Internet uses ISP networks to connect enterprise networks, home networks, and many other networks. Classification of Networks By Scale: What is Data Communication Type? Simplex: Data travel one way, Examples are PA system in school, Radio. Half duplex: Data communication in either direction but not simultaneously, Examples are CB-radio, Walky Talky. Full duplex: They travel to both direction at once, Examples are Telephone, Mobile.
What is Network Topology? It is the physical interconnection of the elements (node) of a computer network s LAN is one example of the physical or logical topology. Bus: Each machine is connected to a single bus. Star: Each machine is connected to a central hub with a point-topoint connection. Ring: Each computer is connected to the network in a closed loop. Mesh: That is fully connected to each other. Tree: It is also known as Hierarchical Network, Is connected to one or more another nodes. Computer Communication Problem. The data communications between two or more computers are impossible if there is no common protocol for transmitting and receiving the packets of data. A protocol is a set of rules on how communication is to proceed between two or more computers. In 1977 International standard organization (ISO) established a committee to develop an international standard for computer communication problem. In 1984, ISO approved the Open Systems Interconnection (OSI) reference protocol model as an international standard for communications architecture.
Reference Models: OSI Reference protocol Model TCP/IP Reference protocol Model 1. OSI Reference Model The OSI model is considered a primary architectural model for inter-computer communications that divides the problem of moving information between computers over a network medium into SEVEN layers for more manageable network communication problems. Each layer provides a service to the layer down it in the protocol specification. All these layers describe how information or data follows specific rules to move from application programmes through a network medium (such as wire) to another application programme located on another network. Data is encapsulated with the necessary protocol information as it moves down the layers before network transit.
The lower 4 layers (transport, network, data link and physical Layers 4, 3, 2, and 1) are concerned with the flow of data from end to end through the network. The upper four layers of the OSI model (application, presentation and session Layers 7, 6 and 5) are orientated more toward services to the applications. Each layer communicates with the same layer s software or hardware on other computers. Seven OSI Reference Model: Application Layer: - This layer interacts directly with computer software applications to provide such as Google browser, Email or file transfer that are closest to end-users. Presentation Layer: - This layer is essentially a translator and provides coding and conversion function. Session Layer: - Session layer controls the dialog (connections) between computers. - Sessions offer various services, including token management, and synchronization. Transport Layer: - This layer assigns port numbers (TCP or UDP) and adds a TCP or UDP header to the data received from the applications. - Pass the data to the network layer.
Network Layer: - Provide the best data transmission path for packets based on static tables. - Gives packet logical address (IP). - Router work on network layer Data Link Layer: - It frames the Data packets and addresses them. Divide into: o Media access control (MAC): It controls the physical transmission media. o Logical link control (LLC): It manages error checking - Switch and bridge work on Data link layer Physical Layer: - It is responsible for transmission and reception of unstructured raw data (bits value of 0 and 1) over a communication channel. - It communicates direct with the various types of communication media. Note: Hub device works on this layer. 2. TCP/IP Reference Model Telephone a line was used to connecte hundreds of universities and government installations before TCP/IP model. When satellite and radio networks were added later, Telephone lines couldn t interwork with them. Cerf and Kahn (1974) described the TCP/IP Reference Model and then defined as a standard in the Internet community (Braden, 1989). Encapsulation: When data moves from upper layer to lower level of TCP/IP protocol stack (outgoing transmission) each layer includes a bundle of relevant information called a header along with the actual data.
Decapsulation: Occurs when data is received on the destination computer. As the data moves up from the lower layer to the upper layer of TCP/IP protocol stack (incoming transmission), each layer unpacks the corresponding header and uses the information contained in the header to deliver the packet to the exact network application waiting for the data.
Computer Networking Chapter #2 Dr. Abdulrhaman Alameer
Application Layer Application Layer: The first step for getting data on to the network. Application Software: The programs used to communicate over the network. For example: When displaying a web page: - The Application Layer uses the HTTP Protocol for (e-mail, web, Skype, YouTube) - The Application Software is your browser (Google Chrome, Firefox). Application architectures - Client-server - Peer-to-peer (P2P) What are the application-level protocols? Web server: HTTP (Hypertext Transfer Protocol). DNS (Domain Name System). FTP (File Transfer Protocol). Email server. - SMTP (Simple Mail Transfer Protocol) - POP3 (Post Office Protocol) - IMAP (Internet Message Access Protocol) What transport service does an app need? Data integrity - Some apps (e.g., file transfer, web transactions) require 100% reliable data transfer - Other apps (e.g., audio) can tolerate some loss Timing - Some apps (e.g., Internet telephony, interactive games) require low delay to be effective Throughput - Some apps (e.g., multimedia) require minimum amount of throughput to be effective - Other apps ( elastic apps ) make use of whatever throughput they get Security - Encryption, data integrity.
What is Web server (HTTP)? It is a protocol used for transferring files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. How does it work? User opens Web page (Browser Application Program) that consists of HyperText Markup language (HTML). User clicks on the Uniform Resource Locator (URL) Link such as http://www.jazanu.edu.sa URL contains Internet name of machine (http://www.jazanu.edu.sa), but not Internet IP address. Internet needs Internet IP address to send information to a machine Browser software uses Domain Name System (DNS) protocol to send query for Internet address. DNS system responds with Internet address
Browser software uses HyperText Transfer Protocol (HTTP) to send request for document. HTTP server waits for requests by listening to a well-known port number (80 for HTTP). HTTP client sends request messages through an ephemeral port number, e.g. 1127. HTTP needs a Transmission Control Protocol (TCP) connection between the HTTP client and the HTTP server to transfer messages reliably HTTP client sends its request message: GET HTTP server sends a status response: 200 OK HTTP server sends requested file Browser displays document
What are the HTTP Types? HTTP Request and HTTP Response - HTTP Request HTTP/1.0: GET POST HEAD HTTP/1.1: GET POST HEAD PUT DELET The HTTP GET request method used for reading and retrieving. It retrieves information from the server. The HTTP POST request method used for creating. It is often used when uploading a file or when submitting a completed web form. The HTTP PUT request method used for updating. It replaces current representations of the target resource with the request payload. The HTTP DELETE request method used for deleting. It deletes the specified resource.
- HTTP Response Status code appears in 1st line in server-to-client response message. Some sample codes: 200 OK: Request succeeded, requested object later in this message. 301 Moved Permanently: Requested object moved, new location specified later in this message (Location:). 400 Bad Request: Request message not understood by server. 404 Not Found: Requested document not found on this server. 505 HTTP Version Not Supported. v Note: Uniform Resource Locator (URL). http://elit.jazanu.edu.sa/default.aspx Host name Path name
What is Domain Name System (DNS)? It is responsible to translate hostname to IP address. Example: Client wants IP for www.amazon.com: 1. Client queries root server to find com DNS server 2. Client queries.com DNS server to get amazon.com DNS server 3. Client queries amazon.com DNS server to get IP address for www.amazon.com v Query and reply messages, both with same message format
What is File Transfer Protocol (FTP)? It is a protocol for transferring file between client (user) and remote host (server). FTP client contacts FTP server at port 21, using TCP. Client authorized over control connection. Client browses remote directory, sends commands over control connection. When server receives file transfer command, server opens 2 nd TCP data connection (for file) to client at port 20. After transferring one file, server closes data connection.
Sample Commands Request: - ASCII: transfers files as text '.txt'. - USER: Username - PASS: Password - LIST: Return list of file in current directory - RETR: Filename retrieves (gets) file - STOR: Filename stores (puts) file onto remote host Sample Codes Response - Status code and phrase (as in HTTP) - 331 Username OK, password required - 125 Data connection already open; transfer starting - 425 Can t open data connection - 452 Error writing file
What is Email Server? It is a protocol used for accessing email on a remote web server from a local client. Three major components: v User agents (e.g., Outlook) v Mail servers: Contains incoming and outgoing messages for user v Protocols: Used for Sending and receiving messages. v SMTP (Simple Mail Transfer Protocol) v POP3 (Post Office Protocol) v IMAP (Internet Message Access Protocol) How Email Server protocols work? Alice sends message to Bob: 1. Alice opens her Mail app (e.g.,microsoft Outlook), writes her message and provides Bob e-mail address (bob@gmai.com), and clicks the send button. 2. The Mail app starts communicating with Alice s mail server via SMTP and eventually push the email into Alice s mail server where it is stored to be delivered later to Bob@gmail.com. 3. Alice s mail server (Hotmail.com) sees that there is a message pending delivery to Bob@gmail.com. It starts a communication with the gmail.com mail server by initializing SMTP handshaking to allow for this message delivery to happen. 4. After some initial SMTP handshaking between the Hotmail.com and gmail mail servers, the SMTP client sends Alice s message to Bob s mail server. 5. Bob s mail server receives the message and stores it in his mailbox so that he can read it later from the server using IMAP or server can download the message in the Bob s computer using POP3.
Sample SMTP interaction comments: S: 220 gmail.com C: HELO hotmail.com S: 250 Hello Hotmail.com, pleased to meet you C: MAIL FROM: <alice@hotmail.com> S: 250 alice@hotmail.com... Sender ok C: RCPT TO: <bob@gmail.com> S: 250 bob@gmail.com... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hotmail.com closing connection
SMTP: - Uses TCP to reliably transfer email message from client to server via port 25. - Requires message (header & body) to be in 7-bit ASCII. Header Body v Header lines, e.g., To: From: Subject: v Body: Contents the message - Uses CRLF.CRLF to determine end of message POP3: Post Office Protocol: authorization, download via port 110. IMAP: Internet Mail Access Protocol: more features, including manipulation of reading msgs on server via port 143.