Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS- 492 : Distributed system & Parallel Processing Lecture 2: 9/4/1435 Sun. 8- 11  networking.  internetworking essentials.  overview of network programming.

Similar presentations


Presentation on theme: "CS- 492 : Distributed system & Parallel Processing Lecture 2: 9/4/1435 Sun. 8- 11  networking.  internetworking essentials.  overview of network programming."— Presentation transcript:

1 CS- 492 : Distributed system & Parallel Processing Lecture 2: 9/4/1435 Sun. 8- 11  networking.  internetworking essentials.  overview of network programming  overview of network programming Lecturer: Kawther Abas

2 What is a “Network”? A network is a way to get “stuff” between 2 or more “things” Examples: Mail, phone system, conversations, railroad system, highways and roads.

3 Fundamental Network Classifications Local Area Networks (LANs):  A local area network (LAN) Wide Area Networks (WANs):  Wide Area Network (WAN)  Metropolitan Area Network (MAN):

4 Network topology  A topology is a way of “laying out” the network. Topologies can be either physical or logical.  Physical topologies describe how the cables are run.  Logical topologies describe how the network messages travel

5 Type of Network topology  Bus (can be both logical and physical)  Star (physical only)  Ring (can be both logical and physical)  Mesh (can be both logical and physical)

6 Network Protocols  Network protocols are layered such that each one relies on the protocols that underlie it  Sometimes referred to as a protocol stack

7 Internetwork   An Internetwork is the connection of two or more distinct computer networks or network segments via a common routing technology.Internetwork   Any interconnection among or between public, private, commercial, industrial, or governmental networks may also be defined as an internetwork.

8 Internetwork   Intranet – –An intranet is a set of networks, using the Internet Protocol and IP-based tools such as web browsers and file transfer applications, that is under the control of a single administrative entity.intranetInternet Protocol   Extranet – –An extranet is a network or internetwork that is limited in scope to a single organization or entity but which also has limited connections to the networks of one or more other usually, but not necessarily, trusted organizations or entitiesextranet – –by definition, an extranet cannot consist of a single LAN; it must have at least one connection with an external network.   Internet – –The Internet consists of a worldwide interconnection of governmental, academic, public, and private networks based upon the networking technologies of the Internet Protocol Suite.Internet Protocol Suite – –It is the successor of the Advanced Research Projects Agency Network (ARPANET) developed by DARPA of the U.S. Department of Defense.Advanced Research Projects Agency NetworkDARPAU.S. Department of Defense – –The Internet is also the communications backbone underlying the World Wide Web (WWW).World Wide Web

9 Advantages of networking  Connectivity and Communication  Data Sharing  Hardware Sharing  Internet Access  Internet Access Sharing  Data Security and Management  Performance Enhancement and Balancing  Entertainment

10 The Disadvantages (Costs) of Networking  Network Hardware, Software and Setup Costs  Hardware and Software Management and Administration Costs  Undesirable Sharing  Illegal or Undesirable Behavior  Data Security Concerns

11 TCP/IP  TCP stands for Transmission Control Protocol TCP software breaks messages into packets, hands them off to the IP software for delivery, and then orders and reassembles the packets at their destination  IP stands for Internet Protocol IP software deals with the routing of packets through the maze of interconnected networks to their final destination

12 TCP/IP (cont.)  UDP stands for User Datagram Protocol –It is an alternative to TCP –The main difference is that TCP is highly reliable, at the cost of decreased performance, while UDP is less reliable, but generally faster

13 High-Level Protocols  Other protocols build on the foundation established by the TCP/IP protocol suite –Simple Mail Transfer Protocol (SMTP) –File Transfer Protocol (FTP) –Telnet –Hyper Text Transfer Protocol (http)

14 Firewalls  Firewall A machine and its software that serve as a special gateway to a network, protecting it from inappropriate access –Filters the network traffic that comes in, checking the validity of the messages as much as possible and perhaps denying some messages altogether –Enforces an organization’s access control policy

15 Network Addresses  Hostname A unique identification that specifies a particular computer on the Internet For example matisse.csc.villanova.educondor.develocorp.com

16 Network Addresses  Network software translates a hostname into its corresponding IP address For example 205.39.145.18

17 Network Addresses  An IP address can be split into –network address, which specifies a specific network –host number, which specifies a particular machine in that network An IP address is stored in four bytes

18 Domain Name System  A hostname consists of the computer name followed by the domain name  csc.villanova.edu is the domain name –A domain name is separated into two or more sections that specify the organization, and possibly a subset of an organization, of which the computer is a part –Two organizations can have a computer named the same thing because the domain name makes it clear which one is being referred to

19 19 Domain Name System  The very last section of the domain is called its top-level domain (TLD) name Top-level domains, including some relatively new ones

20 Domain Name System  The domain name system (DNS) is chiefly used to translate hostnames into numeric IP addresses –DNS is an example of a distributed database –If that server can resolve the hostname, it does so –If not, that server asks another domain name server

21 Client and Server computer role in networking  Server computer is a core component of the network, providing a link to the resources necessary to perform any task.  The link it provides could be to a resource existing on the server itself or a resource on a client computer.  Client computers normally request and receive information over the network client. Client computers also depends primarily on the central server for processing activities

22 A Client-Server Transaction Client process Server process 1. Client sends request 2. Server handles request 3. Server sends response 4. Client handles response Resource  Every network application is based on the client-server model: –A server process and one or more client processes –Server manages some resource. –Server provides service by manipulating resource for clients. Note: clients and servers are processes running on hosts (can be the same or different hosts).

23 A Programmer’s View of the Internet  1. Hosts are mapped to a set of 32-bit IP addresses. –128.2.203.179  2. The set of IP addresses is mapped to a set of identifiers called Internet domain names. –128.2.203.179 is mapped to www.cs.cmu.edu  3. A process on one Internet host can communicate with a process on another Internet host over a connection.

24 1. IP Addresses  32-bit IP addresses are stored in an IP address struct –IP addresses are always stored in memory in network byte order (big-endian byte order) –True in general for any integer transferred in a packet header from one machine to another.  E.g., the port number used to identify an Internet connection.

25 3. Internet Connections Connection socket pair (128.2.194.242:51213, 208.216.181.15:80) Server (port 80) Client Client socket address 128.2.194.242:51213 Server socket address 208.216.181.15:80 Client host address 128.2.194.242 Server host address 208.216.181.15  Clients and servers communicate by sending streams of bytes over connections.  Connections are point-to-point, full-duplex (2-way communication), and reliable. Note: 51213 is an ephemeral port allocated by the kernel Note: 80 is a well-known port associated with Web servers

26 Clients  Examples of client programs –Web browsers, ftp, telnet, ssh  How does a client find the server? –The IP address in the server socket address identifies the host (more precisely, an adapter on the host) –The (well-known) port in the server socket address identifies the service, and thus implicitly identifies the server process that performs that service. –Examples of well know ports  Port 7: Echo server  Port 23: Telnet server  Port 25: Mail server  Port 80: Web server

27 Using Ports to Identify Services Web server (port 80) Client host Server host 128.2.194.242 Echo server (port 7) Service request for 128.2.194.242:80 (i.e., the Web server) Web server (port 80) Echo server (port 7) Service request for 128.2.194.242:7 (i.e., the echo server) Kernel Client

28 Servers  Servers are long-running processes (daemons). –Created at boot-time (typically) by the init process (process 1) –Run continuously until the machine is turned off.  Each server waits for requests to arrive on a well- known port associated with a particular service. –Port 7: echo server –Port 23: telnet server –Port 25: mail server –Port 80: HTTP server  A machine that runs a server process is also often referred to as a “server.”

29 Server Examples  Web server (port 80) –Resource: files/compute cycles (CGI programs) –Service: retrieves files and runs CGI programs on behalf of the client  FTP server (20, 21) –Resource: files –Service: stores and retrieve files  Telnet server (23) –Resource: terminal –Service: proxies a terminal on the server machine  Mail server (25) –Resource: email “spool” file –Service: stores mail messages in spool file See /etc/services for a comprehensive list of the services available on a Linux machine.

30 Sockets  What is a socket? –To the kernel, a socket is an endpoint of communication. –To an application, a socket is a file descriptor that lets the application read/write from/to the network.  Remember: All Unix I/O devices, including networks, are modeled as files.  Clients and servers communicate with each by reading from and writing to socket descriptors.  The main distinction between regular file I/O and socket I/O is how the application “opens” the socket descriptors.

31 Sockets Interface  Created in the early 80’s as part of the original Berkeley distribution of Unix that contained an early version of the Internet protocols.  Provides a user-level interface to the network.  Underlying basis for all Internet applications.  Based on client/server programming model.

32 Overview of the Sockets Interface Client Server socket bind listen accept rio_readlineb rio_writen close rio_readlineb connect rio_writen close Connection request EOF Await connection request from next client open_listenfd open_clientfd


Download ppt "CS- 492 : Distributed system & Parallel Processing Lecture 2: 9/4/1435 Sun. 8- 11  networking.  internetworking essentials.  overview of network programming."

Similar presentations


Ads by Google