Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion Chapter 1 Foundation Eng. Haneen El-Masry February, 2014
A Computer Network A computer network is a telecommunications network that allows computers to exchange data. In computer networks, networked computing devices pass data to each other along data connections. Network computer devices that originate, route and terminate the data are called network nodes. The connections (network links) between nodes are established using either cable media or wireless media. Network = Nodes + Links 1.2.2 Scalable Connectivity Network can consist of two or more computers directly connected by some physical medium that can be Point to Point link or Multiple-Access link. 1- Point to Point Link The link is limited to a pair of nodes. 2- Multiple-Access Link More than two nodes share a single physical link. Disadvantages of Directly Connected Computers Network Networks would be very limited in the number of computers they could connect, or the number of wires coming out of the back of each node would quickly become both unmanageable and very expensive. The Solution is: Indirect Connected Computers. 2
Switched Network Host: the node that uses the network. Switch: the node that implements the network. Cloud to denote any type of network Switched Network Types: 1- Circuit Switched: Employed by the telephone system. Dedicated transmission path. Send the data as a single block. The source node sends a stream of bits across the dedicated circuit to a destination node. 2- Packet Switched: used for computer networks. No dedicated path. Nodes in such a network send discrete blocks (packets) of data to each other. 3
Use a strategy called store-and-forward: each node in a store-and-forward network first receives a complete packet over some link, stores the packet in its internal memory, and then forwards the complete packet to the next node. Router (Gateway): A node that is connected to two or more networks. Routing: The process of determining systematically how to forward messages toward the destination node based on its address. 1.2.3 Cost-Effective Resource Sharing Multiplexing: System Resources are shared among multiple users. Synchronous Time Division Multiplexing (STDM): The idea of STDM is to divide time into equal-sized quanta and, in a round-robin fashion, give each flow a chance to send its data over the physical link. Used in Circuit Switched Networks. Frequency Division Multiplexing (FDM): The idea of FDM is to transmit each flow over the physical link at a different frequency. Used in Circuit Switched Networks. 4
Disadvantages of STDM & FDM If one of the flows (host pairs) does not have any data to send, its share of the physical link that is, its time quantum or its frequency remains idle, even if one of the other flows has data to transmit. Both STDM and FDM are limited to situations in which the maximum number of flows is fixed and known ahead of time. Statistical Multiplexing: Data is transmitted from each flow on demand rather than during a predetermined time slot. Thus, if only one flow has data to send, it gets to transmit that data without waiting for its quantum to come around. It is this avoidance of idle time that gives packet switching its efficiency. To ensure that all the flows eventually get their turn to transmit over the physical link, Statistical multiplexing defines an upper bound on the size of the block of data that each flow is permitted to transmit at a given time. This limited-size block of data is typically referred to as a packet. 5
1.2.4 Support for Common Services Logical Channel is Application to Application communication path or a pipe that provides the set of services required by that application. Logical Channels Types: 1- Request/Reply channels Used by the file transfer and digital library applications. Guarantee that every message sent by one side is received by the other side and that only one copy of each message is delivered. Protect the privacy and integrity of the data that flows over it. 2- Message Stream channels Used by both the video on demand and videoconferencing applications. Might not need to guarantee that all messages are delivered. Need to ensure that those messages that are delivered arrive in the same order in which they were sent. Ensure the privacy and integrity of the video data. Need to support multicast, so that multiple parties can participate in the teleconference or view the video. For Reliability: See Dr. Slides (Slide # 15). 1.3 Network Architecture The 7-Layer Model (OSI architecture) Application Presentation Session Transport Network Data Link Physical 6
Internet (TCP/IP ) Architecture Application Transport Network Data Link Physical Notes: - Switch works at Data link and physical layers. - Router works at network, Data link and physical layers. DeEncapsulation For Details, See Dr. Slides and Text Book. 1.4 Implementing Network Software Socket is the point where a local application process attaches to the network and it is an interface between an application and the network. It has two types: 1- TCP Stream Socket: reliable two way connected communication streams. 2- Datagram socket: unreliable connectionless communication datagram. 7
1.4.1 Application Programming Interface (Sockets) Server socket() : create a new socket Bind (): binds the new created socket to a specific address that consists of the IP address of the server IP and a TCP port number listen() : defines how many connections can be pending on the specified socket. accept (): carries out the passive open: the server says that it is prepared to accept connections, but it does not actually establish a connection. Client Socket (): craete a socket Blocks until connection from client. connect () : carries out active open: the client establish a connection to the server. TCP Connection establishment and the server create a new socket specified for this connection. recv () : recieves data from the client. send () : sends the given message over the specified socket. send () : sends reply to the client. recv(): recieves the reply from the server. close() : closes the open socket close() : closes the open socket. 8
1.4 Performance Bandwidth (Data Rate): The number of bits per second that can be transmitted on the link, it is measured by bits per second(bps). Propagation Time (tp): The time that a signal needs to propagate from one end of a link to another. Tp = D/V (D: Link Length, V: Propagation velocity). Transmission Time (tr): The time needed to load all the packet into the link. Tr= L / R (L: Packet Size, R: DataRate) Queue Time: the time that network switches need to store packets for some time before forwarding them on an outbound link. Latency: the time needed to deliver a message completely. Round Trip Time (Rtt): The time needed for a small packet to travel from client to server and then back to the client. Rtt= 0.5 * tp Transfer Time: it is the latency in addition to connection establishment time. Throughput: The number of bits per second that we can actually transmit over the link in practice. throughput= Transfer size/ Transfer Time Delay Bandwidth: the maximum number of bits that could be in transit through the pipe at any given instant. Note: Delay in Delay Bandwidth is Rtt or one way Latency. 9
Exercises 9. Give an example of a situation in which multicast addresses might be beneficial. Video or audio teleconference transmissions among a reasonably large number of widely spread sites would be an excellent candidate: unicast would require a separate connection between each pair of sites, while broadcast would send far too much traffic to sites not interested in receiving it. Delivery of video and audio streams for a television channel only to those households currently interested in watching that channel is another application. 10. What differences in traffic patterns account for the fact that STDM is a cost-effective form of multiplexing for a voice telephone network and FDM is a cost-effective form of multiplexing for television and radio networks, yet we reject both as not being cost effective for a general-purpose computer network? FDM was preferred historically for TV/radio because it is very simple to build receivers; it also supports different channel sizes. STDM was preferred for voice because it makes somewhat more efficient use of the underlying bandwidth of the medium, and because Wishes channels with different capacities was not originally an issue. STDM and FDM both work best for channels with constant and uniform bandwidth requirements. For both mechanisms bandwidth that goes unused by one channel is simply wasted, not available to other channels. Computer communications are bursty and have long idle periods; such usage patterns would magnify this waste. FDM and STDM also require that channels be allocated (and, for FDM, be assigned bandwidth) well in advance. Again, the connection requirements for computing tend to be too dynamic for this; at the very least, this would pretty much preclude using one channel per connection. 10