diff --git a/Dockerfile b/Dockerfile
index 3d95450..d1aebf1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,10 @@
-# Copyright 2018 the original author or authors.
+# Copyright 2018-present Open Networking Foundation
 #
 # 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
+# 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,
@@ -14,49 +14,48 @@
 
 # bbsim dockerfile
 
-ARG TAG=latest
-ARG REGISTRY=
-ARG REPOSITORY=
+# builder parent
+FROM golang:1.10-stretch as builder
 
-#builder parent
-FROM ubuntu:16.04
+# install prereqs
+ENV PROTOC_VERSION 3.6.1
+ENV PROTOC_SHA256SUM 6003de742ea3fcf703cfec1cd4a3380fd143081a2eb0e559065563496af27807
 
-MAINTAINER Voltha Community <info@opennetworking.org>
+RUN apt-get update \
+ && apt-get install -y unzip libpcap-dev \
+ && curl -L -o /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
+ && echo "$PROTOC_SHA256SUM  /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip" | sha256sum -c - \
+ && unzip /tmp/protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /tmp/protoc3 \
+ && mv /tmp/protoc3/bin/* /usr/local/bin/ \
+ && mv /tmp/protoc3/include/* /usr/local/include/ \
+ && go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
+ && go get -v github.com/golang/protobuf/protoc-gen-go
 
-# Install required packages
-RUN apt-get update && apt-get install -y wget git make libpcap-dev gcc unzip
-ARG version="1.9.3."
-RUN wget https://storage.googleapis.com/golang/go${version}linux-amd64.tar.gz -P /tmp \
-    && tar -C /usr/local -xzf /tmp/go${version}linux-amd64.tar.gz \
-    && rm /tmp/go${version}linux-amd64.tar.gz
+# copy and build
+WORKDIR /go/src/gerrit.opencord.org/voltha-bbsim
+COPY . /go/src/gerrit.opencord.org/voltha-bbsim
 
-# Set PATH
-ENV GOPATH $HOME/go
-ENV PATH /usr/local/go/bin:/go/bin:$PATH
+RUN make bbsim
 
-# Copy source code
-RUN mkdir -p $GOPATH/src/gerrit.opencord.org/voltha-bbsim
-COPY . $GOPATH/src/gerrit.opencord.org/voltha-bbsim
+# runtime parent
+FROM golang:1.10-stretch
 
-# Install golang protobuf and pcap support
-RUN wget https://github.com/google/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-x86_64.zip -P /tmp/ \
-&& unzip /tmp/protoc-3.6.0-linux-x86_64.zip -d /tmp/ \
-&& mv /tmp/bin/* /usr/local/bin/ \
-&& mv /tmp/include/* /usr/local/include/ \
-&& go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
-&& go get -u github.com/golang/protobuf/protoc-gen-go \
-&& go get -u github.com/google/gopacket/pcap \
-&& go get -u golang.org/x/net/context \
-&& go get -u google.golang.org/grpc
+# runtime prereqs
+# the symlink on libpcap is because both alpine and debian come with 1.8.x, but
+# debian symlinks it to 0.8 for historical reasons:
+# https://packages.debian.org/stretch/libpcap0.8-dev
+RUN apt-get update \
+ && apt-get install -y libpcap-dev wpasupplicant isc-dhcp-server network-manager\
+ && ln -s /usr/lib/libpcap.so.1.8.1 /usr/lib/libpcap.so.0.8
 
-# ... Install utilities & config
-RUN apt-get update && apt-get install -y wpasupplicant isc-dhcp-server
 COPY ./config/wpa_supplicant.conf /etc/wpa_supplicant/
 COPY ./config/isc-dhcp-server /etc/default/
 COPY ./config/dhcpd.conf /etc/dhcp/
 RUN mv /usr/sbin/dhcpd /usr/local/bin/ \
-&& mv /sbin/dhclient /usr/local/bin/
+&& mv /sbin/dhclient /usr/local/bin/ \
+&& touch /var/lib/dhcp/dhcpd.leases
 
-WORKDIR $GOPATH/src/gerrit.opencord.org/voltha-bbsim
-RUN make bbsim
+WORKDIR /app
+COPY --from=builder /go/src/gerrit.opencord.org/voltha-bbsim/bbsim /app/bbsim
 
+CMD [ '/app/bbsim' ]
diff --git a/Makefile b/Makefile
index 56bbcb2..2c3bf1e 100644
--- a/Makefile
+++ b/Makefile
@@ -21,22 +21,30 @@
 	go build -i -v -o $@
 
 dep: protos/openolt.pb.go
-	@go get -v -d ./...
+	go get -v -d ./...
 
 protos/openolt.pb.go: openolt.proto
 	@protoc -I . \
 	-I${GOPATH}/src \
 	-I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
 	--go_out=plugins=grpc:protos/ \
-	openolt.proto
+	$<
 
 test:
-	@go test -v ./...
-	@go test -v ./... -cover
+	go test -v ./...
+	go test -v ./... -cover
+
+fmt:
+	go fmt ./...
+
+vet:
+	go vet ./...
+
+lint:
+	gometalinter --vendor --exclude ../../golang.org --skip protos --sort path --sort line ./...
 
 clean:
-	@rm bbsim protos/openolt.pb.go
+	rm -f bbsim openolt/openolt.pb.go
 
 docker:
-	@docker build -t voltha/voltha-bbsim:${DOCKERTAG} .
-
+	docker build -t voltha/voltha-bbsim:${DOCKERTAG} .
diff --git a/bbsim.go b/bbsim.go
old mode 100755
new mode 100644
index 27373f8..1950668
--- a/bbsim.go
+++ b/bbsim.go
@@ -73,7 +73,7 @@
 	addressport := ip + ":" + strconv.Itoa(int(port))
 	endchan := make(chan int, 1)
 	listener, gserver, err := core.CreateGrpcServer(oltid, npon, nonus, addressport)
-	server := core.CreateServer(oltid, npon, nonus, aaawait, dhcpwait, dhcpservip, gserver, mode, endchan)
+	server := core.Create(oltid, npon, nonus, aaawait, dhcpwait, dhcpservip, gserver, mode, endchan)
 	if err != nil {
 		log.Println(err)
 	}
diff --git a/config/dhcpd.conf b/config/dhcpd.conf
index 9f36163..06d366b 100644
--- a/config/dhcpd.conf
+++ b/config/dhcpd.conf
@@ -35,20 +35,10 @@
 
 # This is a very basic subnet declaration.
 subnet 182.21.0.0 netmask 255.255.0.0 {
-  range 182.21.0.1 182.21.0.32;
+  range 182.21.0.1 182.21.0.128;
   option routers 182.21.0.254;
 }
 
-#subnet 182.22.0.0 netmask 255.255.0.0 {
-#  range 182.22.0.1 182.22.0.240;
-#  option routers 182.22.0.254;
-#}
-
-#subnet 172.20.0.0 netmask 255.255.0.0 {
-#  range 172.20.0.1 172.20.0.240;
-#  option routers 172.20.0.254;
-#}
-
 #subnet 10.254.239.0 netmask 255.255.255.224 {
 #  range 10.254.239.10 10.254.239.20;
 #  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
diff --git a/core/core_server.go b/core/core_server.go
index 39f4ca7..7067b3f 100644
--- a/core/core_server.go
+++ b/core/core_server.go
@@ -17,10 +17,10 @@
 package core
 
 import (
+	"errors"
 	"gerrit.opencord.org/voltha-bbsim/device"
 	"gerrit.opencord.org/voltha-bbsim/protos"
 	"gerrit.opencord.org/voltha-bbsim/setup"
-	"errors"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	"github.com/google/gopacket/pcap"
@@ -51,6 +51,9 @@
 	DhcpWait     int
 	DhcpServerIP string
 	gRPCserver   *grpc.Server
+	VethEnv      []string
+	TestFlag     bool
+	Processes    []string
 }
 
 type Packet struct {
@@ -58,7 +61,15 @@
 	Pkt  gopacket.Packet
 }
 
-func CreateServer(oltid uint32, npon uint32, nonus uint32, aaawait int, dhcpwait int, ip string, g *grpc.Server, mode Mode, e chan int) *Server {
+func (s *Server)Initialize(){
+	s.VethEnv = []string{}
+	s.Endchan = make(chan int)
+	s.TestFlag = false
+	s.Processes = []string{}
+	s.Ioinfos = []*Ioinfo{}
+}
+
+func Create(oltid uint32, npon uint32, nonus uint32, aaawait int, dhcpwait int, ip string, g *grpc.Server, mode Mode, e chan int) *Server {
 	s := new(Server)
 	s.Olt = device.CreateOlt(oltid, npon, 1)
 	nnni := s.Olt.NumNniIntf
@@ -70,6 +81,8 @@
 	s.gRPCserver = g
 	s.Mode = mode
 	s.Endchan = e
+	s.VethEnv = []string{}
+	s.TestFlag = false
 	for intfid := nnni; intfid < npon+nnni; intfid++ {
 		s.Onumap[intfid] = device.CreateOnus(oltid, intfid, nonus, nnni)
 	}
@@ -80,14 +93,21 @@
 	// Activate OLT
 	olt := s.Olt
 	oltid := olt.ID
-	vethenv := []string{}
 	wg := &sync.WaitGroup{}
 
+	// DEBUG
+	log.Printf("pointer@activateOLT %p", s)
+	log.Printf("Ioinfos:%v\n", s.Ioinfos)
+	log.Printf("OLT Status:%v\n", s.Olt.OperState)
+	log.Printf("ONUmap:%v\n", s.Onumap)
+	log.Printf("VethEnv:%v\n", s.VethEnv)
+	log.Printf("Processes:%v\n", s.Processes)
+
 	if err := sendOltInd(stream, olt); err != nil {
 		return err
 	}
 	olt.OperState = "up"
-	olt.InternalState = device.OLT_UP
+	*olt.InternalState = device.OLT_UP
 	log.Printf("OLT %s sent OltInd.\n", olt.Name)
 
 	// OLT sends Interface Indication to Adapter
@@ -99,7 +119,7 @@
 
 	// OLT sends Operation Indication to Adapter after activating each interface
 	//time.Sleep(IF_UP_TIME * time.Second)
-	olt.InternalState = device.PONIF_UP
+	*olt.InternalState = device.PONIF_UP
 	if err := sendOperInd(stream, olt); err != nil {
 		log.Printf("[ERROR] Fail to sendOperInd: %v\n", err)
 		return err
@@ -122,6 +142,7 @@
 			break
 		}
 	}
+
 	for intfid, _ := range s.Onumap {
 		sendOnuInd(stream, s.Onumap[intfid])
 		log.Printf("OLT id:%d sent ONUInd.\n", olt.ID)
@@ -133,35 +154,17 @@
 		<-s.Endchan
 		log.Println("core server thread receives close !")
 	} else if s.Mode == AAA || s.Mode == BOTH {
+		s.TestFlag = true
 		var err error
-		s.Ioinfos = []*Ioinfo{}
-		for intfid, _ := range s.Onumap {
-			for i := 0; i < len(s.Onumap[intfid]); i++ {
-				var handler *pcap.Handle
-				onuid := s.Onumap[intfid][i].OnuID
-				uniup, unidw := makeUniName(oltid, intfid, onuid)
-				if handler, vethenv, err = setupVethHandler(uniup, unidw, vethenv); err != nil {
-					return err
-				}
-				iinfo := Ioinfo{name: uniup, iotype: "uni", ioloc: "inside", intfid: intfid, onuid: onuid, handler: handler}
-				s.Ioinfos = append(s.Ioinfos, &iinfo)
-				oinfo := Ioinfo{name: unidw, iotype: "uni", ioloc: "outside", intfid: intfid, onuid: onuid, handler: nil}
-				s.Ioinfos = append(s.Ioinfos, &oinfo)
-			}
-		}
-		var handler *pcap.Handle
-		nniup, nnidw := makeNniName(oltid)
-		if handler, vethenv, err = setupVethHandler(nniup, nnidw, vethenv); err != nil {
+		s.Ioinfos, s.VethEnv, err = createIoinfos(oltid, s.VethEnv, s.Onumap)
+		log.Println("s.VethEnv", s.VethEnv)
+		if err != nil {
 			return err
 		}
-		iinfo := Ioinfo{name: nnidw, iotype: "nni", ioloc: "inside", intfid: 1, handler: handler}
-		s.Ioinfos = append(s.Ioinfos, &iinfo)
-		oinfo := Ioinfo{name: nnidw, iotype: "nni", ioloc: "outside", intfid: 1, handler: nil}
-		s.Ioinfos = append(s.Ioinfos, &oinfo)
 
 		errchan := make(chan error)
 		go func() {
-			<-errchan
+			<- errchan
 			close(s.Endchan)
 		}()
 
@@ -171,6 +174,7 @@
 				log.Println("runPacketInDaemon Done")
 				wg.Done()
 			}()
+
 			err := s.runPacketInDaemon(stream)
 			if err != nil {
 				errchan <- err
@@ -184,28 +188,67 @@
 				log.Println("exeAAATest Done")
 				wg.Done()
 			}()
-			infos, err := s.getUniIoinfos("outside")
+
+			err = s.exeAAATest()
 			if err != nil {
 				errchan <- err
 				return
 			}
-			univeths := []string{}
-			for _, info := range infos {
-				univeths = append(univeths, info.name)
-			}
-			err = s.exeAAATest(univeths)
-			if err != nil {
-				errchan <- err
-				return
+
+			if s.Mode == BOTH {
+				go func() {
+					defer func() {
+						log.Println("exeDHCPTest Done")
+					}()
+
+					err := s.exeDHCPTest()
+					if err != nil {
+						errchan <- err
+						return
+					}
+				}()
 			}
 		}()
 		wg.Wait()
-		tearDown(vethenv) // Grace teardown
+		cleanUpVeths(s.VethEnv) // Grace teardown
+		pnames := s.Processes
+		killProcesses(pnames)
 		log.Println("Grace shutdown down")
 	}
 	return nil
 }
 
+func createIoinfos(oltid uint32, vethenv []string, onumap map[uint32][]*device.Onu)([]*Ioinfo, []string, error){
+	ioinfos := []*Ioinfo{}
+	var err error
+	for intfid, _ := range onumap {
+		for i := 0; i < len(onumap[intfid]); i++ {
+			var handler *pcap.Handle
+			onuid := onumap[intfid][i].OnuID
+			uniup, unidw := makeUniName(oltid, intfid, onuid)
+			if handler, vethenv, err = setupVethHandler(uniup, unidw, vethenv); err != nil {
+				return ioinfos, vethenv, err
+			}
+			iinfo := Ioinfo{name: uniup, iotype: "uni", ioloc: "inside", intfid: intfid, onuid: onuid, handler: handler}
+			ioinfos = append(ioinfos, &iinfo)
+			oinfo := Ioinfo{name: unidw, iotype: "uni", ioloc: "outside", intfid: intfid, onuid: onuid, handler: nil}
+			ioinfos = append(ioinfos, &oinfo)
+		}
+	}
+
+	var handler *pcap.Handle
+	nniup, nnidw := makeNniName(oltid)
+	if handler, vethenv, err = setupVethHandler(nniup, nnidw, vethenv); err != nil {
+		return ioinfos, vethenv, err
+	}
+	//TODO: Intfid should be modified
+	iinfo := Ioinfo{name: nnidw, iotype: "nni", ioloc: "inside", intfid: 1, handler: handler}
+	ioinfos = append(ioinfos, &iinfo)
+	oinfo := Ioinfo{name: nniup, iotype: "nni", ioloc: "outside", intfid: 1, handler: nil}
+	ioinfos = append(ioinfos, &oinfo)
+	return ioinfos, vethenv, nil
+}
+
 func (s *Server) runPacketInDaemon(stream openolt.Openolt_EnableIndicationServer) error {
 	log.Println("runPacketInDaemon Start")
 	unichannel := make(chan Packet, 2048)
@@ -243,6 +286,7 @@
 				log.Println("[WARNING] This packet does not come from UNI !")
 				continue
 			}
+
 			intfid := unipkt.Info.intfid
 			onuid := unipkt.Info.onuid
 			gemid, _ := getGemPortID(intfid, onuid)
@@ -261,17 +305,20 @@
 			} else {
 				continue
 			}
+
 			log.Printf("sendPktInd intfid:%d (onuid: %d) gemid:%d\n", intfid, onuid, gemid)
 			data = &openolt.Indication_PktInd{PktInd: &openolt.PacketIndication{IntfType: "pon", IntfId: intfid, GemportId: gemid, Pkt: pkt.Data()}}
 			if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
 				log.Printf("[ERROR] Failed to send PktInd indication. %v\n", err)
 				return err
 			}
+
 		case nnipkt := <-nnichannel:
 			if nnipkt.Info == nil || nnipkt.Info.iotype != "nni" {
 				log.Println("[WARNING] This packet does not come from NNI !")
 				continue
 			}
+
 			log.Println("Received packet in grpc Server from NNI.")
 			intfid := nnipkt.Info.intfid
 			pkt := nnipkt.Pkt
@@ -281,6 +328,7 @@
 				log.Printf("[ERROR] Failed to send PktInd indication. %v\n", err)
 				return err
 			}
+
 		case <-s.Endchan:
 			if flag == false {
 				log.Println("PacketInDaemon thread receives close !")
@@ -288,6 +336,7 @@
 				log.Println("Closed unichannel !")
 				close(nnichannel)
 				log.Println("Closed nnichannel !")
+
 				flag = true
 				return nil
 			}
@@ -296,22 +345,77 @@
 	return nil
 }
 
-func (s *Server) exeAAATest(vethenv []string) error {
+func (s *Server) exeAAATest() error {
 	log.Println("exeAAATest Start")
-	for i := 0; i < s.AAAWait; i++ {
+	infos, err := s.getUniIoinfos("outside")
+	if err != nil {
+		return err
+	}
+
+	univeths := []string{}
+	for _, info := range infos {
+		univeths = append(univeths, info.name)
+	}
+
+	for  {
 		select {
 		case <-s.Endchan:
 			log.Println("exeAAATest thread receives close !")
 			return nil
-		default:
-			log.Println("exeAAATest is now sleeping....")
-			time.Sleep(time.Second)
+		case <- time.After(time.Second * time.Duration(s.AAAWait)):
+			log.Println("timeout")
+			err = setup.ActivateWPASups(univeths)
+			if err != nil {
+				return err
+			}
+			s.Processes = append(s.Processes, "wpa_supplicant")
+			log.Println("s.Processes:", s.Processes)
+			return nil
 		}
 	}
-	err := setup.ActivateWPASups(vethenv)
+	return nil
+}
+
+func (s *Server) exeDHCPTest() error {
+	log.Println("exeDHCPTest Start")
+	info, err := s.identifyNniIoinfo("outside")
+
 	if err != nil {
 		return err
 	}
+
+	err = setup.ActivateDHCPServer(info.name, s.DhcpServerIP)
+	if err != nil {
+		return err
+	}
+	s.Processes = append(s.Processes, "dhcpd")
+
+	infos, err := s.getUniIoinfos("outside")
+	if err != nil {
+		return err
+	}
+
+	univeths := []string{}
+	for _, info := range infos {
+		univeths = append(univeths, info.name)
+	}
+
+	for  {
+		select {
+		case <-s.Endchan:
+			log.Println("exeDHCPTest thread receives close !")
+			return nil
+		case <- time.After(time.Second * time.Duration(s.DhcpWait)):
+			log.Println("timeout")
+			err = setup.ActivateDHCPClients(univeths)
+			if err != nil {
+				return err
+			}
+			s.Processes = append(s.Processes, "dhclient")
+			log.Println("s.Processes:", s.Processes)
+			return nil
+		}
+	}
 	return nil
 }
 
@@ -363,7 +467,7 @@
 func (s *Server) IsAllONUActive() bool {
 	for _, onus := range s.Onumap {
 		for _, onu := range onus {
-			if onu.InternalState != device.ONU_ACTIVATED {
+			if *onu.InternalState != device.ONU_ACTIVATED {
 				return false
 			}
 		}
@@ -371,10 +475,6 @@
 	return true
 }
 
-func getVID(onuid uint32) (uint16, error) {
-	return uint16(onuid), nil
-}
-
 func getGemPortID(intfid uint32, onuid uint32) (uint32, error) {
 	idx := uint32(0)
 	return 1024 + (((MAX_ONUS_PER_PON*intfid + onuid - 1) * 7) + idx), nil
@@ -419,11 +519,18 @@
 	return
 }
 
-func tearDown(vethenv []string) error {
-	log.Println("tearDown()")
-	setup.KillAllWPASups()
-	setup.KillAllDHCPClients()
-	setup.TearVethDown(vethenv)
+func cleanUpVeths(vethenv []string) error {
+	if len(vethenv) > 0 {
+		log.Println("cleanUp veths !")
+		setup.TearVethDown(vethenv)
+	}
+	return nil
+}
+
+func killProcesses(pnames []string) error {
+	for _, pname := range  pnames {
+		setup.KillProcess(pname)
+	}
 	return nil
 }
 
diff --git a/core/grpc_service.go b/core/grpc_service.go
index a5bc3e5..e647c9d 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -45,13 +45,17 @@
 
 func (s *Server) GetDeviceInfo(c context.Context, empty *openolt.Empty) (*openolt.DeviceInfo, error) {
 	log.Printf("OLT receives GetDeviceInfo()\n")
-	return new(openolt.DeviceInfo), nil
+	devinfo := new(openolt.DeviceInfo)
+	devinfo.Vendor = "CORD"
+	devinfo.OnuIdStart = 0
+	devinfo.OnuIdEnd = 3
+	devinfo.PonPorts = 4
+	return devinfo, nil
 }
 
 func (s *Server) ActivateOnu(c context.Context, onu *openolt.Onu) (*openolt.Empty, error) {
 	log.Printf("OLT receives ActivateONU()\n")
 	result := device.ValidateONU(*onu, s.Onumap)
-
 	if result == true {
 		matched, error := s.getOnuBySN(onu.SerialNumber)
 		if error != nil {
@@ -59,7 +63,7 @@
 		}
 		onuid := onu.OnuId
 		matched.OnuID = onuid
-		matched.InternalState = device.ONU_ACTIVATED
+		*matched.InternalState = device.ONU_ACTIVATED
 		log.Printf("ONU IntfID: %d OnuID: %d activated succesufully.\n", onu.IntfId, onu.OnuId)
 	}
 	return new(openolt.Empty), nil
@@ -130,6 +134,24 @@
 
 func (s *Server) Reboot(c context.Context, empty *openolt.Empty) (*openolt.Empty, error) {
 	log.Printf("OLT %d receives Reboot ().\n", s.Olt.ID)
+	log.Printf("pointer@Reboot %p", s)
+	// Initialize OLT & Env
+	if s.TestFlag == true{
+		log.Println("Initialize by Reboot")
+		cleanUpVeths(s.VethEnv)
+		close(s.Endchan)
+		processes := s.Processes
+		log.Println("processes:", processes)
+		killProcesses(processes)
+		s.Initialize()
+	}
+	olt := s.Olt
+	olt.InitializeStatus()
+	for intfid, _ := range s.Onumap{
+		for _, onu := range s.Onumap[intfid] {
+			onu.InitializeStatus()
+		}
+	}
 	return new(openolt.Empty), nil
 }
 
diff --git a/core/io_worker.go b/core/io_worker.go
index a535869..d512b01 100644
--- a/core/io_worker.go
+++ b/core/io_worker.go
@@ -73,8 +73,8 @@
 			return retpkt, vid, nil
 		}
 	}
-	//return pkt, 1, nil
-	return nil, 0, errors.New("failed to pop vlan")
+	return pkt, 0, nil
+	//return nil, 0, errors.New("failed to pop vlan")
 }
 
 func PushVLAN(pkt gopacket.Packet, vid uint16) (gopacket.Packet, error) {
diff --git a/core/openolt_service.go b/core/openolt_service.go
index 3f0c311..ffded4d 100644
--- a/core/openolt_service.go
+++ b/core/openolt_service.go
@@ -34,12 +34,14 @@
 func sendIntfInd(stream openolt.Openolt_EnableIndicationServer, olt *device.Olt) error {
 	for i := uint32(0); i < olt.NumPonIntf+olt.NumNniIntf; i++ {
 		intf := olt.Intfs[i]
-		data := &openolt.Indication_IntfInd{&openolt.IntfIndication{IntfId: intf.IntfID, OperState: intf.OperState}}
-		if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
-			log.Printf("Failed to send Intf [id: %d] indication : %v\n", i, err)
-			return err
+		if intf.Type == "pon"{	// There is no need to send IntfInd for NNI
+			data := &openolt.Indication_IntfInd{&openolt.IntfIndication{IntfId: intf.IntfID, OperState: intf.OperState}}
+			if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
+				log.Printf("Failed to send Intf [id: %d] indication : %v\n", i, err)
+				return err
+			}
+			log.Printf("SendIntfInd olt:%d intf:%d (%s)\n", olt.ID, intf.IntfID, intf.Type)
 		}
-		log.Printf("SendIntfInd olt:%d intf:%d (%s)\n", olt.ID, intf.IntfID, intf.Type)
 	}
 	return nil
 }
diff --git a/device/device_olt.go b/device/device_olt.go
index a01dda1..b87bc53 100644
--- a/device/device_olt.go
+++ b/device/device_olt.go
@@ -26,7 +26,7 @@
 	SerialNumber       string
 	Manufacture        string
 	Name               string
-	InternalState      oltState
+	InternalState      *oltState
 	OperState          string
 	Intfs              []intf
 	HeartbeatSignature uint32
@@ -51,7 +51,8 @@
 	olt.NumPonIntf = npon
 	olt.NumNniIntf = nnni
 	olt.Name = "BBSIM OLT"
-	olt.InternalState = PRE_ENABLE
+	olt.InternalState = new(oltState)
+	*olt.InternalState = PRE_ENABLE
 	olt.OperState = "up"
 	olt.Intfs = make([]intf, olt.NumPonIntf+olt.NumNniIntf)
 	olt.HeartbeatSignature = oltid
@@ -67,3 +68,18 @@
 	}
 	return &olt
 }
+
+func (olt *Olt)InitializeStatus(){
+	*olt.InternalState = PRE_ENABLE
+	olt.OperState = "up"
+	for i := uint32(0); i < olt.NumNniIntf; i++ {
+		olt.Intfs[i].IntfID = i
+		olt.Intfs[i].OperState = "up"
+		olt.Intfs[i].Type = "nni"
+	}
+	for i := uint32(olt.NumNniIntf); i < olt.NumPonIntf+olt.NumNniIntf; i++ {
+		olt.Intfs[i].IntfID = i
+		olt.Intfs[i].OperState = "up"
+		olt.Intfs[i].Type = "pon"
+	}
+}
diff --git a/device/device_onu.go b/device/device_onu.go
index 6d3df40..3448799 100644
--- a/device/device_onu.go
+++ b/device/device_onu.go
@@ -17,7 +17,6 @@
 package device
 
 import (
-	"fmt"
 	"log"
 	"gerrit.opencord.org/voltha-bbsim/protos"
 	"reflect"
@@ -31,15 +30,15 @@
 )
 
 type Onu struct {
-	InternalState onuState
+	InternalState *onuState
 	IntfID        uint32
 	OperState     string
 	SerialNumber  *openolt.SerialNumber
 	OnuID         uint32
 }
 
-func createSN(oltid uint32, intfid uint32, onuid uint32) string {
-	sn := fmt.Sprintf("%X%X%02X", oltid, intfid, onuid)
+func createSN(oltid uint32, intfid uint32, onuid uint32) []byte {
+	sn := []byte{0, byte(oltid % 256), byte(intfid), byte(onuid)}
 	return sn
 }
 
@@ -47,17 +46,23 @@
 	onus := []*Onu{}
 	for i := 0; i < int(nonus); i++ {
 		onu := Onu{}
-		onu.InternalState = ONU_PRE_ACTIVATED
+		onu.InternalState = new(onuState)
+		*onu.InternalState = ONU_PRE_ACTIVATED
 		onu.IntfID = intfid
 		onu.OperState = "up"
 		onu.SerialNumber = new(openolt.SerialNumber)
 		onu.SerialNumber.VendorId = []byte("NONE")
-		onu.SerialNumber.VendorSpecific = []byte(createSN(oltid, intfid, uint32(i))) //FIX
+		onu.SerialNumber.VendorSpecific = createSN(oltid, intfid, uint32(i))
 		onus = append(onus, &onu)
 	}
 	return onus
 }
 
+func (onu *Onu) InitializeStatus(){
+	onu.OperState = "up"
+	*onu.InternalState = ONU_PRE_ACTIVATED
+}
+
 func ValidateONU(targetonu openolt.Onu, regonus map[uint32][]*Onu) bool {
 	for _, onus := range regonus {
 		for _, onu := range onus {
diff --git a/setup/setup_env.go b/setup/setup_env.go
index a4210f5..72cf9cc 100644
--- a/setup/setup_env.go
+++ b/setup/setup_env.go
@@ -37,21 +37,22 @@
 	return nil
 }
 
-func KillAllWPASups() error {
-	err := exec.Command("pkill", "wpa_supplicant").Run()
-	if err != nil {
-		log.Printf("[ERROR] Fail to pkill wpa_supplicant: %v\n", err)
-		return err
+func ActivateDHCPClients(vethnames []string) error {
+	for _, vethname := range vethnames {
+		if err := activateDHCPClient(vethname); err != nil {
+			return err
+		}
 	}
 	return nil
 }
 
-func KillAllDHCPClients() error {
-	err := exec.Command("pkill", "dhclient").Run()
+func KillProcess (name string) error {
+	err := exec.Command("pkill", name).Run()
 	if err != nil {
-		log.Printf("[ERROR] Fail to pkill dhclient: %v\n", err)
+		log.Printf("[ERROR] Fail to pkill %s: %v\n", name, err)
 		return err
 	}
+	log.Printf("Successfully killed %s\n", name)
 	return nil
 }
 
@@ -107,4 +108,37 @@
 	}
 	log.Printf("activateWPASupplicant() for :%s\n", vethname)
 	return
-}
\ No newline at end of file
+}
+
+func activateDHCPClient(vethname string) (err error) {
+	cmd := "/usr/local/bin/dhclient"
+	err = exec.Command(cmd, vethname).Start()
+	if err != nil {
+		log.Printf("[ERROR] Faile to activateWPASupplicant() for :%s %v\n", vethname, err)
+		return
+	}
+	log.Printf("activateDHCPClient()\n", vethname)
+	return
+}
+
+func ActivateDHCPServer(veth string, serverip string) error {
+	err := exec.Command("ip", "addr", "add", serverip, "dev",veth).Run()
+	if err != nil {
+		log.Printf("[ERROR] Fail to add ip to %s address: %s\n", veth, err)
+		return err
+	}
+	err = exec.Command("ip", "link", "set", veth, "up").Run()
+	if err != nil {
+		log.Printf("[ERROR] Fail to set %s up: %s\n", veth, err)
+		return err
+	}
+	cmd := "/usr/local/bin/dhcpd"
+	conf := "/etc/dhcp/dhcpd.conf"
+	err = exec.Command(cmd, "-cf", conf, veth).Run()
+	if err != nil {
+		log.Printf("[ERROR] Fail to activateDHCP Server ()\n", err)
+		return err
+	}
+	log.Printf("Activate DHCP Server()\n")
+	return err
+}
