Swarm on different machines

Can we configure swarm on different machine?

yes. you can even mix (with a bit of caution) windows and linux docker nodes.

I did that by making my 1st laptop as swarm manager but when i ran the command "docker swarm join"
on my 2nd laptop it showed me the following error
Error response from daemon: Timeout was reached before node was joined. The attempt to join the swarm will continue in the background. Use the “docker info” command to see the current swarm status of your node.

Both the laptops are on the same network

Did you configured the docker daemon to bind to a TCP port?

This is necessary to work with swarm.

For playing with swarm http://play-with-docker.com is probably an interesting pointer for you.