Lab Record File of Computer Networks (CSF303) : Miss Shweta Paliwal Assistant Professor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Lab Record File

of Computer
Networks
(CSF303)

BACHELOR OF TECHNOLOGY In
Computer Science and Technology

Session 2023-24

Submitted To: Submitted By:


Miss Shweta Paliwal Name: Vedant Tiwari

Assistant Professor Roll No: 210105002


School of Computing SAP: 1000015963

DIT UNIVERSITY, DEHRADUN


(State Private University through State Legislature Act No. 10 of 2013 of Uttarakhand and approved by UGC)

Mussoorie Diversion Road, Dehradun, Uttarakhand - 248009, India.


INDEX

S. Objective Date of Faculty


No. Conduction Signature
1. Simulate a network having two communication
node using Cisco packet Tracer.
August 7th, 2023
2. Simulate a network having 4 communication nodes
with one switch
August 14th, 2023
3. Simulate a network having Two subnet using 2
switch, one Router and 6 nodes using Cisco packet
tracer.
August 21st, 2023
4. Simulate a network using Star Topology Using Cisco
packet Tracer
August 28th, 2023
5. Simulate a network using Bus Topology Using Cisco
packet Tracer
September 4th,
2023
6. Simulate a network using Ring Topology Using Cisco
packet Tracer.
September 11th,
2023
7. Simulate a network using Mesh Topology Using
Cisco packet Tracer
September 18th,
2023
8. Create a DHCP server using Cisco packet tracer September 25th,
2023
9. Implement Intra domain and Inter domain routing
Protocol using Cisco Packet Tracer

10. Implement of Bit Stuffing and CRC


EXPERIMENT 1
Simulate a network having two communication node using Cisco packet Tracer.

Model:

Simulation Tab:

Realtime Tab:
EXPERIMENT 2
Simulate a network having 4 communication nodes with one switch.

Model:

Simulation Tab:

Realtime Tab:
EXPERIMENT 3

Simulate a network having Two subnet using 2 switch, one Router and 6 nodes using Cisco
packet Tracer.

Model:

Simulation Tab:

Realtime Tab:
EXPERIMENT 4

Simulate a network using Star Topology Using Cisco packet Tracer.

Model:

Simulation
Tab:

Realtime Tab:
EXPERIMENT 5
Simulate a network using Bus Topology Using Cisco packet Tracer.

Model:

Simulation Tab:

Realtime Tab:
EXPERIMENT 6
Simulate a network using Ring Topology Using Cisco packet Tracer.

Model:

Simulation
Tab:

Realtime Tab:
EXPERIMENT 7

Simulate a network using Mesh Topology Using Cisco packet Tracer.

Model:

Simulation Tab:

Realtime Tab:
EXPERIMENT 8

Create a DHCP server using Cisco packet Tracer.


Model:

Simulation Tab:

Realtime Tab:
EXPERIMENT 9

Implement Intra Domain Routing Protocol Using


Cisco packet
EXPERIMENT 10

Implement Of Bit Stuffing And CRC.


Code for CRC:

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#define CRC32_POLYNOMIAL 0x04C11DB7

uint32_t calculateCRC32(const uint8_t *data, int length) { uint32_t crc


= 0xFFFFFFFF;
for (int i = 0; i < length; i++) { crc ^=
data[i];
for (int j = 0; j < 8; j++) { if (crc
& 0x80000000) { crc = (crc << 1) ^
CRC32_POLYNOMIAL;
} else { crc =
(crc << 1);
}

return crc;
}

int main() { char data[256];


char
generator_polynomial[256];

printf("Enter the data to be transmitted: "); scanf("%s", data);

printf("\nEnter the Generating polynomial: "); scanf("%s",


generator_polynomial);

uint32_t crcResult = calculateCRC32((const uint8_t *)data, strlen(data));


printf("CRC-32: 0x%08X\n", crcResult);

if (crcResult == calculateCRC32((const uint8_t *)data, strlen(data))) { printf("The CRC is


valid.\n");
} else {
printf("The CRC is invalid.\n");
}

return 0;
}

Output:

Code for Bits Stuffing:

#include <stdio.h>

// Function to perform bit stuffing

void bitStuffing(char data[], int *size) {

int count = 0; // Initialize a count variable to keep track of consecutive 1s

printf("Original Data: %s\n", data);

int newSize = *size; // Store the original size

// Loop through the original

data for (int i = 0; i <

newSize; i++) {

printf("%c", data[i]); if

(data[i] == '1') {

count++; } else {

count = 0;

// If 5 consecutive 1s are encountered, insert a '0'

if (count == 5) {
// Shift the elements to make space for the extra

'0' for (int j = *size; j > i + 1; j--) {

data[j] = data[j - 1];

// Insert '0' at the appropriate position

data[i + 1] = '0';

(*size)++; // Increase the size of the array

count = 0; // Reset the count

printf("\n");

int main() {

char data[] = "011111110110111111110";

int size = sizeof(data) - 1; // Subtract 1 to exclude the null terminator

printf("Original Size: %d\n", size);

bitStuffing(data, &size);

printf("Modified Data: %s\n", data);

return 0;

Output:

You might also like