diff --git a/README.md b/README.md
index 48486bc..194360c 100644
--- a/README.md
+++ b/README.md
@@ -99,5 +99,5 @@
   -s string
     	DHCP Server IP Address (default "182.21.0.128")
   -v int
-    	Interval each Indication (ms) (default 1000)
+    	Interval each ONU Discovery Indication (ms) (default 1000)
 ```
diff --git a/core/core_server.go b/core/core_server.go
index 917ed25..2033ec1 100644
--- a/core/core_server.go
+++ b/core/core_server.go
@@ -19,18 +19,18 @@
 import (
 	"context"
 	"errors"
+	"reflect"
 	"strconv"
 	"sync"
-	"reflect"
 
-	omci "github.com/opencord/omci-sim"
 	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"gerrit.opencord.org/voltha-bbsim/common/utils"
 	"gerrit.opencord.org/voltha-bbsim/device"
-	"gerrit.opencord.org/voltha-bbsim/protos"
+	openolt "gerrit.opencord.org/voltha-bbsim/protos"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	"github.com/google/gopacket/pcap"
+	omci "github.com/opencord/omci-sim"
 	log "github.com/sirupsen/logrus"
 	"golang.org/x/sync/errgroup"
 	"google.golang.org/grpc"
@@ -74,7 +74,7 @@
 type byteMsg struct {
 	IntfId uint32
 	OnuId  uint32
-	Byte []byte
+	Byte   []byte
 }
 
 type stateReport struct {
@@ -104,8 +104,8 @@
 		omciOut:      make(chan openolt.OmciMsg, 1024),
 		eapolIn:      make(chan *byteMsg, 1024),
 		eapolOut:     make(chan *byteMsg, 1024),
-		dhcpIn:      make(chan *byteMsg, 1024),
-		dhcpOut:     make(chan *byteMsg, 1024),
+		dhcpIn:       make(chan *byteMsg, 1024),
+		dhcpOut:      make(chan *byteMsg, 1024),
 	}
 
 	nnni := s.Olt.NumNniIntf
@@ -179,11 +179,14 @@
 	if err := s.activateOLT(*sv); err != nil {
 		return err
 	}
+
 	s.updateDevIntState(olt, device.OLT_PREACTIVE)
 
 	coreCtx := context.Background()
 	coreCtx, corecancel := context.WithCancel(coreCtx)
 	s.cancel = corecancel
+	go s.sendDiscovertoONUs(*sv)
+
 	if err := s.StartPktLoops(coreCtx, *sv); err != nil {
 		return err
 	}
@@ -213,7 +216,7 @@
 	}
 }
 
-func (s *Server) updateOnuIntState (intfid uint32, onuid uint32, state device.DeviceState) error {
+func (s *Server) updateOnuIntState(intfid uint32, onuid uint32, state device.DeviceState) error {
 	onu, err := s.GetOnuByID(onuid, intfid)
 	if err != nil {
 		return err
@@ -221,6 +224,11 @@
 	s.updateDevIntState(onu, state)
 	return nil
 }
+func (s *Server) Activate(onu *device.Onu) error {
+	utils.LoggerWithOnu(onu).Info("sending ONUInd Onuid")
+	go sendOnuIndtoONU(*s.EnableServer, onu)
+	return nil
+}
 
 func (s *Server) activateOLT(stream openolt.Openolt_EnableIndicationServer) error {
 	defer logger.Debug("activateOLT() Done")
@@ -248,6 +256,9 @@
 	}
 	logger.Info("OLT %s sent OperInd.", olt.Name)
 
+	return nil
+}
+func (s *Server) sendDiscovertoONUs(stream openolt.Openolt_EnableIndicationServer) {
 	// OLT sends ONU Discover Indication to Adapter after ONU discovery
 	for intfid := range s.Onumap {
 		device.UpdateOnusOpStatus(intfid, s.Onumap[intfid], "up")
@@ -261,24 +272,10 @@
 	}
 
 	// Send discovery indication for all ONUs
-	for intfid := range s.Onumap {
-		sendOnuDiscInd(stream, s.Onumap[intfid])
-		logger.Info("OLT id:%d sent ONUDiscInd.", olt.ID)
+	for intfid, _ := range s.Onumap {
+		sendOnuDiscInd(stream, s.Onumap[intfid], s.IndInterval)
+		logger.Info("OLT sent ONUDiscInd for intfId:%d.", intfid)
 	}
-
-	// OLT Sends OnuInd after waiting all of those ONUs up
-	for {
-		if IsAllOnuActive(s.Onumap) {
-			logger.Debug("All the Onus are Activated.")
-			break
-		}
-	}
-
-	for intfid := range s.Onumap {
-		sendOnuInd(stream, s.Onumap[intfid], s.IndInterval)
-		logger.Info("OLT id:%d sent ONUInd.", olt.ID)
-	}
-	return nil
 }
 
 // StartPktLoops creates veth pairs and invokes runPktLoops (blocking)
@@ -438,7 +435,7 @@
 				logger.Error("send omci indication failed: %v", err)
 				continue
 			}
-		case msg := <- s.eapolIn:
+		case msg := <-s.eapolIn:
 			intfid := msg.IntfId
 			onuid := msg.OnuId
 			gemid, err := s.getGemPortID(intfid, onuid)
@@ -454,7 +451,7 @@
 				logger.Error("Fail to send EAPOL PktInd indication. %v", err)
 				return err
 			}
-		case msg := <- s.dhcpIn:	//TODO: We should put omciIn, eapolIn, dhcpIn toghether
+		case msg := <-s.dhcpIn: //TODO: We should put omciIn, eapolIn, dhcpIn toghether
 			intfid := msg.IntfId
 			onuid := msg.OnuId
 			gemid, err := s.getGemPortID(intfid, onuid)
@@ -540,7 +537,7 @@
 		ethtype := pkt.EthernetType
 		if ethtype == layers.EthernetTypeEAPOL {
 			utils.LoggerWithOnu(onu).Info("Received downstream packet is EAPOL.")
-			eapolPkt := byteMsg{IntfId:intfid, OnuId:onuid, Byte: rawpkt.Data()}
+			eapolPkt := byteMsg{IntfId: intfid, OnuId: onuid, Byte: rawpkt.Data()}
 			s.eapolOut <- &eapolPkt
 			return nil
 		} else if layerDHCP := rawpkt.Layer(layers.LayerTypeDHCPv4); layerDHCP != nil {
@@ -551,7 +548,7 @@
 			rawpkt, _, _ = PopVLAN(rawpkt)
 			rawpkt, _, _ = PopVLAN(rawpkt)
 			logger.Debug("%s", rawpkt.Dump())
-			dhcpPkt := byteMsg{IntfId:intfid, OnuId:onuid, Byte: rawpkt.Data()}
+			dhcpPkt := byteMsg{IntfId: intfid, OnuId: onuid, Byte: rawpkt.Data()}
 			s.dhcpOut <- &dhcpPkt
 			return nil
 		} else {
@@ -601,7 +598,7 @@
 
 func (s *Server) isAllOnuOmciActive() bool {
 	for _, onus := range s.Onumap {
-		for _, onu := range onus{
+		for _, onu := range onus {
 			if onu.GetIntState() != device.ONU_OMCIACTIVE {
 				return false
 			}
diff --git a/core/grpc_service.go b/core/grpc_service.go
index d088e05..69dadaa 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -22,7 +22,7 @@
 	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"gerrit.opencord.org/voltha-bbsim/common/utils"
 	"gerrit.opencord.org/voltha-bbsim/device"
-	"gerrit.opencord.org/voltha-bbsim/protos"
+        "gerrit.opencord.org/voltha-bbsim/protos"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	omci "github.com/opencord/omci-sim"
@@ -99,6 +99,7 @@
 	onuid := onu.OnuId
 	matched.OnuID = onuid
 	s.updateDevIntState(matched, device.ONU_ACTIVE)
+	s.Activate(matched)
 	logger.Debug("ONU IntfID: %d OnuID: %d activated succesufully.", onu.IntfId, onu.OnuId)
 
 	return new(openolt.Empty), nil
diff --git a/core/openolt_service.go b/core/openolt_service.go
index 40d14e5..c34468a 100644
--- a/core/openolt_service.go
+++ b/core/openolt_service.go
@@ -70,9 +70,10 @@
 	return nil
 }
 
-func sendOnuDiscInd(stream openolt.Openolt_EnableIndicationServer, onus []*device.Onu) error {
+func sendOnuDiscInd(stream openolt.Openolt_EnableIndicationServer, onus []*device.Onu, delay int) error {
 	for i, onu := range onus {
 		data := &openolt.Indication_OnuDiscInd{&openolt.OnuDiscIndication{IntfId: onu.IntfID, SerialNumber: onu.SerialNumber}}
+		time.Sleep(time.Duration(delay) * time.Millisecond)
 		if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
 			logger.Error("Failed to send ONUDiscInd [id: %d]: %v", i, err)
 			return err
@@ -84,7 +85,7 @@
 
 func sendOnuInd(stream openolt.Openolt_EnableIndicationServer, onus []*device.Onu, delay int) error {
 	for i, onu := range onus {
-		time.Sleep(time.Duration(delay) * time.Millisecond)
+//		time.Sleep(time.Duration(delay) * time.Millisecond)
 		data := &openolt.Indication_OnuInd{&openolt.OnuIndication{IntfId: onu.IntfID, OnuId: onu.OnuID, OperState: "up", AdminState: "up", SerialNumber: onu.SerialNumber}}
 		if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
 			logger.Error("Failed to send ONUInd [id: %d]: %v", i, err)
@@ -94,3 +95,13 @@
 	}
 	return nil
 }
+
+func sendOnuIndtoONU(stream openolt.Openolt_EnableIndicationServer, onu *device.Onu ) {
+	time.Sleep(time.Duration(10000) * time.Millisecond)    //TODO:This sleep added because of a known race condition in VOLTHA. Can be removed after fix.
+	data := &openolt.Indication_OnuInd{&openolt.OnuIndication{IntfId: onu.IntfID, OnuId: onu.OnuID, OperState: "up", AdminState: "up", SerialNumber: onu.SerialNumber}}
+	if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
+			logger.Error("Failed to send ONUInd [id: %d]: %v", onu.OnuID, err)
+	}
+	utils.LoggerWithOnu(onu).Info("sendONUInd Onuid")
+
+}
