• High School
  • You don't have any recent items yet.
  • You don't have any courses yet.
  • You don't have any books yet.
  • You don't have any Studylists yet.
  • Information

Network Assignment 2

Bsc. computer engineering (coe 1), kwame nkrumah university of science and technology, students also viewed.

  • CV Template Manual - KCSC
  • 1. National income accountants can avoid double counting by
  • Physical- Chemistry-II
  • Chapter 5 - Network Layer - Control Plane
  • 159 2 - Applied Electricity
  • Trading-junkies-CandleStick Patterns

Related documents

  • Data Structures Past Papers Exam Questions T4Tutorials
  • Coe485-lec1 Computer Architecture Introduction
  • Project Report Template
  • Assignemnet 1 - Assignment 1
  • BIT 357 Software Engineering Assignment
  • Abstract CMOS NAND Gate123

Preview text

Introduction to computer networking assignment 2, assignment 2, computer science 4 - regular.

Name : Tayubah Evans Index : 6841816

An organization with 13 branches scattered across Ghana acquired the IP address 176.184.238/

a. What class is the IP address?

Answer: Class B Address

Explanation : Since it is in the range of 128.0.0 and 191.255.

b. What subnet is the address on?

Answer: 176.184.

Explanation : /16 indicates the network mask or subnet mask , which means first 16 consecutive bits of ones.

/ 16 = 11111111.11111111.00000000 in decimal notation is = 255.255.

c. What is the NetID?

Answer: 176.

Explanation : Since is a Class B address, the NetID is determined by the first 16 bits.

Step 1 To get the NetID convert all the host portion of the address into binary and fill them with binary Zero’s

IP address given decimal notation => 176.184.238/ In binary => 10110000.10111000.

Since the subnet mask is /16 , it means the first 16 bits from your left represents the network portion and the last 16 bits represent the host portion

Network Portion Host Portion 10110000. 11101110.

Step 2 Fill the host portion with binary Zero’s

NetID in binary => 10110000.10111000. In Decimal Notation => 176.184.

d. What is the HostID?

Answer: 238.

Hostid range = 176. 0 – 176. 255.

Explanation :

Since is a Class B address with a default mask, the HostId is the last 16 bits of the IP address given.

Network ID Host ID 10110000. 11101110.

Host ID in binary => 00000000.00000000.

HostID in decimal => 0. 238.

e. What is the SubnetID?

` Step 1 To get the subnet address convert all the host portion of the address into binary and fill them with binary Zero’s

IP address given decimal notation => 176.184.238/

In binary => 10110000.10111000.

Since the subnet mask is /16 , it means the first 16 bits represents the network portion and the last 16 bits represent the host portion.

Network Portion Host Portion 10110000. 00000000.

0 1 1 1 0 1 1 1 0 00000000

0 0 1 0 0 1 0 0 1 00000000.

j. Design a suitable network for the organization ensuring most efficient usage of addresses.

  • A star bus or tree topology will be used for the physical layout of the network.
  • Each branch will be given a router which will allow it to connect to the internet and also communicate with other branches.
  • An ISP or WAN service provider is used to link the headquarters with all the branches.
  • A single Subnet addresses will be allocated to each branch by subnetting the organisation allocated address of 176.184.238/16 into 16 subnets where each can support a host of 4094.
  • At the various branches, the subnet address allocated will be further subdivided to cater for the various departments and group of hosts
  • Each department or host with common needs will be connected to a switch which will be linked to the branch router.
  • At the various branches a segment of network provided for special host such as servers, printers and network devices.
  • Links to servers and hosts from network devices will be high speed.
  • Workstations will be connected to their own full duplex interface on a switch. 10, printers and other network devices will be connected to their own full duplex interface with a switch.

Subnetting the Allocated Address block

Since the headquarters is assigned an address block of 176.184.0 /16. we will have to subnet to at least 16 subnets to support all the branches. Where the first subnet will be used for the network and the last for broadcast address.

Since we are subnetting based on the number of subnets required, we shall use the formula 2n to find the number of networks, where the n is the number of bits which will be taken from the host side of the address to create a 2n networks.

Step 1 Work out the number of bits required to support 16 subnets

2 n = 16 2 n = 2 4 n = 4

Therefore to support 16 subnets we require 4 bits in binary from the host portion to append to the network portion.

Convert the host portion of the Subnet Address into binary.

Network Host 10110000. 00000000.

Step 3 Since we require 4 bits from the host side , we counts 4 bits from the left to right in the host portion and allocate it to the network portion.

Network Subne t

10110000. 0000 0000.

Step 4 Calculate for the network mask

Network Host 10110000.10111000 0000.

Total bits = 32 Host bits = 12 Network mask bits = Total bits – Host bits = 32 – 12 = 20

Therefore our Network Mask = /20 or 255.255.

Step 5 Work outs our new subnets by going through all the various binary combinations for the subnet portion of the address.

Therefore the host range for 176.184.0/20 is 176 .0 to 176. 15.

k. List all the subnet addresses Ans :

Subnet Address Host Address Range

1 176.184.0/20 176.184.0 - 176.184.

2 176.184.16/20 176.184.16 - 176.184., 3 176.184.32/20 176.184.32 - 176.184., 4 176.184.48/20 176.184.48 - 176.184., 5 176.184.64/20 176.184.64 - 176.184., 6 176.184.80/20 176.184.80 - 176.184., 7 176.184.96/20 176.184.96 - 176.184., 8 176.184.112/20 176.184.112 - 176.184., 176.184.128/, 176.184.128 -, 10 176.184.144/, 176.184.144 -, 176.184.160/, 176.184.160 -, 12 176.184.176/2 0 176.184.176 - 176.184., 13 176.184.192/, 176.184.192 -, 176.184.208/, 176.184.208 -, 15 176.184.224/, 176.184.224 -, 176.184.240/, 176.184.240 -.

l. Give the subnet address that this IP address resides on 176.184.238 255.255.

Answer: Since is in the host range of 176.184.224 - 176.184.239 in network Number 15, its corresponding subnet Address is 176.184.224/

Or by Calculation

Given a subnet mask of 255.255.240 in binary 11111111.11111111.11110000 or /

To get the subnet address convert all the host portion of the address into binary and fill them with binary Zero’s

In binary => Since the subnet mask is /20 , it means the first 20 bits represents the subnet address.

Network Portion Host Portion 10110000. 1110 1110 .

Fill the host portion with binary Zero’s Network Portion Host Portion 10110000. 1110 0000 .

Subnet Address => 10110000.10111000 0000. In Decimal Notation => 176.184.

m. What is the site address for the given address in 'l' above

Answer: 176.184.238/

n. What is the NetID for the given address in 'l' above

o. What is the HostID for the given address in 'l' above

Answer: 14.

Explanation

Fill the network portion with zero’s Network Portion Host Portion 00000000.0000000 1110 .

Host Address => 00000000.0000000 1110.

In Decimal Notation : 176.184.

r. Explain the functionality of each if the devices in your network diagram and justify their purpose in your diag.

 Switch : A network device that connects multiple devices together and filters packets based on their destination within the connected devices. It is used as part of the networking diagram to receive incoming data packets and redirects them to their destination on the Local Area Network (LAN).

 Router : A device that receives and analyzes packets and then routes them towards their destination. In some cases, a router will send a packet to another router; in other cases, it will send it directly to its destination. It is used as part of the network diagram to connect the different networks in Local Area Network (LAN) and Wide Area Network (WAN) and also to act as a firewall to to protect one network from the other.

 Host Devices: Laptop,Desktop,printer etc to interact with each other.

 Cables: Use to connect Networking devices and host devices

s. How will you ensure Internet connectivity for host at each branch.

Answer: By connecting the routers at the various branches to an Internet Service provider.

t. Explain type(s) of connections in your network diagram.

Answer: LAN: Communication between switches and Host devices in the diagram is based on LAN Local area network (LAN) is a computer network that overlaps with a small area. Usually, a LAN is tied to a single room, building or cluster, but one LAN can be connected to other LANs over any distance via telephone wires and radio waves system of LANs connected in this way is called a broadband network (WAN). The difference between LAN and WAN is that the wider area network scans the larger geographically. Usually, a WAN

Used by web browsers such as Edge and Firefox to request and transfer webpages from the WWW.

File Transfer Protocol (FTP) Often used by file sharing programs in order to send and receive files between users across the Internet.

w. Explain the addressing mechanism in the movement of packets from one branch to the other.

Since the destination host is present in different network the packet will be delivered to the default gateway first which in turn delivers the packet to the destination host.

Here we have a router with two interfaces: e1/1/1 (which I'll refer to as E1 ) and e1/1/2 (which I'll refer to as E2 ).

The router's two interfaces are in separate subnets, separate collision domain as well as broadcast domain. When data arrives from one of the segment the router decides

according to its routing table to which network to forward the data

E1 is connected to subnet: 10.128.200/ E2 is connected to subnet: 10.128.208/

Now, suppose Pc1 (with IP address 10.128.200/21 and therefore in subnet 10.128.200/21 ) sends a message to Pc4 (with IP address 10.128.208/21 and therefore in subnet 10.128.208/21 )

  • Once that packet arrives at the router, the following happens:

i. Packet arrives on interface E1with subnet 10.128.200/

ii. Router determines the destination address is 10.128.208/

iii. Router examines its routing table to determine where the packet should go based on the NetId

iv. The routing table indicates interface E2 is connected to subnet 10.128.208/

v. The router prepares the packet for transmission on interface E2.

vi. The new packet is transmitted on interface E

Once the packet is sent to the network segment connected to router interface E2 it is received by the switch which is then forwarded to the host.

x. Assuming each branch has 58 workstations and a printer, how many collision domains has your network diagram

y. As follow-up question to 'x', how many broadcast domains has your network diagram

Answer : 26

z. Write a convincing summary statement to convince management of why they should invest money to deploy your network diagram. Your statement must clearly spell out the advantages of the network that the organization stands to gain if they implement it.

The advantage of using this is that additional segments of network can easily be added in several places. Segments can be attached to a router for expansion in a given department or building or even a branch and if a segment needs to be secured, if the router has access list configured on them they can act as a firewall for network. Since each branch will be given one single block of address it can further be subnetted to create additional networks at each branch. Subnetworks can be created for host with common user needs.

Also since the Wide Area Network (WAN) operates over a much larger area, they are

required to interconnect LANs at various branches to communicate and exchange data. It also allows the branches to connect to the internet. The reason for the company to rent a WAN service from an established service provider is due to the distance that WANs operate over, setting one up would cost a substantial amount of money as the company would need to purchase the necessary cabling, fibre and satellite systems. Setting up a WAN would therefore prove to be extremely expensive and time-consuming.

  • Multiple Choice

Course : Bsc. Computer Engineering (COE 1)

University : kwame nkrumah university of science and technology.

computer network assignment 2

  • Discover more from: Bsc. Computer Engineering COE 1 Kwame Nkrumah University of Science and Technology 45   Documents Go to course
  • More from: Bsc. Computer Engineering COE 1 Kwame Nkrumah University of Science and Technology 45   Documents Go to course

Recommended for you

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

aks2507/Computer-Networks-Assignments

Folders and files, repository files navigation, computer-networks-assignments, assignment:1.

  • Create processes sequentially; P1 -> P2 -> P3 -> P4
  • Create two processes from single process and the parent informs whenever and whichever of the children exit; P1 -> P2, P1 -> P3
  • Alternatingly post statements from two processes and use semaphores for synchronization
  • Use semaphores to read and write from and to shared memory

Assignment:2

  • Alternate lines read by parent and child process from a file using semaphores
  • Alternate lines read by two diffrent processes from a file using semaphores
  • Create two shared memories X and Y. P1 writes to X. Then P2 reads from it, then P2 changes something, writes to Y and after that, P1 reads from Y, changes something and then writes to X and so on.

Assignment:3

  • Basic pipes implementation
  • Parent sends a string, child makes some changes to it and then sends it back
  • Parent and child chatting system using threads and pipes
  • P1 sends a string, P2 makes some changes to it and then sends it back(P1 & P2 are diffrent programs)
  • P1 and P2 chatting system using threads and pipes
  • Implement a program using popen()
  • Use popen and create nested pipes; P1 <---> P2 <---> P3 <---> P4

Assignment:4

  • Implement a program using polling
  • Implement a program using mkfifo()
  • Chat server using mkfifo()
  • Code Checker

Assignment:5

  • Implement a program using raise()
  • Implement a program using different kinds of signals and use user signals as well; Communicate between both child and parent
  • Use two shared memories and signals to implement two way communication between two processes
  • Make a handler that nullifies the functioning of Ctrl+c
  • Make a handler that nullifies the functioning of Ctrl+c for only the first 5 times you press Ctrl+c

Assignment:6

  • P2 receives a signal from P1 and P2 knows it is from P1
  • P1 executes P2, P3 and P4, and signals all of them at the same time as a group
  • Communicate between two threads within a process
  • Communication between two threads in two processes. P1 sends and P2 receives

Assignment:7

  • Parent Process: S; Two other processes C1 and C2 send data to S via a fifo. Another process D sends signal to S, telling to send the message from C1 and C2 to either send to G1(children S`1 and S`2) or to G2(children A and B). There is one shared memory that tells how many times kill has been called.

Assignment:8

  • Basic implementation of message passing system calls like msgget(),msgsnd(),msgrcv() and msgctl()
  • Peer to Peer chat using message queues
  • Print all the information reagarding the message queue
  • Sequentially send messages to diffrent processes i.e. P1 -> P2 -> P3 -> P4 -> P1 -> ......
  • Implement the Chat Server using message queues. If P1 sends a message then P2 and P3 should see it, If P2 sends a message then P1 and P3 should see it and If P3 sends a message then P1 and P2 should see it.

Assignment:9

  • Use readv() and writev() in a client-server program

Assignment:10

  • Create two groups of clients. If a client wants to send a message globally, it gets broadcasted to all the clients. If it wants to send locally, it gets broadcasted only to its group. Group the clients using gids.

Assignment:11

  • Implement a basic device driver
  • Implement a basic character based device driver

Assignment:12->Minor Exam questions implementation

  • Clients join a server in a circular manner and get notified by the previosly joined client that they have joined the client-server system. Any new client joins between C1 and the last client that joined the system.
  • P1 accepts the outputs of P2, P3 AND P4 as and when they are available, and then sends those outputs to P5 and P6 for printing them. P5 and P6 should get the outputs through scanf()/cin and you should not use any read(), write() commands in P1.

Assignment:13

  • Iterative Connection Oriented Client-Server system -> Where the server directly serves the client
  • Concurrent Connection Oriented Client-Server system -> Where we use fork to create a child process of the server that serves the client
  • Multi-service Concurrent Connection Oriented Client-Server system -> Where we use execv() to run a service that serves a client
  • Multi-threaded Concurrent Connection Oriented Client-Server system -> Where we use threads to manage different clients

Assignment:14

  • Using select() to implement connection between one sever and multiple clients. In this case, a group chat is implemented.

Assignment:15

  • Basic implementation of UDP(Connectionless) socket programming(Client-Server)
  • Client-Server chat program implemented using UDP
  • One server handles a 2 TCP clients and a UDP Client
  • One server handles multiple TCP and UDP Clients(The program isn't complete)

Assignment:16

  • Implementing Unix Domain sockets by passing the fd of a file being read. After sender reads half the file, it send the fd to receiver to read the other half of it

Assignment:17

  • fd_pass: Accepting the client connections and then passing their fds to an alternate server that serves those clients
  • NITW_News: Consider the following different processes at NitwNews Channel Studio as shown in sample figure below. Editor(E) gets news from Reporters(R). Reporters type news through keyboard and send to standard output, which in turn goes to Editor. Whenever Editor receives a news, he sends the news to News Reader’s table. The News Readers N1 and N2 reads the news alternatively, i.e. arrange to display the news onto the Screen.(A news will be displayed only once onto the screen). If a News Reader notices a decimal number(port address) in the start of news content, then it gets connected to a Live telecaster(L) whose IP address is IP5, and the noticed port number. After connecting, the News Reader arranges to echo onto the screen, whatever it gets from Live telecaster. At this moment the other News Reader should not read any news as live telecast is going on. Once live telecast is over, the news reading will be done alternatively by N1 and N2 as usual. The News Reader who has got connected to live telecast should also notify the Editor, so that the editor will maintain a total count of live telecasts at any moment. This count can be seen/known by anybody in the studio. If Editor notices a news message with prefix “/d” from any of the Reporters, then it passes that Reporter to Document Writer(D). The Document Writer stores the news messages that it gets from the Reporter in a file(document). Implement all the different type of processes involved in this News Channel Studio scenario. You must have to use all the IPC (Inter Process Communication) mechanisms, 90% of I/O multiplexing, required BSD socket system calls and other suitable system calls.(This question is not possible to complete with the given set of system calls that we are taught, so don't worry if it doesn't work. It didn't work for anyone)

Assignment:18

  • Implement the inetd server with multiple clients(TCP and UDP)
  • Implement the dynamic inetd server(not completed in this repository)

Assignment:19

  • Hamming Code generation
  • Hamming Code error detection
  • rpc_calc(For simple arithmetic operations)
  • rpc_math(For arithmetic operations and sorting)
  • rpc_squaring(For squaring a number)
  • rpc_practice(Digits' sum)
  • test(Just a test progrom to see if rpcgen was working fine or not)

Assignment:20

  • IP header printing
  • Packet sniffing
  • IP Spoofing
  • Svayambhoo Server -> very similar to packet sniffing program, except this has to sniff only the packets that are sent to particular ports
  • A Service server process Si can accept the first client and serves. After that it does not accept.
  • Any Service Server Process Si , can start its execution at any time on a different sfdi.
  • A Tracer process T observes a Service server process Si serving the first client. Then it sends that service port number to Ingenerate Super Server ( ISS ) so that ISS can start accepting the second client onwards for that service request.
  • After receiving a service port number from T, the ISS only accepts service requests for any of the Service server processes and passes the accepted clients to the corresponding Si
  • Any client Ci can also get service port numbers from T, and can get connected for the service.
  • Implement the processes ISS, T , Si , Ci. See image in the folder for further clarification
  • In this case, the code is not completed

Assignment:21

  • A Client Process sends an enquiry message to Server computer system, asking for what are all the service server processes available in it. All the service server processes will receive this message and each one of them replies to the client about its service information (All of them may not send replies at the same time). The client now connects to the required service sever process. A client can connect to multiple server processes. Code to implement all processes. Check the image in the folder for further clarification.(The code for this is not perfect)
  • NITW Passport(This question was not solved by me, but I am still putting it up here so that one can try, if they want): Assume that a process S in a server system is providing passport verification service as follows: client processes C1, C2, C3,…Ci, which are running in the same computer system, contact the sever process S, and sends a message containing its name(Aabhaas Das), postal address (eg, H-No : 10 -12- 45, Fathima Nagar, Warangal). Names will be different but postal address is same. A process called Verifier V, is also running in the same computer system of S. Now the server process S makes arrangements, so that process V can verify the details of a Ci. The process V has to send the same details (i.e. name, postal address) to client processes and should get a confirmed message from concerned Ci. Then it informs S about the result of verification. Depending on the result of verification, process S either can issue or deny passport to Ci. The process V and a process Ci should have to use only one descriptor. (Hint: no need of signals or any IPC)

Assignment:22

  • Printing ARP Header
  • Printing Ethernet frame

Mid Semester Laboratory Exam Quesitons

  • All in one server(Refer the image in the folder for clarification)
  • Training and Placement Server(Refer the image in the folder for clarification)

End Semester Laborartory Exam Question

There was a set of several questions, out of which, I got one. I will be putting both the pdfs in the folder as well, so that one might refer the questions, if they wish. My question was as follows.(It was the 3rd question)

  • Nitnetd Super Server(Privileged): Nitnetd super server is similar to inetd super server except on the limit of maximum number of clients for a particular service. Assume that Nitnetd server provides services S1, S2 on ports say 1, 2. The Nitnetd server can accept a maximum of 2 clients for S1 service on port 1, maximum of 3 clients for S2 service on port2. Once the maximum limit reaches on a port , Nitnetd will be rejecting connection requests of clients, until the running S1, S2 server processes exit after servicing some of the clients. Suppose at a moment 2 clients are being served by 2 server processes of S1. Then Nitnetd keeps rejecting of connection requests for port 1. Now, if any one S1 server process completes its service and exits, then Nitnetd can accept one client for S1 service on port1. At any time, if Nitnetd is not able to service clients because of maximum limit, it notifies to another side by server N2, which will be serving any number of the clients. But a Client should be given first preference to get connected to Nitnetd. ( As Nitnetd is the main server , assume that it provides speedy service connection than that of N2. ) Implement all the processes in this scenario. Hint : After all, the Service server processes are children of Nitnetd super server process.

-----THE END-----

  • Batchfile 11.7%

IMAGES

  1. Cn 2

    computer network assignment 2

  2. Computer Network ASsignment

    computer network assignment 2

  3. (DOC) Computer networks Assignment 2

    computer network assignment 2

  4. Network Assignment 2

    computer network assignment 2

  5. Assignment 2

    computer network assignment 2

  6. Advanced Computer Networks week 2 Assignment Answers || Nptel assignment week 2

    computer network assignment 2

VIDEO

  1. computer project file/computer networking project file/computer network file/computer file class 12

  2. DAY 49

  3. NPTEL Computer Networks and Internet Protocol Week 0 Assignment Solutions |@OPEducore

  4. BAIT2004 Fundamentals of Computer Network Assignment

  5. Fundamentals Of Computer Network Assignment

  6. Computer Network (Lab 2