N5ken's technical blog

Just another WordPress.com site

Category Archives: Network

Isolate your test environment in VM Desktop from the intranet of your company

Due to the increasing number of hosts and devises we are using now in our company, so it’s more easier to cause IP conflict than ever, to avoid affecting the test result, it’s better to separate our network from intranet.

Summary:
It’s a huge benefit for using the virtual network, on the one hand, it saving the precious IP address, on the other hand, the virtual network is more stable for the intranet, so this makes our test result more reliable! Especially in HA, federation, test automation and so on.

In the following tutorial, we will take a look at how to manage our NAT network:

1. After we finish installing the VM Workstation, we should see two more virtual network interface cards in “Network and Sharing Center”

2. The network structure:

3. So firstly, change the network connection setting of our virtual machine:

4. Secondly, restart network interface card or run “ipconfig /renew” to connect to VMnet08 (here is need to confirm that we get a C class IP address, e.g. 192.168.x.x)

5. Lastly, for testing the connectivity, we can ping each other by the host name, and our machine will send ping packages to the network 10.30.x.x and 192.168.x.x.

6. we need to be sure we are pinging the machine in VMnet 08.

7. If you are unable to connect to the internet, please check the gateway of your VM machine, it should be 192.168.133.2 normally.

TCP and IP Datagram

For reviewing the concept and the structure of TCP, UDP, IP and HTTP, here are some diagram for reference, and will have further posts for discussion.

A Very Simplified Description of TCP 3-Way Handshake (SYN,SYN-ACK,ACK)

TCP 3-Way Handshake is used to establish TCP socket connections and tear down TCP socket connections over the network.

3 way handshake

From this image, we can see the TCP’s three-way handshaking technique is referred to as the 3-way handshake: SYN, SYN-ACK, ACK, SYNchronize and ACKnowledge messages are indicated by a bit inside the header of the TCP segment.

When the communication between two computers ends, another 3-way communication is performed to tear down the TCP socket connection. This setup and teardown of a TCP socket connection is part of what qualifies TCP a reliable protocol. TCP also acknowledges that data is successfully received and guarantees the data is reassembled in the correct order.

Note that UDP is connectionless. That means UDP doesn’t establish connections as TCP does, so UDP does not perform this 3-way handshake and for this reason, it is referred to as an unreliable protocol.

Some useful HTTP return codes

This article is from: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

10 Status Code DefinitionsEach Status-Code is described below, including a description of which method(s) it can follow and any metainformation required in the response.

Here are some codes we may see usually:

200 OK

304 Not Modified

400 Bad Request

403 Forbidden

404 Not Found

500 Internal Server Error

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout
Follow

Get every new post delivered to your Inbox.