diff --git a/core/api/src/main/java/org/onosproject/net/IndexedLambda.java b/core/api/src/main/java/org/onosproject/net/IndexedLambda.java
new file mode 100644
index 0000000..e350b47
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/IndexedLambda.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2015 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.net;
+
+import com.google.common.base.MoreObjects;
+
+/**
+ * Implementation of Lambda simply designated by an index number of wavelength.
+ */
+public class IndexedLambda implements Lambda {
+
+    private final long lambda;
+
+    /**
+     * Creates an instance representing the wavelength specified by the given index number.
+     *
+     * @param lambda index number of wavelength
+     */
+    IndexedLambda(long lambda) {
+        this.lambda = lambda;
+    }
+
+    @Override
+    public int hashCode() {
+        return (int) (lambda ^ (lambda >>> 32));
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof IndexedLambda)) {
+            return false;
+        }
+
+        final IndexedLambda that = (IndexedLambda) obj;
+        return this.lambda == that.lambda;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("lambda", lambda)
+                .toString();
+    }
+}
diff --git a/core/api/src/main/java/org/onosproject/net/Lambda.java b/core/api/src/main/java/org/onosproject/net/Lambda.java
new file mode 100644
index 0000000..d0995be
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/Lambda.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2015 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.net;
+
+/**
+ * Abstraction of wavelength. Currently, this is just a marker interface
+ */
+public interface Lambda {
+    /**
+     * Create an Lambda instance with the specified wavelength index number.
+     *
+     * @param lambda index number
+     * @return an instance
+     */
+    static Lambda indexedLambda(long lambda) {
+        return new IndexedLambda(lambda);
+    }
+
+    /**
+     * Creates a Lambda instance with the specified arguments.
+     *
+     * @param gridType          grid type
+     * @param channelSpacing    channel spacing
+     * @param spacingMultiplier channel spacing multiplier
+     * @param slotGranularity   slot width granularity
+     */
+    static Lambda ochSignal(GridType gridType, ChannelSpacing channelSpacing,
+                            int spacingMultiplier, int slotGranularity) {
+        return new OchSignal(gridType, channelSpacing, spacingMultiplier, slotGranularity);
+    }
+}
diff --git a/core/api/src/main/java/org/onosproject/net/OchSignal.java b/core/api/src/main/java/org/onosproject/net/OchSignal.java
new file mode 100644
index 0000000..3f6c14f
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/OchSignal.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2015 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.net;
+
+import com.google.common.base.MoreObjects;
+import org.onlab.util.Frequency;
+
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Implementation of Lambda representing OCh (Optical Channel) Signal.
+ *
+ * <p>
+ * See ITU G.709 "Interfaces for the Optical Transport Network (OTN)".
+ * </p>
+ */
+// TODO: consider which is better, OchSignal or OpticalChannelSignal
+public class OchSignal implements Lambda {
+
+    private static final Frequency CENTER_FREQUENCY = Frequency.ofTHz(193.1);
+    private static final Frequency FLEX_GRID_SLOT = Frequency.ofGHz(12.5);
+
+    private final GridType gridType;
+    private final ChannelSpacing channelSpacing;
+    // Frequency = 193.1 THz + spacingMultiplier * channelSpacing
+    private final int spacingMultiplier;
+    // Slot width = slotGranularity * 12.5 GHz
+    private final int slotGranularity;
+
+    /**
+     * Creates an instance with the specified arguments.
+     *
+     * @param gridType          grid type
+     * @param channelSpacing    channel spacing
+     * @param spacingMultiplier channel spacing multiplier
+     * @param slotGranularity   slot width granularity
+     */
+    OchSignal(GridType gridType, ChannelSpacing channelSpacing,
+              int spacingMultiplier, int slotGranularity) {
+        this.gridType = checkNotNull(gridType);
+        this.channelSpacing = checkNotNull(channelSpacing);
+        // TODO: check the precondition for spacingMultiplier. Is negative value permitted?
+        this.spacingMultiplier = spacingMultiplier;
+
+        checkArgument(slotGranularity > 0, "slotGranularity must be more than 0, but %s", slotGranularity);
+        this.slotGranularity = slotGranularity;
+    }
+
+    /**
+     * Returns grid type.
+     *
+     * @return grid type
+     */
+    public GridType gridType() {
+        return gridType;
+    }
+
+    /**
+     * Returns channel spacing.
+     *
+     * @return channel spacing
+     */
+    public ChannelSpacing channelSpacing() {
+        return channelSpacing;
+    }
+
+    /**
+     * Returns spacing multiplier.
+     *
+     * @return spacing multiplier
+     */
+    public int spacingMultiplier() {
+        return spacingMultiplier;
+    }
+
+    /**
+     * Returns slow width granularity.
+     *
+     * @return slow width granularity
+     */
+    public int slotGranularity() {
+        return slotGranularity;
+    }
+
+    /**
+     * Returns central frequency in MHz.
+     *
+     * @return frequency in MHz
+     */
+    public Frequency centralFrequency() {
+        return CENTER_FREQUENCY.add(channelSpacing().frequency().multiply(spacingMultiplier));
+    }
+
+    /**
+     * Returns slot width.
+     *
+     * @return slot width
+     */
+    public Frequency slotWidth() {
+        return FLEX_GRID_SLOT.multiply(slotGranularity);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(gridType, channelSpacing, spacingMultiplier, slotGranularity);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof OchSignal)) {
+            return false;
+        }
+        final OchSignal other = (OchSignal) obj;
+        return Objects.equals(this.gridType, other.gridType)
+                && Objects.equals(this.channelSpacing, other.channelSpacing)
+                && Objects.equals(this.spacingMultiplier, other.spacingMultiplier)
+                && Objects.equals(this.slotGranularity, other.slotGranularity);
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("gridType", gridType)
+                .add("channelSpacing", channelSpacing)
+                .add("spacingMultiplier", spacingMultiplier)
+                .add("slotGranularity", slotGranularity)
+                .toString();
+    }
+}
diff --git a/core/api/src/test/java/org/onosproject/net/IndexedLambdaTest.java b/core/api/src/test/java/org/onosproject/net/IndexedLambdaTest.java
new file mode 100644
index 0000000..b08d995
--- /dev/null
+++ b/core/api/src/test/java/org/onosproject/net/IndexedLambdaTest.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2015 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.net;
+
+import com.google.common.testing.EqualsTester;
+import org.junit.Test;
+
+public class IndexedLambdaTest {
+    @Test
+    public void testEquality() {
+        new EqualsTester()
+                .addEqualityGroup(Lambda.indexedLambda(10), Lambda.indexedLambda(10))
+                .addEqualityGroup(Lambda.indexedLambda(11), Lambda.indexedLambda(11), Lambda.indexedLambda(11))
+                .testEquals();
+    }
+}
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
index d047135..9a8e268 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
@@ -18,7 +18,6 @@
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
-
 import org.onlab.packet.ChassisId;
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip4Prefix;
@@ -57,14 +56,16 @@
 import org.onosproject.net.GridType;
 import org.onosproject.net.HostId;
 import org.onosproject.net.HostLocation;
+import org.onosproject.net.IndexedLambda;
 import org.onosproject.net.Link;
 import org.onosproject.net.LinkKey;
 import org.onosproject.net.OchPort;
+import org.onosproject.net.OchSignal;
 import org.onosproject.net.OduCltPort;
+import org.onosproject.net.OduSignalType;
 import org.onosproject.net.OmsPort;
 import org.onosproject.net.Port;
 import org.onosproject.net.PortNumber;
-import org.onosproject.net.OduSignalType;
 import org.onosproject.net.device.DefaultDeviceDescription;
 import org.onosproject.net.device.DefaultPortDescription;
 import org.onosproject.net.flow.CompletedBatchOperation;
@@ -384,6 +385,8 @@
             .register(ChannelSpacing.class)
             .register(OduCltPort.class)
             .register(OduCltPort.SignalType.class)
+            .register(IndexedLambda.class)
+            .register(OchSignal.class)
             .register(
                     MplsIntent.class,
                     MplsPathIntent.class,
diff --git a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
index 388532a..d0e1c6d 100644
--- a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
+++ b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
@@ -324,6 +324,18 @@
     }
 
     @Test
+    public void testIndexedLambda() {
+        testSerializedEquals(org.onosproject.net.Lambda.indexedLambda(10L));
+    }
+
+    @Test
+    public void testOchSignal() {
+        testSerializedEquals(org.onosproject.net.Lambda.ochSignal(
+                GridType.DWDM, ChannelSpacing.CHL_100GHZ, 1, 1
+        ));
+    }
+
+    @Test
     public void testDefaultLinkResourceRequest() {
         testSerializable(DefaultLinkResourceRequest.builder(IntentId.valueOf(2501), ImmutableList.of())
                         .addLambdaRequest()
