Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an application that connects to a database and retrieves information from it. The way it is written is: for every request received, create a new connection to the DB server and retrieve data.

When testing, if the network cable is removed from the host, and reconnected, the application goes back to retrieving data normally. However, if the "connected" option is unchecked and rechecked to simulate a disconnection, the application cannot connect to the database again, even though all handlers etc are created for each connection.

Question: Is disconnecting the network cable from the host different than unchecking the "Connected" option in VM configuration?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

No there should be no difference, but if you have transient ports set on your switch it may give you a new port number which may effect the network reconnection in an unexpected manner. The vswitches don't act like normal switches either, they are more aware of the VM configuration state, so may also be effecting what happens. You would run a wireshark on a port that is in promiscuous mode to try to isolate the problem.

share|improve this answer
add comment

No, there is no difference. Unchecking 'Connected' is just breaking the virtual link between the card and vSwitch:

Unchecked 'Connected' and clicked 'OK': 
Nov 8 09:11:28 mtasink8 kernel: eth1: NIC Link is Down 
Checked 'Connected' and clicked 'OK': 
Nov 8 09:11:40 mtasink8 kernel: eth1: NIC Link is Up 10000 Mbps
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.