diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java
index 5c8eb94..efdc4bd 100644
--- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java
+++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/PointToPointIntentCompiler.java
@@ -18,7 +18,9 @@
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
+import org.onlab.onos.net.ConnectPoint;
 import org.onlab.onos.net.DefaultEdgeLink;
+import org.onlab.onos.net.DefaultLink;
 import org.onlab.onos.net.DefaultPath;
 import org.onlab.onos.net.Link;
 import org.onlab.onos.net.Path;
@@ -31,6 +33,7 @@
 import java.util.List;
 
 import static java.util.Arrays.asList;
+import static org.onlab.onos.net.Link.Type.DIRECT;
 
 /**
  * An intent compiler for {@link org.onlab.onos.net.intent.PointToPointIntent}.
@@ -55,13 +58,21 @@
 
     @Override
     public List<Intent> compile(PointToPointIntent intent) {
-        Path path = getPath(intent, intent.ingressPoint().deviceId(),
-                            intent.egressPoint().deviceId());
+        ConnectPoint ingressPoint = intent.ingressPoint();
+        ConnectPoint egressPoint = intent.egressPoint();
+
+        if (ingressPoint.deviceId().equals(egressPoint.deviceId())) {
+            List<Link> links = asList(new DefaultLink(PID, ingressPoint, egressPoint, DIRECT));
+            return asList(createPathIntent(new DefaultPath(PID, links, 1), intent));
+        }
 
         List<Link> links = new ArrayList<>();
-        links.add(DefaultEdgeLink.createEdgeLink(intent.ingressPoint(), true));
+        Path path = getPath(intent, ingressPoint.deviceId(),
+                egressPoint.deviceId());
+
+        links.add(DefaultEdgeLink.createEdgeLink(ingressPoint, true));
         links.addAll(path.links());
-        links.add(DefaultEdgeLink.createEdgeLink(intent.egressPoint(), false));
+        links.add(DefaultEdgeLink.createEdgeLink(egressPoint, false));
 
         return asList(createPathIntent(new DefaultPath(PID, links, path.cost(),
                                                        path.annotations()), intent));
diff --git a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java
index 20345aa..7f7e6d3 100644
--- a/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java
+++ b/core/net/src/test/java/org/onlab/onos/net/intent/impl/TestPointToPointIntentCompiler.java
@@ -16,10 +16,12 @@
 package org.onlab.onos.net.intent.impl;
 
 import org.hamcrest.Matchers;
-//import org.junit.Test;
 import org.junit.Test;
-import org.onlab.onos.core.ApplicationId;
 import org.onlab.onos.TestApplicationId;
+import org.onlab.onos.core.ApplicationId;
+import org.onlab.onos.net.ConnectPoint;
+import org.onlab.onos.net.Link;
+import org.onlab.onos.net.Path;
 import org.onlab.onos.net.flow.TrafficSelector;
 import org.onlab.onos.net.flow.TrafficTreatment;
 import org.onlab.onos.net.intent.Intent;
@@ -29,11 +31,15 @@
 
 import java.util.List;
 
+import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.notNullValue;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasSize;
 import static org.hamcrest.Matchers.is;
+import static org.onlab.onos.net.DeviceId.deviceId;
+import static org.onlab.onos.net.NetTestTools.APP_ID;
 import static org.onlab.onos.net.NetTestTools.connectPoint;
+import static org.onlab.onos.net.PortNumber.portNumber;
 import static org.onlab.onos.net.intent.LinksHaveEntryWithSourceDestinationPairMatcher.linksHasPath;
 
 /**
@@ -138,4 +144,28 @@
             assertThat(reversePathIntent.path().links(), linksHasPath("d8", "d7"));
         }
     }
+
+    /**
+     * Tests compilation of the intent which designates two different ports on the same switch.
+     */
+    @Test
+    public void testSameSwitchDifferentPortsIntentCompilation() {
+        ConnectPoint src = new ConnectPoint(deviceId("1"), portNumber(1));
+        ConnectPoint dst = new ConnectPoint(deviceId("1"), portNumber(2));
+        PointToPointIntent intent = new PointToPointIntent(APP_ID, selector, treatment, src, dst);
+
+        String[] hops = {"1"};
+        PointToPointIntentCompiler sut = makeCompiler(hops);
+
+        List<Intent> compiled = sut.compile(intent);
+
+        assertThat(compiled, hasSize(1));
+        assertThat(compiled.get(0), is(instanceOf(PathIntent.class)));
+        Path path = ((PathIntent) compiled.get(0)).path();
+
+        assertThat(path.links(), hasSize(1));
+        Link link = path.links().get(0);
+        assertThat(link.src(), is(src));
+        assertThat(link.dst(), is(dst));
+    }
 }
