SlideShare a Scribd company logo
1 of 3
Course Code : BCSL-056
Title : Network Programming and Administration Lab
Assignment Number : BCA(V)-056/Assign/14-15
Maximum Marks : 50
Weightage : 25%
Last date of Submission : 15th October, 2014 (For July 2014 Session)
15th April, 2015 (For January 2015 Session)
Note: This assignment has two questions. Answer all the questions. These questions carry
40 marks. Rest 10 marks are for viva voce.
Question 1:
Write a UDP client and UDP server program in C language on UNIX operating system. A
client program starts the communication and sends a text string. Whenever server is free, it
can answer the client (however in case of multiple clients, server will respond on first come
first serve basis) and send reverse of the text string sent by the respective client.
Solution:
ECHO SERVER USING UDP
SERVER:
#include<netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include
#include <arpa/inet.h>
#include
#include
main()
{
int sfd,l;
char buf[1024]=”",buf1[1024]=”";
struct sockaddr_in ser;
sfd=socket(AF_INET,SOCK_DGRAM,0);
bzero(&ser,sizeof(ser));
ser.sin_family=AF_INET;
ser.sin_port=htons(1300);
inet_aton(“localhost”,&ser.sin_addr);
printf(“Enter the message:”);
scanf(“%s”,buf);
sendto(sfd,buf,strlen(buf),0,(struct sockaddr *)&ser,sizeof(ser));
recvfrom(sfd,buf1,1024,0,NULL,NULL);
close(sfd);
}
CLIENT:
#include<netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include
#include <arpa/inet.h>
#include
#include
main()
{
int sfd,l;
char buf[1024]=”";
struct sockaddr_in server,client;
sfd=socket(AF_INET,SOCK_DGRAM,0);
bzero(&server,sizeof(server));
server.sin_family=AF_INET;
server.sin_port=htons(1300);
inet_aton(“localhost”,&server.sin_addr);
printf(“bind=%dn” ,bind(sfd,(struct sockaddr *)&server,sizeof(server)));
l=sizeof(client);
for(;;)
{
recvfrom(sfd,buf,1024,0,(struct sockaddr *)&client,&l);
sendto(sfd,buf,strlen(buf),0,(struct sockaddr *)&client,l);
printf(“MESSAGE FROM CLIENT:%sn”,buf);
}
}
OUTPUT:
SERVER:
cc udpechoserver.c -o echo
./echo
bind=0
MESSAGE FROM CLIENT:olleH
CLIENT:
cc udpechoclient.c -o udpecho
./udpecho
Enter the message:
Hello
Question 2:
a) Write the step by step procedure to configure and launch an FTP server than install and
test an FTP client in Linux.
click here to see the solution of Second Question
b) Write a step by step procedure to create and configure a remote server and transfer a
Directory to Remote Server.
Solution:
Connecting to the Remote Server
To make a connection to your remote server:
1. Switch to the Remote System Explorer perspective. From the workbench menu, click
Window > Open Perspective > Remote System Explorer.
2. In the Remote Systems view, New Connection is automatically expanded to show the
various remote systems you can connect to through the Remote System Explorer.
Expand Linux or Unix to invoke the new connection dialog box and configure a
connection.
3. Enter a name for your first profile and click Next. (This step only occurs if you have
never defined a connection before.)
4. Enter a connection name. This name displays in your tree view and must be unique to
the profile.
5. Enter the name or TCP/IP address of your Linux server in the Host name field, for
example, LINUX_A.
6. (Optional) Enter a Description. The description appears in the Properties view after
the connection is created.
7. Click Finish to define your system.
Attention: To check your port number, right-click your connection or subsystem from the
Remote Systems view and select Properties. Click Subsystem to view the relevant
information. If your port is “0,” then your Remote System Explorer communications
server will pick any free port on the server. If you specified a port number when starting
the server, you need to enter it here, for example, to work with a firewall.
1 Download a file from the FTP server to your computer. Navigate to the file or folder
that you want to download on the right side of the window. Navigate to the location that
you want to save it on the left side of the window. Click and drag the file from the bottom
frame on the right to the bottom frame on the left. Your file or folder will start transferring
automatically.
You can see the size of the file in bytes in the “Filesize” column.
You can select multiple files to download in the same session by holding ^ Ctrl and
clicking on each one you want. Files will be transferred one at a time.
You can add files to your download queue by right-clicking on them and selecting “Add
files to queue”
2 Upload a file to the server. Navigate to the file or folder that you want to upload on the
left side of the window. Navigate to the location that you want to upload it to on the right
side of the window. If you have permissions to upload a file to the FTP server, you can
click and drag the file from the left side to the right side to begin uploading.
Most public FTPs will not allow anonymous users to upload files.
Uploads will typically take longer than downloads of the same size.
3 Track your transfers. You can watch your transfers in the bottom frame of the window.
You will see a list of files you are transferring and have queued, along with their size,
priority, and percent completion. You can see your failed and completed transfers by
using the tabs at the bottom of the window.

More Related Content

What's hot

Information on protocols-email protocols
Information on protocols-email protocolsInformation on protocols-email protocols
Information on protocols-email protocolsPriyanka Shinde
 
Meeting 11. electronic mail: smtp
Meeting 11. electronic mail: smtpMeeting 11. electronic mail: smtp
Meeting 11. electronic mail: smtpSyaiful Ahdan
 
Information gathering using windows command line utility
Information gathering using windows command line utilityInformation gathering using windows command line utility
Information gathering using windows command line utilityVishal Kumar
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)Raghu nath
 
DNS server configuration in packet tracer
DNS server configuration in packet tracerDNS server configuration in packet tracer
DNS server configuration in packet tracerprodhan999
 
Lotus Notes Vpn Settings
Lotus Notes Vpn SettingsLotus Notes Vpn Settings
Lotus Notes Vpn SettingsKirti Kunal
 
Domain name system (dns) , TELNET ,FTP, TFTP
Domain name system (dns) , TELNET ,FTP, TFTPDomain name system (dns) , TELNET ,FTP, TFTP
Domain name system (dns) , TELNET ,FTP, TFTPsaurav kumar
 

What's hot (15)

How-to Guide: ES explorer
How-to Guide: ES explorerHow-to Guide: ES explorer
How-to Guide: ES explorer
 
Smtp
SmtpSmtp
Smtp
 
Ch02
Ch02Ch02
Ch02
 
Introduction to telnet
Introduction to telnetIntroduction to telnet
Introduction to telnet
 
Information on protocols-email protocols
Information on protocols-email protocolsInformation on protocols-email protocols
Information on protocols-email protocols
 
Ch01
Ch01Ch01
Ch01
 
Meeting 11. electronic mail: smtp
Meeting 11. electronic mail: smtpMeeting 11. electronic mail: smtp
Meeting 11. electronic mail: smtp
 
Smtp
SmtpSmtp
Smtp
 
Information gathering using windows command line utility
Information gathering using windows command line utilityInformation gathering using windows command line utility
Information gathering using windows command line utility
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
DNS server configuration in packet tracer
DNS server configuration in packet tracerDNS server configuration in packet tracer
DNS server configuration in packet tracer
 
Lotus Notes Vpn Settings
Lotus Notes Vpn SettingsLotus Notes Vpn Settings
Lotus Notes Vpn Settings
 
Domain name system (dns) , TELNET ,FTP, TFTP
Domain name system (dns) , TELNET ,FTP, TFTPDomain name system (dns) , TELNET ,FTP, TFTP
Domain name system (dns) , TELNET ,FTP, TFTP
 
What is COTI?
What is COTI? What is COTI?
What is COTI?
 

Viewers also liked

Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4Dr. Loganathan R
 
Bcsl 033 data and file structures lab s1-3
Bcsl 033 data and file structures lab s1-3Bcsl 033 data and file structures lab s1-3
Bcsl 033 data and file structures lab s1-3Dr. Loganathan R
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Dr. Loganathan R
 
Bcsl 033 data and file structures lab s3-2
Bcsl 033 data and file structures lab s3-2Bcsl 033 data and file structures lab s3-2
Bcsl 033 data and file structures lab s3-2Dr. Loganathan R
 
Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Dr. Loganathan R
 
Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1Dr. Loganathan R
 

Viewers also liked (7)

Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4Bcsl 033 data and file structures lab s1-4
Bcsl 033 data and file structures lab s1-4
 
Bcsl 033 data and file structures lab s1-3
Bcsl 033 data and file structures lab s1-3Bcsl 033 data and file structures lab s1-3
Bcsl 033 data and file structures lab s1-3
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1
 
Bcsl 033 data and file structures lab s3-2
Bcsl 033 data and file structures lab s3-2Bcsl 033 data and file structures lab s3-2
Bcsl 033 data and file structures lab s3-2
 
Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3Bcsl 033 data and file structures lab s4-3
Bcsl 033 data and file structures lab s4-3
 
Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1
 
Bcsl 033 solve assignment
Bcsl 033 solve assignmentBcsl 033 solve assignment
Bcsl 033 solve assignment
 

Similar to Configure and Test FTP Server and Client in Linux

Ubuntu getting started
Ubuntu getting startedUbuntu getting started
Ubuntu getting startedErnesto Celis
 
香港六合彩
香港六合彩香港六合彩
香港六合彩csukxnr
 
六合彩 » SlideShare
六合彩 » SlideShare六合彩 » SlideShare
六合彩 » SlideSharemvtqyygx
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShareyqtvdsbl
 
六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideSharemmfirkhw
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideSharecxrcpdu
 
六合彩-香港六合彩
六合彩-香港六合彩六合彩-香港六合彩
六合彩-香港六合彩skpkcd
 
香港六合彩-六合彩
香港六合彩-六合彩香港六合彩-六合彩
香港六合彩-六合彩qiohms
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideSharedqxjlhfc
 
Mastering PowerShell
Mastering PowerShellMastering PowerShell
Mastering PowerShellFahad Noaman
 
Mastering power shell - Windows
Mastering power shell - WindowsMastering power shell - Windows
Mastering power shell - WindowsAriel Devulsky
 
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docxCSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docxannettsparrow
 
Choose one of these three options A IPC using FIFO B Shar.pdf
Choose one of these three options A IPC using FIFO B Shar.pdfChoose one of these three options A IPC using FIFO B Shar.pdf
Choose one of these three options A IPC using FIFO B Shar.pdfaghsports
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1Julio Pulido
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer ProtocolOm Prakash
 
How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhostIIUM
 
Pf sense installation and initial setup
Pf sense installation and initial setupPf sense installation and initial setup
Pf sense installation and initial setupHarvey Dime
 

Similar to Configure and Test FTP Server and Client in Linux (20)

COZA HOST HELP
COZA HOST HELPCOZA HOST HELP
COZA HOST HELP
 
Ubuntu getting started
Ubuntu getting startedUbuntu getting started
Ubuntu getting started
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
六合彩 » SlideShare
六合彩 » SlideShare六合彩 » SlideShare
六合彩 » SlideShare
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
 
六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
 
六合彩-香港六合彩
六合彩-香港六合彩六合彩-香港六合彩
六合彩-香港六合彩
 
香港六合彩-六合彩
香港六合彩-六合彩香港六合彩-六合彩
香港六合彩-六合彩
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
 
Mastering PowerShell
Mastering PowerShellMastering PowerShell
Mastering PowerShell
 
Mastering power shell - Windows
Mastering power shell - WindowsMastering power shell - Windows
Mastering power shell - Windows
 
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docxCSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
 
Choose one of these three options A IPC using FIFO B Shar.pdf
Choose one of these three options A IPC using FIFO B Shar.pdfChoose one of these three options A IPC using FIFO B Shar.pdf
Choose one of these three options A IPC using FIFO B Shar.pdf
 
Linux introductory-course-day-1
Linux introductory-course-day-1Linux introductory-course-day-1
Linux introductory-course-day-1
 
Createlistener
CreatelistenerCreatelistener
Createlistener
 
Lab 1 Essay
Lab 1 EssayLab 1 Essay
Lab 1 Essay
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhost
 
Pf sense installation and initial setup
Pf sense installation and initial setupPf sense installation and initial setup
Pf sense installation and initial setup
 

More from Indira Gnadhi National Open University (IGNOU)

More from Indira Gnadhi National Open University (IGNOU) (18)

Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16
 
Mcs 16 solved assignment 2015-16
Mcs 16 solved assignment 2015-16Mcs 16 solved assignment 2015-16
Mcs 16 solved assignment 2015-16
 
Mcs 014 solved assignment 2015-16
Mcs 014 solved assignment 2015-16Mcs 014 solved assignment 2015-16
Mcs 014 solved assignment 2015-16
 
Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16
 
Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
BCSL 057 solved assignments
BCSL 057 solved assignmentsBCSL 057 solved assignments
BCSL 057 solved assignments
 
Bcs 055 solved 2014-15
Bcs 055 solved 2014-15Bcs 055 solved 2014-15
Bcs 055 solved 2014-15
 
Bcs 054 solved assignment
Bcs 054 solved assignmentBcs 054 solved assignment
Bcs 054 solved assignment
 
Bcs 053 solved assignment 2014-15
Bcs 053 solved assignment 2014-15Bcs 053 solved assignment 2014-15
Bcs 053 solved assignment 2014-15
 
Bcs 052 solved assignment
Bcs 052 solved assignmentBcs 052 solved assignment
Bcs 052 solved assignment
 
Mcs 021 solve assignment
Mcs 021 solve assignmentMcs 021 solve assignment
Mcs 021 solve assignment
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
2012 bcsl-021 solve assihnment
2012 bcsl-021 solve assihnment2012 bcsl-021 solve assihnment
2012 bcsl-021 solve assihnment
 
Bcsl 022 solved-assignment_2012-13
Bcsl 022 solved-assignment_2012-13Bcsl 022 solved-assignment_2012-13
Bcsl 022 solved-assignment_2012-13
 
Eco 02 question paper
Eco 02 question paperEco 02 question paper
Eco 02 question paper
 
Mcs 015 solve assignment
Mcs 015 solve assignmentMcs 015 solve assignment
Mcs 015 solve assignment
 
Mcs 013 solve assignment
Mcs 013 solve assignmentMcs 013 solve assignment
Mcs 013 solve assignment
 

Recently uploaded

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 

Recently uploaded (20)

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 

Configure and Test FTP Server and Client in Linux

  • 1. Course Code : BCSL-056 Title : Network Programming and Administration Lab Assignment Number : BCA(V)-056/Assign/14-15 Maximum Marks : 50 Weightage : 25% Last date of Submission : 15th October, 2014 (For July 2014 Session) 15th April, 2015 (For January 2015 Session) Note: This assignment has two questions. Answer all the questions. These questions carry 40 marks. Rest 10 marks are for viva voce. Question 1: Write a UDP client and UDP server program in C language on UNIX operating system. A client program starts the communication and sends a text string. Whenever server is free, it can answer the client (however in case of multiple clients, server will respond on first come first serve basis) and send reverse of the text string sent by the respective client. Solution: ECHO SERVER USING UDP SERVER: #include<netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #include #include <arpa/inet.h> #include #include main() { int sfd,l; char buf[1024]=”",buf1[1024]=”"; struct sockaddr_in ser; sfd=socket(AF_INET,SOCK_DGRAM,0); bzero(&ser,sizeof(ser)); ser.sin_family=AF_INET; ser.sin_port=htons(1300); inet_aton(“localhost”,&ser.sin_addr); printf(“Enter the message:”); scanf(“%s”,buf); sendto(sfd,buf,strlen(buf),0,(struct sockaddr *)&ser,sizeof(ser)); recvfrom(sfd,buf1,1024,0,NULL,NULL); close(sfd); } CLIENT: #include<netinet/in.h> #include <sys/types.h>
  • 2. #include <sys/socket.h> #include #include <arpa/inet.h> #include #include main() { int sfd,l; char buf[1024]=”"; struct sockaddr_in server,client; sfd=socket(AF_INET,SOCK_DGRAM,0); bzero(&server,sizeof(server)); server.sin_family=AF_INET; server.sin_port=htons(1300); inet_aton(“localhost”,&server.sin_addr); printf(“bind=%dn” ,bind(sfd,(struct sockaddr *)&server,sizeof(server))); l=sizeof(client); for(;;) { recvfrom(sfd,buf,1024,0,(struct sockaddr *)&client,&l); sendto(sfd,buf,strlen(buf),0,(struct sockaddr *)&client,l); printf(“MESSAGE FROM CLIENT:%sn”,buf); } } OUTPUT: SERVER: cc udpechoserver.c -o echo ./echo bind=0 MESSAGE FROM CLIENT:olleH CLIENT: cc udpechoclient.c -o udpecho ./udpecho Enter the message: Hello Question 2: a) Write the step by step procedure to configure and launch an FTP server than install and test an FTP client in Linux. click here to see the solution of Second Question b) Write a step by step procedure to create and configure a remote server and transfer a Directory to Remote Server.
  • 3. Solution: Connecting to the Remote Server To make a connection to your remote server: 1. Switch to the Remote System Explorer perspective. From the workbench menu, click Window > Open Perspective > Remote System Explorer. 2. In the Remote Systems view, New Connection is automatically expanded to show the various remote systems you can connect to through the Remote System Explorer. Expand Linux or Unix to invoke the new connection dialog box and configure a connection. 3. Enter a name for your first profile and click Next. (This step only occurs if you have never defined a connection before.) 4. Enter a connection name. This name displays in your tree view and must be unique to the profile. 5. Enter the name or TCP/IP address of your Linux server in the Host name field, for example, LINUX_A. 6. (Optional) Enter a Description. The description appears in the Properties view after the connection is created. 7. Click Finish to define your system. Attention: To check your port number, right-click your connection or subsystem from the Remote Systems view and select Properties. Click Subsystem to view the relevant information. If your port is “0,” then your Remote System Explorer communications server will pick any free port on the server. If you specified a port number when starting the server, you need to enter it here, for example, to work with a firewall. 1 Download a file from the FTP server to your computer. Navigate to the file or folder that you want to download on the right side of the window. Navigate to the location that you want to save it on the left side of the window. Click and drag the file from the bottom frame on the right to the bottom frame on the left. Your file or folder will start transferring automatically. You can see the size of the file in bytes in the “Filesize” column. You can select multiple files to download in the same session by holding ^ Ctrl and clicking on each one you want. Files will be transferred one at a time. You can add files to your download queue by right-clicking on them and selecting “Add files to queue” 2 Upload a file to the server. Navigate to the file or folder that you want to upload on the left side of the window. Navigate to the location that you want to upload it to on the right side of the window. If you have permissions to upload a file to the FTP server, you can click and drag the file from the left side to the right side to begin uploading. Most public FTPs will not allow anonymous users to upload files. Uploads will typically take longer than downloads of the same size. 3 Track your transfers. You can watch your transfers in the bottom frame of the window. You will see a list of files you are transferring and have queued, along with their size, priority, and percent completion. You can see your failed and completed transfers by using the tabs at the bottom of the window.