Nt1310 Unit 7

710 Words3 Pages

HTTP & TCP Input & Output In this simple java program, I inputted an HTTP URL for a website, and when the program is run, it returns HTTP data for the specified website. In terms of TCP/IP model, this HTTP request would fit under the application layer, as I am using an interface to exchange data through a network. More specifically, as the data exchange is utilizing the HTTP protocol, and sends the data through port 80. Here, I am using a very simple java TCP server and client. On the left is the server, and on the right is the client. When I type a message and press enter on the server (left side), it is sent (locally) to the TCP client. Much like the HTTP client above, this utilizes the application layer of the TCP/IP …show more content…

In this capture, a 3-way handshake is established, then an HTTP get request is made, the server sends the html data to the client, and finally, a 4-way handshake is made to terminate the the TCP request. Before the web browser can connect to the website, it must first establish a connection through TCP. A 3-step exchange occurs to initiate this connection, which is known as a 3-way handshake. The client sends a SYNchronize packet - which you can see in the screenshot – to the server. In response, the server sends SYN-ACK (Synchronize Acknowledgement) to the web browser client. Finally, the client sends a ACK packet back to the server, acknowledging the connection has been established. This sets up a full duplex connection between the client and server, meaning they can both send and receive data from each other simultaneously. After the 3-way handshake in the screenshot, an HTTP get request is made by the web browser for the website; the server ACKnowledges this and sends the website data to the web browser. For ending the connection, a 4-way handshake is used. In the screenshot, the client first ACKnowledges that it has successfully received the HTTP data, and then the sever sends out a FIN packet, which the client ACKnowledges, and then the client sends out a FIN packet, which the sever then ACKnowleges, and then the connection times out, thus ending the data exchange …show more content…

This division can be represented in either dot decimal notation or CIDR notation. A dot decimal notation subnet mask would look like this: 255.255.255.0. That same subnet mask would look like IP Address/24 in CIDR notation. Essentially, a subnet mask is a number that tells a device how many other devices it can directly connect to (through a switch) within a network or subnetwork without having to go through a default gateway (aka a router). In a network such as this one, the circled subnet at the bottom left is given a subnet mask of /24, or 255.255.255.0. This means that within its subnetwork (the switch it is connected to) it would be able to connect to any other host connected to its local switch, as the subnet mask means it could connect to any host with the IP address 10.10.1.x, meaning that it will NOT go through the lab-a router if the IP is within that range. If we change the subnet mask of the circled subnet to /16, or 255.255.0.0, this would effectively disable the functionality of the host. This is because now the host will attempt to connect to all the hosts with 10.10.x.x within its own subnet and avoid using the lab-a router. This will break the connectivity of the circled host because all the other hosts that it could connect to are defined as 10.10.2.x, and the subnet mask of /16 means it will not go through the default gateway/router in order to access these

More about Nt1310 Unit 7