Describe two major network-layer functions

Assignment Help Computer Networking
Reference no: EM131230679

Part -1:

Describe why an application developer might choose to run over TCP rather than UDP.

An application developer might choose to run TCP rather than UDP because, most firewalls are configured to block UDP traffic. Also a transport-layer protocol provides for logical communication between applications processes running on different hosts.

Suppose host A is sending host B a large file over a TCP connection. If the acknowledge number for a segment of this connection is y, then the acknowledge number for the subsequent segment will necessarily be y+ 1. Is this true or false? Why?

This is false because the acknowledged number is the next sequence number that the receiver expects, and the sequence number of the next sequence depends on the number of 8-byte characters in the current segment.

Suppose 5 TCP connections are present over some bottleneck link of rate X bps. All connections have a huge file to send (in the same direction over the bottleneck link). The transmissions of the files start at the same time. What is the transmission rate that TCP would like to give to each of the connections?

Transmission rate of each connection is: X/5

How to identify a UDP socket? How to identify a TCP socket? Are these data fields same? Why?

UDP Sockets are unreliableconnectionless services to the invoking application. In addition to this a UDP socket is fully identified by destination IP and destination port. Now with a TCP packet it provides a reliable, connection-oriented services to the invoking application. Also, a TCP socket is identified by a four-tuple?source IP address, source port number, destination IP address, destination port number).

UDP and TCP use 1's complement for their checksums. Suppose you have the following three 8-bit words: 11010101, 01111000, 10001010. What is the 1's complement of the sum of these words? Show all work. Why UDP takes the 1's complement of the sum, that is, why not just use the sum?

decimal 0 = 0 in binary
decimal 1 = 1 in binary
decimal 2 = 10 in binary
decimal 3 = 2 + 1 = 11 in binary
decimal 4 = 22 = 100 in binary
decimal 7 = 22 + 2 + 1 = 111 in binary
decimal 8 = 23 = 1000 in binary
decimal 10 = 23 + 2 = 1010 in binary
decimal 16 = 24 = 10000 in binary
decimal 20 = 24 + 22 = 10100 in binary

Binary Addition
The addition of binaries is similar to the decimal system. The only different is to carry over when the result is 2.
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0, carry 1 = 10
For example:
0 1 1 0 1
+ 1 0 1 1 1
---------------------
= 1 0 0 1 0 0

Suppose Client A. initiates a SMTP session with server S. Provide possible source and destination port numbers for:

a. The segment sent from S to A.
b. The segment sent from S to S.

 

Source Port #

Destination Port #

The segment sent from S to A

X

25

The segment sent from A to S

25

Y

Compare two pipelining protocols shown in the textbook - go-back-N and selective repeat.

In our textbook, protocol rdt 3.0 shows a data transfer protocols that uses only acknowledges. As an alternative, consider a reliable data transfer protocol that uses negative acknowledgements. Suppose the sender sends data only infrequently. Will a NAK-only protocol be preferable to protocol that uses ACKs? Why? Suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. In the second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why?

Let us assume that the roundtrip delay between sender and receiver is constant and known to the sender. Would a timer still be necessary in protocol rdt 3.0, assuming that packets can be lost? Please explain.

Briefly discuss the basic mechanisms adopted by TCP congestion control.

Describe two major network-layer functions in a datagram network.

Describe how packet loss can occur at input and outputs of a router. Is it possible to eliminate packet loss at these ports? If so, how? If not, please explain.

Suppose an application generates chunks of 960 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment and then an IP datagram. What percentage of each datagram will be overhead, and what percentage will be application data?

Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table:

For each of the 3 interfaces, give the associated range of destination host addresses and the number of addresses in the range.

Consider the following network. With the indicated link costs, use Dijkstra's shortest-path algorithm to compute the shortest path from x to all network nodes. Show how the algorithm works by computing a table similar to the textbook example. In cases when several candidate nodes have the same minimal costs, choose a node according to non-decreasing alphabetical order.

1461_Figure1.jpg

 

Consider the count-to-infinity problem in the distance vector routing. Will the problem occur if we decrease the cost of a link? Why?

IPv6 adopts a fixed-length 40 byte IP header. What is the major advantage of this approach compared to that in IPv4?

Suppose an ISP owns the block of addresses of the form 200.200.128.0/19. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets?

Why are different inter-AS and intra-AS protocols used in the Internet?

Part 2. Textbook questions Chapter 3

Describe why an application developer might choose to run over TCP rather than UDP.

Suppose host A is sending host B a large file over a TCP connection. If the acknowledge number for a segment of this connection is y, then the acknowledge number for the subsequent segment will necessarily be y+ 1. Is this true or false? Why?

Suppose 5 TCP connections are present over some bottleneck link of rate X bps. All connections have a huge file to send (in the same direction over the bottleneck link). The transmissions of the files start at the same time. What is the transmission rate that TCP would like to give to each of the connections?

How to identify a UDP socket? How to identify a TCP socket? Are these data fields same? Why?

UDP and TCP use 1's complement for their checksums. Suppose you have the following three 8-bit words: 11010101, 01111000, 10001010. What is the 1's complement of the sum of these words? Show all work. Why UDP takes the 1's complement of the sum, that is, why not just use the sum?

Suppose Client A initiates a SMTP session with server S. Provide possible source and destination port numbers for:

a. The segment sent from S to A.
b. The segment sent from A to S.

Compare two pipelining protocols shown in the textbook - go-back-N and selective repeat.

In our textbook, protocol rdt 3.0 shows a data transfer protocols that uses only acknowledges. As an alternative, consider a reliable data transfer protocol that uses negative acknowledgements. Suppose the sender sends data only infrequently. Will a NAK-only protocol be preferable to protocol that uses ACKs? Why? Suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. In the second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why?

Let us assume that the roundtrip delay between sender and receiver is constant and known to the sender. Would a timer still be necessary in protocol rdt 3.0, assuming that packets can be lost? Please explain.

Briefly discuss the basic mechanisms adopted by TCP congestion control.

Chapter 4

Describe two major network-layer functions in a datagram network.

Describe how packet loss can occur at input and outputs of a router. Is it possible to eliminate packet loss at these ports? If so, how? If not, please explain.

Suppose an application generates chunks of 960 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment and then an IP datagram. What percentage of each datagram will be overhead, and what percentage will be application data?

Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table:

Prefix Match

Interface

00

0

001

1

otherwise

2

For each of the 3 interfaces, give the associated range of destination host addresses and the number of addresses in the range.

Consider the following network. With the indicated link costs, use Dijkstra's shortest-path algorithm to compute the shortest path from x to all network nodes. Show how the algorithm works by computing a table similar to the textbook example. In cases when several candidate nodes have the same minimal costs, choose a node according to non-decreasing alphabetical order.

517_Figure.png

Consider the count-to-infinity problem in the distance vector routing. Will the problem occur if we decrease the cost of a link? Why?

IPv6 adopts a fixed-length 40 byte IP header. What is the major advantage of this approach compared to that in IPv4?

Suppose an ISP owns the block of addresses of the form 200.200.128.0/19. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets?

Why are different inter-AS and intra-AS protocols used in the Internet?

Part 3. Practical assignment

For this assignment, you can choose to use either Java or Python. Please submit the following items in a ZIP file.
1) Source code;
2) Instructions on how to install and run your program;
3) A brief design document explaining your solution.

Note: I shall not provide remedial help concerning coding problems that you might have. Students are responsible for the setup of their own coding environment. Each student is also expected to debug their code. In addition most SMTP servers (e.g., NSU's email server at nsusmtp.nova.edu) require authentication before sending messages. You can either hard-code the email account's authentication information into the source code, or create a dummy or a free SMTP server (shown as follows) to test your program.

https://www.softstack.com/freesmtp.html https://www.hmailserver.com/
https://sourceforge.net/directory/os:windows/freshness:recently-updated/?q=smtp%20server (There are a couple of options. It seems that SMTPMail is a viable option if you feel comfortable with common line mode.)

Sending Email with Java

Java provides an API for interacting with the Internet mail system, which is called JavaMail. However, we will not be using this API, because it hides the details of SMTP and socket programming. Instead, you should write a simple Java program that establishes a TCP connection with a mail server through the socket interface, and sends an email message.

You can place all of your code into the main method of a class called EmailAgent. Run your program with the following simple command:

java EmailAgent

This means you will include in your code the details of the particular email message you are trying to send.

Here is a skeleton of the code you'll need to write:

import java.io.*; import java.net.*;

public class EmailAgent
{
public static void main(String[] args) throws Exception
{
// Establish a TCP connection with the mail server.


// Create a BufferedReader to read a line at a time. InputStream is = socket.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr);

// Read greeting from the server. String response = br.readLine(); System.out.println(response);
if (!response.startsWith("220")) {
throw new Exception("220 reply not received from server.");
}

// Get a reference to the socket's output stream. OutputStream os = socket.getOutputStream();

// Send HELO command and get server response. String command = "HELO alice\r\n"; System.out.print(command); os.write(command.getBytes("US-ASCII")); response = br.readLine(); System.out.println(response);
if (!response.startsWith("250")) {
throw new Exception("250 reply not received from server.");
}

// Send MAIL FROM command.


// Send RCPT TO command.


// Send DATA command.


// Send message data.

// End with line with a single period.


// Send QUIT command.

}
}

For this assignment, you are required to use command-line-based Java and should not rely on any features provided by IDE such as NetBeans, Eclipse, etc. In your submission please send me a stand-alone document named "EmailAgent.java". No executables should be submitted. No graphical interface should be used by your program.

Sending Email with Python

You can implement your email client using Python. You should write a simple Python program that follow a step-by-step process to establish a TCP connection with a mail server through sockets, and send an email message. The other requirements are very similar to those by choosing Java. I am attaching a skeleton of the Python code below. Again Python 2 is recommended for this assignment.

from socket import *

# Message to send
msg = '\r\nHello World' endmsg = '\r\n.\r\n'

# Choose a mail server and call it mailserver mailserver = 'smtp.nova.edu'

# Create socket called clientSocket and establish a TCP connection with mailserver
clientSocket = socket(AF_INET, SOCK_STREAM)

# Port number may change according to the mail server clientSocket.connect((mailserver, 587))
recv = clientSocket.recv(1024) print recv
if recv[:3] != '220':
print '220 reply not received from server.'

# Send HELO command and print server response. heloCommand = 'HELO gmail.com\r\n' clientSocket.send(heloCommand)
recv1 = clientSocket.recv(1024) print recv1
if recv1[:3] != '250':
print '250 reply not received from server.'

# Send MAIL FROM command and print server response.

# Send RCPT TO command and print server response.

# Send DATA command and print server response.

# Send message data.

# Message ends with a single period.

# Send QUIT command and get server response.

Reference no: EM131230679

Questions Cloud

A downward sloping yield curve with a steep slope : Assume that a downward-sloping yield curve with a steep slope exists. Based on this information, should Elon consider using financial futures as a hedging technique? Explain.
Calculate the planning materiality : ACFI3005 Auditing and Assurance Assignment. Calculate the planning materiality and provide two reasons justifying the base you have chosen for your calculation. Refer to additional information
Should blue devil consider using financial futures : Assume that an upward-sloping yield curve with a steep slope exists.  - Based on this information, should Blue Devil consider using financial futures as a hedging technique?
How were certain shots framed : From a film of your own choosing (something you have access to), pick a scene and discuss the cinematography. How were certain shots framed? Was there camera movement? If so, what kind? Discuss lighting choices. How did the cinematographer's d..
Describe two major network-layer functions : CISC 650 Computer Networks - Describe why an application developer might choose to run over TCP rather than UDP and choose to run TCP rather than UDP because, most firewalls are configured to block UDP traffic. Also a transport-layer protocol provid..
Which factor is most influential on decision : Which factor is most influential on your decision regarding Treasury bond futures and on your decision regarding stock index futures?
Write a summary of each instructional strategy : Access 3 journal articles that present instructional strategies that have shown evidence of being effective in teaching students with the target disability you are focusing on this semester. After you have identified at least 3 instructional stra..
Use of interest rate futures : Do you think financial institutions that could be adversely affected by a decline in interest rates would benefit from hedging their exposure with interest rate futures? Explain.
Write a c program that accepts a list of numbers from user : When the program is run, the prompts and responses will look like the following:

Reviews

len1230679

10/4/2016 6:57:02 AM

I have started some of the questions, but having trouble with the other questions. I have attached the original assignment and a word document that I started working on.

Write a Review

Computer Networking Questions & Answers

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd