23 #include <ns3/epc-helper.h>
25 #include <ns3/inet-socket-address.h>
26 #include <ns3/mac48-address.h>
27 #include <ns3/eps-bearer.h>
28 #include <ns3/ipv4-address.h>
29 #include <ns3/internet-stack-helper.h>
30 #include <ns3/point-to-point-helper.h>
31 #include <ns3/packet-socket-helper.h>
32 #include <ns3/packet-socket-address.h>
33 #include <ns3/epc-enb-application.h>
34 #include <ns3/epc-sgw-pgw-application.h>
36 #include <ns3/lte-enb-rrc.h>
37 #include <ns3/epc-x2.h>
38 #include <ns3/lte-enb-net-device.h>
39 #include <ns3/lte-ue-net-device.h>
40 #include <ns3/epc-mme.h>
41 #include <ns3/epc-ue-nas.h>
51 : m_gtpuUdpPort (2152)
100 m_mme = CreateObject<EpcMme> ();
115 .AddConstructor<EpcHelper> ()
116 .AddAttribute (
"S1uLinkDataRate",
117 "The data rate to be used for the next S1-U link to be created",
120 MakeDataRateChecker ())
121 .AddAttribute (
"S1uLinkDelay",
122 "The delay to be used for the next S1-U link to be created",
126 .AddAttribute (
"S1uLinkMtu",
127 "The MTU of the next S1-U link to be created. Note that, because of the additional GTP/UDP/IP tunneling overhead, you need a MTU larger than the end-to-end MTU that you want to support.",
130 MakeUintegerChecker<uint16_t> ())
131 .AddAttribute (
"X2LinkDataRate",
132 "The data rate to be used for the next X2 link to be created",
135 MakeDataRateChecker ())
136 .AddAttribute (
"X2LinkDelay",
137 "The delay to be used for the next X2 link to be created",
141 .AddAttribute (
"X2LinkMtu",
142 "The MTU of the next X2 link to be created. Note that, because of some big X2 messages, you need a big MTU.",
145 MakeUintegerChecker<uint16_t> ())
177 enbSgwNodes.Add (enb);
208 retval = enbLteSocket->
Bind (enbLteSocketBindAddress);
214 retval = enbLteSocket->
Connect (enbLteSocketConnectAddress);
219 Ptr<EpcEnbApplication> enbApp = CreateObject<EpcEnbApplication> (enbLteSocket, enbS1uSocket, enbAddress, sgwAddress, cellId);
231 m_mme->
AddEnb (cellId, enbAddress, enbApp->GetS1apSapEnb ());
268 uint16_t enb1CellId = enb1LteDev->
GetCellId ();
269 NS_LOG_LOGIC (
"LteEnbNetDevice #1 = " << enb1LteDev <<
" - CellId = " << enb1CellId);
273 uint16_t enb2CellId = enb2LteDev->
GetCellId ();
274 NS_LOG_LOGIC (
"LteEnbNetDevice #2 = " << enb2LteDev <<
" - CellId = " << enb2CellId);
276 enb1X2->AddX2Interface (enb1CellId, enb1X2Address, enb2CellId, enb2X2Address);
277 enb2X2->AddX2Interface (enb2CellId, enb2X2Address, enb1CellId, enb1X2Address);
302 NS_ASSERT_MSG (ueIpv4 != 0,
"UEs need to have IPv4 installed before EPS bearers can be activated");
303 int32_t
interface = ueIpv4->GetInterfaceForDevice (ueDevice);
313 ueLteDevice->GetNas ()->ActivateEpsBearer (bearer, tft);