Connection problems when playing on local network

When playing on LAN, periodically it gets laggy and says there are connection problem, it’s really strange having connection problems playing on local network, what’s more the ping is quite normal all the time and does not exceed 10 ms. If it matters there are two computers in the network and all are capable of running half-life 2 on high settings and playing it fluently, the modem is 20 mb (6 real) and the connection between computers is through the modem.
Any help will be appreciated and I apologize in advance if it have already been asked, but the forum search isn’t quite efficient. Thank you.