- Assignments
CPS 114 Introduction to Computer Networks: Labs
Lab 2: simple router, introduction.
In this lab assignment, you will write a simple router with a static routing table. We will pass to your code raw Ethernet frames and give you a function that can send a raw Ethernet frame. It is up to you to implement the forwarding logic between getting a frame and sending it out over another interface.
Figure 1: sample topology
Your router will route real packets from any machine to application servers sitting behind your router. The servers are running HTTP applications. When you have finished the forwarding path of your router, you should be able to access these servers using regular client software. In addition, you should be able to ping and traceroute to and through your functioning router. If the router is functioning correctly, all of the following operations should work:
This lab runs on top of Stanford's Virtual Network System . VNS allows you to build virtual network topologies consisting of nodes that operate on actual Ethernet frames. You don't have to know how VNS works to complete this assignment.
Getting started
First download and untar the assignment code .
You will also need to download your testing topology and auth_key file from class Forum ( DO use your own topology and auth_key file). Please
Here is one sample rtable file for topology in Figure 1. The base rtable file only has a default route to the firewall.
You can then build and run the assignment code (TOPOLOGY_ID and USER_NAME are in the topology file): xwy@linux21$ make xwy@linux21$ ./sr -s vns-2.stanford.edu -t <TOPOLOGY_ID> -u <USER_NAME>
From another terminal or another machine, try pinging one of the router's interfaces. Currently, all the assignment code does is print that it gets a packet to the command line.
Understanding the code
Data structure.
sr_router.[h|c] : The full context of the router is housed in the struct sr_instance (sr_router.h). sr_instance contains information about the topology the router is routing for as well as the routing table and the list of interfaces.
sr_if.[h|c] : After connecting, the server will send the client the hardware information for that host. The assignment code uses this to create a linked list of interfaces in the router instance at member if_list. Utility methods for handling the interface list can be found at sr_if.[h|c].
sr_rt.[h|c] : The routing table in the stub code is read on from a file (default filename "rtable", can be set with command line option -r ) and stored in a linked list of routing entries in the current routing instance.
sr_arpcache.[h|c] : You will need to add ARP requests and packets waiting on responses to those ARP requests to the ARP request queue. When an ARP response arrives, you will have to remove the ARP request from the queue and place it onto the ARP cache, forwarding any packets that were waiting on that ARP request. Pseudocode for these operations is provided in sr_arpcache.h. The base code already creates a thread that times out ARP cache entries 15 seconds after they are added for you. You must fill out the sr_arpcache_sweepreqs function in sr_arpcache.c that gets called every second to iterate through the ARP request queue and re-send ARP requests if necessary. Psuedocode for this is provided in sr_arpcache.h.
Important Functions
void sr_handlepacket(struct sr_instance* sr, uint8_t * packet, unsigned int len, char* interface)
This function receives a raw Ethernet frame and sends raw Ethernet frames when sending a reply to the sending host or forwarding the frame to the next hop. This method, located in sr_router.c, is called by the router each time a packet is received. The "packet" argument points to the packet buffer which contains the full packet including the ethernet header. The name of the receiving interface is passed into the method as well.
int sr_send_packet(struct sr_instance* sr, uint8_t* buf, unsigned int len, const char* iface)
This method, located in sr_vns_comm.c, will send an arbitrary packet of length, len, to the network out of the interface specified by iface.
void sr_arpcache_sweepreqs(struct sr_instance *sr)
The assignment requires you to send an ARP request about once a second until a reply comes back or we have sent five requests. This function is defined in sr_arpcache.c and called every second, and you should add code that iterates through the ARP request queue and re-sends any outstanding ARP requests that haven't been sent in the past second. If an ARP request has been sent 5 times with no response, a destination host unreachable should go back to all the sender of packets that were waiting on a reply to this ARP request.
Requirements
- The router enforces guarantees on timeouts--that is, if an ARP request is not responded to within a fixed period of time, the ICMP host unreachable message is generated even if no more packets arrive at the router.
Functions and data structures you need to implement
There is no specific requirement which function you can/cannot modify. To make the simple router work, you need to handle 4 kinds of packets correctly: Ethernet , IP , ICMP and ARP . For the actual specifications, there are also the RFC's for ARP (RFC826) , IP (RFC791) , and ICMP (RFC792) .
In our reference implementation, we developed sr_ip.[h|c], sr_icmp.[h|c] (you need to add these source files to the Makefile). We also modified sr_router.[h|c], protocol.h and sr_arpcache.[h|c]. Total work load is around 550 lines of c code.
Understanding Protocols
You are given a raw Ethernet frame and have to send raw Ethernet frames. You should understand source and destination MAC addresses and the idea that we forward a packet one hop by changing the destination MAC address of the forwarded packet to the MAC address of the next hop's incoming interface.
Internet Protocol
You should understand how to find the longest prefix match of a destination IP address in the routing table. If you determine that a datagram should be forwarded, you should correctly decrement the TTL field of the header and recompute the checksum over the changed header before forwarding it to the next hop.
Internet Control Message Protocol
ICMP is used to send control information back to the sending host. You will need to properly generate the following ICMP messages (including the ICMP header checksum) in response to the sending host under the following conditions:
Address Resolution Protocol
ARP is needed to determine the next-hop MAC address that corresponds to the next-hop IP address stored in the routing table. Without the ability to generate an ARP request and process ARP replies, your router would not be able to fill out the destination MAC address field of the raw Ethernet frame you are sending over the outgoing interface. Analogously, without the ability to process ARP requests and generate ARP replies, no other router could send your router Ethernet frames. Therefore, your router must generate and process ARP requests and replies. To lessen the number of ARP requests sent out, you are required to cache ARP replies. Cache entries should time out after 15 seconds to minimize staleness. The provided ARP cache class already times the entries out for you.
When forwarding a packet to a next-hop IP address, the router should first check the ARP cache for the corresponding MAC address before sending an ARP request. In the case of a cache miss, an ARP request should be sent to a target IP address about once every second until a reply comes in. If the ARP request is sent five times with no reply, an ICMP destination host unreachable is sent back to the source IP as stated above. The provided ARP request queue will help you manage the request queue.
In the case of an ARP request, you should only send an ARP reply if the target IP address is one of your router's IP addresses. In the case of an ARP reply, you should only cache the entry if the target IP address is one of your router's IP addresses. Note that ARP requests are sent to the broadcast MAC address (ff-ff-ff-ff-ff-ff). ARP replies are sent directly to the requester's MAC address.
Testing and Debugging
The above test case does not include Destination Host Unreachable , Destination Unreachable and Protocol Unreachable tests. To do these three tests, you may use test4 at cps114.cod.cs.duke.edu . Before you start these tests, you need to reconfigure your router/rtable. Let's take Figure 1 as an example.
Suppose your topology is shown in Figure 1, the allocated IP block is 171.67.243.176/29 (8 IP addresses). Packets heading to this IP block will be routed to your router. This IP block consists of 4 /31 blocks. They are 171.67.243.176/31 (connected to eth0), 171.67.243.178/31, 171.67.243.180/31 (connected to eth1) and 171.67.243.182/31 (connected to eth2). 171.67.243.178/31 is not connected to any interface.
171.67.243.179 171.67.243.178 255.255.255.254 eth1
to your routing table, once your router receives a packet heading to 171.67.243.179, it will send ARP request for 171.67.243.178 through eth1. There will be no reply since 171.67.243.178 does not exist at all. After 5 ARP requests without any reply, a Destination Host Unreachable ICMP packet will be generated by your router. At this point, your route/rtable should look like
0.0.0.0 172.24.74.17 0.0.0.0 eth0 171.67.243.181 171.67.243.181 255.255.255.255 eth1 171.67.243.183 171.67.243.183 255.255.255.255 eth2 171.67.243.179 171.67.243.178 255.255.255.254 eth1
For the Destination Unreachable test, We do following changes to the above routing table. First, we remove the default route. Second we remove the routing table entry for 171.67.243.179. Third, we add a entry for any PC in Figure 1. For example, if any PC is cps114.cod.cs.duke.edu , we add a entry for its IP address (152.3.145.121) to the routing table. After these three changes, your routing table should look like.
152.3.145.121 172.24.74.17 255.255.255.0 eth0 171.67.243.181 171.67.243.181 255.255.255.255 eth1 171.67.243.183 171.67.243.183 255.255.255.255 eth2
Right now, your router/rtable is ready for the Destination Unreachable test. You may simply send a UDP packet heading for 171.67.243.179 from cps114.cod.cs.duke.edu (152.3.145.121). Your router should be able to generate a Destination Unreachable ICMP packet and send it to cps114.cod.cs.duke.edu . At this point, you may think about why do we do the above three modifications. Try not to delete the default route, what do you find?
For the Protocol Unreachable test, you may simply send one UDP packet to any of your router interfaces. Your router should be able to generate a protocol unreachable packt and send it to you.
For the Destination Host Unreachable test, Destination Unreachable test and Protocol Unreachable tests, you can log on to cps114.cod.cs.duke.edu with your cs appartment account and use test4 to send UDP packets and receive ICMP feedbacks. You need to create and modify config.xml . <dst> stands for your UDP packet's destination address, <intf> is the interface IP addresses of your router. Then run the test case as following. xwy@cps114:~$ test4 config.xml This test4 sends 3 UDP packets to your specified IP address, grabs received ICMP packets and check these packets' source addresses, ICMP type and code fields.
- Run the command make submit , this should create a file called router.tar.gz.
- Upload router.tar.gz to the lab2 assignment on Blackboard .
Collaboration policy
You can discuss with anyone, but you must not look at each other's code, or copy code from others.
Acknowledgement
Administrivia
Sunday | 4:00-6:00 pm | Urbauer 215 | Taylor |
Sunday | 7:00-9:00 pm | Urbauer 215 | Nathan |
Monday | 4:00-5:00 pm | Urbauer 215 | Nathan |
Monday | 5:00-7:00 pm | Urbauer 215 | Vigo |
Tuesday | 9:00-10:00 am | Urbauer 215 | Chao |
Lectures and Assignments
8/27 | Chapter 1 | - | - | |
8/29 | Chapter 1, 2.1, 2.2, RFC 2616 | , | ||
9/3 | 3.1-3.3 | , | , | |
9/5 | 2.3, 2.4 RFCs 959, 2821 | , | ||
9/10 | 4.1, 4.3, 4.4.1-4.4.3, RFC 791 | , | ||
9/12 | 5.1-5.4.2,5.7, 407-409, RFCs 826, 2236, 3376 | , | ||
9/17 | 4.4.4, | , | , | |
9/19 | pages 345-355, RFCs 792, 1631, 2131 | , | ||
9/24 | - | - | - | |
9/26 | , | - | - | - |
Second Half
10/1 | 2.6 | , | ||
10/3 | 3.4 | , | ||
10/8 | 2.5, RFCs 1034, 1035 | , | , | |
10/10 | Congestion Control | 3.5 | , | |
10/15 | 3.6, 3.7 | , | ||
10/17 | 4.5 | , | ||
10/22 | 4.6 | , | , | |
10/24 | 5.4-5.6, | , | ||
10/29 | - | - | - | |
10/31 | , | - | - | - |
11/5 | 8.1-8.4 | , | ||
11/7 | 8.5-8.8 | , | - | |
11/12 | RFC 2236, pages 1-4; RFC 4541, pages 1-7; RFC 4601, pages 1-12 | , | , | |
11/14 | 7.1-7.2 | , | ||
11/19 | No class | |||
11/21 | 7.3-7.5, 4.2 | , | ||
11/26 | 6.1-6.3 | , | , | |
12/3 | 6.4-6.7 | , | ||
12/5 | 4.4.4, RFC 2460 | , | - | |
12/10 | - | - | - |
Computer Networks Lab Manual
Welcome to the official Lab Manual for the 2023-2024 edition of the Computer Networks course at Vrije Universiteit Amsterdam.
This manual will be your guide through the Lab part of the course. It describes the available Lab assignments and serves as a handbook for the basics of networked programming.
Feel free to read the document from start to finish, or hop around between pages that pique your interest. Either way, the table of contents remains accessible on the left-hand side of the page.
Last updated 4 months ago
This course is an introduction to the implementation and design of computer networks. The goal of this course is learn the standard protocols of modern networks and to learn how to interact with networks through standard programming practices. We will cover the entire network stack: from physical and link layer properties; (inter-) network and transport protocols; application and socket programming; and network security. The programming assignments in this course will be a mix of C and Python programming.
Course Goals/Promisses
Homework policy, participation policy, academic integrity.
Academic honesty is required in all work you submit to be graded. With the exception of your lab partner on approved lab assignments, you may not submit work done with (or by) someone else, or examine or use work done by others to complete your own work. Your code should never be shared with anyone; you may not examine or use code belonging to someone else, nor may you let anyone else look at or make a copy of your code. This includes sharing solutions after the due date of the assignment.
Discussing ideas and approaches to problems with others on a general level is fine (in fact, we encourage you to discuss general strategies with each other), but you should never read anyone else's code or let anyone else read your code. You may discuss assignment specifications and requirements with others in the class to be sure you understand the problem. In addition, you are allowed to work with others to help learn the course material. However, with the exception of your lab partner, you may not work with others on your assignments in any capacity.
``It is the opinion of the faculty that for an intentional first offense, failure in the course is normally appropriate. Suspension for a semester or deprivation of the degree in that year may also be appropriate when warranted by the seriousness of the offense.'' - Swarthmore College Bulletin (2008-2009, Section 7.1.2)
Class Schedule
Date | Topics | Readings | Homework | Labs | |
---|---|---|---|---|---|
Week 1 (Sept. 3) | Aministrivia and Intro to Modern Networking | Chapter 1 in K&R | Homework Posted to Piazza (#homework1) | Build a Network [ ] | |
Week 2 (Sept 10) | Physical Layer | Chapter 5.1 in K&R | |||
Week 3 (Sept 17) | Error Correction/Detection Multiple-Access Links | Chapter 5.2 in K&R | Homework Posted to Piazza (#homework2) | C Programming and Parsing Network Packets [ ] | |
Week 4 (Sept 24) | Multi-Access Links (cont) | Chapter 5.3 in K&R | Homework posted to (#homework3) | Implementing Ping and Traceroute [ ] [ ] | |
Week 5 (Oct 1) | LANs and Link-Layer Switching ARP and Ethernet Internet Basics and History | Chapter 5.4 in K&R Chapter 4.1 in K&R | Homework posted to (#homework4) | ||
Week 6 (Oct 8) | Intro to (inter-)Network Layer Datagram vs. Virtual Circuit Networks Internet Regulation/Censorship and Network Neutrality | Chapter 4.2 in K&R by Lawrence Lessig by Tim Wu | (#netneutrality) | ||
Fall Break (Oct 15) | |||||
Week 7 (Oct 22) | Routing Tables Routing algorithms | Chapter 4.2 in K&R Chapter 4.5 in K&R | Homework posted to (#homework5) | | |
Week 8 (Oct 29) | Distance Vector Intra-AS Routing (RIP,OSPF) | Chapter 4.5 in K&R | Homework posted to | Socket Programming: [ ] [ ] Additional Socket Programming Docs: [ ] [ ] | |
Week 9 (Nov 9) | Inter-AS Routing (BGP) Transport Layer Port Multiplexing Reliable Data Transfer | Chapter 3.3 and 3.4 in K&R | work on lab and study | BitTorrent Lab [ ] [ ] [ ] | |
Week 10 (Nov 12) | RDT: Go-Back-N, Selective Repeat TCP: Connection Cycle | Chapter 3.5 in K&R | work on lab and study for midterm | ||
Week 11 (Nov 19) | TCP: Reliable Data Transport TCP: Flow Control Basics of Congestion Control | Have a happy Thanksgiving! | |||
Midterm #2 (OUT: Nov 19, DUE: Nov 21) | |||||
Thanksgiving Break (Nov 21) | |||||
Week 12 (Nov 26) | TCP: Congestion Control DNS | Chapter 2.1 and 2.2 in K&R | |||
Week 13 (Dec 3) | Cryptography Public Key Crypto and PKI Anonymous Networks | ||||
Week 14 (Dec 10) | Firewalls and Intrusion Detection | No lab this week | |||
CS 144: Introduction to Computer Networking , Winter 2024
Course info, course basics.
Lectures | Mondays & Wednesday, 1:30 a.m.–2:50 p.m. in |
Lab sessions | Thursdays, 7:30 p.m.–10 p.m. in |
Exams | Thursday, February 15, 7:30 p.m. (location TBD) Wednesday March 20, 3:30 p.m.–5:30 p.m. in Hewlett 200 |
Practice exams | : Thursday Jun 8, 7:30 p.m., STLC 114 --> |
Contact | To contact the course staff, please use Ed, the lab sessions, or office hours. You can also email the instructor—I'm here to help but also often behind on email! |
Disabilities | Please submit OAE accommodation letters by making a private post on Ed in the "OAE" category. |
Syllabus/logistics | |
Ed | . Please make public posts when possible (anonymously if you prefer) so answers can benefit anybody. Please don't post source code to lab solutions. |
Archived lecture videos | |
Optional course texts | |
Honor Code Discussion |
Keith Winstein
Course Assistants
Yasmine Mitchell (head CA) yasminem
Kamran Ahmed kmahmed
Isaac Cheruiyot icykip
Michelina Hanlon michcat
Glen Husman ghusman
Jeremy Kim jk23541
Parthiv Krishna parthiv
Trisha Kulkarni trishak8
Griffin Miller gmill
Rashon Poole rashonp
Kelechi Uhegbu kuhegbu
Ruiqi Wang rqwang
Lab Assignment
Lecture Notes
When and Where
Policy for late assignments.
Policy on Joint Work and the Dartmouth Honor Code
You should not under any circumstance look at or use code from previous terms' assignments and projects. We have smart shell scripts that can find similar code. The message is - please don't make life unpleasant for all of us by breaking these rules. The penalties for cheating at Dartmouth are severe, starting with suspension and including expulsion. If you are unsure about anything, please ask. |
VLSM Subnetting Explained with Examples
VLSM subnetting allows us to create subnets based on our requirements and network size. It allows us to create subnets with different subnet masks.
There are two types of subnetting: FLSM and VLSM. FLSM is easy but produces subnets having the same number of IP addresses. The same-sized subnets do not scale all networks. Let us take an example. We have an IP subnet having 12 IP addresses. We have two networks. The first network has seven hosts. The second network has three hosts.
If we use FLSM, we can create the following subnets.
Subnets | Hosts in each subnet |
2 | 6 |
3 | 4 |
4 | 3 |
We need seven hosts in the first subnet and three in the second subnet. None of the above-listed combinations fulfill our requirements. If we use VLSM, we can create two subnets. The first will provide eight IP addresses. The second will provide four IP addresses. This example shows how VLSM allows us to utilize IP addresses based on our requirements.
VLSM Subnetting example
The following image shows a network.
The above network has the following requirements.
- The development department needs 74 IP addresses.
- The production department needs 52 IP addresses.
- The administration department needs 28 IP addresses.
- Three WAN links connect these departments.
- Each WAN link needs two IP addresses.
- The given default IP subnet is 192.168.1.0/24.
This tutorial is the ninth chapter of the tutorial series. Other chapters of this series are the following.
Chapter 01 Introduction to Subnetting Chapter 02 Network Address Basic Concepts Explained with Examples Chapter 03 The Subnet Mask and Slash Notation Chapter 04 Convert Decimal IP address in Binary and Binary in Decimal Chapter 05 Basic Subnetting in Computer Networks Explained Chapter 06 Subnetting Tutorial - Subnetting Explained with Examples Chapter 07 Subnetting Tricks Subnetting Made Easy with Examples Chapter 08 FLSM Subnetting and VLSM Subnetting Chapter 10 VLSM Subnetting Examples and Calculation Explained Chapter 11 Route Summarization Advantages and Disadvantages Chapter 12 Supernetting Tutorial: - Supernetting Explained with Examples
VLSM Subnetting step-by-step
In the first step, we calculate and arrange our IP requirements in descending order.
Each network needs two additional IP addresses, one for the network address and another for the broadcast address. All IP subnets reserve two IP addresses for these requirements. They use the first IP address for the network address and the last IP address for the broadcast address.
Since each network requires two additional IP addresses, we add two to the total host requirement of each network. After finalizing the host requirement, we find the block size that fulfills the host requirement.
A block size is the block of IP address we get when we convert a host bit into a network bit. The following table lists the block sizes we can have.
Host bit(s) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Block size | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
Host bits | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Block size | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65536 |
Host bits | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Block size | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 |
The block size must be greater than or equal to the actual host requirement of the network.
The following table lists the block sizes that meet our requirements.
Segment | Host requirement | Actual requirement | Block size |
Production | 52 | 54 | 64 |
Development | 74 | 76 | 128 |
Administration | 28 | 30 | 32 |
Wan link 1 | 2 | 4 | 4 |
Wan link 2 | 2 | 4 | 4 |
Wan link 3 | 2 | 4 | 4 |
In the next step, we arrange segments in descending order.
Segment | Block size | Descending order |
Development | 128 | 1 |
Production | 64 | 2 |
Administration | 32 | 3 |
Wan link 1 | 4 | 4 |
Wan link 2 | 4 | 5 |
Wan link 3 | 4 | 6 |
VLSM is an extended version of FLSM. It uses the same steps FLSM uses. In FLSM, we break the default subnet into the same-sized subnets. In VLSM, we further divide the created subnets into small-sized subnets based on our requirements in descending order.
In this example, first, we will perform FLSM from the development segment.
The development segment's block size is 128. The given IP subnet belongs to class C. In class C, the first 24 bits are reserved network bits. We cannot use the reserved network bits. We can use only host bits for subnetting. The default class C IP subnet has 6 (8 - 2 reserved host bits [ 30 and 31 ] ) host bits available for subnetting. Subnetting always goes from left to right without skipping a bit. Hence, the first host bit we can use in subnetting is the 25 th . If we convert this host bit (25 th ) into a network bit, we get two subnets having 128 IP addresses each.
Subnet | Subnet1 | Subnet2 |
Network ID | 192.168.1.0 | 192.168.1.128 |
First host address | 192.168.1.1 | 192.168.1.129 |
Last host address | 192.168.1.126 | 192.168.1.254 |
Broadcast ID | 192.168.1.127 | 192.168.1.255 |
It fulfills the development section's requirements. We can assign the first subnet to the development section and use the second subnet for the next VLSM subnetting.
Segment | Development |
Requirement | 74 |
CIDR | /25 |
Subnet mask | 255.255.255.128 |
Network ID | 192.168.1.0 |
First hosts | 192.168.1.1 |
Last hosts | 192.168.1.126 |
Broadcast ID | 192.168.1.127 |
Our next segment is the production department. Its block size is 64. If we convert the next host bit (26 th ), we get four subnets having 64 IP addresses each.
Subnet | Subnet 1 | Subnet 2 | Subnet 3 | Subnet 4 |
Network ID | 0 | 64 | 128 | 192 |
First address | 1 | 65 | 129 | 193 |
Last address | 62 | 126 | 190 | 254 |
Broadcast ID | 63 | 127 | 191 | 255 |
We cannot use the subnets 1 and 2. They contain the addresses we have already assigned to the development section. We can use the subnet 3 for the production section.
Segment | Production |
Requirement | 52 |
CIDR | /26 |
Subnet mask | 255.255.255.192 |
Network ID | 192.168.1.128 |
First hosts | 192.168.1.129 |
Last hosts | 192.168.1.190 |
Broadcast ID | 192.168.1.191 |
Our next segment is the administration department. Its block size is 32. If we convert the next host bit (27 th ), we get eight subnets having 32 IP addresses each.
Subnet | Sub 1 | Sub 2 | Sub 3 | Sub 4 | Sub 5 | Sub 6 | Sub 7 | Sub 8 |
Net ID | 0 | 32 | 64 | 96 | 128 | 160 | 192 | 224 |
First Host | 1 | 33 | 65 | 95 | 129 | 161 | 193 | 225 |
Last Host | 30 | 62 | 94 | 126 | 158 | 190 | 222 | 254 |
Broadcast ID | 31 | 63 | 95 | 127 | 159 | 191 | 223 | 255 |
We cannot use the subnets 1, 2, 3, 4, 5, and 6. They contain the addresses we have already assigned to the development and production sections. We can use subnet 7 for the administration section.
Segment | Administration |
Requirement | 28 |
CIDR | /27 |
Subnet mask | 255.255.255.224 |
Network ID | 192.168.1.192 |
First hosts | 192.168.1.193 |
Last hosts | 192.168.1.222 |
Broadcast ID | 192.168.1.223 |
Our remaining segments are WAN links. Their block size is 4. If we convert the next three host bits (28, 29, and 30 th ), we get sixty-four subnets having 4 IP addresses each.
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 256
We cannot use the subnets 1 to 56. They contain the addresses we have already assigned to the development, production, and administration sections. We can use subnets 57, 58, and 59 for the WAN links.
Subnet | Subnet 57 | Subnet 58 | Subnet 59 |
Network ID | 224 | 228 | 232 |
First host | 225 | 229 | 233 |
Last host | 226 | 230 | 234 |
Broadcast ID | 227 | 231 | 235 |
Assign subnet 57 to the WAN link 1.
Subnet | Subnet 57 |
Segments | Wan Link 1 |
Requirement | 2 |
CIDR | /30 |
Subnet mask | 255.255.255.252 |
Network ID | 192.168.1.224 |
First hosts | 192.168.1.225 |
Last hosts | 192.168.1.226 |
Broadcast ID | 192.168.1.227 |
Assign subnet 58 to the WAN link 2.
Subnet | Subnet 58 |
Segments | Wan Link 2 |
Requirement | 2 |
CIDR | /30 |
Subnet mask | 255.255.255.252 |
Network ID | 192.168.1.228 |
First hosts | 192.168.1.229 |
Last hosts | 192.168.1.230 |
Broadcast ID | 192.168.1.231 |
Assign subnet 59 to the WAN link 3.
Subnet | Subnet 59 |
Segments | Wan Link 3 |
Requirement | 2 |
CIDR | /30 |
Subnet mask | 255.255.255.252 |
Network ID | 192.168.1.232 |
First hosts | 192.168.1.233 |
Last hosts | 192.168.1.234 |
Broadcast ID | 192.168.1.235 |
The following image shows the final allocation of IP addresses.
We have assigned IP addresses to all segments. The subnets 60, 61, 62, 63, and 64 are still available for further use.
By ComputerNetworkingNotes Updated on 2024-06-09
ComputerNetworkingNotes CCNA Study Guide VLSM Subnetting Explained with Examples
- EtherChannel Load Distribution Explained
- Link Aggregation Control Protocol (LACP) Explained
- Port Aggregation Protocol (PAgP) Explained
- EtherChannel Manual Configuration
- EtherChannel Basic Concepts Explained
- STP, RSTP, PVST, RPVST, and MSTP
- Similarities and Differences between STP and RSTP
- RSTP / RPVST Explained with Examples
- PVST/RPVST and EtherChannel Explained
- STP/RSTP Timers Explained
We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us [email protected]
- Skip to content
- Skip to search
- Skip to footer
What is Computer Networking?
Computer networking refers to connected computing devices (such as laptops, desktops, servers, smartphones, and tablets) and an ever-expanding array of IoT devices (such as cameras, door locks, doorbells, refrigerators, audio/visual systems, thermostats, and various sensors) that communicate with one another.
- Basic networking (0:57)
- Learn about network basics
Contact Cisco
- Get a call from Sales
Call Sales:
- 1-800-553-6387
- US/CAN | 5am-5pm PT
- Product / Technical Support
- Training & Certification
How does a computer network work
Specialized devices such as switches, routers, and access points form the foundation of computer networks.
Switches connect and help to internally secure computers, printers, servers, and other devices to networks in homes or organizations. Access points are switches that connect devices to networks without the use of cables.
Routers connect networks to other networks and act as dispatchers. They analyze data to be sent across a network, choose the best routes for it, and send it on its way. Routers connect your home and business to the world and help protect information from outside security threats.
While switches and routers differ in several ways, one key difference is how they identify end devices. A Layer 2 switch uniquely identifies a device by its "burned-in" MAC address. A Layer 3 router uniquely identifies a device's network connection with a network-assigned IP address.
Today, most switches include some level of routing functionality.
MAC and IP addresses uniquely define devices and network connections, respectively, in a network. A MAC address is a number assigned to a network interface card (NIC) by a device's manufacturer. An IP address is a number assigned to a network connection.
How is computer networking evolving?
Modern-day networks deliver more than connectivity. Organizations are embarking on transforming themselves digitally. Their networks are critical to this transformation and to their success. The types of network architectures that are evolving to meet these needs are as follows:
- Software-defined (SDN) : In response to new requirements in the "digital" age, network architecture is becoming more programmable, automated, and open. In software-defined networks, routing of traffic is controlled centrally through software-based mechanisms. This helps the network to react quickly to changing conditions.
- Intent-based : Building on SDN principles, intent-based networking (IBN) not only introduces agility but also sets up a network to achieve desired objectives by automating operations extensively, analyzing its performance, pinpointing problematic areas, providing all-around security, and integrating with business processes.
- Virtualized : The underlying physical network infrastructure can be partitioned logically, to create multiple "overlay" networks. Each of these logical networks can be tuned to meet specific security, quality-of-service (QoS), and other requirements.
- Controller-based : Network controllers are crucial to scaling and securing networks. Controllers automate networking functions by translating business intent to device configurations, and they monitor devices continuously to help ensure performance and security. Controllers simplify operations and help organizations respond to changing business requirements.
- Multidomain integrations : Larger enterprises may construct separate networks, also called networking domains, for their offices, WANs, and data centers. These networks communicate with one another through their controllers. Such cross-network, or multidomain, integrations generally involve exchanging relevant operating parameters to help ensure that desired business outcomes that span network domains are achieved.
Only Cisco offers a complete portfolio of modern network architectures for access, WANs, data centers, and cloud.
Types of computer networks
While similar in their overall objectives, various types of networks fulfill different purposes. Networks today are classified in the broad categories below.
Local-area network (LAN)
A LAN is a collection of connected devices in one physical location, such as a home or an office. A LAN can be small or large, ranging from a home network with one user to a large enterprise network with thousands of users and devices. A LAN may include both wired and wireless devices.
Regardless of size, a LAN's particular characteristic is that it connects devices that are in a single, limited area.
Wide-area network (WAN)
A WAN extends over a large geographical area and connects individual users or multiple LANs. The Internet can be considered a WAN. Large organizations use WANs to connect their various sites, remote employees, suppliers, and data centers so they can run applications and access necessary data.
Physical connectivity in WANs can be achieved by leased lines, cellular connections, satellite links, and other means.
Enterprise network
A network built for a large organization, typically called an enterprise, needs to fulfill exacting requirements. Since networking is crucial for any modern enterprise to function, enterprise networks must be highly available, scalable, and robust. These networks have tools that enable network engineers and operators to design, deploy, debug, and remediate them.
An enterprise may use both LANs and WANs across its campus, branches, and data centers.
Service-provider network
Service providers operate WANs to provide connectivity to individual users or organizations. They may offer simple connectivity, in the form of leased lines, or more-advanced, managed services to enterprises. Service providers also supply Internet and cellular connectivity to their customers.
Related topics
- Intent-based networking
- Networking Basics: What You Need to Know
- Networking Basics: Cisco DevNet Learning Labs
- Software-defined networking
- What is a Network Controller?
You may also like…
- What Is an Edge Router?
- What Is an Enterprise Network?
- What Is Network Topology?
- What Is Network Monitoring?
- What Is Power over Ethernet?
- What Is IT Service Management - ITSM?
Navigation Menu
Search code, repositories, users, issues, pull requests..., provide feedback.
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications You must be signed in to change notification settings
Contains all the assignments and solutions for computer networks course in IIIT Allahabad.
aryan-harsh/computer-networks-assignments
Folders and files.
Name | Name | |||
---|---|---|---|---|
28 Commits | ||||
Repository files navigation
Computer-networks-assignments.
Contains all the assignments and solutions for computer networks course in IIIT Allahabad. Check the respective assignment folder for detailed information about the assignment and how to run it.
IMAGES
COMMENTS
Introduction. In this lab assignment, you will write a simple router with a static routing table. We will pass to your code raw Ethernet frames and give you a function that can send a raw Ethernet frame. It is up to you to implement the forwarding logic between getting a frame and sending it out over another interface. Figure 1: sample topology.
Therefore, you can be sure that each program will surely run and perform the task it is supposed to do. Although, you must be aware that there might be some corner cases which might get left out. If you just want the codes you can go to each assignment's folder and get it. If you are doing this while your lab is going on / you're studying for ...
The most wonderful part of this class is the labs. There are 8 labs in total, which guides you to implement a complete Internet infrastructure step by step. Here is a brief overview of each lab : Lab 0 : simple Internet applications; Lab 1 - 4 : implementation of the TCP protocols Lab 1 : stream assembler; Lab 2 : TCP receiver; Lab 3 : TCP sender
PROJECT 1: With this Project/Assignment, I designed a sample network for an Enterprise. This Enterprise has 2 Locations (Location A & Location B). It is a of Secure Campus Area Network where in Location B, there is a Main Server with IP of 172.18.51.1. ... Computer Networks Lab tasks implemented on various network platforms including socket ...
through this computer's Internet connectioncheck box. 9. If you are sharing a dial-up Internet connection, select the Establish a dial-up connection whenever a computer on my network attempts to access the Internet check box if you want to permit your computer to automatically connect to the Internet. 10. Click OK. You receive the following ...
CSE 473S Lab Assignment 1. Due date: TBA. Goals. To learn the basic infrastructure computer networks. of layered architecture and service primitives in. To design a simplified datalink layer. To get familiar with the simulator environment used for this and the next lab. Layered architecture. For the purpose of this lab, assume that each node in ...
All assignments are on the web page Text: Kurose & Ross, Computer Networking: A Top-Down Approach, 4th or 5th edition-Instructors working from 4th edition, either OK-Don't need lab manual or Ethereal (used book OK) Syllabus on web page-Gives which textbook chapters correspond to lectures (Lectures and book topics will mostly overlap)
Introduction to Computer Networks Fall 2013. ... Most of the assignments will be done in the context of the Open Network Lab a network testbed that allows you to define your own private network configuration and run applications within it. You will be working with multiple computers at the same time, as well as network components such as ...
Computer Networks Lab Manual. Search Ctrl + K. COURSE INFORMATION. Welcome. Lab Session and Etiquette. Submission Requirements. Team Setup. Automated Testing. Assignments. ... The table below gives an overview of all Lab assignments and their associated rewards. Assignment Mandatory Reward [points] Chat Client. 100. TCP Trace Analysis. 100 ...
Welcome to the official Lab Manual for the 2023-2024 edition of the Computer Networks course at Vrije Universiteit Amsterdam. This manual will be your guide through the Lab part of the course. It describes the available Lab assignments and serves as a handbook for the basics of networked programming. Feel free to read the document from start to ...
Programming/Lab Assignments: 40% (~8-10 labs, some labs may be worth more than others) Homework: 10% (~10 homeworks) Class and Lab Participation: 5% Lab Policy All assignments are due at the time and date specified on the lab write-up. Lab submissions will be done electronically, and I will provide more instruction later.
Assignments from Computer Network Labs. LAB 7. Write a C program in TCP to demonstrate the use of select() system call in the context of I/O multiplexing. LAB 6. Test Q1. Test Q2. LAB 5. Write a C program in TCP to send a message "Hello KIIT" from client to server. The server will display the message and then send a response message "Thank you ...
CS 144: Introduction to Computer Networking. CS 144: Introduction to Computer Networking, Winter 2024. Course info. Course basics. Lectures: Mondays & Wednesday, 1:30 ... FAQ Answers to common questions about lab assignment. Checkpoint 0: networking warmup (intro video) Out: January 9, due January 16, 3 p.m.
Team. Andrew T. Campbell (Instructor) campbell AT cs.dartmouth.edu 260 Sudikoff Office Hours: Monday and Friday 3-4 PM TA: Melo Qiao [email protected] Office hours in Lab 001 or 108 (to be confirmed): Thursday, Friday and Sunday 5-8 PM Section Leaders: Graham Findlay Melissa Queen The network programmers.
FLSM is easy but produces subnets having the same number of IP addresses. The same-sized subnets do not scale all networks. Let us take an example. We have an IP subnet having 12 IP addresses. We have two networks. The first network has seven hosts. The second network has three hosts. If we use FLSM, we can create the following subnets.
Computer networking refers to connected computing devices (such as laptops, desktops, servers, smartphones, and tablets) and an ever-expanding array of IoT devices (such as cameras, door locks, doorbells, refrigerators, audio/visual systems, thermostats, and various sensors) that communicate with one another. Basic networking (0:57)
These were the Computer Networks Assignments given in my sixth semester at IIT Guwahati. The topics covered in the assignments are as follows: Assignment 01: Exploring the various network diagnostic tools, an end user makes use of these tools to discover how a machine is connected to the network and how the network looks like beyond the first hop.
About. Wireless Networks Lab (WNL) is a 'Megagrant' lab established in 2017 around the project on Cloudified Wireless Networks for 5G and beyond, led by Prof. Ian F. Akyildiz. The project focused at cloud architectures for wireless networks based on software-defined networking and network function virtualization concepts and essential ...
E-mail: [email protected]. Website: lvk.cs.msu.ru. Phone number: +7 (495) 939-46-71. Other contact information. The Computer Systems Laboratory (CSL) is an academic department within the Faculty of Computational Mathematics and Cybernetics of the Moscow State University. CSL was established in 1982.
To associate your repository with the computer-networking-lab topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
Contains all the assignments and solutions for computer networks course in IIIT Allahabad. Check the respective assignment folder for detailed information about the assignment and how to run it.