diff --git a/network_manager.cpp b/network_manager.cpp
index cac4d93..6ae3bfb 100644
--- a/network_manager.cpp
+++ b/network_manager.cpp
@@ -64,18 +64,38 @@
     for (const auto& intfInfo : interfaceInfoList)
     {
         fs::path objPath = objectPath;
+        auto index = intfInfo.first.find(".");
+
+        // interface can be of vlan type or normal ethernet interface.
+        // vlan interface looks like "interface.vlanid",so here by looking
+        // at the interface name we decide that we need
+        // to create the vlaninterface or normal physical interface.
+        if (index != std::string::npos)
+        {
+            //it is vlan interface
+            auto interface = intfInfo.first.substr(0, index);
+            auto vlanid = intfInfo.first.substr(index + 1);
+            uint32_t vlanInt = std::stoul(vlanid);
+
+            interfaces[interface]->loadVLAN(vlanInt);
+            return;
+        }
+        // normal ethernet inetrface
         objPath /= intfInfo.first;
 
         auto dhcp = getDHCPValue(intfInfo.first);
 
+        auto intf =  std::make_shared<phosphor::network::EthernetInterface>(
+                         bus,
+                         objPath.string(),
+                         dhcp,
+                         *this);
+
+
+        intf->createIPAddressObjects();
+
         this->interfaces.emplace(std::make_pair(
-                                     intfInfo.first,
-                                     std::make_unique<
-                                     phosphor::network::EthernetInterface>
-                                     (bus,
-                                      objPath.string(),
-                                      dhcp,
-                                      *this)));
+                                     intfInfo.first, std::move(intf)));
 
     }
 
