Networking


* * * * *
Implementation of fragmentation concept using C program.

Following assumptions are taken while implementing this program.
  • Assume MTU size is 5 characters. 
  • Assuming Source IP=192.168.1.1 and Destination IP=10.1.1.1
  • All fragments will be displayed on screen.
  • For sample input content: "Hello Student. How are you?" Output generated will be as under:
         0,192.168.1.1, 10.1.1.1,Hello
         1,192.168.1.1, 10.1.1.1, stud
         2,192.168.1.1, 10.1.1.1,ent.
         3,192.168.1.1, 10.1.1.1,How a
         4,192.168.1.1, 10.1.1.1,re yo
         5,192.168.1.1, 10.1.1.1,u?
         Total fragments created=6




UDP Header implementation
This C program generates UDP Header with following assumptions:

1. Sample data in input.txt file: ABC
2. Source Port=1100, Destination Port=1101
3. Total length=50
4. You may use your logic for Checksum calculation.
5. Output of the program is stored in UDP Header.txt file.

For the given input "ABC", output in the UDPHeader file is as under:

1100,1101,50,198


* * * * *
Simulation of Framing Concept using C language.

Assumptions:

1. Header contains following parameters:
    FrameNumber, SourceIP, DestinationIP,FiveCharacters of Data
2. SourceIP=192.168.1.1
3. DestinationIP=192.168.1.2
4. Input data is taken from input.txt file.
5. Generated Frames will be stored in output.txt file.

Demo C program - Simulation of Framing concept

1 comment: