Вы находитесь на странице: 1из 3

COMPUTER NETWORK DESIGN-HOME WORK 1

1. What is your computers IP address, MAC address? Do you have other computers connected to your network? IP address of my computer is 192.168.1.107 Physical (MAC) address of my computer is 00:23:14:2d:05:60 Yes. There are other computers connected to my network. The destination list contains IP addresses of other users apart from our system. These are the other computers connected to the same network. Few of them may be the routing addresses.

A. Run the Wireshark tool to observe the traffic on the target web site: http://www.unt.edu/stadium/stadium-images.htm and adjust your Wireshark settings to listen to only the http port over TCP. Save your results for submission. Include the Wireshark output for http port over TCP connection to your assignment report together with your analysis. Then, look for the image keyword on the target page. Which packet is it? Explain the details of this packet based on the TCP/IP protocol suite. After entering the URL http://www.unt.edu/stadium/stadium-images.htm capturing of packets is done after setting the capture options to http port tcp(80) or it can also be done by setting the filter for capture as tcp.port==80 in the Wireshark. Then, the image keyword is searched in the filter to find the desired packet. The TCP/IP protocol details for the particular packet 255 are Packet number: 255 Source: 192.168.1.107 Destination: 129.120.188.44 Source port: 50862 Destination port: http (80) Version: IPV4 Protocol: HTTP (80) Length: 920 bytes Reserved bit is not set Time to live: 128 seconds Fragment offset: 0 Relative sequence number: 867 Relative ACK number: 1 Header length: 20 bytes Info: GET/Stadium/stadium-images.htm HTTP/1.1 Check sum validation is disabled.

B. Install puTTY.exe, if you do not have it installed on your computers already. Run Wireshark again. This time only listen to the SSH port. Using puTTY, connect to csp10.cse.unt.edu host. After connection, run the directory listing command ls -al on the command line in puTTY. Observe the network traffic analyzed by Wireshark for this SSH connection, as well as the directory listing command execution after connection. Explain and comment on the steps of the SSH connection shown in the Wireshark analyzer. Save your results for submission. Include the Wireshark output for SSH connection to your assignment report, together with your analysis. Putty.exe is used for the Ssh traffic. We enter the host name as csp10.cse.unt.edu and login using our EUID and password. Then run the directory listing command. Then we open Wireshark and filter the SSH traffic. The traffic shows that a server protocol is the first packet from the csp console. Then the client protocol is sent. Now exchange of keys between client and server are initiated. Then Diffie-Hellman encryption is used for the secure transfer of data in the form of encrypted data. Thus packet exchange and communication is done by the secure shell. The results observed are as below. SSH port: Packet number: 372 Source physical address: 98: fc: 11:8a:d2:2e Destination physical address: 00:23:14:2d:05:60 Protocol: SSHV2 Info: server protocol: SSH-1.99-OpenSSH_3.4p1 Debian 1:3.4p1-1.Woody.3 IP version: IPV4 Source port: SSH (22) Destination port: 51881 Sequence number: 1 Next sequence number: 49 Fragment offset: 0 Time to live: 47 seconds Header length: 20 bytes Check sum validation disabled. The directory listing command shows a total of 12 directories. It displays the name of each directory from root to leaf and their time of creation. It also shows the log details.

2. Write a program (preferably in C) to do the following:


- The main (parent) process spawns one child process [Hint: use the fork () function] - The child process displays its own (the childs) process id, the parents process id and the hostname (The hostname only needs to be displayed in dotted decimal format). - The child process exits. - The parent process displays its (the parents) process id. - The parent process exits

#include<stdio.h> #include<stdlib.h> #include<sys/types.h> main() { int childprocessid,ln=20,l; char name[30]; int k=gethostname(*name,ln); childprocessid=fork(); if (childprocessid==0) { printf("Child's process ID is %d", getpid()); printf("parent's process IS is %d", getppid()); ln=gethostbyname("localhost"); if (k==0) for(l=0;l<ln;l++) Printf("%c", name[l]); exit(childprocessid); } else { printf("parent's process IS is %d", getpid()); exit(childprocessid); } }

A valid hostname can never have the dotted decimal format.

Student name: Sai Sandeep Kavuru EUID:ssk0083 UNT ID: 10822460

Вам также может понравиться