Follow the below steps to connect peers to the private network.
Step 1: Initialise a Genesis File.
geth --identity "YourNodeName" --rpc --rpcport "8092" --datadir "DirectoryPathToStoreData" --port "30330" --nodiscover --rpcapi "db,eth,net,web3" --networkid 2010 init PathOfGenesisFile
Note: All Peers that want to connect to a particular network should have the same Genesis File.
Step 2: Open a Geth JavaScript console.
geth --identity "YourNodeName" --rpc --rpcport "8092" --datadir "DirectoryPathToStoreData" --port "30330" --nodiscover --rpcapi "db,eth,net,web3" --networkid 2010 console
Step 3: To add peers to a system, run the following command on the system that you want to add the peers to.
admin.addPeer("Argument")
where Argument is the enode value of another node which is obtained by typing admin.nodeInfo() in another system.
Eg:
admin.nodeInfo
{
enode: "enode://965dc2b0f39e199d3a07871293015d8a4ad9349834fc27b7ee5e87bea89547e4fafda3ce7982ae07c14b8770c87a6c14e3fe2f91ef0d0ca717eb6ae56aa3e74b@[::]:30330?discport=0",
//////////
}
where 30330 is the network id of another system.
Replace [::] with IP address of another system.
You can create a private blockchain without creating a Genesis File.
To find out more about it, it's recommended to go for the Blockchain online course.
Thanks.