diff --git a/cli/src/main/java/org/onosproject/cli/net/DomainIdCompleter.java b/cli/src/main/java/org/onosproject/cli/net/DomainIdCompleter.java
new file mode 100644
index 0000000..34833d3
--- /dev/null
+++ b/cli/src/main/java/org/onosproject/cli/net/DomainIdCompleter.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2014-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.cli.net;
+
+import org.apache.karaf.shell.console.Completer;
+import org.apache.karaf.shell.console.completer.StringsCompleter;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.net.domain.DomainId;
+import org.onosproject.net.domain.DomainService;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+
+/**
+ * Domain ID completer.
+ */
+public class DomainIdCompleter implements Completer {
+
+    @Override
+    public int complete(String buffer, int cursor, List<String> candidates) {
+        // Delegate string completer
+        StringsCompleter delegate = new StringsCompleter();
+
+        // Fetch our service and feed it's offerings to the string completer
+        DomainService service = AbstractShellCommand.get(DomainService.class);
+        Iterator<DomainId> it = service.getDomainIds().iterator();
+        SortedSet<String> strings = delegate.getStrings();
+        while (it.hasNext()) {
+            strings.add(it.next().id());
+        }
+
+        // Now let the completer do the work for figuring out what to offer.
+        return delegate.complete(buffer, cursor, candidates);
+    }
+}
diff --git a/cli/src/main/java/org/onosproject/cli/net/GetDomainsCommand.java b/cli/src/main/java/org/onosproject/cli/net/GetDomainsCommand.java
new file mode 100644
index 0000000..2b54406
--- /dev/null
+++ b/cli/src/main/java/org/onosproject/cli/net/GetDomainsCommand.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.cli.net;
+
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.net.domain.DomainId;
+import org.onosproject.net.domain.DomainService;
+
+import java.util.Set;
+
+/**
+ * Gets the complete list of domain IDs.
+ */
+@Command(scope = "onos", name = "domains", description = "Gets the list of domain IDs")
+public class GetDomainsCommand extends AbstractShellCommand {
+
+    @Override
+    public void execute() {
+        DomainService domainService = AbstractShellCommand.get(DomainService.class);
+
+        Set<DomainId> domainIds = domainService.getDomainIds();
+        domainIds.forEach(domainId -> print("%s", domainId.id()));
+    }
+}
