The sh.addShard() method has the following parameter:
Parameter Description host The hostname of either a standalone database instance or of a replica set. Include the port number if the instance is running on a non-standard port. Include the replica set name if the instance is a replica set, as explained below.
The sh.addShard() method has the following prototype form:
The host parameter can be in any of the following forms:
[hostname] [hostname]:[port] [replica-set-name]/[hostname] [replica-set-name]/[hostname]:port
To add a shard on a replica set, specify the name of the replica set and the hostname of at least one member of the replica set, as a seed. If you specify additional hostnames, all must be members of the same replica set.
The following example adds a replica set named repl0 and specifies one member of the replica set: