Lector: Aliyev H.U. Lecture №9 Broadcast network software design TASHKENT UNIVERSITY OF INFORMATION TECHNOLOGIES THE DEPARTMENT OF DATA COMMUNICATION NETWORKS.

Slides:



Advertisements
Similar presentations
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CCNA – Network Fundamentals
Network Certification Preparation. Module - 1 Communication methods OSI reference model and layered communication TCP/IP model TCP and UDP IP addressing.
Multicast Fundamentals n The communication ways of the hosts n IP multicast n Application level multicast.
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
Java Socket Support Presentation by: Lijun Yuan Course Number: cs616.
Understanding Networks. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
Introduction To Networking
Delivery, Forwarding, and Routing
1 Version 3.0 Module 10 Routing Fundamentals and Subnetting.
Gursharan Singh Tatla Transport Layer 16-May
The OSI Model and the TCP/IP Protocol Suite
Layering and the TCP/IP protocol Suite  The TCP/IP Protocol only contains 5 Layers in its networking Model  The Layers Are 1.Physical -> 1 in OSI 2.Network.
Protocol Headers Pre DA SA 0800h … version H L 6 TCP Header Data FCS
1 26-Aug-15 Addressing the network using IPv4 Lecture # 2 Engr. Orland G. Basas Prepared by: Engr. Orland G. Basas IT Lecturer.
IP Addressing and Network Software. IP Addressing  A computer somewhere in the world needs to communicate with another computer somewhere else in the.
1Group 07 IPv6 2 1.ET/06/ ET/06/ ET/06/ EE/06/ EE/06/ EE/06/6473 Group 07 IPv6.
Business Data Communications, by Allen Dooley, (c) 2005 Pearson Prentice HallChapter Five 1 Business Data Communications Chapter Five Network, Transport,
Chapter 4: Managing LAN Traffic
Chapter 2 The Infrastructure. Copyright © 2003, Addison Wesley Understand the structure & elements As a business student, it is important that you understand.
1 Internetworking : Internet architecture and TCP/IP Protocol TK3133 Computer Networking Technology.
Network Layer Programing Connection-Oriented Sockets SWE 344 Internet Protocols & Client Server Programming.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Addressing Networking for Home and Small Businesses – Chapter 5.
University of Calgary – CPSC 441.  UDP stands for User Datagram Protocol.  A protocol for the Transport Layer in the protocol Stack.  Alternative to.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
NetworkProtocols. Objectives Identify characteristics of TCP/IP, IPX/SPX, NetBIOS, and AppleTalk Understand position of network protocols in OSI Model.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
Huda AL_Omairl - Network 71 Protocols and Network Software.
© 2002, Cisco Systems, Inc. All rights reserved..
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Chapter Three Network Protocols By JD McGuire ARP Address Resolution Protocol Address Resolution Protocol The core protocol in the TCP/IP suite that.
University of the Western Cape Chapter 12: The Transport Layer.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy Network Fundamentals.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
SYSTEM ADMINISTRATION Chapter 8 Internet Protocol (IP) Addressing.
UNDERSTANDING THE HOST-TO-HOST COMMUNICATIONS MODEL - OSI LAYER & TCP/IP MODEL 1.
Addressing IP v4 W.Lilakiatsakun. Anatomy of IPv4 (1) Dotted Decimal Address Network Address Host Address.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Lector: Aliyev H.U. Lecture №10 Multicast network software design TASHKENT UNIVERSITY OF INFORMATION TECHNOLOGIES THE DEPARTMENT OF DATA COMMUNICATION.
Chapter 4 Objectives Upon completion you will be able to: Classful Internet Addressing Understand IPv4 addresses and classes Identify the class of an.
Connectionless Sockets SWE 344 Internet Protocols & Client Server Programming.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
IP multicasting SWE 344 Internet Protocols & Client Server Programming.
BZUPAGES.COM Presentation on TCP/IP Presented to: Sir Taimoor Presented by: Jamila BB Roll no Nudrat Rehman Roll no
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Chapter 11 Extending LANs 1. Distance limitations of LANs 2. Connecting multiple LANs together 3. Repeaters 4. Bridges 5. Filtering frame 6. Bridged network.
© Cengage Learning 2014 How IP Addresses Get Assigned A MAC address is embedded on a network adapter at a factory IP addresses are assigned manually or.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Chapter 9: Multicast Sockets
TCP/IP Illustrated, Volume 1: The Protocols Chapter 6. ICMP: Internet Control Message Protocol ( 월 ) 김 철 환
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
1 Network Communications A Brief Introduction. 2 Network Communications.
Network Layer IP Address.
Chapter 9 Introduction To Data-Link Layer 9.# 1
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
PART IV Network Layer.
Net 431: ADVANCED COMPUTER NETWORKS
Net 323: NETWORK Protocols
Net 323 D: Networks Protocols
CSE 313 Data Communication
Delivering the Data.
Computer Networks Protocols
Computer Networks Protocols
Transport Layer 9/22/2019.
Exceptions and networking
Layering and the TCP/IP protocol Suite
Presentation transcript:

Lector: Aliyev H.U. Lecture №9 Broadcast network software design TASHKENT UNIVERSITY OF INFORMATION TECHNOLOGIES THE DEPARTMENT OF DATA COMMUNICATION NETWORKS AND SYSTEMS

Introduction In 1994, you may recall, the Rolling Stones transmitted a live concert over the Internet for free. This was made possible due to multicasting, the same technology that makes it possible to watch astronauts in space, to hold meetings over the Internet, and more. Unicasting would be inappropriate for these applications, as for events attended by thousands of clients, the load on the server and the network would be excessive. Multicasting means that the server only has to send messages just once, and they will be distributed to a whole group of clients. Only systems that are members of the group participate in the network transfers. In the last few lessons, we discussed socket programming using connection-oriented and connectionless protocols. Multicasts can be used for group communications over the Internet, where every node participating in the multicast has to join the group set up for the purpose. Routers can forward messages to all interested nodes. In this lesson, we will design network applications using broadcasting features. With one application it will be possible to chat with multiple systems, where everyone is both a sender and a receiver.

The Mean of Unicasts, Broadcasts, and Multicasts The terms unicast and multicast make the most sense when also considering the more common term broadcast. Where broadcast means to send to everyone, for example, radio, television, satellite, and so on, the other two terms cover a more restrained set of receivers. Unicast is the opposite of broadcast and means that a transmission is sent to only one user, hence "uni-" (one) combined with "-cast" (to send). Multicast is therefore the transmission to "multi-", that is, more than one but not everyone. In the radio or television world, a broadcast does not truly go to everyone. In most broadcasts, each station has a "footprint" in which its signal can be received. This footprint is considered the entire network, and so every user has the potential to receive this signal. Television uses a combination of satellites, relays, cable plants, and so on to create a broadcast network. Traditional broadcast networks are designed to efficiently deliver a signal to everyone. While they can also technically deliver a unicast transmission by sending a broadcast signal but expecting only one user to receive and process the data--the signal itself is not truly unicast. Multicast in these networks is accomplished the same way: a broadcast signal is sent to everyone, but only a subset of receivers is expected to receive and process the signal.

Unicasts, Broadcasts, and Multicasts The Internet Protocol supports three kinds of IP addresses: Unicast- unicast network packets are sent to a single destination Broadcast- broadcast datagrams are sent to all nodes in a subnetwork Multicast- multicast datagrams are sent to all nodes, possibly on different subnets, that belong to a group The TCP protocol provides a connection-oriented communication where two systems communicate with each other; with this protocol, we can only send unicast messages. If multiple clients connect to a single server, all clients maintain a separate connection on the server. The server needs resources for each of these simultaneous connections, and must communicate individually with every client. Don't forget that the UDP protocol can also be used to send unicast messages, where, unlike TCP, connectionless communication is used, making it is faster than TCP, although without TCP's reliability. Sending unicast messages with TCP is covered in.

Broadcasting Broadcast addresses are identified by IP addresses where all bits of the host are set to 1. For instance, to send messages to all hosts in a subnet with a mask of in a network with the address , the broadcast address would be Any host with an IP address beginning will then receive the broadcast messages. Broadcasts are always performed with connectionless communication using the UDP protocol. The server sends the data regardless of whether any client is listening. Performance reasons mean it wouldn't be possible to set up a separate connection to every client. Connection-less communication means that the server does not have to allocate resources for every single client-no matter how many clients are listening, the same server resources will be consumed. Of course, there are disadvantages to the connection-less mechanism. For one, there is no guarantee that the data is received by anyone. If we wanted to add reliability, we would have to add a handshaking mechanism of our own at a higher level than UDP. Broadcasts introduce a performance issue for every system on the destination subnet, because each system on that subnet has to check whether the receiving packet is of interest. A broadcast can be of interest to any system in the network, and it passes all the way up to the transport layer in the protocol stack of each system before its relevancy can be determined. There is another issue with broadcasts: they don't cross subnets. Routers don't let broadcasts cross them-we would soon reach network saturation if routers forwarded broadcasts, so this is desired behavior. Thus, broadcasts can be only used inside a particular subnet.

Broadcast networking

IP broadcasting IP broadcasting is used by network devices to send a single packet of information that can be accessible by every device on the network. Because TCP communication requires that two devices have a dedicated connection, it is not possible to send broadcast messages in a strictly TCP environment. Instead, UDP packets must be used because that protocol has the capability of sending messages without a specific connection being defined. Broadcast messages contain a special destination IP address. The IP address format allows for two types of broadcast message addresses: local broadcasts and global broadcasts. Network programmers use the local broadcast address to send a broadcast message destined for all devices on a particular subnet. The idea is to localize a broadcast message so that other networks are not affected by the broadcast. As discussed, IP Programming Basics, an IP address is divided into two parts, a network address and a host address. The standard network address part makes up the first part of the local broadcast address, and all 1s are used for the host part of the address (which is the decimal value 255 in the address octet). This is demonstrated in Figure Thus, for the class B network , using a subnet mask of , the local broadcast address would be

The IP network and host address parts of a local broadcast address

IP broadcasting Similarly, if the subnet is further divided using a subnet mask of , each subnet would have its own local broadcast address. The subnet would have a broadcast address of , and so on up to the subnet , which would have the broadcast address The global broadcast was originally intended to allow a device to send a packet to all devices on an internetwork. It uses all 1s in the IP address, creating an address of This special broadcast address indicates that the destination of the packet is all devices on all networks accessible from the device sending the message. The vast size and burgeoning popularity of the Internet, of course, meant that this behavior had to be modified. Otherwise, it would be easy for a rogue programmer to create a stream of global broadcasts that would propagate to all networks on the Internet, effectively clogging the worldwide system with bogus broadcasts and stopping normal traffic. To eliminate this possibility, routers do not send global IP broadcasts to other networks unless specifically configured to do so (which is practically never). Instead, they silently ignore global broadcasts, effectively turning them into local broadcasts that are seen only on the local network over which they were sent.

Implementing Broadcasting with.NET The.NET network library contains elements for sending and receiving broadcast packets. This section describes the techniques necessary to handle broadcast pack. Sending Broadcast Packets By default, sockets are not allowed to send broadcast messages. You can test this by running the simple program shown in Listing 9.1. Listing 9.1: The BadBroadcast.cs programs in your network application programs.

The Broadcst.cs program using System; using System.Net; using System.Net.Sockets; using System.Text; class Broadcst { public static void Main() { Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPEndPoint iep1 = new IPEndPoint(IPAddress.Broadcast, 9050); IPEndPoint iep2 = new IPEndPoint(IPAddress.Parse(" "), 9050); string hostname = Dns.GetHostName(); byte[] data = Encoding.ASCII.GetBytes(hostname); sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1); sock.SendTo(data, iep1); sock.SendTo(data, iep2); sock.Close(); }

The Broadcst.cs program using System; using System.Net; using System.Net.Sockets; using System.Text; class Broadcst { public static void Main() { Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPEndPoint iep1 = new IPEndPoint(IPAddress.Broadcast, 9050); IPEndPoint iep2 = new IPEndPoint(IPAddress.Parse(" "), 9050); string hostname = Dns.GetHostName(); byte[] data = Encoding.ASCII.GetBytes(hostname); sock.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1); sock.SendTo(data, iep1); sock.SendTo(data, iep2); sock.Close(); }

Receiving Broadcast Packets using System; using System.Net; using System.Net.Sockets; using System.Text; class RecvBroadcst { public static void Main() { Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPEndPoint iep = new IPEndPoint(IPAddress.Any, 9050); sock.Bind(iep); EndPoint ep = (EndPoint)iep; Console.WriteLine("Ready to receive "); byte[] data = new byte[1024]; int recv = sock.ReceiveFrom(data, ref ep); string stringData = Encoding.ASCII.GetString(data, 0, recv); Console.WriteLine("received: {0} from: {1}", stringData, ep.ToString()); data = new byte[1024]; recv = sock.ReceiveFrom(data, ref ep); stringData = Encoding.ASCII.GetString(data, 0, recv); Console.WriteLine("received: {0} from: {1}", stringData, ep.ToString()); sock.Close(); } }

Q&A?