5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrPointToPointEpcHelper Class Reference

Create an EPC network with PointToPoint links. More...

#include "nr-point-to-point-epc-helper.h"

+ Inheritance diagram for ns3::NrPointToPointEpcHelper:
+ Collaboration diagram for ns3::NrPointToPointEpcHelper:

Public Member Functions

 NrPointToPointEpcHelper ()
 Constructor.
 
 ~NrPointToPointEpcHelper () override
 Destructor.
 
void AddGnb (Ptr< Node > gnbNode, Ptr< NetDevice > nrGnbNetDevice, std::vector< uint16_t > cellIds) override
 
void DoDispose () override
 
TypeId GetInstanceTypeId () const override
 
- Public Member Functions inherited from ns3::NrNoBackhaulEpcHelper
 NrNoBackhaulEpcHelper ()
 
 ~NrNoBackhaulEpcHelper () override
 
uint8_t ActivateEpsBearer (Ptr< NetDevice > ueNrDevice, uint64_t imsi, Ptr< NrEpcTft > tft, NrEpsBearer bearer) override
 
void AddS1Interface (Ptr< Node > gnb, Ipv4Address gnbAddress, Ipv4Address sgwAddress, std::vector< uint16_t > cellIds) override
 
void AddUe (Ptr< NetDevice > ueNrDevice, uint64_t imsi) override
 
void AddX2Interface (Ptr< Node > gnbNode1, Ptr< Node > gnbNode2) override
 
int64_t AssignStreams (int64_t stream) override
 
Ipv4InterfaceContainer AssignUeIpv4Address (NetDeviceContainer ueDevices) override
 
Ipv6InterfaceContainer AssignUeIpv6Address (NetDeviceContainer ueDevices) override
 
void DoDispose () override
 
TypeId GetInstanceTypeId () const override
 
Ptr< Node > GetPgwNode () const override
 
Ptr< Node > GetSgwNode () const override
 
Ipv4Address GetUeDefaultGatewayAddress () override
 
Ipv6Address GetUeDefaultGatewayAddress6 () override
 
- Public Member Functions inherited from ns3::NrEpcHelper
 NrEpcHelper ()
 
 ~NrEpcHelper () override
 
void DoDispose () override
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::NrNoBackhaulEpcHelper
static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::NrEpcHelper
static TypeId GetTypeId ()
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::NrNoBackhaulEpcHelper
virtual void DoActivateEpsBearerForUe (const Ptr< NetDevice > &ueDevice, const Ptr< NrEpcTft > &tft, const NrEpsBearer &bearer) const
 DoActivateEpsBearerForUe: Schedule ActivateEpsBearer on the UE.
 
virtual void DoAddX2Interface (const Ptr< NrEpcX2 > &gnb1X2, const Ptr< NetDevice > &gnb1NrDev, const Ipv4Address &gnb1X2Address, const Ptr< NrEpcX2 > &gnb2X2, const Ptr< NetDevice > &gnb2NrDev, const Ipv4Address &gnb2X2Address) const
 DoAddX2Interface: Call AddX2Interface on top of the Gnb device pointers.
 

Detailed Description

Create an EPC network with PointToPoint links.

The class is based on the LTE version. The usage is, in most of the cases, automatic inside the NrHelper. All the user has to do, is:

  Ptr<NrPointToPointEpcHelper> nrEpcHelper = CreateObject<NrPointToPointEpcHelper> ();
  ...
  Ptr<NrHelper> nrHelper = CreateObject<NrHelper> ();
  nrHelper->SetEpcHelper (nrEpcHelper);

This helper will then used to create the links between the GNBs and the EPC. All links will be point-to-point, with some properties. The user can set the point-to-point links properties by using:

  nrEpcHelper->SetAttribute ("AttributeName", UintegerValue (10));

And these attribute will be valid for all the code that follows the SetAttribute call. The list of attributes can be seen in the class PointToPointEpcHelper in the ns-3 code base.

Obtaining the PGW node

You can obtain the pointer to the PGW node by doing:

  Ptr<Node> pgw = nrEpcHelper->GetPgwNode ();

After that, you would probably want to setup a network between the PGW and your remote nodes, to create your topology. As example, there is the code that setup a point to point link between the PGW and a single remote node:

  // Create our remote host
  NodeContainer remoteHostContainer;
  remoteHostContainer.Create (1);
  Ptr<Node> remoteHost = remoteHostContainer.Get (0);

  // Install internet stack on the remote host
  InternetStackHelper internet;
  internet.Install (remoteHostContainer);

  // connect a remoteHost to pgw
  PointToPointHelper p2ph;
  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (2500));
  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.000)));
  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);

  // Here is the routing part.. please note that UEs will always be in the
  // class 7.0.0.0
  Ipv4AddressHelper ipv4h;
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting
(remoteHost->GetObject<Ipv4> ()); remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address
("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1); 

Assigning IPV4 addresses

Another important thing that this helper can do is assigning automatically the IPv4 addresses to the UE:

  NetDeviceContainer netDeviceContainerForUe = ...;
  Ipv4InterfaceContainer ueLowLatIpIface = nrEpcHelper->AssignUeIpv4Address
(netDeviceContainerForUe);

And, of course, you would like to set the default routing for the UE, which is the address of the EPC:

  // Set the default gateway for the UEs
  for (uint32_t j = 0; j < ueContainer.GetN(); ++j)
    {
      Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting
(ueContainer.Get(j)->GetObject<Ipv4> ()); ueStaticRouting->SetDefaultRoute
(nrEpcHelper->GetUeDefaultGatewayAddress (), 1);
    }

For everything else, please see also the NrHelper documentation.

See also
PointToPointEpcHelper

Introspection did not find any typical Config paths.

Attributes

  • S1uLinkDataRate: The data rate to be used for the next S1-U link to be created
    • Set with class: ns3::DataRateValue
    • Underlying type: DataRate
    • Initial value: 10000000000bps
    • Flags: construct write read
  • S1uLinkDelay: The delay to be used for the next S1-U link to be created
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read
  • S1uLinkMtu: 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.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 2000
    • Flags: construct write read
  • S1uLinkPcapPrefix: Prefix for Pcap generated by S1-U link
    • Set with class: ns3::StringValue
    • Underlying type:
    • Initial value: s1u
    • Flags: construct write read
  • S1uLinkEnablePcap: Enable Pcap for X2 link
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read

Attributes defined in parent class ns3::NrNoBackhaulEpcHelper

  • S5LinkDataRate: The data rate to be used for the next S5 link to be created
    • Set with class: ns3::DataRateValue
    • Underlying type: DataRate
    • Initial value: 10000000000bps
    • Flags: construct write read
  • S5LinkDelay: The delay to be used for the next S5 link to be created
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read
  • S5LinkMtu: The MTU of the next S5 link to be created
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 2000
    • Flags: construct write read
  • S11LinkDataRate: The data rate to be used for the next S11 link to be created
    • Set with class: ns3::DataRateValue
    • Underlying type: DataRate
    • Initial value: 10000000000bps
    • Flags: construct write read
  • S11LinkDelay: The delay to be used for the next S11 link to be created
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read
  • S11LinkMtu: The MTU of the next S11 link to be created.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 2000
    • Flags: construct write read
  • X2LinkDataRate: The data rate to be used for the next X2 link to be created
    • Set with class: ns3::DataRateValue
    • Underlying type: DataRate
    • Initial value: 10000000000bps
    • Flags: construct write read
  • X2LinkDelay: The delay to be used for the next X2 link to be created
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: construct write read
  • X2LinkMtu: The MTU of the next X2 link to be created. Note that, because of some big X2 messages, you need a big MTU.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 3000
    • Flags: construct write read
  • X2LinkPcapPrefix: Prefix for Pcap generated by X2 link
    • Set with class: ns3::StringValue
    • Underlying type:
    • Initial value: x2
    • Flags: construct write read
  • X2LinkEnablePcap: Enable Pcap for X2 link
    • Set with class: ns3::BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read

No TraceSources are defined for this type.
Size of this type is 536 bytes (on a 64-bit architecture).

Definition at line 112 of file nr-point-to-point-epc-helper.h.

Constructor & Destructor Documentation

◆ NrPointToPointEpcHelper()

ns3::NrPointToPointEpcHelper::NrPointToPointEpcHelper ( )

Constructor.

Definition at line 25 of file nr-point-to-point-epc-helper.cc.

◆ ~NrPointToPointEpcHelper()

ns3::NrPointToPointEpcHelper::~NrPointToPointEpcHelper ( )
override

Destructor.

Definition at line 39 of file nr-point-to-point-epc-helper.cc.

Member Function Documentation

◆ AddGnb()

void ns3::NrPointToPointEpcHelper::AddGnb ( Ptr< Node >  gnbNode,
Ptr< NetDevice >  nrGnbNetDevice,
std::vector< uint16_t >  cellIds 
)
overridevirtual

Add an gNB to the EPC

Parameters
gnbNodethe previously created gNB node which is to be added to the EPC
nrGnbNetDevicethe NrGnbNetDevice of the gNB node
cellIdsIDs of cells served by this gNB

Reimplemented from ns3::NrNoBackhaulEpcHelper.

Definition at line 97 of file nr-point-to-point-epc-helper.cc.

References ns3::NrNoBackhaulEpcHelper::AddGnb(), ns3::NrNoBackhaulEpcHelper::AddS1Interface(), and ns3::NrNoBackhaulEpcHelper::GetSgwNode().

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::NrPointToPointEpcHelper::DoDispose ( )
override

Definition at line 90 of file nr-point-to-point-epc-helper.cc.

◆ GetInstanceTypeId()

TypeId ns3::NrPointToPointEpcHelper::GetInstanceTypeId ( ) const
override

Definition at line 84 of file nr-point-to-point-epc-helper.cc.

◆ GetTypeId()

TypeId ns3::NrPointToPointEpcHelper::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

Definition at line 45 of file nr-point-to-point-epc-helper.cc.


The documentation for this class was generated from the following files: