diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt
index bf964cec4659ca057357253303bde1acc61f91bb..8993466bc25bcba86bbf772691ffffbd86e7d379 100755
--- a/cmake_targets/at_commands/CMakeLists.txt
+++ b/cmake_targets/at_commands/CMakeLists.txt
@@ -452,6 +452,7 @@ set(esm_SRC
 )
 
 set(esm_HDR
+    ${OPENAIR_TARGETS}/COMMON/openairinterface5g_limits.h
     ${OPENAIR_NAS_DIR}/UE/ESM/esm_main.h
     ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h
     ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h
@@ -491,6 +492,7 @@ target_include_directories(esm PRIVATE
                      ${OPENAIR_NAS_DIR}/UE
                      ${OPENAIR_NAS_DIR}/UE/API/USER 
                      ${OPENAIR_NAS_DIR}/UE/ESM
+                     ${OPENAIR_TARGETS}/COMMON
                      ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG
                      ${OPENAIR_NAS_DIR}/UE/ESM/SAP
                      ${OPENAIR_NAS_DIR}/COMMON/IES
@@ -673,6 +675,7 @@ target_include_directories(ies PRIVATE
 # EXECUTABLE at_nas_ue
 ################################################################################
 include_directories( 
+                     ${OPENAIR_TARGETS}/COMMON
                      ${OPENAIR_NAS_DIR}/UE
                      ${OPENAIR_DIR}/common/utils
                      ${OPENAIR_DIR}/common/utils/msc 
diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h
index dd09749fbf16bddde06e7b3b7418e87b2ca37ff1..4ef013151604efbe050bd434f4e19693c8dd7a1e 100644
--- a/openair1/PHY/impl_defs_top.h
+++ b/openair1/PHY/impl_defs_top.h
@@ -284,21 +284,7 @@ typedef enum {
 #define NUMBER_OF_HARQ_PID_MAX 8
 
 #define MAX_FRAME_NUMBER 0x400
-#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
-#define NUMBER_OF_eNB_MAX 1
-#define NUMBER_OF_UE_MAX 16
-#define NUMBER_OF_CONNECTED_eNB_MAX 3
-#else
-#ifdef LARGE_SCALE
-#define NUMBER_OF_eNB_MAX 2
-#define NUMBER_OF_UE_MAX 120
-#define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
-#else
-#define NUMBER_OF_eNB_MAX 7
-#define NUMBER_OF_UE_MAX 16
-#define NUMBER_OF_CONNECTED_eNB_MAX 3
-#endif
-#endif
+#include "openairinterface5g_limits.h"
 
 #define NUMBER_OF_RN_MAX 3
 typedef enum {no_relay=1,unicast_relay_type1,unicast_relay_type2, multicast_relay} relaying_type_t;
diff --git a/openair2/NETWORK_DRIVER/UE_IP/constant.h b/openair2/NETWORK_DRIVER/UE_IP/constant.h
index 9b4017773b0c84726ecc1846f50bfbe617b86b51..42fd0b6303c0bcaca9665e0eae52c135a31d6a0b 100644
--- a/openair2/NETWORK_DRIVER/UE_IP/constant.h
+++ b/openair2/NETWORK_DRIVER/UE_IP/constant.h
@@ -19,6 +19,7 @@
  *      contact@openairinterface.org
  */
 
+#include "openairinterface5g_limits.h"
 #ifndef _UE_IP_CST
 #define _UE_IP_CST
 
@@ -51,7 +52,7 @@
 
 
 
-#define UE_IP_NB_INSTANCES_MAX       8
+#define UE_IP_NB_INSTANCES_MAX       NUMBER_OF_UE_MAX
 
 
 #endif
diff --git a/openair2/UTIL/OMV/structures.h b/openair2/UTIL/OMV/structures.h
index c50e7b22973c05f7c1c212485685ad955d59a137..434fa4c3836e888697328ae182b422b78fb1d1b0 100644
--- a/openair2/UTIL/OMV/structures.h
+++ b/openair2/UTIL/OMV/structures.h
@@ -31,13 +31,12 @@
 #ifndef STRUCTURES_H
 #define STRUCTURES_H
 
+#include "openairinterface5g_limits.h"
 #ifndef __PHY_IMPLEMENTATION_DEFS_H__
-#define Maxneighbor 64
-#define NUMBER_OF_UE_MAX 64
-#define NUMBER_OF_eNB_MAX 3
-#ifndef NB_ANTENNAS_RX
-#  define NB_ANTENNAS_RX  4
-#endif
+	#define Maxneighbor NUMBER_OF_UE_MAX
+	#ifndef NB_ANTENNAS_RX
+		#define NB_ANTENNAS_RX  4
+	#endif
 #endif
 //
 
diff --git a/openair2/UTIL/OTG/otg_defs.h b/openair2/UTIL/OTG/otg_defs.h
index 0cef777b8f0b98eddeb42b61323bc985ff1e9b6b..ebb3f299897031f17ae140f61091d177121aae60 100644
--- a/openair2/UTIL/OTG/otg_defs.h
+++ b/openair2/UTIL/OTG/otg_defs.h
@@ -33,12 +33,12 @@
 #ifndef __OTG_DEFS_H__
 # define __OTG_DEFS_H__
 
-
+/* \brief To define the NUMBER_OF_eNB_MAX and NUMBER_OF_UE_MAX */
 #if STANDALONE==1
-# define NUMBER_OF_eNB_MAX 3
-# define NUMBER_OF_UE_MAX 3
+	#include "openairinterface5g_limits.h"
 #else
-#include "PHY/impl_defs_top.h" /* \brief To define the NUMBER_OF_eNB_MAX and NUMBER_OF_UE_MAX */
+	// impl_defs_top.h includes openairinterface5g_limits.h
+	#include "PHY/impl_defs_top.h"
 #endif
 
 #include "otg_config.h"
diff --git a/openair3/NAS/UE/nas_ue_task.h b/openair3/NAS/UE/nas_ue_task.h
index 4c7cd1424948119bc66b32a3be0aa158258f369b..90ef26bd80ffbab5fdd6eac4d00938a8e4fcf706 100644
--- a/openair3/NAS/UE/nas_ue_task.h
+++ b/openair3/NAS/UE/nas_ue_task.h
@@ -22,8 +22,7 @@
 #ifndef NAS_UE_TASK_H_
 #define NAS_UE_TASK_H_
 
-// FIXME There is multiple definition of NUMBER_OF_UE_MAX
-#include "defs.h"
+#include "openairinterface5g_limits.h"
 #include "user_defs.h"
 
 // XXX simple array container for multiple users
diff --git a/targets/COMMON/openairinterface5g_limits.h b/targets/COMMON/openairinterface5g_limits.h
new file mode 100644
index 0000000000000000000000000000000000000000..6185dd8bbe5a08bf1400430f18d21945f51f1b31
--- /dev/null
+++ b/targets/COMMON/openairinterface5g_limits.h
@@ -0,0 +1,20 @@
+#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
+	#define NUMBER_OF_eNB_MAX 1
+	#define NUMBER_OF_UE_MAX 16
+	#define NUMBER_OF_CONNECTED_eNB_MAX 3
+#else
+	#define NUMBER_OF_eNB_MAX 7
+	#define NUMBER_OF_UE_MAX 20
+	#define NUMBER_OF_CONNECTED_eNB_MAX 3
+
+	#if STANDALONE==1
+		#define NUMBER_OF_eNB_MAX 3
+		#define NUMBER_OF_UE_MAX 3
+	#endif
+
+	#if LARGE_SCALE
+		#define NUMBER_OF_eNB_MAX 2
+		#define NUMBER_OF_UE_MAX 120
+		#define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
+	#endif
+#endif