diff --git a/internal/bbsim/devices/nni.go b/internal/bbsim/devices/nni.go
index 3a36287..ad01f2f 100644
--- a/internal/bbsim/devices/nni.go
+++ b/internal/bbsim/devices/nni.go
@@ -74,34 +74,43 @@
 // sendNniPacket will send a packet out of the NNI interface.
 // We will send upstream only DHCP packets and drop anything else
 func sendNniPacket(packet gopacket.Packet) error {
-	if isDhcp := packetHandlers.IsDhcpPacket(packet); !isDhcp {
+	isDhcp := packetHandlers.IsDhcpPacket(packet)
+	isLldp := packetHandlers.IsLldpPacket(packet)
+
+	if isDhcp == false && isLldp == false {
 		nniLogger.WithFields(log.Fields{
 			"packet": packet,
 		}).Trace("Dropping NNI packet as it's not DHCP")
+		return nil
 	}
 
-	packet, err := packetHandlers.PopDoubleTag(packet)
-	if err != nil {
-		nniLogger.WithFields(log.Fields{
-			"packet": packet,
-		}).Errorf("Can't remove double tags from packet: %v", err)
-		return err
-	}
+	if isDhcp {
+		packet, err := packetHandlers.PopDoubleTag(packet)
+		if err != nil {
+			nniLogger.WithFields(log.Fields{
+				"packet": packet,
+			}).Errorf("Can't remove double tags from packet: %v", err)
+			return err
+		}
 
-	handle, err := getVethHandler(nniVeth)
-	if err != nil {
-		return err
-	}
+		handle, err := getVethHandler(nniVeth)
+		if err != nil {
+			return err
+		}
 
-	err = handle.WritePacketData(packet.Data())
-	if err != nil {
-		nniLogger.WithFields(log.Fields{
-			"packet": packet,
-		}).Errorf("Failed to send packet out of the NNI: %s", err)
-		return err
-	}
+		err = handle.WritePacketData(packet.Data())
+		if err != nil {
+			nniLogger.WithFields(log.Fields{
+				"packet": packet,
+			}).Errorf("Failed to send packet out of the NNI: %s", err)
+			return err
+		}
 
-	nniLogger.Infof("Sent packet out of NNI")
+		nniLogger.Infof("Sent packet out of NNI")
+	} else if isLldp {
+		// TODO rework this when BBSim supports data-plane packets
+		nniLogger.Trace("Received LLDP Packet, ignoring it")
+	}
 	return nil
 }
 
diff --git a/internal/bbsim/packetHandlers/filters.go b/internal/bbsim/packetHandlers/filters.go
index b43b677..9ada88c 100644
--- a/internal/bbsim/packetHandlers/filters.go
+++ b/internal/bbsim/packetHandlers/filters.go
@@ -30,6 +30,13 @@
 	return false
 }
 
+func IsLldpPacket(pkt gopacket.Packet) bool {
+	if layer := pkt.Layer(layers.LayerTypeLinkLayerDiscovery); layer != nil {
+		return true
+	}
+	return false
+}
+
 // return true if the packet is coming in the OLT from the NNI port
 // it uses the ack to check if the source is the one we assigned to the
 // dhcp server
diff --git a/internal/bbsim/packetHandlers/filters_test.go b/internal/bbsim/packetHandlers/filters_test.go
index 6064e68..8d5f96a 100644
--- a/internal/bbsim/packetHandlers/filters_test.go
+++ b/internal/bbsim/packetHandlers/filters_test.go
@@ -62,6 +62,50 @@
 	assert.Equal(t, res, false)
 }
 
+func Test_IsLldpPacket_True(t *testing.T) {
+	layer := &layers.LinkLayerDiscovery{
+		PortID: layers.LLDPPortID{
+			ID:      []byte{1, 2, 3, 4},
+			Subtype: layers.LLDPPortIDSubtypeMACAddr,
+		},
+		ChassisID: layers.LLDPChassisID{
+			ID:      []byte{1, 2, 3, 4},
+			Subtype: layers.LLDPChassisIDSubTypeMACAddr,
+		},
+	}
+
+	buffer := gopacket.NewSerializeBuffer()
+	opts := gopacket.SerializeOptions{FixLengths: true}
+	err := gopacket.SerializeLayers(buffer, opts, layer)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	packet := gopacket.NewPacket(buffer.Bytes(), layers.LayerTypeLinkLayerDiscovery, gopacket.DecodeOptions{})
+
+	res := packetHandlers.IsLldpPacket(packet)
+	assert.Equal(t, res, true)
+}
+
+func Test_IsLldpPacket_False(t *testing.T) {
+	eth := &layers.Ethernet{
+		DstMAC: net.HardwareAddr{0x2e, 0x60, 0x70, 0x13, 0x15, 0x16},
+		SrcMAC: net.HardwareAddr{0x2e, 0x60, 0x70, 0x13, 0x15, 0x17},
+	}
+
+	buffer := gopacket.NewSerializeBuffer()
+	opts := gopacket.SerializeOptions{FixLengths: true}
+	err := gopacket.SerializeLayers(buffer, opts, eth)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	ethernetPkt := gopacket.NewPacket(buffer.Bytes(), layers.LayerTypeEthernet, gopacket.DecodeOptions{})
+
+	res := packetHandlers.IsLldpPacket(ethernetPkt)
+	assert.Equal(t, res, false)
+}
+
 func Test_IsIncomingPacket_True(t *testing.T) {
 	eth := &layers.IPv4{
 		SrcIP: net.ParseIP("192.168.254.1"),
