Computer Network tutorial provides basic and advanced concepts of Data Communication & Networks (DCN). Our Computer Networking Tutorial is designed for beginners and professionals.
Our Computer Network tutorial includes all topics of Computer Network such as introduction, features, types of computer network, architecture, hardware, software, internet, intranet, website, LAN, WAN, etc.
This document provides instructions and content for a computer network laboratory manual. It includes:
1. Instructions for students on preparation, maintaining records, obtaining signatures, and proper equipment use.
2. A table of contents listing experiments on topics like NS2 basics, point-to-point networks, wireless LANs, and algorithms.
3. An introduction to the NS2 network simulator, including its Tcl scripting language components, basic architecture, and how to initialize, define nodes/links, and configure agents and applications in a simulation.
The document describes a network laboratory experiment on simulating a star topology using the NS2 simulator.
The objectives are to simulate the star topology, understand queuing and packet dropping at routers, and apply the knowledge to measure network performance metrics.
The steps include creating nodes and links to form the star topology, generating UDP traffic from two sources to a sink node, and observing packet dropping at the congested link using the nam trace file.
Ns is an object-oriented network simulator written in C++ and OTcl that is used to simulate wired and wireless networks. It allows debugging of network protocols and configurations efficiently without physical equipment. Ns simulates network components, traffic models, transport and routing protocols, and physical media. It consists of an event scheduler that handles the simulation by processing events in chronological order.
Ns is an open-source network simulator written in C++ and OTcl that allows debugging of wired and wireless network protocols. It provides an event-driven simulation environment where users can model networking scenarios without physical equipment. Ns simulations involve defining a network topology with nodes, attaching traffic source and destination agents to nodes using protocols like TCP and UDP, generating network traffic, and running the simulation. The results can be analyzed using trace files and visualized using the Network Animator (NAM) and Xgraph plotting tools.
Network simulator 2 :
Object-oriented, discrete event driven network simulator
It was normally used in wired & wireless protocol
Written in C++ and OTcl
The document describes simulating a link state routing algorithm using NS2. It involves each router sharing information about its neighbors with every other router on the network. The simulation program creates nodes and links them in a topology, sets up UDP connections between nodes, applies CBR traffic, and uses a link state routing protocol to transmit data from senders to receivers. Events are scheduled and the program is run to simulate the link state routing algorithm.
The document describes two experiments conducted using the OPNET simulation tool. Experiment 1 involves simulating a TCP network using different congestion control mechanisms and analyzing OSPF routing. Experiment 2 compares the bus and star network topologies by creating networks with each in OPNET and collecting statistics on traffic and delay. The objectives are to get familiar with OPNET, study TCP algorithms, simulate OSPF routing, and understand the pros and cons of different topologies. Tasks for each experiment are described in detail, including how to set up the simulations, configure nodes and links, select statistics, and run the simulations.
Gurpinder Singh Ghuman has a M.S. in Electrical Engineering from USC and a B.E. in Electronics and Communication from Punjab Technical University. He has experience as an intern at Infosys and Access Point and currently works as a graduate assistant at USC. His technical skills include programming languages like C, C++, Python and MATLAB as well as networking protocols like TCP/IP, UDP and Ethernet. Some of his academic projects involve software defined networking using Ryu and Mininet, building an operating system kernel in C called Weenix, and designing algorithms for power allocation in MIMO systems and CSMA/CA networks.
This document provides instructions and content for a computer network laboratory manual. It includes:
1. Instructions for students on preparation, maintaining records, obtaining signatures, and proper equipment use.
2. A table of contents listing experiments on topics like NS2 basics, point-to-point networks, wireless LANs, and algorithms.
3. An introduction to the NS2 network simulator, including its Tcl scripting language components, basic architecture, and how to initialize, define nodes/links, and configure agents and applications in a simulation.
The document describes a network laboratory experiment on simulating a star topology using the NS2 simulator.
The objectives are to simulate the star topology, understand queuing and packet dropping at routers, and apply the knowledge to measure network performance metrics.
The steps include creating nodes and links to form the star topology, generating UDP traffic from two sources to a sink node, and observing packet dropping at the congested link using the nam trace file.
Ns is an object-oriented network simulator written in C++ and OTcl that is used to simulate wired and wireless networks. It allows debugging of network protocols and configurations efficiently without physical equipment. Ns simulates network components, traffic models, transport and routing protocols, and physical media. It consists of an event scheduler that handles the simulation by processing events in chronological order.
Ns is an open-source network simulator written in C++ and OTcl that allows debugging of wired and wireless network protocols. It provides an event-driven simulation environment where users can model networking scenarios without physical equipment. Ns simulations involve defining a network topology with nodes, attaching traffic source and destination agents to nodes using protocols like TCP and UDP, generating network traffic, and running the simulation. The results can be analyzed using trace files and visualized using the Network Animator (NAM) and Xgraph plotting tools.
Network simulator 2 :
Object-oriented, discrete event driven network simulator
It was normally used in wired & wireless protocol
Written in C++ and OTcl
The document describes simulating a link state routing algorithm using NS2. It involves each router sharing information about its neighbors with every other router on the network. The simulation program creates nodes and links them in a topology, sets up UDP connections between nodes, applies CBR traffic, and uses a link state routing protocol to transmit data from senders to receivers. Events are scheduled and the program is run to simulate the link state routing algorithm.
The document describes two experiments conducted using the OPNET simulation tool. Experiment 1 involves simulating a TCP network using different congestion control mechanisms and analyzing OSPF routing. Experiment 2 compares the bus and star network topologies by creating networks with each in OPNET and collecting statistics on traffic and delay. The objectives are to get familiar with OPNET, study TCP algorithms, simulate OSPF routing, and understand the pros and cons of different topologies. Tasks for each experiment are described in detail, including how to set up the simulations, configure nodes and links, select statistics, and run the simulations.
Gurpinder Singh Ghuman has a M.S. in Electrical Engineering from USC and a B.E. in Electronics and Communication from Punjab Technical University. He has experience as an intern at Infosys and Access Point and currently works as a graduate assistant at USC. His technical skills include programming languages like C, C++, Python and MATLAB as well as networking protocols like TCP/IP, UDP and Ethernet. Some of his academic projects involve software defined networking using Ryu and Mininet, building an operating system kernel in C called Weenix, and designing algorithms for power allocation in MIMO systems and CSMA/CA networks.
Ns-2 is a discrete event network simulator used for modeling wired and wireless network protocols. It has two main components - the C++ simulator engine for fast packet-level processing, and the OTcl scripting language for configuration and control. Simulation involves setting up nodes, links, agents, applications and traffic before scheduling events and running the simulation. Traces can then be analyzed to evaluate network performance.
This document provides information on setting up wireless simulations in NS-2 including:
1) Details on configuring wireless node parameters, channels, propagation models, interfaces, and routing protocols.
2) Examples of generating node mobility using the setdest script and generating traffic using cbrgen.
3) The format of DSR trace files and how to calculate routing overhead and packet delivery ratio from these files using AWK.
The document provides an overview of Chapter 3 from the textbook "Computer Networking: A Top Down Approach" by Jim Kurose and Keith Ross. It discusses the goals and outline of the chapter which covers transport layer services, multiplexing and demultiplexing, UDP, principles of reliable data transfer, TCP, and congestion control. Specifically, it describes transport layer services, multiplexing and demultiplexing of data between applications, UDP as a connectionless transport protocol, and outlines the topics to be covered related to reliable data transfer and TCP.
This document contains information about network programming laboratory experiments at the Global Institute of Technology. It includes the syllabus, list of experiments, course objectives, and content beyond the syllabus. The key experiments covered are:
1. Studying different network topologies, LAN equipment, and configurations
2. Writing client and server programs in C using TCP and UDP for tasks like echoing messages and estimating round trip time
3. Simulating routing algorithms like Bellman-Ford in NS2 networking simulation software
The objectives are for students to learn network programming concepts like the OSI model, TCP/IP, and socket programming to implement client-server applications over TCP and UDP.
This document provides information about network programming laboratory experiments at the Global Institute of Technology. It includes:
1. An index listing the syllabus, list of experiments, course objectives and outcomes, additional content, and experiments.
2. The syllabus lists 10 experiments covering topics like network topologies, TCP/IP programming, routing algorithms, and protocols.
3. The list of experiments provides more details on 13 experiments to be performed, covering network devices, client-server programming, chat servers, and simulation of protocols.
This document provides information about network programming and socket programming. It begins with an introduction to the client-server model and TCP connections. TCP connections provide reliable, connection-oriented communication with flow and congestion control. The document then discusses byte ordering issues that can occur when transferring multi-byte data types between systems with different architectures. It also covers IP addresses and port numbers, which are used to route and multiplex network traffic. Address structures and conversion functions are described to handle byte ordering when transferring addresses between networks.
The document describes how to simulate computer networks using the Network Simulator 2 (NS2). It discusses running NS2 on the department's Unix server and modifying configuration files. It then provides examples of simulating simple wired and wireless network topologies with different types of traffic including UDP and TCP. Trace files are analyzed to understand network performance.
The intern will model satellite networks using the ns3 simulator. Goals include learning how to use ns3, simulating a multi-point network with a satellite link, and analyzing the effects of changing parameters like maximum congestion window size. The project expands LinQuest's expertise in physical satellite layers into network and transport layers, and may uncover issues in real network environments.
The document provides an introduction to the Network Simulator 2 (NS2) by describing its components, architecture that separates C++ and OTcl, and basic usage including writing Tcl scripts to simulate simple network topologies and traffic patterns and analyzing trace files. It also gives examples of simulating simple wired and wireless networks with UDP and TCP traffic.
This document provides instructions for creating scenarios in the GloMoSim network simulator. It discusses the key input and output files used, including the scenario configuration file, node placement file, and application configuration file. It also describes how to design both wired and wireless networks as scenarios in GloMoSim, including defining the network topology and components, configuring applications and traffic, and analyzing output statistics files.
The transport layer provides end-to-end communication between processes on different machines. Two main transport protocols are TCP and UDP. TCP provides reliable, connection-oriented data transmission using acknowledgments and retransmissions. UDP provides simpler, connectionless transmission but without reliability. Both protocols use port numbers to identify processes and negotiate quality of service options during connection establishment.
The document discusses various TCP/IP utilities used for network troubleshooting and analysis. It describes connectivity utilities like FTP, Telnet, and TFTP. Diagnostic utilities mentioned include ARP, IPConfig, Netstat, Ping, and Traceroute. Server utilities covered are TCP/IP printing service and Internet Information Services. The document also provides brief explanations of ARP, which converts IP addresses to MAC addresses, and Traceroute, which shows the network path between hosts.
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OpenvSwitch
1) Mobile networks today handle a large number of simultaneous short duration flows, with high call rates of 100k-200k connections per second. Statistics like call duration and bandwidth usage need to be tracked for each flow for billing purposes.
2) Testing was conducted injecting a 10Gbps mobile traffic profile of 1 million flows into OVS, with 200k flows created and destroyed per second. Key metrics measured were maximum throughput, latency, and jitter at different flow table sizes and core counts.
3) Conntrack performance was tested for OVS kernel and DPDK versions. For 100k flows, OVS kernel achieved 152k pps for 4-tuple matching while OVS-DPDK achieved
This document describes how to simulate congestion control algorithms using the Network Simulator 2 (NS2). It provides steps to install and run NS2 in Ubuntu, describes a sample network topology with 4 nodes, and includes NS2 code to simulate TCP and UDP connections over this topology with FTP and CBR traffic. The code schedules the start and stop of the FTP and CBR agents, runs the simulation for 5 seconds, and outputs results to the NAM network animator and trace files for analysis.
Chapter 3. sensors in the network domainPhu Nguyen
This chapter discusses network sensors and the data they generate. Examples of network sensors include NetFlow sensors on routers and packet capture tools like tcpdump. The chapter covers challenges of analyzing large network traffic data, and describes common data formats generated by sensors like NetFlow records and packet captures. It also discusses techniques for filtering large packet capture data, such as using rolling buffers, limiting packet snap lengths, and Berkeley Packet Filter rules.
The document discusses applications and simulations of error correction coding (ECC) for multicast file transfer. It provides an overview of different ECC and feedback-based multicast protocols and evaluates their performance based on simulations. Reed-Solomon coding on blocks provided faster decoding times than on entire files, while tornado coding had the fastest decoding but required slightly more packets for reconstruction. Simulations of protocols like MFTP and MFTP/EC using network simulators showed that using ECC like Reed-Muller codes significantly improved performance over regular MFTP.
The document outlines a 10 question networks laboratory exam covering topics like using networking commands, writing HTTP and TCP socket programs, simulating protocols like DNS, ARP, and RARP, and simulating routing algorithms and error correction using network simulation tools. Students are asked to capture and examine ping and trace route PDUs, develop client-server and chat applications using TCP sockets, and evaluate the performance of TCP/UDP and routing protocols through simulation.
The document provides an overview of the transport layer chapter from the textbook "Computer Networking: A Top Down Approach". It outlines the key topics that will be covered, including multiplexing and demultiplexing, connectionless transport with UDP, reliable data transfer, connection-oriented transport with TCP, and principles of congestion control. Examples are given of how multiplexing and demultiplexing work in both connectionless and connection-oriented transport.
As growth of internet and computer increase day by day so as the growth of attacks on network is also
tremendously increased day by day. In this paper we introduced a wired network and create two TCP
source node and one attacker node (Distributed denial-of-service) flooding type attack which is the attack
on the bandwidth of TCP node at source side sends data to destination through router and also measure the
impact of Denial-of-service attack (DoS) on that wired network how packets of other source nodes and that
node will drop down due to the impact of flooding type denial-of-service attack and shows the result using
NS-2 NAM & Xgraph windows in simulation.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Ns-2 is a discrete event network simulator used for modeling wired and wireless network protocols. It has two main components - the C++ simulator engine for fast packet-level processing, and the OTcl scripting language for configuration and control. Simulation involves setting up nodes, links, agents, applications and traffic before scheduling events and running the simulation. Traces can then be analyzed to evaluate network performance.
This document provides information on setting up wireless simulations in NS-2 including:
1) Details on configuring wireless node parameters, channels, propagation models, interfaces, and routing protocols.
2) Examples of generating node mobility using the setdest script and generating traffic using cbrgen.
3) The format of DSR trace files and how to calculate routing overhead and packet delivery ratio from these files using AWK.
The document provides an overview of Chapter 3 from the textbook "Computer Networking: A Top Down Approach" by Jim Kurose and Keith Ross. It discusses the goals and outline of the chapter which covers transport layer services, multiplexing and demultiplexing, UDP, principles of reliable data transfer, TCP, and congestion control. Specifically, it describes transport layer services, multiplexing and demultiplexing of data between applications, UDP as a connectionless transport protocol, and outlines the topics to be covered related to reliable data transfer and TCP.
This document contains information about network programming laboratory experiments at the Global Institute of Technology. It includes the syllabus, list of experiments, course objectives, and content beyond the syllabus. The key experiments covered are:
1. Studying different network topologies, LAN equipment, and configurations
2. Writing client and server programs in C using TCP and UDP for tasks like echoing messages and estimating round trip time
3. Simulating routing algorithms like Bellman-Ford in NS2 networking simulation software
The objectives are for students to learn network programming concepts like the OSI model, TCP/IP, and socket programming to implement client-server applications over TCP and UDP.
This document provides information about network programming laboratory experiments at the Global Institute of Technology. It includes:
1. An index listing the syllabus, list of experiments, course objectives and outcomes, additional content, and experiments.
2. The syllabus lists 10 experiments covering topics like network topologies, TCP/IP programming, routing algorithms, and protocols.
3. The list of experiments provides more details on 13 experiments to be performed, covering network devices, client-server programming, chat servers, and simulation of protocols.
This document provides information about network programming and socket programming. It begins with an introduction to the client-server model and TCP connections. TCP connections provide reliable, connection-oriented communication with flow and congestion control. The document then discusses byte ordering issues that can occur when transferring multi-byte data types between systems with different architectures. It also covers IP addresses and port numbers, which are used to route and multiplex network traffic. Address structures and conversion functions are described to handle byte ordering when transferring addresses between networks.
The document describes how to simulate computer networks using the Network Simulator 2 (NS2). It discusses running NS2 on the department's Unix server and modifying configuration files. It then provides examples of simulating simple wired and wireless network topologies with different types of traffic including UDP and TCP. Trace files are analyzed to understand network performance.
The intern will model satellite networks using the ns3 simulator. Goals include learning how to use ns3, simulating a multi-point network with a satellite link, and analyzing the effects of changing parameters like maximum congestion window size. The project expands LinQuest's expertise in physical satellite layers into network and transport layers, and may uncover issues in real network environments.
The document provides an introduction to the Network Simulator 2 (NS2) by describing its components, architecture that separates C++ and OTcl, and basic usage including writing Tcl scripts to simulate simple network topologies and traffic patterns and analyzing trace files. It also gives examples of simulating simple wired and wireless networks with UDP and TCP traffic.
This document provides instructions for creating scenarios in the GloMoSim network simulator. It discusses the key input and output files used, including the scenario configuration file, node placement file, and application configuration file. It also describes how to design both wired and wireless networks as scenarios in GloMoSim, including defining the network topology and components, configuring applications and traffic, and analyzing output statistics files.
The transport layer provides end-to-end communication between processes on different machines. Two main transport protocols are TCP and UDP. TCP provides reliable, connection-oriented data transmission using acknowledgments and retransmissions. UDP provides simpler, connectionless transmission but without reliability. Both protocols use port numbers to identify processes and negotiate quality of service options during connection establishment.
The document discusses various TCP/IP utilities used for network troubleshooting and analysis. It describes connectivity utilities like FTP, Telnet, and TFTP. Diagnostic utilities mentioned include ARP, IPConfig, Netstat, Ping, and Traceroute. Server utilities covered are TCP/IP printing service and Internet Information Services. The document also provides brief explanations of ARP, which converts IP addresses to MAC addresses, and Traceroute, which shows the network path between hosts.
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OpenvSwitch
1) Mobile networks today handle a large number of simultaneous short duration flows, with high call rates of 100k-200k connections per second. Statistics like call duration and bandwidth usage need to be tracked for each flow for billing purposes.
2) Testing was conducted injecting a 10Gbps mobile traffic profile of 1 million flows into OVS, with 200k flows created and destroyed per second. Key metrics measured were maximum throughput, latency, and jitter at different flow table sizes and core counts.
3) Conntrack performance was tested for OVS kernel and DPDK versions. For 100k flows, OVS kernel achieved 152k pps for 4-tuple matching while OVS-DPDK achieved
This document describes how to simulate congestion control algorithms using the Network Simulator 2 (NS2). It provides steps to install and run NS2 in Ubuntu, describes a sample network topology with 4 nodes, and includes NS2 code to simulate TCP and UDP connections over this topology with FTP and CBR traffic. The code schedules the start and stop of the FTP and CBR agents, runs the simulation for 5 seconds, and outputs results to the NAM network animator and trace files for analysis.
Chapter 3. sensors in the network domainPhu Nguyen
This chapter discusses network sensors and the data they generate. Examples of network sensors include NetFlow sensors on routers and packet capture tools like tcpdump. The chapter covers challenges of analyzing large network traffic data, and describes common data formats generated by sensors like NetFlow records and packet captures. It also discusses techniques for filtering large packet capture data, such as using rolling buffers, limiting packet snap lengths, and Berkeley Packet Filter rules.
The document discusses applications and simulations of error correction coding (ECC) for multicast file transfer. It provides an overview of different ECC and feedback-based multicast protocols and evaluates their performance based on simulations. Reed-Solomon coding on blocks provided faster decoding times than on entire files, while tornado coding had the fastest decoding but required slightly more packets for reconstruction. Simulations of protocols like MFTP and MFTP/EC using network simulators showed that using ECC like Reed-Muller codes significantly improved performance over regular MFTP.
The document outlines a 10 question networks laboratory exam covering topics like using networking commands, writing HTTP and TCP socket programs, simulating protocols like DNS, ARP, and RARP, and simulating routing algorithms and error correction using network simulation tools. Students are asked to capture and examine ping and trace route PDUs, develop client-server and chat applications using TCP sockets, and evaluate the performance of TCP/UDP and routing protocols through simulation.
The document provides an overview of the transport layer chapter from the textbook "Computer Networking: A Top Down Approach". It outlines the key topics that will be covered, including multiplexing and demultiplexing, connectionless transport with UDP, reliable data transfer, connection-oriented transport with TCP, and principles of congestion control. Examples are given of how multiplexing and demultiplexing work in both connectionless and connection-oriented transport.
As growth of internet and computer increase day by day so as the growth of attacks on network is also
tremendously increased day by day. In this paper we introduced a wired network and create two TCP
source node and one attacker node (Distributed denial-of-service) flooding type attack which is the attack
on the bandwidth of TCP node at source side sends data to destination through router and also measure the
impact of Denial-of-service attack (DoS) on that wired network how packets of other source nodes and that
node will drop down due to the impact of flooding type denial-of-service attack and shows the result using
NS-2 NAM & Xgraph windows in simulation.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on integration of Salesforce with Bonterra Impact Management.
Interested in deploying an integration with Salesforce for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
B.Tech. Lab Record for Data Communication & Computer Networks
1. SCHOOL OF ENGINEERING AND TECHNOLOGY
Programme: B.Tech.
Lab Record for
Data Communication & Computer Networks
(4CSGC2061)
Semester VI (2023- 24)
Submitted by:
SWAPNIL SUNIL HERAGE
21BBTCS241
Lab Incharge
Dr. Umesharaddy,
Associate Professor, CMR University.
Department of Computer Science & Engineering
Hennur-Bagalur Main Road, Chagalatti, Bagalur, Bengaluru-562149
KARNATAKA, INDIA
Tel: 7022007672 Email:admin.soet@cmr.edu.in www.cmr.edu.in
2. 4CSGC2061: DATA COMMUNICATION AND COMPUTER NETWORKS
Course Framework:
Credits: L-T-P: 2 – 0 – 1 Total Credits: 3
Contact Hours/Week: 4 Direct Teaching Hours: 45 Total Contact Hours: 75
Course Learning Objectives:
The course aims to introduce the concepts, terminologies and technologies used in data communication and computer
networking, familiarize students with division of network functionalities into layers, components required to build
different types of networks, functionality of each layer and learn the flow control and congestion control algorithms.
Course Outcomes:
On successful completion of the course, Students will be able to,
1) Outline basic concepts in data communications, OSI and TCP/IP Protocol Stack. (L2)
2) Demonstrate design issues, flow control and error control (L2)
3) Understand the transfer of data from source to the destination using different protocols and addressing.
(L2)
4) Summarize the functions of Application layer protocols and how to meet the QoS requirements in networking.
(L2)
5) Identify the limits and importance of compression, encoding, sampling, quantization methods. (L3)
Syllabus Hours
Module – 1 09
Overview of data communication and Networking: Introduction; Data communications: components, data
representation(ASCII,ISO etc.),direction of data flow(simplex, half duplex, full duplex); Networks: distributed processing,
network criteria, physical structure (type of connection, topology), categories of network (LAN, MAN,WAN);Internet: brief
history, internet today; The Internet, Protocols & Standards, Layered Tasks, The OSI model, Layers in OSI model, TCP/IP
Protocol suite, Addressing.
Module – 2 09
Design Issues: Services to Network Layer, Framing, Error Control and Flow Control. Error Control: Parity Bits, Hamming
Codes and CRC. Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol, Medium
Access Control: Pure and Slotted ALOHA, CSMA, WDMA, CSMA/CD,
CSMA/CA.
Module – 3 09
TCP/IP: TCP/IP architecture, The Internet Protocol, IPv6, UDP, TCP, Internet Routing Protocols, Multicast Routing.
Module – 4 09
3. Applications Layer : Application layer overview, Domain Name System (DNS), Remote Login Protocols, E- mail,
File Transfer and FTP, World Wide Web and HTTP, Network management, Overview of QoS, Integrated
Services QoS, Differentiated services QoS, Virtual Private Networks.
Module – 5 09
Multimedia Networking : Overview of data compression, Digital voice and compression, JPEG, MPEG, Limits of compression
with loss, Compression methods without loss, Overview of IP Telephony, VoIP signaling protocols, Real-Time Media Transport
Protocols, Stream control Transmission Protocol(SCTP).
LABORATORY EXPERIMENTS:
—Simulation Exercises.
7-10- Network programs.
IDE/Software’s used: NS2/Packet Tracer for Simulations and Turbo C for Windows/ gcc/ Sublime for Ubuntu. PART
A:
Simulation Exercises
1) Simulate a three nodes point-to-point network with duplex links between them. Set the queue size vary the
bandwidth and find the number of packets dropped.
2) Simulate a four-node point-to-point network, and connect the links as follows: n0-n2, n1-n2 and n2-n3. Apply
TCP agent between n0-n3 and UDP n1-n3. Apply relevant applications over TCP and UDP agents changing the
parameter and determine the number of packets by TCP/UDP.
3) Simulate the transmission of ping messaged over a network topology consisting of 6 nodes and find the number
of packets dropped due to congestion.
4) Simulate an Ethernet LAN using N-nodes (6-10), change error rate and data rate and compare the throughput.
5) Simulate an Ethernet LAN using N nodes and set multiple traffic nodes and plot congestion window for different
source/destination.
6) Configure RIP/OSPF routing protocols using packet tracer.
PART B:
The following experiments shall be conducted using C/C++.
7) Write a program for distance vector algorithm to find suitable path for transmission.
8) Write a program for Hamming code/CRC.
9) Using TCP/IP sockets, write a client server program to make client sending the file name and the server to send
back the contents of the requested file if present.
10) Write a program for congestion control using Leaky bucket algorithm.
4. INDEX
Expt No. Name of Experiment Page No. Remarks
1
Simulate a three nodes point-to-point network
with duplex links between them. Set the queue
size vary the bandwidth and find the number of
packetsdropped.
1-4
2
Simulate a four-node point-to-point network, and
connect the links as follows: n0-n2, n1-n2 and n2-
n3. Apply TCP agent between n0-n3 and UDP n1-
n3. Apply relevant applications over TCP and UDP
agents changing the parameter and determine the
number of packets by TCP/UDP.
5-9
3
Simulate the transmission of ping messaged over a
network topology consisting of 6 nodes and find
the number of packets dropped due to congestion.
10-14
4
Simulate an Ethernet LAN using N-nodes change
error rate and data rate and compare throughput.
15-18
5
Simulate an Ethernet LAN using N nodes and set
multiple traffic nodes and plot congestion window
for different source/destination.
19-23
6 Write a program for distance vector algorithm to
find suitable path for transmission.
24-26
7
Error Detection Techniques 27-31
A) Write a program for Hamming code/CRC. 27-28
B) Program for cyclic Redundancy Check in C 29-31
8
Using TCP/IP sockets, write a client server
program to make client sending the file name and
the server to send back the contents of the
requested file if present.
32-35
9
Program for congestion control using leaky bucket
algorithm
36-39
5. 1
EXPERIMENT NO 1
Simulate a three nodes point-to-point network with duplex links between them. Set the
queue size vary the bandwidth and find the number of packetsdropped.
TCL file:
set ns[new Simulator]
set tf[open lab1.tr w]
$ns trace-all $tf
set nf[open lab1.nam w]
$ns namtrace-all $nf
proc finish {} {
global ns nf tf
$ns flush-trace
exec nam lab1.nam &
close $tf
close $nf
exit
}
set n0[$ns node]
set n1[$ns node]
set n2[$ns node]
set n3[$ns node]
$ns color 1 "red"
$ns color 2 "blue"
$n0 label "source/udp0"
$n1 label "source/udp1"
$n2 label "router"
6. 2
$n3 label "Destination/Null"
$ns duplex-link $n0 $n2 100Mb 300ms DropTail
$ns duplex-link $n1 $n2 100Mb 300ms DropTail
$ns duplex-link $n2 $n3 1Mb 300ms DropTail
$ns set queue-limit $n0 $n2 50
$ns set queue-limit $n1 $n2 50
$ns set queue-limit $n2 $n3 5
set udp0[new Agent/UDP]
$ns attach-agent $n0 $udp0
set cbr0[new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp
set udp1[new Agent/UDP]
$ns attach-agent $n1 $udp1
set cbr1[new Application/Traffic/CBR]
$cbr1 set packetSize_ 500
$cbr1 set interval_ 0.005
$cbr1 attach-agent $udp1
# Use Agent/TCP or Agent/Null depending on your requirements
set tcpAgent[new Agent/TCP]
$ns attach-agent $n3 $tcpAgent
$ns connect $udp0 $tcpAgent
$ns connect $udp1 $tcpAgent
$ns at 0.5 "$cbr0 start"
$ns at 1.0 "$cbr1 start"
$ns at 4.0 "$cbr1 stop"
7. 3
$ns at 4.5 "$cbr0 stop"
$ns at 5.0 "finish"
$ns run
AWK file:
BEGIN{
count = 0;
} {
If ($1==”d”)
count++
}
END{
printf(“The Total no of packets Drop is: %dnn”,count)
}
OUTPUT:
9. 5
EXPERIMENT NO 2
Simulate a four-node point-to-point network, and connect the links as follows: n0-n2, n1-n2
and n2-n3. Apply TCP agent between n0-n3 and UDP n1-n3. Apply relevant applications over
TCP and UDP agents changing the parameter and determine the number of packets by
TCP/UDP.
TCL File:
#Create a simulator object
set ns [new Simulator]
#Define different colors for data flows (for NAM)
$ns color 1 Blue
$ns color 2 Red
set tf [open out1.tr w]
$ns trace-all $tf
#Open the NAM trace file
set nf [open out1.nam w]
$ns namtrace-all Snf
#Define a 'finish' procedure
proc finish {} {
global ns tf nf
$ns flush-trace
close $tf
#Close the NAM trace file
close Snf
#Execute NAM on the trace file
exec nam out.nam &
exit e
}
10. 6
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
#Create links between the nodes
$ns duplex-link $no $n2 2Mb 10ms DropTail 35
$ns duplex-link $n1 $n2 2Mb 10ms DropTail
$ns duplex-link $n2 $n3 1.7Mb 20ms DropTail
#Set Queue Size of link (n2-n3) to 16
$ns queue-limit $n2 $n3 10
#Give node position (for NAM)
$ns duplex-link-op $ne $n2 orient right-down 43 $ns duplex-link-op $n1 $n2 orient right-up
$ns duplex-link-op $n2 $n3 orient right
#Monitor the queue for link (n2-n3). (for NAM)
$ns duplex-link-op $n2 $n3 queuePos 0.5
#Setup a TCP connection
set tcp [new Agent/TCP]
$tcp set class_2
$ns attach-agent $no $tcp
set sink [new Agent/TCPSink] 55 $ns attach-agent $n3 $sink
ns connect Stcp $sink
$tcp set fid 1
#Setup a FTP over TCP connection
set ftp [new Application/FTP]
$ftp attach-agent $t.cp
$ftp set type FTP
11. 7
#Setup a UDP connection
set udp [new Agent/UDP]
$ns attach-agent $n1 $udp
set null [new Agent/Null]
$ns attach-agent $n3 $null
$ns connect $udp $null
$udp set fid 2
#Setup a CBR over UDP connection
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
$cbr set type CBR
$cbr set packet_size_1000
$cbr set rate imb
$cbr set random false
#Schedule events for the CBR and FTP agents
$ns at 0.1 "Scbr start"
$ns at 1.0 "Sftp start"
$ns at 4.0 "Sftp stop"
$ns at 4.5 "Scbr stop"
#Detach tcp and sink agents (not really necessary)
$ns at 4.5 "$ns detach-agent Sno Stcp; Sns detach-agent $n3 $sink" 90
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish
#Print CBR packet size and interval 95 puts CBR
packet size = [Scbr set packet_size_]"
puts "CBR interval = [Scbr set interval ]"
14. 10
EXPERIMENT NO 3
Simulate the transmission of ping messaged over a network topology consisting of 6 nodes
and find the number of packets dropped due to congestion.
TCL file:
#Create a simulator object
set ns [new SimulatOT] set tf [open lab2.tr w]
$ns trace-all $tf
set nf [open lab2.nam w]
$ns namtrace-all $nf
set n0 [$ns node] set nl [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set
n5 [$ns node] set n6 [$ns node]
$n0 label "Ping0"
$n4 label "Ping4"
$n5 label "Ping S"
$n6 labcl "Ping6"
$n2 label "Router"
$ns color 1 "red"
$ns color 2 "green"
$ns duplex-link $n0 $n2 l00Mb 300ms DropTail
$ns duplex-link $n1 $n2 lMb 300ms DropTail
$ns duplex-link $n3 $n2 lMb 300ms DropTail
$ns duplex-link $n5 $n2 lO0Mb 300ms DropTail
$ns duplex link $n2 $n4 lMb 3O0ms DropTail
$ns duplex-link $n2 $n6 lMb 300ms DropTail
$ns queue-limit $nO $n2 5
$ns queue-limit $n2 $n4 3
15. 11
$ns queue-limit $n2 $n6 2
$ns queue-limit $n5 $n2 S
#The below code is used to connect between the ping agents to the node n0, #n4 , n5 and n6.
set ping0 [new Agent/Ping]
$ns attach-agent Sn0 $ping0
set ping4 [new AgentHing}
$ns attach-agent Sn4 $ping4
set ping 5 [new Agent/Ping]
$ns attach-agent Sn5 $ping 5
set ping6 [new Agent/Ping]
$ns attach-agent Sn6 $ping6
$ping0 set packctSizc_ 50000
$ping0 set interval_ 0.0001
$ping5 set packetSize_ 60000
$pingS set interval_ 0.00001
$ping0 set class_ 1
$ping5 set class_ 2
$ns connect $ping0 $ping4
$ns connect $ping 5 $ping6
#Define a 'recv' function for the class 'Agent/Ping'
#The below function is executed when the ping agent receives a reply from the destination
Agent/Ping instproc recv {from rtt} (
$self instvar node_
puts " The node [Snode id] received an reply from $from with round trip time of $rtt”
proc finish (} ( global ns nf tf exec nam lab2.nam &
16. 12
$ns flush-trace close $t1 close $nf exit 0
#Schedule events
$ns at 0.1 ”$ping0 send"
$ns at 0.2 ”$ping0 send"
$ns at 0.3 ”$ping0 send"
$ns at 0.4 ”$ping0 send"
$ns at 0.5 "$pingo send"
$ns at 0.6 "$ping0 send"
$ns at 0.7 "$ping0 send"
$ns at 0.8 "$ping0 send"
$ns at 0.9 "$ping0 send"
$ns at 1.0 "$ping0 send"
$ns at 1.1 "$ping0 send"
$ns at 1.2 "$ping0 send"
$ns at 1.3 "$ping0 send"
$ns at 1.4 "$ping0 send"
$ns at 1.5 "$ping0 send"
$ns at 1.6 "$ping0 send"
$ns at t.7 "$ping0 send"
$ns at 1.8 "$ping0 send"
$ns at 0.1 "$ping 5 send"
$ns at 0.2 "$ping 5 send"
$ns at 0.3 "$ping 5 send"
$ns at 0.4 "$ping 5 send"
$ns at 0.5 "$ping 5 send"
$ns at 0.6 "$ping 5 send"
$ns at 0.7 "$ping 5 send"
17. 13
$ns at 0.8 "$ping S send"
$ns at 0.9 "$ping S send"
$ns at 1.0 "$ping 5 scnd"
$ns at 1.1 "$ping S send"
$ns at 1.2 "$ping 5 send"
$ns at 1.3 "$ping 5 send"
$ns at 1.4 "$ping 5 send"
$ns at 1.5 "$ping 5 send"
$ns at 1.6 "$ping 5 send"
$ns at 1.7 "$ping 5 send"
$ns at 1.8 "$ping S send"
$ns at 5.0 "finish"
$ns run
Awk file:
Note: Create the file using gcdir command and save it with rhe extension o(. Awk in order to
find the number o(packets drop in thc trace file. We can name it as out1.awk.
BEGIN{
count=0;
}{
if($l=="d")
count++
}
END {
printf(”The Total no of Packets Drop is :%dnn", count)
}
19. 15
EXPERIMENT NO 4
Simulate an Ethernet LAN using N-nodes (6-10), change error rate and data rate and compare
the throughput.
TCL File:
# Declare a new Simulator set ns [new Simulator]
# Open nam and trace file in write mode set tf [open out.tr w]
set nf [open out.nam w]
$ns trace-all $tf
$ns namtrace-all $nf
# Take value of error rate and data rate from std input puts "Enter error rate (<1) : "
gets stdin erate
puts "Enter data rate (in Mbps) : " gets stdin drate
# Create nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4
[$ns node] set n5 [$ns node] set n6 [$ns node]
# set label and color (OPTIONAL)
$n1 label "udp/source"
$n5 label "udp/null"
$n0 color "blue"
$n1 color "blue"
$n2 color "blue"
$n3 color "blue"
$n4 color "red"
$n5 color "red"
$n6 color "red"
# Create two lans
$ns make-lan "$n0 $n1 $n2 $n3" 10Mb 10ms LL Queue/DropTail Mac/802_3
20. 16
$ns make-lan "$n4 $n5 $n6" 10Mb 10ms LL Queue/DropTail Mac/802_3
# Setup Links
$ns duplex-link $n3 $n6 10Mb 10ms DropTail
$ns duplex-link-op $n3 $n6 orient right-down
# Declare the transport layer protocols set udp1 [new Agent/UDP]
set null5 [new Agent/Null]
$ns attach-agent $n1 $udp1
$ns attach-agent $n5 $null5
# Declare the application layer protocol set cbr1 [new Application/Traffic/CBR]
$cbr1 attach-agent $udp1
# Connect the source and destination
$ns connect $udp1 $null5
# Create error model
set err [new ErrorModel]
$ns lossmodel $err $n3 $n6
$err set rate_ $erate
# Define the data rate
$cbr1 set packetSize_ $drate.Mb
$cbr1 set interval_ 0.001 # Define procedure
proc finish { } {
global ns nf tf
$ns flush-trace exec nam out.nam & close $nf
close $tf
set count 0
set tr [open out.tr r]
while {[gets $tr line] != -1} {
# 8 denotes LAN at destination side and 5 denotes destination node
21. 17
if {[string match "* 8 5 *" $line]} {
set count [expr $count+1]}
}
set thr [expr $count/7] puts "Throughput : $thr" exit 0
}
$ns at 0.1 "$cbr1 start"
$ns at 5.1 "finish"
$ns run
OUTPUT:
23. 19
EXPERIMENT NO 5
Simulate an Ethernet LAN using N nodes and set multiple traffic nodes and plot congestion
window for different source/destination.
TCL File:
set ns [new Simulator]
set tf [open lab3.tr w]
$ns trace-all $tf
set nf [open lab3.nam w]
$ns namtrace-all $nf
set n0 [$ns node]
$n0 color "magenta"
$n0 label "src1"
set n1 [$ns node]
$n1 color "red"
set n2 [$ns node]
$n2 color "magenta"
$n2 label "src2"
set n3 [$ns node]
$n3 color "blue"
$n3 label "dest2"
set n4 [$ns node]
$n4 shape square
set n5 [$ns node]
$n5 color "blue"
$n5 label "dest1"
$ns make-lan "$n0 $n1 $n2 $n3 $n4" 50Mb 100ms LL Queue/DropTail Mac/802_3
24. 20
$ns duplex-link $n4 $n5 1Mb 1ms DropTail
$ns duplex-link-op $n4 $n5 orient right
set tcp0 [new Agent/TCP]
$ns attach-agent $n0 $tcp0
set ftp0 [new Application/FTP]
$ftp0 attach-agent $tcp0
$ftp0 set packetSize_ 500
$ftp0 set interval_ 0.0001
set sink0 [new Agent/TCPSink]
$ns attach-agent $n5 $sink0
$ns connect $tcp0 $sink0
set tcp1 [new Agent/TCP]
$ns attach-agent $n2 $tcp1
set ftp1 [new Application/FTP]
$ftp1 attach-agent $tcp1
$ftp1 set packetSize_ 600
$ftp1 set interval_ 0.001
set sink1 [new Agent/TCPSink]
$ns attach-agent $n3 $sink1
# Direct traffic from "tcp1" to "sink1"
$ns connect $tcp1 $sink1
set file1 [open file1.tr w]
$tcp0 attach $file1
set file2 [open file2.tr w]
$tcp1 attach $file2
$tcp0 trace cwnd_
$tcp1 trace cwnd_
25. 21
# Define a 'finish' procedure
proc finish { } {
global ns nf tf
$ns flush-trace
close $tf
close $nf
exec nam lab3.nam &
exit 0 }
# Schedule start/stop times
$ns at 0.1 "$ftp0 start"
$ns at 5 "$ftp0 stop"
$ns at 7 "$ftp0 start"
$ns at 0.2 "$ftp1 start"
$ns at 8 "$ftp1 stop"
$ns at 14 "$ftp0 stop"
$ns at 10 "$ftp1 start"
$ns at 15 "$ftp1 stop"
# Set simulation end time
$ns at 16 "finish"
$ns run
AWK File:
BEGIN {}
{
if($6=="cwnd_")
printf("%ft%ftn",$1,$7);
28. 24
EXPERIMENT NO 6
Write a program for distance vector algorithm to find suitable path for transmission.
C File:
#include<stdio.h>
#include<stdlib.h>
void rout_table();
int d[10][10],via[10][10], i, j, k, l, m, n, g[10][10], temp[10][10], ch, cost;
int main()
{
printf("enter the value of no. of nodesn");
scanf("%d", &n);
rout_table();
for(i=0; i<n; i++)
for(j=0; j<n; j++)
temp[i][j] = g[i][j];
for(i=0; i<n; i++)
for(j=0; j<n; j++)
via[i][j]= i;
while(1)
{
for(i=0;i<n;i++)
for(j=0;j<n;j++)
if(d[i][j])
for(k=0;k<n;k++)
if(g[i][j]+g[j][k]<g[i][k])
{
30. 26
OUTPUT:
enter the value of no. of nodes: 4
Enter the routing table:
|a b c d
------------------------------
a|0 5 1 4
b|5 0 6 2
c|1 6 0 3
d|4 2 3 0
table for router a: a:: 0 via a, b:: 5 via a, c:: 1 via a, d:: 4 via a
table for router b: a:: 5 via b, b:: 0 via b, c:: 5 via d, d:: 2 via b
table for router c: a:: 1 via c, b:: 5 via d, c:: 0 via c, d:: 3 via c
table for router d: a:: 4 via d, b:: 2 via d, c:: 3 via d, d:: 0 via d
31. 27
EXPERIMENT NO 7
a) Write a program for Hamming code.
C File:
#include<stdio.h>
void main() {
int data[10];
int dataatrec[10],c,c1,c2,c3,i;
printf("Enter 4 bits of data one by onen");
scanf("%d",&data[0]);
scanf("%d",&data[1]);
scanf("%d",&data[2]);
scanf("%d",&data[4]);
data[6]=data[0]^data[2]^data[4];
data[5]=data[0]^data[1]^data[4];
data[3]=data[0]^data[1]^data[2];
printf("nEncoded data isn");
for(i=0;i<7;i++)
printf("%d",data[i]);
printf("nnEnter received data bits one by onen");
for(i=0;i< 7;i++)
scanf("%d",&dataatrec[i]);
c1=dataatrec[6]^dataatrec[4]^dataatrec[2]^dataatrec[0];
c2=dataatrec[5]^dataatrec[4]^dataatrec[1]^dataatrec[0];
c3=dataatrec[3]^dataatrec[2]^dataatrec[1]^dataatrec[0];
c=c3*4+c2*2+c1;
if(c==0) {
32. 28
printf("nNo error while transmission of datan");
} else {
printf("nError on position %d",&c);
printf("nData sent : ");
for(i=0;i<7;i++)
printf("%d",data[i]);
printf("nData received : ");
for(i=0;i<7;i++)
printf("%d",dataatrec[i]);
printf("nCorrect message isn");
if(dataatrec[7-c]==0)
dataatrec[7-c]=1;
else
dataatrec[7-c]=0;
for (i=0;i<7;i++){
printf("%d",dataatrec[i]);
}}}
OUTPUT:
Enter 4 bits of data one by one: 1010.
Encoded Data is 1010010
Enter received data bits one by one: 1000010.
Error on position 5
Data sent: 1010010.
Data received: 1000010.
Correct message is 1010010.
33. 29
b) Program for cyclic Redundancy Check(CRC) in C.
C File:
#include<stdio.h>
#include<string.h>
#define N strlen(gen_poly)
char data[28];
char check_value[28];
char gen_poly[10];
int data_length,i,j;
void XOR(){
// if both bits are the same, the output is 0
// if the bits are different the output is 1
for(j = 1;j < N; j++)
check_value[j] = (( check_value[j] == gen_poly[j])?'0':'1');
}
void receiver(){
printf("Enter the received data: ");
scanf("%s", data);
printf("n-----------------------------n");
printf("Data received: %s", data);
crc();
for(i=0;(i<N-1) && (check_value[i]!='1');i++);
if(i<N-1)
printf("nError detectednn");
else
printf("nNo error detectednn");
35. 31
for(i=data_length;i<data_length+N-1;i++)
data[i]=check_value[i-data_length];
printf("n----------------------------------------");
printf("n Final data to be sent : %s",data);
printf("n----------------------------------------n");
receiver();
return 0;
}
OUTPUT:
Enter data to be transmitted: 1001101
Enter the Generating polynomial: 1011
----------------------------------------
Data padded with n-1 zeros : 1001101000
----------------------------------------
CRC or Check value is : 101
----------------------------------------
Final data to be sent : 1001101101
----------------------------------------
Enter the received data: 1001101101
-----------------------------
Data received: 1001101101
No error detected
36. 32
EXPERIMENT NO 8
Using TCP/IP sockets, write a client server program to make client sending the file name and
the server to send back the contents of the requested file if present.
Client Program:
/* Client Program */
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h
#include <arpa/inet.h>
#include <unistd.h>
int main()
{
int sock, n;
char buffer[1024] fname[50];
Sock= socket(AF_INET, SOCK_STREAM, 0)
struct sockaddr_in addr = { AF_INET, htons(1234), inet_addr("127.0.0.1") };
/* keep trying to esatablish connection with server */
while(connect(sock, (struct sockaddr *) &addr, sizeof(addr)));
printf("nClient is connected to Server");
/* send the filename to the server */
printf("nEnter file name: ");
scanf("%s", fname);
send(sock, fname, sizeof(fname), 0);
printf("nRecieved file datan");
printf("------------------------”);
/* keep printing any data received from the server */
37. 33
while ((n = recv(sock, buffer, sizeof(buffer), 0)) > 0)
{
buffer[n] = '0’;
}
printf("----------------------------------------n");
return 0;
}
Server Program:
/* Server Program"/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <unistd.h>
int main()
{
int sersock, sock, fd, n, reuse = 1;
char buffer[1024], fname[50];
/* sockfd = socket(domain, type, protocol) */
sersock = socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in addr = (AF_INET, htons(1234), inet_addr("127.0.0.1"));
// Forcefully connecting to same port everytime
setsockopt(sersock, SOL SOCKET, SO_REUSEADDR, (char *)&reuse,
/* attaching socket to port */
bind(sersock, (struct sockaddr") &addr, sizeof(addr));
38. 34
printf("nServer is Online");
listen(sersock, 5); // listen(int sockfd, int backlog)
sock = accept(sersock, NULL, NULL);
/* receive the filename "/
recv(sock, fname, 50, 0);
printf("nRequesting for file: %sn", fname);
/* open the file in read-only mode */
fd = open(fname, O_RDONLY);
{
if (fd < 0)
send(sock, "InFile not foundn", 15, 0); // strlen(nFile not found)=15
}
else
while ((n= read(fd, buffer, sizeof(buffer))) > 0)
{
send(sock, buffer, n, 0);
}
} printf("nFile content sentn");
close(fd);
return 0;
}
40. 36
EXPERIMENT NO 9
Write a program for congestion control using leaky bucket algorithm.
C File:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define NOF PACKETS 10
int my_rand(int a) {
int rn (random() % 10) % a; return rn==0?1:m;
}
int main() {
int packet_sz[NOF_PACKETS], i, clk, b_size, o_rate, p_sz_rm = 0, p_sz, p_time,
op:
for (i=0; i<NOF_PACKETS; ++i)
packet_sz[i] = my_rand(6)*10;
for (i = 0; i < NOF_PACKETS; ++i)
printf("npacket[%d]:%d bytest", i, packet_sz[i]);
printf("nEnter the Output rate:");
scanf("%d", &o_rate);
printf("Enter the Bucket Size:");
scanf("%d", &b_size);
for (i = 0; i < NOF_PACKETS; ++i) {
if ((packet_sz[i] + p_sz_rm) > b_size)
if (packet_sz[i] > b_size)/compare the packet siz with bucket size/
printf("nnIncoming packet size (%dbytes) is Greater than bucket capacity (%dbytes)-
PACKET REJECTED", packet_sz[i], b_size);
41. 37
else
printf("nnBucket capacity exceeded-PACKETS REJECTED!!");
else {
p_sz_rm += packet_sz[i]:
printf("nnIncoming Packet size: %d", packet_sz[i]);
printf("nBytes remaining to Transmit: %d", p_sz_rm);
p_time = my_rand(4)*10;
printf("nTime left for transmission: %d units", p_time); for (clk = 10; clk <=p_time; clk +=
10) {
sleep(1):
if (p_sz_rm) {
if (p_sz_rm <= o_rate)
//"packet size remaining comparing with output
rate"/
}
}
opp_sz_rm, p_sz_rm = 0;
else
op=o_rate, p_sz_rm -= o_rate;
printf("nPacket of size %d Transmitted", op);
printf("--Bytes Remaining to Transmit: %d", p_sz_rm);
}
else {
printf("nTime left for transmission: %d units", p_time-cik);
printf("nNo packets to transmit!!");
}
}}}}