diff --git a/ponsim/v2/core/ponsim_device.go b/ponsim/v2/core/ponsim_device.go
index 3fc52a5..9474432 100644
--- a/ponsim/v2/core/ponsim_device.go
+++ b/ponsim/v2/core/ponsim_device.go
@@ -108,35 +108,11 @@
 	o.Counter.CountRxFrame(port, len(common.GetEthernetLayer(frame).Payload))
 
 	if egressPort, egressFrame := o.processFrame(ctx, port, frame); egressFrame != nil {
-		forwarded := 0
-		links := o.links[int(egressPort)]
-
-		if int(egressPort) <= 2 && int(egressPort) > 0 {
-			o.Counter.CountTxFrame(int(egressPort), len(common.GetEthernetLayer(egressFrame).Payload))
-		}
-
-		for _, link := range links {
-			forwarded += 1
-
-			common.Logger().WithFields(logrus.Fields{
-				"device":      o,
-				"egressPort":  port,
-				"egressFrame": egressFrame,
-			}).Debug("Forwarding packet to link")
-
-			link.(func(int, gopacket.Packet))(int(egressPort), egressFrame)
-		}
-		if forwarded == 0 {
-			common.Logger().WithFields(logrus.Fields{
-				"device": o,
-				"port":   port,
-				"frame":  frame,
-			}).Warn("Nothing was forwarded")
-		}
+		o.SendOut(int(egressPort), egressFrame)
 	} else {
 		common.Logger().WithFields(logrus.Fields{
 			"device": o,
-			"port":   egressPort,
+			"port":   int(egressPort),
 			"frame":  egressFrame,
 		}).Error("Failed to properly process frame")
 	}
@@ -145,6 +121,45 @@
 }
 
 /*
+SendOut send a given frame out the given port
+*/
+func (o *PonSimDevice) SendOut(
+	egressPort int,
+	egressFrame gopacket.Packet,
+) {
+	common.Logger().WithFields(logrus.Fields{
+		"egressPort":  egressPort,
+		"egressFrame": egressFrame,
+	}).Debug("Sending packet out port")
+
+	forwarded := 0
+	links := o.links[egressPort]
+
+	if egressPort <= 2 && egressPort > 0 {
+		o.Counter.CountTxFrame(egressPort, len(common.GetEthernetLayer(egressFrame).Payload))
+	}
+
+	for _, link := range links {
+		forwarded++
+
+		common.Logger().WithFields(logrus.Fields{
+			"device":      o,
+			"egressPort":  egressPort,
+			"egressFrame": egressFrame,
+		}).Debug("Forwarding packet to link")
+
+		link.(func(int, gopacket.Packet))(egressPort, egressFrame)
+	}
+	if forwarded == 0 {
+		common.Logger().WithFields(logrus.Fields{
+			"device": o,
+			"egressPort":   egressPort,
+			"egressFrame":  egressFrame,
+		}).Warn("Nothing was forwarded")
+	}
+}
+
+/*
 connectNetworkInterfaces opens network interfaces for reading and/or writing packets
 */
 func (o *PonSimDevice) connectNetworkInterfaces() {
diff --git a/ponsim/v2/core/ponsim_interface.go b/ponsim/v2/core/ponsim_interface.go
index fbceae2..b6f236a 100644
--- a/ponsim/v2/core/ponsim_interface.go
+++ b/ponsim/v2/core/ponsim_interface.go
@@ -30,4 +30,6 @@
 	GetPort() int32
 
 	Forward(context.Context, int, gopacket.Packet) error
+
+	SendOut(int, gopacket.Packet)
 }
diff --git a/ponsim/v2/grpc/nbi/ponsim_handler.go b/ponsim/v2/grpc/nbi/ponsim_handler.go
index 49fd71a..ec64d5c 100644
--- a/ponsim/v2/grpc/nbi/ponsim_handler.go
+++ b/ponsim/v2/grpc/nbi/ponsim_handler.go
@@ -52,10 +52,11 @@
 
 	common.Logger().WithFields(logrus.Fields{
 		"handler": handler,
+		"out_port": int(data.OutPort),
 		"frame":   frame.Dump(),
 	}).Info("Constructed frame")
 
-	handler.device.Forward(context.Background(), 2, frame)
+	handler.device.SendOut(int(data.OutPort), frame)
 
 	out := new(empty.Empty)
 	return out, nil
@@ -145,7 +146,7 @@
 				},
 			)
 		}
-		out.NniPort = 0
+		out.NniPort = 2
 	} else {
 		common.Logger().WithFields(logrus.Fields{
 			"handler": handler,
diff --git a/voltha/adapters/ponsim_olt/ponsim_olt.py b/voltha/adapters/ponsim_olt/ponsim_olt.py
index b84209c..5ef3fc3 100644
--- a/voltha/adapters/ponsim_olt/ponsim_olt.py
+++ b/voltha/adapters/ponsim_olt/ponsim_olt.py
@@ -427,7 +427,7 @@
         self.alarms = AdapterAlarms(self.adapter, device)
 
         nni_port = Port(
-            port_no=2,
+            port_no=info.nni_port,
             label='NNI facing Ethernet port',
             type=Port.ETHERNET_NNI,
             admin_state=AdminState.ENABLED,
@@ -450,7 +450,7 @@
                 hw_desc='simualted pon',
                 sw_desc='simualted pon',
                 # serial_num=uuid4().hex,
-                serial_num="9b7cfd85441b407c87ee3261df7d4818",
+                serial_num=device.serial_number,
                 dp_desc='n/a'
             ),
             switch_features=ofp_switch_features(
@@ -703,17 +703,22 @@
         self.log.info('sending-packet-out', egress_port=egress_port,
                       msg=hexify(msg))
         pkt = Ether(msg)
-        out_pkt = (
-                Ether(src=pkt.src, dst=pkt.dst) /
-                Dot1Q(vlan=4000) /
-                Dot1Q(vlan=egress_port, type=pkt.type) /
-                pkt.payload
-        )
+        out_pkt = pkt
+        if egress_port != self.nni_port.port_no:
+            # don't do the vlan manipulation for the NNI port, vlans are already correct
+            out_pkt = (
+                    Ether(src=pkt.src, dst=pkt.dst) /
+                    Dot1Q(vlan=egress_port, type=pkt.type) /
+                    pkt.payload
+            )
+
+        # TODO need better way of mapping logical ports to PON ports
+        out_port = self.nni_port.port_no if egress_port == self.nni_port.port_no else 1
 
         if self.ponsim_comm == 'grpc':
             # send over grpc stream
             stub = ponsim_pb2.PonSimStub(self.get_channel())
-            frame = PonSimFrame(id=self.device_id, payload=str(out_pkt))
+            frame = PonSimFrame(id=self.device_id, payload=str(out_pkt), out_port=out_port)
             stub.SendFrame(frame)
         else:
             # send over frameio
diff --git a/voltha/protos/ponsim.proto b/voltha/protos/ponsim.proto
index bdf4394..9d62b63 100644
--- a/voltha/protos/ponsim.proto
+++ b/voltha/protos/ponsim.proto
@@ -31,6 +31,7 @@
 message PonSimFrame {
     string id = 1;
     bytes payload = 2;
+    int32 out_port = 3;
 }
 
 message PonSimPacketCounter {
