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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Manuel Requena <manuel.requena@cttc.es>
7 * (based on the original point-to-point-epc-helper.h)
8 */
9
10#ifndef NO_BACKHAUL_EPC_HELPER_H
11#define NO_BACKHAUL_EPC_HELPER_H
12
13#include "epc-helper.h"
14
15namespace ns3
16{
17
21
22/**
23 * @ingroup lte
24 * @brief Create an EPC network with PointToPoint links between the core network nodes.
25 *
26 * This Helper will create an EPC network topology comprising of
27 * three nodes: SGW, PGW and MME.
28 * The X2-U, X2-C, S5 and S11 interfaces are realized over PointToPoint links.
29 *
30 * The S1 interface is not created. So, no backhaul network is built.
31 * You have to build your own backhaul network in the simulation program.
32 * Or you can use PointToPointEpcHelper or CsmaEpcHelper
33 * (instead of this NoBackhaulEpcHelper) to use reference backhaul networks.
34 */
36{
37 public:
38 /**
39 * Constructor
40 */
42
43 /**
44 * Destructor
45 */
46 ~NoBackhaulEpcHelper() override;
47
48 // inherited from Object
49 /**
50 * Register this type.
51 * @return The object TypeId.
52 */
53 static TypeId GetTypeId();
54 void DoDispose() override;
55
56 // inherited from EpcHelper
57 void AddEnb(Ptr<Node> enbNode,
58 Ptr<NetDevice> lteEnbNetDevice,
59 std::vector<uint16_t> cellIds) override;
60 void AddUe(Ptr<NetDevice> ueLteDevice, uint64_t imsi) override;
61 void AddX2Interface(Ptr<Node> enbNode1, Ptr<Node> enbNode2) override;
63 Ipv4Address enbAddress,
64 Ipv4Address sgwAddress,
65 std::vector<uint16_t> cellIds) override;
66 uint8_t ActivateEpsBearer(Ptr<NetDevice> ueLteDevice,
67 uint64_t imsi,
68 Ptr<EpcTft> tft,
69 EpsBearer bearer) override;
70 Ptr<Node> GetSgwNode() const override;
71 Ptr<Node> GetPgwNode() const override;
76 int64_t AssignStreams(int64_t stream) override;
77
78 protected:
79 /**
80 * @brief DoAddX2Interface: Call AddX2Interface on top of the Enb device pointers
81 *
82 * @param enb1X2 EPCX2 of ENB1
83 * @param enb1LteDev LTE device of ENB1
84 * @param enb1X2Address Address for ENB1
85 * @param enb2X2 EPCX2 of ENB2
86 * @param enb2LteDev LTE device of ENB2
87 * @param enb2X2Address Address for ENB2
88 */
89 virtual void DoAddX2Interface(const Ptr<EpcX2>& enb1X2,
90 const Ptr<NetDevice>& enb1LteDev,
91 const Ipv4Address& enb1X2Address,
92 const Ptr<EpcX2>& enb2X2,
93 const Ptr<NetDevice>& enb2LteDev,
94 const Ipv4Address& enb2X2Address) const;
95
96 /**
97 * @brief DoActivateEpsBearerForUe: Schedule ActivateEpsBearer on the UE
98 * @param ueDevice LTE device for the UE
99 * @param tft TFT
100 * @param bearer Bearer
101 */
102 virtual void DoActivateEpsBearerForUe(const Ptr<NetDevice>& ueDevice,
103 const Ptr<EpcTft>& tft,
104 const EpsBearer& bearer) const;
105
106 private:
107 /**
108 * helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW
109 */
111 /**
112 * helper to assign IPv6 addresses to UE devices as well as to the TUN device of the SGW/PGW
113 */
115
116 /**
117 * PGW network element
118 */
120
121 /**
122 * SGW network element
123 */
125
126 /**
127 * MME network element
128 */
130
131 /**
132 * SGW application
133 */
135
136 /**
137 * PGW application
138 */
140
141 /**
142 * MME application
143 */
145
146 /**
147 * TUN device implementing tunneling of user data over GTP-U/UDP/IP
148 */
150
151 /**
152 * UDP port where the GTP-U Socket is bound, fixed by the standard as 2152
153 */
155
156 /**
157 * Helper to assign addresses to S11 NetDevices
158 */
160
161 /**
162 * The data rate to be used for the next S11 link to be created
163 */
165
166 /**
167 * The delay to be used for the next S11 link to be created
168 */
170
171 /**
172 * The MTU of the next S11 link to be created
173 */
174 uint16_t m_s11LinkMtu;
175
176 /**
177 * UDP port where the GTPv2-C Socket is bound, fixed by the standard as 2123
178 */
180
181 /**
182 * S5 interfaces
183 */
184
185 /**
186 * Helper to assign addresses to S5 NetDevices
187 */
189
190 /**
191 * The data rate to be used for the next S5 link to be created
192 */
194
195 /**
196 * The delay to be used for the next S5 link to be created
197 */
199
200 /**
201 * The MTU of the next S5 link to be created
202 */
203 uint16_t m_s5LinkMtu;
204
205 /**
206 * Map storing for each IMSI the corresponding eNB NetDevice
207 */
208 std::map<uint64_t, Ptr<NetDevice>> m_imsiEnbDeviceMap;
209
210 /**
211 * helper to assign addresses to X2 NetDevices
212 */
214
215 /**
216 * The data rate to be used for the next X2 link to be created
217 */
219
220 /**
221 * The delay to be used for the next X2 link to be created
222 */
224
225 /**
226 * The MTU of the next X2 link to be created. Note that,
227 * because of some big X2 messages, you need a big MTU.
228 */
229 uint16_t m_x2LinkMtu;
230
231 /**
232 * Enable PCAP generation for X2 link
233 */
235
236 /**
237 * Prefix for the PCAP file for the X2 link
238 */
240};
241
242} // namespace ns3
243
244#endif // NO_BACKHAUL_EPC_HELPER_H
Class for representing data rates.
Definition data-rate.h:78
EpcHelper()
Constructor.
Definition epc-helper.cc:26
This application implements the Mobility Management Entity (MME) according to the 3GPP TS 23....
This application implements the Packet Data Network (PDN) Gateway Entity (PGW) according to the 3GPP ...
This application implements the Serving Gateway Entity (SGW) according to the 3GPP TS 23....
This class contains the specification of EPS Bearers.
Definition eps-bearer.h:80
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.
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.
Keep track of a set of IPv6 interfaces.
holds a vector of ns3::NetDevice pointers
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.
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:66
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:49
Every class exported by the ns3 library is enclosed in the ns3 namespace.