the UDP server described needed only one socket, whereas the TCP server needed two sockets. Why? If the TCP server were to support n simultaneous connections, each from a different client host, how many sockets would the TCP server need?

Answers

Answer 1
Answer:

Answer:

The UDP server described needed only one socket, whereas the TCP server needed two sockets because:

  • With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket.
  • With the TCP server, there is a welcoming socket, and each time a client initiates a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets.

Answer 2
Answer:

Answer:

UDP uses one socket and TCP requires two sockets in a transmission because UDP is a way one connectionless protocol but TCP is connection oriented.

The TCP server that supports n simultaneous connections would require n sockets, ranging from 1 through n.

Explanation:

A socket is a fusion of a port number and a source IP address using a colon.

UDP is a transport layer protocol that is unreliable, because it does not need to establish connection to transmit packets and does not retransmit dropped packets. TCP is another transport layer protocol that is reliable, establish connection and retransmit dropped packets.

For a UDP, only one socket would be created to transmission. A socket on the client side and server side would be created in TCP connection. A server can have multiple sockets for one or different transmission protocols.


Related Questions

In the glare of the sun, it is hard to see and be seen. Name six precautions
Please explain in 2-4 sentences why diligence is needed and is important in building a pc. Thank you
Write a java program that use multiple arrays This is a simple array program which does not use an "external class & demo program" If you wish, you may break it down into methods, but that is not required. a. Set up 4 arrays which hold data about 6 items you want to sell: [make them up] int[ ] itemnum int[ ] quantity double[ ] price double[ ] sales b. Set up loops to load the itemnum, quantity and price arrays c. Set up another loop to calculate values for the sales array. [= price * quantity] d. Set up another loop to print the item number and sales amount for each transaction . e. Set up another loop to calculate the total sales of all 6 items f. print the total sales amount
Numbers are calculated in Excel using formulas and ______.
Assign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise.Here is the answer I wrote:i = []for i in range(len([s1])):if s1.count(s1[i]) > 1:has_dups = Trueelif s1.count(s1[i]) = 1:has_dups = FalseHere is the message I got from the system:Solutions with your approach don't usually use: elifPlease Help me to correct it.

Assume hosts A and B are each connected to a switch Svia 100-Mbps links. The propagation delay on each link is 25μs. The switch Sis a store-and-forward device and it requires a delay of 35μs to process a packet after is has received the last bit in the packet. Calculate the total time required to transmit 40,000 bits from Ato B in the following scenarios. (The total time is measured from the start of the transmission of the first bit at A, until the last bit is received at B. We always assume that links are bi-directional with the same transmission rate and propagation delay in each direction unless specifically instructed otherwise.)

Answers

Answer:

885 μs

Explanation:

Given that:

Switch via = 100 Mbps links

The propagation delay for each link = 25μs.

Retransmitting a received packet = 35μs

To determine:

The total time required to transmit 40,000 bits from A to B.

Considering the fact as a single packet:

Transmit Delay / link = size/bandwith

= 4×10⁴ bits / 100 × 10⁶ bits/sec

= 400 μs

The total transmission time = ( 2 × 400 + 2 × 25 + 35) μs

= (800 + 50 + 35) μs

= 885 μs

#Write a function called string_finder. string_finder should #take two parameters: a target string and a search string. #The function will look for the search string within the #target string. # #The function should return a string representing where in #the target string the search string was found: # # - If search string is at the very beginning of target # string, then return "Beginning". For example: # string_finder("Georgia Tech", "Georgia") -> "Beginning" # # - If search string is at the very end of target string, # then return "End". For example: # string_finder("Georgia Tech", "Tech") -> "End" # # - If search string is in target string but not at the # very beginning or very end, then return "Middle. For # example: # string_finder("Georgia Tech", "gia") -> "Middle" # # - If search string is not in target string at all, then # return "Not found". For example: # string_finder("Georgia Tech", "Idaho") -> "Not found" # #Assume that we're only interested in the first instance #of the search string if it appears multiple times in the #target string, and that search string is definitely #shorter than target string. # #Hint: Don't be surprised if you find that the "End" case #is the toughest! You'll need to look at the lengths of #both the target string and the search string. #Write your function here!

Answers

Answer:

I am writing a Python program:

def string_finder(target,search): #function that takes two parameters i.e. target string and a search string

   position=(target.find(search))# returns lowest index of search if it is found in target string

   if position==0: # if value of position is 0 means lowers index

       return "Beginning" #the search string in the beginning of target string

   elif position== len(target) - len(search): #if position is equal to the difference between lengths of the target and search strings

       return "End" # returns end

   elif position > 0 and position < len(target) -1: #if value of position is greater than 0 and it is less than length of target -1

       return "Middle" #returns middle        

   else: #if none of above conditions is true return not found

       return "not found"

#you can add an elif condition instead of else for not found condition as:

#elif position==-1    

#returns "not found"

#tests the data for the following cases      

print(string_finder("Georgia Tech", "Georgia"))

print(string_finder("Georgia Tech", "gia"))

print(string_finder("Georgia Tech", "Tech"))

print(string_finder("Georgia Tech", "Idaho"))

Explanation:

The program can also be written in by using string methods.

def string_finder(target,search):  #method definition that takes target string and string to be searched

       if target.startswith(search):  #startswith() method scans the target string and checks if the (substring) search is present at the start of target string

           return "Beginning"  #if above condition it true return Beginning

       elif target.endswith(search):  #endswith() method scans the target string and checks if the (substring) search is present at the end of target string

           return "End"#if above elif condition it true return End

       elif target.find(search) != -1:  #find method returns -1 if the search string is not in target string so if find method does not return -1 then it means that the search string is within the target string and two above conditions evaluated to false so search string must be in the middle of target string

           return "Middle"  #if above elif condition it true return End

       else:  #if none of the above conditions is true then returns Not Found

           return "Not Found"

Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output for the given program Gus Bob Ann 1 short_names- Your solution goes here 2 # print names 4 print(short_names[0])

Answers

Answer:

shortNames = ['Gus', 'Bob','Zoe']

Explanation:

In this assignment, your knowledge of list is been tested. A list is data structure type in python that can hold different elements (items) of different type. The general syntax of a list is

listName = [item1, "item2", item3]

listName refers to the name of the list variable, this is followed by a pair of square brackets, inside the square brackets we have items separated by commas. This is a declaration and initialization of a list with some elements.

The complete python code snippet for this assignment is given below:

shortNames = ['Gus', 'Bob','Zoe']

print(shortNames[0])

print(shortNames[1])

print(shortNames[2])

Write a program that reads a string (password) and a number. The program will keep asking the user for a password and number as long as the user does not provide the expected values ("milkyway" and 1847, respectively), and as long as the user has not exhausted the maximum number of attempts . In addition, the program will stop asking for data if the word "quit" is provided as a password value (in this case, the program will not read the number). The program will print the message "Wrong credentials" when an invalid password or number (or both) is provided. If the user eventually provides the correct credentials the message "Access Granted" will be displayed; otherwise the message "Access Denied" will be generated. The following example illustrates the messages to use to read data and to display results. Enter password: milkyway
Enter number: 10
Wrong credentials
Enter password: tomato
Enter number: 1847
Wrong credentials
Enter password: milkyway
Enter number: 1847
Access Granted

Answers

Answer:

// Program is written in Java Programming Language

// Comments are used for explanatory purpose

// Program starts here

import java.util.Scanner;

public class checkPass{

public static void main (String [] args)

{

// Call scanner function

Scanner input = new Scanner (System.in);

// Declare user password and number

string userpass;

int usernum;

// Initialise password and number

string password = "milkway";

int number = 1847;

// Initialise number of attempts to 0

int attempts = 0;

while (attempts<=10 )

{

// Prompt user to enter password and number

System.out.println("Enter password: ");

userpass = input.nextLine();

System.out.println("Enter Number: ");

usernum = input.nextInt();

if(userpass == password && usernum == number)

{

System.out.print("Access Granted");

attempts = 11;

}

else

{

System.out.print("Wrong Credentials");

attempts++;

}

}

}

}

Explanation:

The correct password and number are defined and stored in their respective variables. While loop is used to keep on taking input from the user until the user inputs correct password and number or user runs out of attempts. The number of attempts is set to 3 but can be changed to any number as you like.

The user is asked to input password first then we check if the user wants to quit? if true terminate program else continue to get the input number from the user.

Now we have password and number from the user, check if both are correct? if yes then grant the access else wrong credentials add one to the attempt, display the number of attempts left and repeat the whole loop again.

Python Code:

password = "milkyway"

number = 1847

attempts=0

while attempts < 3:

   pas=str(input("Please Enter the Password\n"))

   if pas=="quit":

       print("You quit!")

       break

   num=int(input("Please Enter the Number\n"))

   if pas==password and num==number:

       print("Access Granted")

   else:

       print("Wrong credentials")

       attempts+=1

       print("Attempts left: ",3-attempts)

Output:

Test 1:

Please Enter the Password

waysnf

Please Enter the Number

1847

Wrong credentials

Attempts left: 2

Please Enter the Password

milkyway

Please Enter the Number

1942

Wrong credentials

Attempts left: 1

Please Enter the Password

milkyway

Please Enter the Number

1847

Access Granted

Test 2:

Please Enter the Password

menas

Please Enter the Number

4235

Wrong credentials

Attempts left: 2

Please Enter the Password

quit

You quit!

Note: feel free to ask in comments if you dont understand anything!

Conduct research to determine the best network design to ensure security of internal access while retaining public website availability.

Answers

The best method in network security to prevent intrusion are:

  • Understand and use OSI Model.  
  • Know the types of Network Devices.  
  • Know Network Defenses.  
  • Separate your Network.

How can I improve security through network design?

In the above case, the things to do is that one needs to focus on these areas for a a good network design. They are:

  • Physical security.
  • Use of good firewalls.
  • Use the DMZ, etc.

Therefore, The best method in network security to prevent intrusion are:

  • Understand and use OSI Model.  
  • Know the types of Network Devices.  
  • Know Network Defenses.  
  • Separate your Network.

Learn more about network security from

brainly.com/question/17090284

#SPJ6

Answer:

There are many benefits to be gained from network segmentation, of which security is one of the most important. Having a totally flat and open network is a major risk. Network segmentation improves security by limiting access to resources to specific groups of individuals within the organization and makes unauthorized access more difficult. In the event of a system compromise, an attacker or unauthorized individual would only have access to resources on the same subnet. If access to certain databases in the data center must be given to a third party, by segmenting the network you can easily limit the resources that can be accessed, it also provides greater security against internal threats.

Explanation:

The computer output for integer programs in the textbook does not include reduced costs, dual values, or sensitivity ranges because these variables are not meaningful for integer programs. TrueFalse

Answers

Answer:

The answer is True