0% found this document useful (0 votes)
68 views21 pages

E LibraryCommunicationSystemfinal

This document describes an E-Library Communication System project report submitted by four students - Shikhar Pandey, Aryan Chakraborty, Avik Kumar, and Riya Kumari - under the guidance of Dr. L. Kavisankar at SRM Institute of Science and Technology in partial fulfillment of the course 18CSC302J - Computer Networks. The report includes an abstract, introduction, literature survey, requirements analysis, architecture and design, implementation, experimental results and analysis, and conclusion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views21 pages

E LibraryCommunicationSystemfinal

This document describes an E-Library Communication System project report submitted by four students - Shikhar Pandey, Aryan Chakraborty, Avik Kumar, and Riya Kumari - under the guidance of Dr. L. Kavisankar at SRM Institute of Science and Technology in partial fulfillment of the course 18CSC302J - Computer Networks. The report includes an abstract, introduction, literature survey, requirements analysis, architecture and design, implementation, experimental results and analysis, and conclusion.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

E-Library Communication System

A COURSE PROJECT REPORT

By

Shikhar Pandey (RA2011003011018)


Aryan Chakraborty
(RA2011003011043) Avik Kumar
(RA2011003011036)
Riya Kumari (RA2011003011009)

Under the guidance of

Dr. L. Kavisankar

In partial fulfilment for the Course

of

18CSC302J - COMPUTER NETWORKS

in C.Tech

FACULTY OF ENGINEERING AND TECHNOLOGY

SRM INSTITUTE OF SCIENCE AND

TECHNOLOGY

Kattankulathur, Chenpalpattu District

NOVEMBER 2022
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

(Under Section 3 of UGC Act, 1956)

BONAFIDE CERTIFICATE

Certified that this mini project report "E-Library Communication System " is the
bonafide work of Shikhar Pandey (RA2011003011018), Aryan Chakraborty
(RA2011003011043), Avik Kumar (RA2011003011036) and Riya Kumari
(RA2011003011009) who carried out the project work under my supervision.

SIGNATURE

Dr. L Kavisankar
Assistant
Professor CTech
SRM Institute of Science and Technology

II
ABSTRACT

A network has to be designed for a small business organization

which has 100 users. The organization hosts an e-commerce

application on a server which is accessible to internet users using

https and with a public IP address.

A network for the same was designed using Cisco Packet Tracer

version 8.0.0. The requirements were emulated and tested for

connectivity. A server was setup, which is accessible only on

port 443 with HTTPS connectivity. Internally, department routers

are interconnected for unfiltered access to the server.

The company router has NAT to translate public IP address to

private device IP addresses. Switches are used to ensure optimal

number of devices can be used with both the company network

as well as the broadband network.

Pings were used to check the connectivity and the reachability of

the systems from all the network.

III
ACKNOWLEDGEMENT

We express our heartfelt thanks to our honorable Vice Chancellor Dr.


C. MUTHAMIZHCHELVAN, for being the beacon in all our endeavors.

We would like to express my warmth of gratitude to our Registrar


Dr. S. Ponnusamy, for his encouragement
We express our profound gratitude to our Dean (College of
Engineering and Technology) Dr. T. V.Gopal, for bringing out novelty in all
executions.
We would like to express my heartfelt thanks to Chairperson, School
of Computing Dr. Revathi Venkataraman, for imparting confidence to complete
my course project
We wish to express my sincere thanks to Course Audit Professor
Dr.Annapurani Panaiyappan, Professor and Head, Department of
Networking and Communications and Course Coordinators for their constant
encouragement and support.

We are highly thankful to our my Course project Faculty Dr. L


Kavisankar, Assistant Professor, C. tech for his/her assistance, timely
suggestion and guidance throughout the duration of this course project.
We extend my gratitude to our HoD Dr.Annapurani Panaiyappan,
Professor and Head, Department of Networking and Communications and
Course Coordinators and my Departmental colleagues for their Support.

Finally, we thank our parents and friends near and dear ones who
directly and indirectly contributed to the successful completion of our project.
Above all, I thank the almighty for showering his blessings on me to complete
my Course project.

6
TABLE OF CONTENTS

CHAPTERS CONTENTS

1. ABSTRACT
2. INTRODUCTION
3. LITERATURE SURVEY
4. REQUIREMENT ANALYSIS
5. ARCHITECTURE & DESIGN
6. IMPLEMENTATION
7. EXPERIMENT RESULTS & ANALYSIS
7.1. RESULTS
7.2. RESULT ANALYSIS
8. CONCLUSION & FUTURE ENHANCEMENT
9. REFERENCES

7
1. INTRODUCTION

1.1 Scenario Description:


We aim to design a server-client-based e-library system that allows users to
extract books(files) from the database. The user will send a request from
the client side asking for a particular file(book), and the server code will
accept the request and send the file.

The scenario will involve the users having full access to the server,
While they will have access only to the public IP address and not IP address.
The users will use the necessary hardware and applications to do so.

8
2. LITERATURE SURVEY

In this Library Management System project, you can enter the record of new books and
retrieve the details of books available in the library. You can issue the books to the students
and maintain their records. Late fine is charged for students who returns the issued books
after the due date. Only one book is issued to students. New book is not issued to students
those not returned the last book.

First, we figure out the hardware and software requirements. It involves using a cisco packet
tracer and designing a network architecture which contains the library network, public
network etc. This is then followed by implementation, which maintains an address table. This
is then followed by client code and server code, further leading up to results and discussion.

9
3. REQUIREMENTS

3.1 Requirement Analysis

From the given scenario, we draw the following requirements:


1. Identifying the appropriate hardware which would be used (Cisco Packet Tracer)
2. Users on the internet should be able to access only https on the e-commerce server.
3. Users on the internet should have access only to the public IP address of the server and
not the private IP address.
4. The users in the organization should have full access to the server.
5. TCP/IP Network design with IP addressing
6. Features and configuration required on the hardware with explanation

We need to configure a network design keeping the following requirements in mind.

3.2 Hardware Requirement

From the given scenario, we draw the following requirements:


For Company XYZ (Private Network):
Hardware Required:
1x Server – PT Primary Server
1x Router (For address 10.0.0.1)
4x Switches:
2x Department Specific Switches
1x Master Company Dept. Switch
1x Primary Company Switch
6x End
Devices:
3x PCs for Software Department Representation
3x PCs for IT Department Representation

1
For Public Network:
Hardware Required:
1x Switch(Broadband Switch)
3x End Devices(Public Network PCs)

For Network Integration(Private with


Public): Hardware Required:
1x Router (Internet Service router say ‘Airtel’)

1
4. ARCHITECTURE AND DESIGN

4.1 Network Architecture

The network architecture is as follows:

The architecture consists of three major networks:


- Library Network(s)
- Public Internet
- Network maintained by the Internet Service Provider

These networks are interconnected with each other with varying degrees (discussed in the
implementation chapter).

1
5. IMPLEMENTATION

5.1 Address Table

The address table is as follows:

Device Interface Address


Server Fa0 172.16.0.2
Fa0/0 172.16.0.1
Company Router Fa1/0 192.16.0.1
Se2/0 10.0.0.1
Employee PC Fa0/0 192.16.0.2 to 192.16.0.7
Se2/0 10.0.0.2
Broadband Router
Fa0/0 192.168.10.1
192.168.10.2 to
Public PC Fa0/0
192.168.10.4

The Company Router has NAT configured with an ACL.


The Access Control List contains the entire broadband network. Any request from that
network is translated to the private IP of the server.
Static Routing is used on all the routers to interconnect the networks.

LIBRARY-

#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>

1
#include <sys/types.h>
#include <unistd.h> // read(), write(),
close() #define MAX 80
#define PORT 8080
#define SA struct sockaddr

// Function designed for chat between client and server.


void func(int connfd)
{
char buff[MAX];
int n;
// infinite loop for chat
for (;;) {
bzero(buff, MAX);

// read the message from client and copy it in buffer


read(connfd, buff, sizeof(buff));
// print buffer which contains the client contents
printf("From customer: %s\t To customer : ", buff);
bzero(buff, MAX);
n = 0;
// copy server message in the buffer
while ((buff[n++] = getchar()) != '\n')
;

// and send that buffer to client


write(connfd, buff, sizeof(buff));

// if msg contains "Exit" then server exit and chat ended.


if (strncmp("exit", buff, 4) == 0) {
1
printf("Server Exit...\n");
break;
}
}
}

int main()
{

int sockfd, connfd, len;


struct sockaddr_in servaddr, cli;

// socket create and verification


sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd == -1) {
printf("socket creation failed...\n");
exit(0);
}
else
printf("Socket successfully created..\
n"); bzero(&servaddr, sizeof(servaddr));

// assign IP, PORT


servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr =
htonl(INADDR_ANY); servaddr.sin_port =
htons(PORT);

// Binding newly created socket to given IP and


verification if ((bind(sockfd, (SA*)&servaddr,
sizeof(servaddr))) != 0)
1
{
printf("socket bind failed...\n");

1
exit(0);
}
else
printf("Socket successfully binded..\n");

// Now server is ready to listen and verification


if ((listen(sockfd, 5)) != 0) {
printf("Listen failed...\n");
exit(0);
}
else
printf("Library Server listening..\n");
len = sizeof(cli);

// Accept the data packet from client and verification


connfd = accept(sockfd, (SA*)&cli, &len);
if (connfd < 0) {
printf("Library server accept failed...\n");
exit(0);
}
else
{
printf("Library server accept the customer...\n");
printf("Select a book :\n");
}
// Function for chatting between client and server
func(connfd);
// After chatting close the socket
close(sockfd);
}
1
CLIENT-
#include <arpa/inet.h> //
inet_addr() #include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h> // bzero()
#include <sys/socket.h>
#include <unistd.h> // read(), write(), close()
#define MAX 80
#define PORT 8080
#define SA struct
sockaddr void func(int
sockfd)
{
char buff[MAX];
int n;
for (;;) {
bzero(buff, sizeof(buff));
printf("Enter the book name : ");
n = 0;
while ((buff[n++] = getchar()) != '\n')
;
write(sockfd, buff, sizeof(buff));
bzero(buff, sizeof(buff));
read(sockfd, buff, sizeof(buff));
printf("From Library Systen : %s", buff);
if ((strncmp(buff, "exit", 4)) == 0) {
printf("Client Exit...\n");
break;

1
}

1
}
}

int main()
{
int sockfd, connfd;
struct sockaddr_in servaddr, cli;

// socket create and verification


sockfd = socket(AF_INET, SOCK_STREAM,
0); if (sockfd == -1) {
printf("socket creation failed...\n");
exit(0);
}
else
printf("Socket successfully created..\n");
bzero(&servaddr, sizeof(servaddr));

// assign IP, PORT


servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = inet_addr("127.0.0.1");
servaddr.sin_port = htons(PORT);
// connect the client socket to server socket
if (connect(sockfd, (SA*)&servaddr, sizeof(servaddr))
!= 0) {
printf("connection with the Library server failed...\n");
exit(0);
}
else
printf("connected to the Library sytstem..\n");

// function for chat

1
func(sockfd);
// close the socket
close(sockfd);
}

6. RESULTS AND DISCUSSION

6.1 System Check

Client Side

Server Side

6.2 HTTPS

The server was checked with HTTPS by using a browser:

1
7. CONCLUSION AND FUTURE ENHANCEMENT:

We conclude that the e-library system works fine and in accordance with the
needs of the organization and there are chances of further enhancement
depending upon further use. The number of files can be added additionally
and can be designed for a larger set of users in future.

2
REFERENCES:
http://www.w3schools.com/html/html_intro.asp
http://www.udemy.com/css/css_background.asp
http://www.w3schools.com/js/js_datatypes.asp

You might also like