diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/intf/InterfaceEvent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/intf/InterfaceEvent.java
index 4e6e81c..540a79d 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/intf/InterfaceEvent.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/intf/InterfaceEvent.java
@@ -17,12 +17,16 @@
 package org.onosproject.incubator.net.intf;
 
 import org.onosproject.event.AbstractEvent;
+import org.joda.time.LocalDateTime;
+import static com.google.common.base.MoreObjects.toStringHelper;
 
 /**
  * Describes an interface event.
  */
 public class InterfaceEvent extends AbstractEvent<InterfaceEvent.Type, Interface> {
 
+    private final Interface prevSubject;
+
     public enum Type {
         /**
          * Indicates a new interface has been added.
@@ -47,18 +51,64 @@
      * @param subject subject interface
      */
     public InterfaceEvent(Type type, Interface subject) {
-        super(type, subject);
+        this(type, subject, null);
     }
 
     /**
-     * Creates an interface event with type, subject and time.
+     * Creates an interface event with type, subject and time of event.
      *
      * @param type event type
      * @param subject subject interface
      * @param time time of event
      */
     public InterfaceEvent(Type type, Interface subject, long time) {
-        super(type, subject, time);
+        this(type, subject, null, time);
     }
 
+    /**
+     * Creates an interface event with type, subject and previous subject.
+     *
+     * @param type event type
+     * @param subject subject interface
+     * @param subject previous interface subject
+     */
+    public InterfaceEvent(Type type, Interface subject, Interface prevSubject) {
+        super(type, subject);
+        this.prevSubject = prevSubject;
+    }
+
+    /**
+     * Creates an interface event with type, subject, previous subject and time.
+     *
+     * @param type event type
+     * @param subject subject interface
+     * @param subject previous interface subject
+     * @param time time of event
+     */
+    public InterfaceEvent(Type type, Interface subject, Interface prevSubject, long time) {
+        super(type, subject, time);
+        this.prevSubject = prevSubject;
+    }
+
+    /**
+     * Returns the previous interface subject.
+     *
+     * @return previous subject of interface or null if the event is not interface specific.
+     */
+    public Interface prevSubject() {
+        return prevSubject;
+    }
+
+    @Override
+    public String toString() {
+        if (prevSubject == null) {
+            return super.toString();
+        }
+        return toStringHelper(this)
+                .add("time", new LocalDateTime(time()))
+                .add("type", type())
+                .add("subject", subject())
+                .add("prevSubject", prevSubject)
+                .toString();
+     }
 }
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/intf/impl/InterfaceManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/intf/impl/InterfaceManager.java
index c31ab92..2b4ecbf 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/intf/impl/InterfaceManager.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/intf/impl/InterfaceManager.java
@@ -171,7 +171,7 @@
                     if (oldIntf.isPresent()) {
                         old.remove(oldIntf.get());
                         if (!oldIntf.get().equals(intf)) {
-                            process(new InterfaceEvent(InterfaceEvent.Type.INTERFACE_UPDATED, intf));
+                            process(new InterfaceEvent(InterfaceEvent.Type.INTERFACE_UPDATED, intf, oldIntf.get()));
                         }
                     } else {
                         process(new InterfaceEvent(InterfaceEvent.Type.INTERFACE_ADDED, intf));
