You can run bitcoind on one machine, and communicate with another over your LAN using bitcoind's JSON-RPC API.
Once bitcoind is running just hit your host machine's local network IP on port 8332 with your API calls. You can find out your local network IP of your host machine by typing ipconfig in your command prompt.
You didn't mention how you were trying to communicate so let's say for example if you're using Python-BitcoinRPC
from bitcoinrpc.authproxy import AuthServiceProxy
access = ServiceProxy("http://USERNAME:PASSWORD@192.168.2.1:8332")
access.getinfo()
Make sure you update the ServicProxy() function with the host's local IP, and your username and password from your bitcoin.conf.
I want just to excute bitcoin-cli commands from a bitcoin client E.g bitcoin-cli -regtest getbalance. I am not writing a program. – PHD LAB – 2016-10-20T12:02:54.047
Ok I might have misunderstood your question. You want one machine on your LAN to hold the blockchain, and another machine to run the bitcoin client but NOT store the blockchain, but still be able to execute commands. Perhaps this will help https://bitcoin.stackexchange.com/questions/7455/how-to-setup-a-lan-network-with-only-one-bitcoind-client-downloading-the-blockch?rq=1
– m1xolyd1an – 2016-10-20T12:24:40.160i want to setup a local private chain so i thought about using a node as a server and the other as a client – PHD LAB – 2016-10-20T12:36:06.373