A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
no-backhaul-epc-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Manuel Requena <manuel.requena@cttc.es>
18 * (based on the original point-to-point-epc-helper.h)
19 */
20
21#ifndef NO_BACKHAUL_EPC_HELPER_H
22#define NO_BACKHAUL_EPC_HELPER_H
23
24#include "epc-helper.h"
25
26namespace ns3
27{
28
29class EpcSgwApplication;
30class EpcPgwApplication;
31class EpcMmeApplication;
32
33/**
34 * \ingroup lte
35 * \brief Create an EPC network with PointToPoint links between the core network nodes.
36 *
37 * This Helper will create an EPC network topology comprising of
38 * three nodes: SGW, PGW and MME.
39 * The X2-U, X2-C, S5 and S11 interfaces are realized over PointToPoint links.
40 *
41 * The S1 interface is not created. So, no backhaul network is built.
42 * You have to build your own backhaul network in the simulation program.
43 * Or you can use PointToPointEpcHelper or CsmaEpcHelper
44 * (instead of this NoBackhaulEpcHelper) to use reference backhaul networks.
45 */
47{
48 public:
49 /**
50 * Constructor
51 */
53
54 /**
55 * Destructor
56 */
57 ~NoBackhaulEpcHelper() override;
58
59 // inherited from Object
60 /**
61 * Register this type.
62 * \return The object TypeId.
63 */
64 static TypeId GetTypeId();
65 TypeId GetInstanceTypeId() const override;
66 void DoDispose() override;
67
68 // inherited from EpcHelper
69 void AddEnb(Ptr<Node> enbNode,
70 Ptr<NetDevice> lteEnbNetDevice,
71 std::vector<uint16_t> cellIds) override;
72 void AddUe(Ptr<NetDevice> ueLteDevice, uint64_t imsi) override;
73 void AddX2Interface(Ptr<Node> enbNode1, Ptr<Node> enbNode2) override;
75 Ipv4Address enbAddress,
76 Ipv4Address sgwAddress,
77 std::vector<uint16_t> cellIds) override;
78 uint8_t ActivateEpsBearer(Ptr<NetDevice> ueLteDevice,
79 uint64_t imsi,
80 Ptr<EpcTft> tft,
81 EpsBearer bearer) override;
82 Ptr<Node> GetSgwNode() const override;
83 Ptr<Node> GetPgwNode() const override;
88 int64_t AssignStreams(int64_t stream) override;
89
90 protected:
91 /**
92 * \brief DoAddX2Interface: Call AddX2Interface on top of the Enb device pointers
93 *
94 * \param enb1X2 EPCX2 of ENB1
95 * \param enb1LteDev LTE device of ENB1
96 * \param enb1X2Address Address for ENB1
97 * \param enb2X2 EPCX2 of ENB2
98 * \param enb2LteDev LTE device of ENB2
99 * \param enb2X2Address Address for ENB2
100 */
101 virtual void DoAddX2Interface(const Ptr<EpcX2>& enb1X2,
102 const Ptr<NetDevice>& enb1LteDev,
103 const Ipv4Address& enb1X2Address,
104 const Ptr<EpcX2>& enb2X2,
105 const Ptr<NetDevice>& enb2LteDev,
106 const Ipv4Address& enb2X2Address) const;
107
108 /**
109 * \brief DoActivateEpsBearerForUe: Schedule ActivateEpsBearer on the UE
110 * \param ueDevice LTE device for the UE
111 * \param tft TFT
112 * \param bearer Bearer
113 */
114 virtual void DoActivateEpsBearerForUe(const Ptr<NetDevice>& ueDevice,
115 const Ptr<EpcTft>& tft,
116 const EpsBearer& bearer) const;
117
118 private:
119 /**
120 * helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW
121 */
123 /**
124 * helper to assign IPv6 addresses to UE devices as well as to the TUN device of the SGW/PGW
125 */
127
128 /**
129 * PGW network element
130 */
132
133 /**
134 * SGW network element
135 */
137
138 /**
139 * MME network element
140 */
142
143 /**
144 * SGW application
145 */
147
148 /**
149 * PGW application
150 */
152
153 /**
154 * MME application
155 */
157
158 /**
159 * TUN device implementing tunneling of user data over GTP-U/UDP/IP
160 */
162
163 /**
164 * UDP port where the GTP-U Socket is bound, fixed by the standard as 2152
165 */
167
168 /**
169 * Helper to assign addresses to S11 NetDevices
170 */
172
173 /**
174 * The data rate to be used for the next S11 link to be created
175 */
177
178 /**
179 * The delay to be used for the next S11 link to be created
180 */
182
183 /**
184 * The MTU of the next S11 link to be created
185 */
186 uint16_t m_s11LinkMtu;
187
188 /**
189 * UDP port where the GTPv2-C Socket is bound, fixed by the standard as 2123
190 */
192
193 /**
194 * S5 interfaces
195 */
196
197 /**
198 * Helper to assign addresses to S5 NetDevices
199 */
201
202 /**
203 * The data rate to be used for the next S5 link to be created
204 */
206
207 /**
208 * The delay to be used for the next S5 link to be created
209 */
211
212 /**
213 * The MTU of the next S5 link to be created
214 */
215 uint16_t m_s5LinkMtu;
216
217 /**
218 * Map storing for each IMSI the corresponding eNB NetDevice
219 */
220 std::map<uint64_t, Ptr<NetDevice>> m_imsiEnbDeviceMap;
221
222 /**
223 * helper to assign addresses to X2 NetDevices
224 */
226
227 /**
228 * The data rate to be used for the next X2 link to be created
229 */
231
232 /**
233 * The delay to be used for the next X2 link to be created
234 */
236
237 /**
238 * The MTU of the next X2 link to be created. Note that,
239 * because of some big X2 messages, you need a big MTU.
240 */
241 uint16_t m_x2LinkMtu;
242
243 /**
244 * Enable PCAP generation for X2 link
245 */
247
248 /**
249 * Prefix for the PCAP file for the X2 link
250 */
252};
253
254} // namespace ns3
255
256#endif // NO_BACKHAUL_EPC_HELPER_H
Class for representing data rates.
Definition: data-rate.h:89
Base helper class to handle the creation of the EPC entities.
Definition: epc-helper.h:51
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Helper class to auto-assign global IPv6 unicast addresses.
Describes an IPv6 address.
Definition: ipv6-address.h:49
Keep track of a set of IPv6 interfaces.
holds a vector of ns3::NetDevice pointers
Create an EPC network with PointToPoint links between the core network nodes.
uint16_t m_s5LinkMtu
The MTU of the next S5 link to be created.
static TypeId GetTypeId()
Register this type.
Ptr< VirtualNetDevice > m_tunDevice
TUN device implementing tunneling of user data over GTP-U/UDP/IP.
Time m_s5LinkDelay
The delay to be used for the next S5 link to be created.
Ipv4AddressHelper m_x2Ipv4AddressHelper
helper to assign addresses to X2 NetDevices
Ptr< Node > m_sgw
SGW network element.
~NoBackhaulEpcHelper() override
Destructor.
Ptr< EpcSgwApplication > m_sgwApp
SGW application.
DataRate m_x2LinkDataRate
The data rate to be used for the next X2 link to be created.
Ptr< Node > m_mme
MME network element.
Ipv4AddressHelper m_uePgwAddressHelper
helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW
Ptr< Node > GetSgwNode() const override
Get the SGW node.
Ptr< EpcMmeApplication > m_mmeApp
MME application.
void AddUe(Ptr< NetDevice > ueLteDevice, uint64_t imsi) override
Notify the EPC of the existence of a new UE which might attach at a later time.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint16_t m_s11LinkMtu
The MTU of the next S11 link to be created.
std::string m_x2LinkPcapPrefix
Prefix for the PCAP file for the X2 link.
bool m_x2LinkEnablePcap
Enable PCAP generation for X2 link.
Ipv6Address GetUeDefaultGatewayAddress6() override
uint8_t ActivateEpsBearer(Ptr< NetDevice > ueLteDevice, uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer) override
Activate an EPS bearer, setting up the corresponding S1-U tunnel.
Ptr< Node > GetPgwNode() const override
Get the PGW node.
void DoDispose() override
Destructor implementation.
Ipv4AddressHelper m_s5Ipv4AddressHelper
S5 interfaces.
uint16_t m_x2LinkMtu
The MTU of the next X2 link to be created.
Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices) override
Assign IPv6 addresses to UE devices.
uint16_t m_gtpcUdpPort
UDP port where the GTPv2-C Socket is bound, fixed by the standard as 2123.
void AddS1Interface(Ptr< Node > enb, Ipv4Address enbAddress, Ipv4Address sgwAddress, std::vector< uint16_t > cellIds) override
Add an S1 interface between an eNB and a SGW.
void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2) override
Add an X2 interface between two eNB.
Ptr< EpcPgwApplication > m_pgwApp
PGW application.
uint16_t m_gtpuUdpPort
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152.
virtual void DoAddX2Interface(const Ptr< EpcX2 > &enb1X2, const Ptr< NetDevice > &enb1LteDev, const Ipv4Address &enb1X2Address, const Ptr< EpcX2 > &enb2X2, const Ptr< NetDevice > &enb2LteDev, const Ipv4Address &enb2X2Address) const
DoAddX2Interface: Call AddX2Interface on top of the Enb device pointers.
Time m_x2LinkDelay
The delay to be used for the next X2 link to be created.
Ipv4AddressHelper m_s11Ipv4AddressHelper
Helper to assign addresses to S11 NetDevices.
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used.
Ipv4Address GetUeDefaultGatewayAddress() override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
Assign IPv4 addresses to UE devices.
Time m_s11LinkDelay
The delay to be used for the next S11 link to be created.
Ptr< Node > m_pgw
PGW network element.
DataRate m_s11LinkDataRate
The data rate to be used for the next S11 link to be created.
Ipv6AddressHelper m_uePgwAddressHelper6
helper to assign IPv6 addresses to UE devices as well as to the TUN device of the SGW/PGW
std::map< uint64_t, Ptr< NetDevice > > m_imsiEnbDeviceMap
Map storing for each IMSI the corresponding eNB NetDevice.
void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, std::vector< uint16_t > cellIds) override
Add an eNB to the EPC.
virtual void DoActivateEpsBearerForUe(const Ptr< NetDevice > &ueDevice, const Ptr< EpcTft > &tft, const EpsBearer &bearer) const
DoActivateEpsBearerForUe: Schedule ActivateEpsBearer on the UE.
DataRate m_s5LinkDataRate
The data rate to be used for the next S5 link to be created.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.