diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java
index 51779cc..6e544ae 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java
@@ -34,6 +34,7 @@
     private static final Logger log = LoggerFactory.getLogger(AsPath.class);
     public static final byte AS4PATH_TYPE = 17;
     public static final byte ASNUM_SIZE = 4;
+    public static final byte FLAGS = (byte) 0x40;
 
     private List<Integer> as4pathSet;
     private List<Integer> as4pathSeq;
@@ -162,8 +163,27 @@
 
     @Override
     public int write(ChannelBuffer cb) {
-        //Not required to Implement as of now
-        return 0;
+
+        int iLenStartIndex = cb.writerIndex();
+
+        cb.writeByte(FLAGS);
+        cb.writeByte(getType());
+        if ((as4pathSet != null) && (as4pathSeq != null)) {
+            int iAsLenIndex = cb.writerIndex();
+            cb.writeByte(0);
+            cb.writeByte(AsPath.ASPATH_SEQ_TYPE);
+            cb.writeByte(as4pathSeq.size());
+
+            for (int j = 0; j < as4pathSeq.size(); j++) {
+                cb.writeInt(as4pathSeq.get(j));
+            }
+
+            int asLen = cb.writerIndex() - iAsLenIndex;
+            cb.setByte(iAsLenIndex, (byte) (asLen - 1));
+        } else {
+            cb.writeByte(0);
+        }
+        return cb.writerIndex() - iLenStartIndex;
     }
 
     @Override
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java
index 7879bd6..c4b9c71 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java
@@ -63,6 +63,7 @@
     public static final byte ASPATH_SET_TYPE = 1;
     public static final byte ASPATH_SEQ_TYPE = 2;
     public static final byte ASNUM_SIZE = 2;
+    public static final byte FLAGS = (byte) 0x40;
 
     private boolean isAsPath = false;
     private List<Short> aspathSet;
@@ -201,8 +202,25 @@
 
     @Override
     public int write(ChannelBuffer cb) {
-        //Not required to Implement as of now
-        return 0;
+        int iLenStartIndex = cb.writerIndex();
+        cb.writeByte(FLAGS);
+        cb.writeByte(getType());
+        if (isaspathSet()) {
+            int iAsLenIndex = cb.writerIndex();
+            cb.writeByte(0);
+            cb.writeByte(ASPATH_SEQ_TYPE);
+            cb.writeByte(aspathSeq.size());
+
+            for (int j = 0; j < aspathSeq.size(); j++) {
+                cb.writeShort(aspathSeq.get(j));
+            }
+
+            int asLen = cb.writerIndex() - iAsLenIndex;
+            cb.setByte(iAsLenIndex, (byte) (asLen - 1));
+        } else {
+            cb.writeByte(0);
+        }
+        return cb.writerIndex() - iLenStartIndex;
     }
 
     @Override
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LocalPref.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LocalPref.java
index 36793c1..b15c74c 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LocalPref.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LocalPref.java
@@ -30,6 +30,7 @@
 public class LocalPref implements BgpValueType {
     public static final byte LOCAL_PREF_TYPE = 5;
     public static final byte LOCAL_PREF_MAX_LEN = 4;
+    public static final byte FLAGS = (byte) 0x40;
 
     private int localPref;
 
@@ -109,8 +110,12 @@
 
     @Override
     public int write(ChannelBuffer cb) {
-        //Not to implement as of now
-        return 0;
+        int iLenStartIndex = cb.writerIndex();
+        cb.writeByte(FLAGS);
+        cb.writeByte(getType());
+        cb.writeByte(4);
+        cb.writeInt(localPref());
+        return cb.writerIndex() - iLenStartIndex;
     }
 
     @Override
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Med.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Med.java
index 7f1ab53..2fe4867 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Med.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Med.java
@@ -30,6 +30,7 @@
 public class Med implements BgpValueType {
     public static final byte MED_TYPE = 4;
     public static final byte MED_MAX_LEN = 4;
+    public static final byte FLAGS = (byte) 0x80;
 
     private int med;
 
@@ -109,8 +110,12 @@
 
     @Override
     public int write(ChannelBuffer cb) {
-        //Not to implement as of now
-        return 0;
+        int iLenStartIndex = cb.writerIndex();
+        cb.writeByte(FLAGS);
+        cb.writeByte(getType());
+        cb.writeByte(4);
+        cb.writeInt(med());
+        return cb.writerIndex() - iLenStartIndex;
     }
 
     @Override
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java
index 3e0e06c..7999f82 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java
@@ -55,6 +55,7 @@
 
     public static final byte ORIGIN_TYPE = 1;
     public static final byte ORIGIN_VALUE_LEN = 1;
+    public static final byte FLAGS = (byte) 0x40;
 
     private boolean isOrigin = false;
     private byte origin;
@@ -131,8 +132,12 @@
 
     @Override
     public int write(ChannelBuffer cb) {
-        //Not required to Implement as of now
-        return 0;
+        int iLenStartIndex = cb.writerIndex();
+        cb.writeByte(FLAGS);
+        cb.writeByte(ORIGIN_TYPE);
+        cb.writeByte(1);
+        cb.writeByte(origin().value);
+        return cb.writerIndex() - iLenStartIndex;
     }
 
     @Override
