diff --git a/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java b/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java
new file mode 100644
index 0000000..4f23231
--- /dev/null
+++ b/core/api/src/test/java/org/onlab/onos/net/DefaultHostTest.java
@@ -0,0 +1,36 @@
+package org.onlab.onos.net;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.google.common.testing.EqualsTester;
+
+public class DefaultHostTest extends  TestDeviceParams {
+
+    @Test
+    public void testEquality() {
+        Host h1 = new DefaultHost(PID, HID1, MAC1, VLAN1, LOC1, IPSET1);
+        Host h2 = new DefaultHost(PID, HID1, MAC1, VLAN1, LOC1, IPSET1);
+        Host h3 = new DefaultHost(PID, HID2, MAC2, VLAN2, LOC2, IPSET2);
+        Host h4 = new DefaultHost(PID, HID2, MAC2, VLAN2, LOC2, IPSET2);
+        Host h5 = new DefaultHost(PID, HID2, MAC2, VLAN1, LOC2, IPSET1);
+
+        new EqualsTester().addEqualityGroup(h1, h2)
+                .addEqualityGroup(h3, h4)
+                .addEqualityGroup(h5)
+                .testEquals();
+    }
+
+    @Test
+    public void basics() {
+        Host host = new DefaultHost(PID, HID1, MAC1, VLAN1, LOC1, IPSET1);
+        assertEquals("incorrect provider", PID, host.providerId());
+        assertEquals("incorrect id", HID1, host.id());
+        assertEquals("incorrect type", MAC1, host.mac());
+        assertEquals("incorrect VLAN", VLAN1, host.vlan());
+        assertEquals("incorrect location", LOC1, host.location());
+        assertEquals("incorrect IP's", IPSET1, host.ipAddresses());
+    }
+
+}
diff --git a/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java b/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java
index 3adcabc..fefc499 100644
--- a/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java
+++ b/core/api/src/test/java/org/onlab/onos/net/HostIdTest.java
@@ -1,21 +1,30 @@
 package org.onlab.onos.net;
 
 import com.google.common.testing.EqualsTester;
+
 import org.junit.Test;
+import org.onlab.packet.MACAddress;
+import org.onlab.packet.VLANID;
 
 import static org.onlab.onos.net.HostId.hostId;
 
 /**
- * Test of the host identifier.
+ * Test for the host identifier.
  */
 public class HostIdTest extends ElementIdTest {
 
+    private static final MACAddress MAC1 = MACAddress.valueOf("00:11:00:00:00:01");
+    private static final MACAddress MAC2 = MACAddress.valueOf("00:22:00:00:00:02");
+    private static final VLANID VLAN1 = VLANID.vlanId((short) 11);
+    private static final VLANID VLAN2 = VLANID.vlanId((short) 22);
+
+    @Override
     @Test
     public void basics() {
         new EqualsTester()
-                .addEqualityGroup(hostId("nic:foo"),
-                                  hostId("nic:foo"))
-                .addEqualityGroup(hostId("nic:bar"))
+                .addEqualityGroup(hostId("nic:00:11:00:00:00:01/11"),
+                                  hostId(MAC1, VLAN1))
+                .addEqualityGroup(hostId(MAC2, VLAN2))
                 .testEquals();
     }
 
diff --git a/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java b/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java
new file mode 100644
index 0000000..930cb3b
--- /dev/null
+++ b/core/api/src/test/java/org/onlab/onos/net/TestDeviceParams.java
@@ -0,0 +1,40 @@
+package org.onlab.onos.net;
+
+import static org.onlab.onos.net.DeviceId.deviceId;
+
+import java.util.Set;
+
+import org.onlab.onos.net.provider.ProviderId;
+import org.onlab.packet.IPAddress;
+import org.onlab.packet.MACAddress;
+import org.onlab.packet.VLANID;
+
+import com.google.common.collect.Sets;
+
+/**
+ * Provides a set of test DefaultDevice parameters for use with Host-
+ * related tests.
+ */
+public abstract class TestDeviceParams {
+
+    protected static final ProviderId PID = new ProviderId("foo");
+    protected static final DeviceId DID1 = deviceId("of:foo");
+    protected static final DeviceId DID2 = deviceId("of:bar");
+    protected static final MACAddress MAC1 = MACAddress.valueOf("00:11:00:00:00:01");
+    protected static final MACAddress MAC2 = MACAddress.valueOf("00:22:00:00:00:02");
+    protected static final VLANID VLAN1 = VLANID.vlanId((short) 11);
+    protected static final VLANID VLAN2 = VLANID.vlanId((short) 22);
+    protected static final IPAddress IP1 = IPAddress.valueOf("10.0.0.1");
+    protected static final IPAddress IP2 = IPAddress.valueOf("10.0.0.2");
+    protected static final IPAddress IP3 = IPAddress.valueOf("10.0.0.3");
+
+    protected static final PortNumber P1 = PortNumber.portNumber(100);
+    protected static final PortNumber P2 = PortNumber.portNumber(200);
+    protected static final HostId HID1 = HostId.hostId(MAC1, VLAN1);
+    protected static final HostId HID2 = HostId.hostId(MAC2, VLAN2);
+    protected static final HostLocation LOC1 = new HostLocation(DID1, P1, 123L);
+    protected static final HostLocation LOC2 = new HostLocation(DID2, P2, 123L);
+    protected static final Set<IPAddress> IPSET1 = Sets.newHashSet(IP1, IP2);
+    protected static final Set<IPAddress> IPSET2 = Sets.newHashSet(IP1, IP3);
+
+}
diff --git a/utils/misc/src/main/java/org/onlab/packet/IPAddress.java b/utils/misc/src/main/java/org/onlab/packet/IPAddress.java
index 94c2d54..4e898f4 100644
--- a/utils/misc/src/main/java/org/onlab/packet/IPAddress.java
+++ b/utils/misc/src/main/java/org/onlab/packet/IPAddress.java
@@ -57,7 +57,7 @@
      * @return an IP address
      */
     public static IPAddress valueOf(String address) {
-        final String [] parts = address.split(".");
+        final String [] parts = address.split("\\.");
         if (parts.length != INET_LEN) {
             throw new IllegalArgumentException("Malformed IP address string; "
                     + "Addres must have four decimal values separated by dots (.)");
@@ -119,7 +119,9 @@
             return true;
         }
         if (obj instanceof IPAddress) {
+
             IPAddress other = (IPAddress) obj;
+
             if (!(this.version.equals(other.version))) {
                 return false;
             }
diff --git a/utils/misc/src/main/java/org/onlab/packet/VLANID.java b/utils/misc/src/main/java/org/onlab/packet/VLANID.java
index 31cdecb..5b26d04 100644
--- a/utils/misc/src/main/java/org/onlab/packet/VLANID.java
+++ b/utils/misc/src/main/java/org/onlab/packet/VLANID.java
@@ -37,12 +37,12 @@
         }
 
         if (obj instanceof VLANID) {
-            return true;
-        }
 
-        VLANID other = (VLANID) obj;
-        if (this.value == other.value) {
-            return true;
+            VLANID other = (VLANID) obj;
+
+             if (this.value == other.value) {
+                return true;
+            }
         }
 
         return false;
