
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Please provide code and explanation. thanks!
1. Please provide a snippet of code that illustrates blocking on a send() function in socket.
2. Provide 3 unique ways that we can tell if a web server is up and accepting connections correctly.
Expert Solution

arrow_forward
Step 1
Note: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as separate questions. Hence I am answering the first question.
As no programming language is mention. So I am using python.
Step by stepSolved in 3 steps with 2 images

Knowledge Booster
Similar questions
- Step 1: Write a script to find and print your local IP address Use the following code: import socket hostname = socket.gethostname() local_ip = socket.gethostbyname(hostname) print(local_ip) Step 2: Write a script to find and print your OS platform and release (for example, "Windows version 10") Use the following code: import platform print(platform.system ()) print(platform.release ()) Step 3: Write a script to find and print a "ping sweep"? Use the following code: import os my_ip="192.168.10.103" # sub your ip address os.system('ping -n 4 {}'.format(my_ip)) Step 4: Write a script to find and print current day and time import time now = time.localtime() print(time.strftime("%m/%d/%Y %I:%M:%S %p", now)) Extra Credit: Add code to Step#4 which prints a greeting, either "good morning", "good afternoon", "or good evening", depending on the current time.arrow_forwardI made a TCP server using socket python,basically my server can: - Upload (“put”) request: The client should, at the very least, open (in binary mode) the local file defined on the command line, read its data, send it to the server through the socket, and finally close the connection. - Download (“get”) request: The client should, at the very least, create the local file defined on the command line (in exclusive binary mode), read the data sent by the server, store it in the file, and finally close the connection. To avoid accidents, the client should deny overwriting existing files. - Listing (“list”) request: the client should, at the very least, send an appropriate request message, receive the listing from the server, print it on the screen one file per line, and finally close the connection. I want you to draw an ER diagram that can show the process above please.arrow_forwardwrite a custom Snort rule to handle Inbound and Outbound HTTP traffic on the Private (Host-Only) network. Upload a screen shot of the Snort console displaying the alerts. In this exercise, we are going to create two Snort monitoring rules that will be used to alert on HTTPnetwork traffic for both Inbound and Outbound traffic. Remember, Inbound rules are those rules whosedestination is to your internal network (HOME_NET), outbound rules are directed out of your internalnetwork (!HOME_NET). When you use “any” there is no distinction on whether a rule is Inbound orOutbound. When using Inbound/Outbound to describe local traffic, traffic generated on the samenetwork (as in this lab on VMnet-1), the Inbound reference is to your client system that is running snortthe Outbound reference is to the HTTP server.You should now understand a little bit about custom rules, so given the following rule:alert tcp any any -> any 80 (msg:"TCP HTTP Testing Rule"; sid:1000004;)You should be able to…arrow_forward
- Which of the following characteristics below are associated with a UDP socket? Check one or more that apply. when contacted, the server will create a new server-side socket to communicate with that client socket(AF_INET, SOCK_DGRAM) creates this type of socket socket(AF_INET, SOCK_STREAM) creates this type of socket data from different clients can be received on the same socket provides reliable, in-order byte-stream transfer (a "pipe"), from client to server provides unreliable transfer of a groups of bytes ("a datagram"), from client to server a server can perform an accept() on this type of socket the application must explicitly specify the IP destination address and port number for each group of bytes written into a socket ICarrow_forwardSuppose an HTTP client makes a first GET request to the gaia.cs.umass.edu web server for a base page that it has never before requested, which contains an embedded object, which causes the client to make a second GET request. A very short time later, the client then makes a third GET request - for the same base page, with that third GET request having an If-Modified-Since field (as does the 4th GET request that the client makes for the embedded object). Neither the base object nor the jpeg object has changed. How many round trip times (RTTs) are needed from when the client first makes the third GET request (i.e., when it requests the base object for the second time) to when the base page and the jpeg file are displayed a second time, assuming that: any time needed by the server to transmit the base file, or the jpeg file into the server's link is (each) equal to 1/2 RTT the time needed to transmit an HTTP GET into the client's link is zero? the time needed by the server to transmit…arrow_forwardThe host-target discussion is interesting, but how about we also talk about the word "reuse"?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY