I have read that entry nodes knows clients ipaddress but how is it possible because tor uses socks proxy to communicate
The socks proxy is run on your own computer. It's not something over the network. Tor needs it as an additional layer to talk with the applications since the applications don't speak Tor protocol.
Regardless, the entry node NEEDS to know the client's IP address, or else there is no way it can send the response (the content you requested) back to you. Think of it as sending a mail. How are you gonna receive the response if nobody knows where you are? Tor simply acts as a series of third parties that delivers the mail for you, but in the end there got to be somebody that knows where you are. It's just a matter of who you trust to give this information to. The point of Tor is that since there is a chain of middle nodes, with each only knowing their direct upstream and downstream neighbor, no one knows at the same time the source AND the final destination of the message (unless all nodes on the chain so happen to be controlled by the same party).
I think the socks is needet to be able to connect to tor generally and is created on the users host. So the socks will have the ip address the clients internet connection has.
But whats the problem if the entry sees the ip address? The arrriving traffic is allready encrypted and not readable by the node. Its also passed encryped to the next node. I do not see a reason to worry because of the ip address.
this question indicates that you should do some more research & reading to understand and use Tor safely.
to make it clear in very easy (non-techy) words:
Tor is NOT a type of connection (like VPNs), it is more like a proxy. so if you use Tor on a not prepared OS with not prepared programs (which is NOT recommended), you need to specify where the traffic should go... this is the point where socks comes in. you can configure every program which supports socks to rout its (TCP) traffic through Tor.
for using Tor more safely this answer (especially its 2nd part) may be also useful for you.