View | Details | Raw Unified | Return to bug 2835
Collapse All | Expand All

(-)a/src/lte/examples/lena-deactivate-bearer.cc (-1 / +1 lines)
 Lines 102-108    Link Here 
102
102
103
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
103
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
104
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
104
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
105
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
105
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
106
106
107
  NodeContainer ueNodes;
107
  NodeContainer ueNodes;
108
  NodeContainer enbNodes;
108
  NodeContainer enbNodes;
(-)a/src/lte/examples/lena-distributed-ffr.cc (-1 / +1 lines)
 Lines 158-164    Link Here 
158
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
158
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
159
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
159
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
160
  // interface 0 is localhost, 1 is the p2p device
160
  // interface 0 is localhost, 1 is the p2p device
161
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
161
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
162
162
163
  // Create Nodes: eNodeB and UE
163
  // Create Nodes: eNodeB and UE
164
  NodeContainer enbNodes;
164
  NodeContainer enbNodes;
(-)a/src/lte/examples/lena-dual-stripe.cc (-1 / +1 lines)
 Lines 671-677    Link Here 
671
671
672
      Ipv4StaticRoutingHelper ipv4RoutingHelper;
672
      Ipv4StaticRoutingHelper ipv4RoutingHelper;
673
      Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
673
      Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
674
      remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
674
      remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
675
675
676
      // for internetworking purposes, consider together home UEs and macro UEs
676
      // for internetworking purposes, consider together home UEs and macro UEs
677
      ues.Add (homeUes);
677
      ues.Add (homeUes);
(-)a/src/lte/examples/lena-simple-epc-emu.cc (-1 / +1 lines)
 Lines 113-119    Link Here 
113
113
114
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
114
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
115
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
115
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
116
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
116
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
117
117
118
  NodeContainer ueNodes;
118
  NodeContainer ueNodes;
119
  NodeContainer enbNodes;
119
  NodeContainer enbNodes;
(-)a/src/lte/examples/lena-simple-epc.cc (-1 / +1 lines)
 Lines 100-106    Link Here 
100
100
101
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
101
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
102
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
102
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
103
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
103
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
104
104
105
  NodeContainer ueNodes;
105
  NodeContainer ueNodes;
106
  NodeContainer enbNodes;
106
  NodeContainer enbNodes;
(-)a/src/lte/examples/lena-simple-two-epc.cc (+297 lines)
Line 0    Link Here 
1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License version 2 as
7
 * published by the Free Software Foundation;
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *
18
 * Author: Jaume Nin <jaume.nin@cttc.cat>
19
 *         Tommaso Pecorella <tommaso.pecorella@unifi.it>
20
 */
21
22
#include "ns3/lte-helper.h"
23
#include "ns3/epc-helper.h"
24
#include "ns3/core-module.h"
25
#include "ns3/network-module.h"
26
#include "ns3/ipv4-global-routing-helper.h"
27
#include "ns3/internet-module.h"
28
#include "ns3/mobility-module.h"
29
#include "ns3/lte-module.h"
30
#include "ns3/applications-module.h"
31
#include "ns3/csma-helper.h"
32
#include "ns3/config-store.h"
33
//#include "ns3/gtk-config-store.h"
34
35
using namespace ns3;
36
37
/**
38
 * Sample simulation script for LTE+EPC. It instantiates several eNodeB,
39
 * attaches one UE per eNodeB starts a flow for each UE to  and from a remote host.
40
 * It also  starts yet another flow between each UE pair.
41
 */
42
43
NS_LOG_COMPONENT_DEFINE ("EpcFirstExample");
44
45
int
46
main (int argc, char *argv[])
47
{
48
49
  uint16_t numberOfNodes = 2;
50
  double simTime = 1.1;
51
  double distance = 60.0;
52
  double interPacketInterval = 100;
53
  bool useCa = false;
54
55
//  LogComponentEnable ("PointToPointEpcHelper", LOG_LEVEL_ALL);
56
57
  // Command line arguments
58
  CommandLine cmd;
59
  cmd.AddValue("numberOfNodes", "Number of eNodeBs + UE pairs", numberOfNodes);
60
  cmd.AddValue("simTime", "Total duration of the simulation [s])", simTime);
61
  cmd.AddValue("distance", "Distance between eNBs [m]", distance);
62
  cmd.AddValue("interPacketInterval", "Inter packet interval [ms])", interPacketInterval);
63
  cmd.AddValue("useCa", "Whether to use carrier aggregation.", useCa);
64
  cmd.Parse(argc, argv);
65
66
  ConfigStore inputConfig;
67
  inputConfig.ConfigureDefaults();
68
69
  // parse again so you can override default values from the command line
70
  cmd.Parse(argc, argv);
71
72
  if (useCa)
73
    {
74
      Config::SetDefault ("ns3::LteHelper::UseCa", BooleanValue (useCa));
75
      Config::SetDefault ("ns3::LteHelper::NumberOfComponentCarriers", UintegerValue (2));
76
      Config::SetDefault ("ns3::LteHelper::EnbComponentCarrierManager", StringValue ("ns3::RrComponentCarrierManager"));
77
    }
78
79
  InternetStackHelper internet;
80
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
81
82
  // Network A
83
  Ptr<LteHelper> lteAHelper = CreateObject<LteHelper> ();
84
  Ptr<PointToPointEpcHelper>  epcAHelper = CreateObject<PointToPointEpcHelper> ();
85
  lteAHelper->SetEpcHelper (epcAHelper);
86
87
  Ptr<Node> pgwA = epcAHelper->GetPgwNode ();
88
89
  // Network A
90
  NodeContainer ueNodesA;
91
  NodeContainer enbNodesA;
92
  enbNodesA.Create(numberOfNodes);
93
  ueNodesA.Create(numberOfNodes);
94
95
  // Install Mobility Model
96
  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
97
  for (uint16_t i = 0; i < numberOfNodes; i++)
98
    {
99
      positionAlloc->Add (Vector(distance * i, 0, 0));
100
    }
101
  MobilityHelper mobilityA;
102
  mobilityA.SetMobilityModel("ns3::ConstantPositionMobilityModel");
103
  mobilityA.SetPositionAllocator(positionAlloc);
104
  mobilityA.Install(enbNodesA);
105
  mobilityA.Install(ueNodesA);
106
107
  // Install LTE Devices to the nodes
108
  NetDeviceContainer enbLteADevs = lteAHelper->InstallEnbDevice (enbNodesA);
109
  NetDeviceContainer ueLteADevs = lteAHelper->InstallUeDevice (ueNodesA);
110
111
  // Install the IP stack on the UEs
112
  internet.Install (ueNodesA);
113
  Ipv4InterfaceContainer ueAIpIface;
114
  ueAIpIface = epcAHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteADevs));
115
  // Assign IP address to UEs, and install applications
116
  for (uint32_t u = 0; u < ueNodesA.GetN (); ++u)
117
    {
118
      Ptr<Node> ueNode = ueNodesA.Get (u);
119
      // Set the default gateway for the UE
120
      Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
121
      ueStaticRouting->SetDefaultRoute (epcAHelper->GetUeDefaultGatewayAddress (), 1);
122
    }
123
124
  // Attach one UE per eNodeB
125
  for (uint16_t i = 0; i < numberOfNodes; i++)
126
    {
127
      lteAHelper->Attach (ueLteADevs.Get(i), enbLteADevs.Get(i));
128
      // side effect: the default EPS bearer will be activated
129
    }
130
131
  // Network B
132
  Ptr<LteHelper> lteBHelper = CreateObject<LteHelper> ();
133
  Ptr<PointToPointEpcHelper>  epcBHelper = CreateObject<PointToPointEpcHelper> ();
134
  lteBHelper->SetEpcHelper (epcBHelper);
135
136
  Ptr<Node> pgwB = epcBHelper->GetPgwNode ();
137
138
  NodeContainer ueNodesB;
139
  NodeContainer enbNodesB;
140
  enbNodesB.Create(numberOfNodes);
141
  ueNodesB.Create(numberOfNodes);
142
143
  // Install Mobility Model
144
  Ptr<ListPositionAllocator> positionAllocB = CreateObject<ListPositionAllocator> ();
145
  for (uint16_t i = 0; i < numberOfNodes; i++)
146
    {
147
      positionAllocB->Add (Vector(distance * i, 500, 0));
148
    }
149
  MobilityHelper mobilityB;
150
  mobilityB.SetMobilityModel("ns3::ConstantPositionMobilityModel");
151
  mobilityB.SetPositionAllocator(positionAllocB);
152
  mobilityB.Install(enbNodesB);
153
  mobilityB.Install(ueNodesB);
154
155
  // Install LTE Devices to the nodes
156
  NetDeviceContainer enbLteBDevs = lteBHelper->InstallEnbDevice (enbNodesB);
157
  NetDeviceContainer ueLteBDevs = lteBHelper->InstallUeDevice (ueNodesB);
158
159
  // Install the IP stack on the UEs
160
  internet.Install (ueNodesB);
161
  Ipv4InterfaceContainer ueBIpIface;
162
  ueBIpIface = epcBHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteBDevs));
163
  // Assign IP address to UEs, and install applications
164
  for (uint32_t u = 0; u < ueNodesB.GetN (); ++u)
165
    {
166
      Ptr<Node> ueNode = ueNodesB.Get (u);
167
      // Set the default gateway for the UE
168
      Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
169
      ueStaticRouting->SetDefaultRoute (epcBHelper->GetUeDefaultGatewayAddress (), 1);
170
    }
171
172
  // Attach one UE per eNodeB
173
  for (uint16_t i = 0; i < numberOfNodes; i++)
174
    {
175
      lteBHelper->Attach (ueLteBDevs.Get(i), enbLteBDevs.Get(i));
176
      // side effect: the default EPS bearer will be activated
177
    }
178
179
  // Create a single RemoteHost
180
  NodeContainer remoteHostContainer;
181
  remoteHostContainer.Create (1);
182
  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
183
  internet.Install (remoteHostContainer);
184
185
  // Create the Internet
186
  CsmaHelper csma;
187
  NodeContainer internetNodes;
188
  internetNodes.Add (remoteHost);
189
  internetNodes.Add (pgwA);
190
  internetNodes.Add (pgwB);
191
192
  csma.SetDeviceAttribute ("Mtu", UintegerValue (1500));
193
  csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
194
  csma.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
195
  NetDeviceContainer internetDevices = csma.Install (internetNodes);
196
  Ipv4AddressHelper ipv4h;
197
  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
198
  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
199
  // interface 0 is localhost, 1 is the csma device
200
  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
201
202
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
203
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
204
205
206
  // Install and start applications on UEs and remote host
207
  uint16_t dlPort = 1234;
208
  uint16_t ulPort = 2000;
209
  uint16_t otherPort = 3000;
210
  ApplicationContainer clientApps;
211
  ApplicationContainer serverApps;
212
  for (uint32_t u = 0; u < ueNodesA.GetN (); ++u)
213
    {
214
      ++ulPort;
215
      ++otherPort;
216
      PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
217
      PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
218
      PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), otherPort));
219
      serverApps.Add (dlPacketSinkHelper.Install (ueNodesA.Get(u)));
220
      serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
221
      serverApps.Add (packetSinkHelper.Install (ueNodesA.Get(u)));
222
223
      UdpClientHelper dlClient (ueAIpIface.GetAddress (u), dlPort);
224
      dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
225
      dlClient.SetAttribute ("MaxPackets", UintegerValue(1000000));
226
227
      UdpClientHelper ulClient (remoteHostAddr, ulPort);
228
      ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
229
      ulClient.SetAttribute ("MaxPackets", UintegerValue(1000000));
230
231
      UdpClientHelper client (ueAIpIface.GetAddress (u), otherPort);
232
      client.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
233
      client.SetAttribute ("MaxPackets", UintegerValue(1000000));
234
235
      clientApps.Add (dlClient.Install (remoteHost));
236
      clientApps.Add (ulClient.Install (ueNodesA.Get(u)));
237
      if (u+1 < ueNodesA.GetN ())
238
        {
239
          clientApps.Add (client.Install (ueNodesA.Get(u+1)));
240
        }
241
      else
242
        {
243
          clientApps.Add (client.Install (ueNodesA.Get(0)));
244
        }
245
    }
246
  for (uint32_t u = 0; u < ueNodesB.GetN (); ++u)
247
    {
248
      ++ulPort;
249
      ++otherPort;
250
      PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
251
      PacketSinkHelper ulPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
252
      PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), otherPort));
253
      serverApps.Add (dlPacketSinkHelper.Install (ueNodesB.Get(u)));
254
      serverApps.Add (ulPacketSinkHelper.Install (remoteHost));
255
      serverApps.Add (packetSinkHelper.Install (ueNodesB.Get(u)));
256
257
      UdpClientHelper dlClient (ueBIpIface.GetAddress (u), dlPort);
258
      dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
259
      dlClient.SetAttribute ("MaxPackets", UintegerValue(1000000));
260
261
      UdpClientHelper ulClient (remoteHostAddr, ulPort);
262
      ulClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
263
      ulClient.SetAttribute ("MaxPackets", UintegerValue(1000000));
264
265
      UdpClientHelper client (ueBIpIface.GetAddress (u), otherPort);
266
      client.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
267
      client.SetAttribute ("MaxPackets", UintegerValue(1000000));
268
269
      clientApps.Add (dlClient.Install (remoteHost));
270
      clientApps.Add (ulClient.Install (ueNodesB.Get(u)));
271
      if (u+1 < ueNodesA.GetN ())
272
        {
273
          clientApps.Add (client.Install (ueNodesB.Get(u+1)));
274
        }
275
      else
276
        {
277
          clientApps.Add (client.Install (ueNodesB.Get(0)));
278
        }
279
    }
280
  serverApps.Start (Seconds (0.01));
281
  clientApps.Start (Seconds (0.01));
282
  lteAHelper->EnableTraces ();
283
  lteBHelper->EnableTraces ();
284
  // Uncomment to enable PCAP tracing
285
  //p2ph.EnablePcapAll("lena-epc-first");
286
287
  Simulator::Stop(Seconds(simTime));
288
  Simulator::Run();
289
290
  /*GtkConfigStore config;
291
  config.ConfigureAttributes();*/
292
293
  Simulator::Destroy();
294
  return 0;
295
296
}
297
(-)a/src/lte/examples/lena-x2-handover-measures.cc (-1 / +1 lines)
 Lines 206-212    Link Here 
206
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
206
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
207
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
207
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
208
  // interface 0 is localhost, 1 is the p2p device
208
  // interface 0 is localhost, 1 is the p2p device
209
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
209
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
210
210
211
  /*
211
  /*
212
   * Network topology:
212
   * Network topology:
(-)a/src/lte/examples/lena-x2-handover.cc (-1 / +1 lines)
 Lines 187-193    Link Here 
187
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
187
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
188
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
188
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
189
  // interface 0 is localhost, 1 is the p2p device
189
  // interface 0 is localhost, 1 is the p2p device
190
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
190
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
191
191
192
  NodeContainer ueNodes;
192
  NodeContainer ueNodes;
193
  NodeContainer enbNodes;
193
  NodeContainer enbNodes;
(-)a/src/lte/examples/wscript (+3 lines)
 Lines 34-39    Link Here 
34
    obj = bld.create_ns3_program('lena-simple-epc',
34
    obj = bld.create_ns3_program('lena-simple-epc',
35
                                 ['lte'])
35
                                 ['lte'])
36
    obj.source = 'lena-simple-epc.cc'
36
    obj.source = 'lena-simple-epc.cc'
37
    obj = bld.create_ns3_program('lena-simple-two-epc',
38
                                 ['lte'])
39
    obj.source = 'lena-simple-two-epc.cc'
37
    obj = bld.create_ns3_program('lena-deactivate-bearer',
40
    obj = bld.create_ns3_program('lena-deactivate-bearer',
38
                                 ['lte'])
41
                                 ['lte'])
39
    obj.source = 'lena-deactivate-bearer.cc'
42
    obj.source = 'lena-deactivate-bearer.cc'
(-)a/src/lte/helper/emu-epc-helper.cc (-3 / +22 lines)
 Lines 26-31    Link Here 
26
#include <ns3/mac48-address.h>
26
#include <ns3/mac48-address.h>
27
#include <ns3/eps-bearer.h>
27
#include <ns3/eps-bearer.h>
28
#include <ns3/ipv4-address.h>
28
#include <ns3/ipv4-address.h>
29
#include <ns3/ipv4-address-generator.h>
29
#include <ns3/internet-stack-helper.h>
30
#include <ns3/internet-stack-helper.h>
30
#include <ns3/packet-socket-helper.h>
31
#include <ns3/packet-socket-helper.h>
31
#include <ns3/packet-socket-address.h>
32
#include <ns3/packet-socket-address.h>
 Lines 91-110    Link Here 
91
                   StringValue ("00:00:00:eb:00"),
92
                   StringValue ("00:00:00:eb:00"),
92
                   MakeStringAccessor (&EmuEpcHelper::m_enbMacAddressBase),
93
                   MakeStringAccessor (&EmuEpcHelper::m_enbMacAddressBase),
93
                   MakeStringChecker ())
94
                   MakeStringChecker ())
95
    .AddAttribute ("BaseIpv4Prefix",
96
                   "The 8 bit IPv4 prefix to be used for the assignment of IPv4 addresses to PGW and UE.",
97
                   Ipv4AddressValue (Ipv4Address ("7.0.0.0")),
98
                   MakeIpv4AddressAccessor (&EmuEpcHelper::m_uePgwBaseIpv4Prefix),
99
                   MakeIpv4AddressChecker ())
94
    ;
100
    ;
95
  return tid;
101
  return tid;
96
}
102
}
97
103
104
TypeId
105
EmuEpcHelper::GetInstanceTypeId () const
106
{
107
  return GetTypeId ();
108
}
109
110
98
void
111
void
99
EmuEpcHelper::DoInitialize ()
112
EmuEpcHelper::DoInitialize ()
100
{
113
{
101
  NS_LOG_LOGIC (this);   
114
  NS_LOG_LOGIC (this);   
102
115
116
  // we use a /16 bit IPv4 net for an EPC network
117
  m_uePgwCurrentIpv4Prefix = m_uePgwBaseIpv4Prefix.CombineMask (Ipv4Mask ("255.0.0.0"));  //Initialize
118
  Ipv4AddressGenerator::Init (m_uePgwCurrentIpv4Prefix, Ipv4Mask ("255.255.0.0"));
103
119
104
  // we use a /8 net for all UEs
120
  while (!Ipv4AddressGenerator::IsNetworkAllocated (m_uePgwCurrentIpv4Prefix, Ipv4Mask ("255.255.0.0")))
105
  m_ueAddressHelper.SetBase ("7.0.0.0", "255.0.0.0");
121
    {
122
      m_uePgwCurrentIpv4Prefix = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
123
    }
106
124
107
  
125
  m_ueAddressHelper.SetBase (m_uePgwCurrentIpv4Prefix, "255.255.0.0"); //The helper will assign IPv4 addresses using this 16 bit prefix
126
  //Now we get an unique 16 bit IPv4 prefix for this EPC, which not used by any other EPC
108
 
127
 
109
  // create SgwPgwNode
128
  // create SgwPgwNode
110
  m_sgwPgw = CreateObject<Node> ();
129
  m_sgwPgw = CreateObject<Node> ();
(-)a/src/lte/helper/emu-epc-helper.h (+22 lines)
 Lines 70-78    Link Here 
70
   *  \return The object TypeId.
70
   *  \return The object TypeId.
71
   */
71
   */
72
  static TypeId GetTypeId (void);
72
  static TypeId GetTypeId (void);
73
  TypeId GetInstanceTypeId () const;
73
  virtual void DoInitialize ();
74
  virtual void DoInitialize ();
74
  virtual void DoDispose ();
75
  virtual void DoDispose ();
75
76
77
  /**
78
   * Get the IPv4 network address used by the EPC.
79
   * The EPC will use a /16 network address.
80
   *
81
   * \returns The EPC IPv4 network address.
82
   */
83
  Ipv4Address GetEpcIpv4NetworkAddress ();
84
76
  // inherited from EpcHelper
85
  // inherited from EpcHelper
77
  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
86
  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
78
  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
87
  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
 Lines 92-97    Link Here 
92
  Ipv4AddressHelper m_ueAddressHelper; 
101
  Ipv4AddressHelper m_ueAddressHelper; 
93
102
94
  /**
103
  /**
104
   * The common 8 bit prefix used for the IPv4 address assignment of
105
   * all the EPC networks
106
   */
107
  Ipv4Address m_uePgwBaseIpv4Prefix;
108
109
  /**
110
   * The 16 bit prefix used for the IPv4 address assignment of
111
   * the UE and PGW.
112
   * The current IPv4 prefix will be the first available one in the /8 pool.
113
   */
114
  Ipv4Address m_uePgwCurrentIpv4Prefix;
115
116
  /**
95
   * SGW-PGW network element
117
   * SGW-PGW network element
96
   */  
118
   */  
97
  Ptr<Node> m_sgwPgw; 
119
  Ptr<Node> m_sgwPgw; 
(-)a/src/lte/helper/point-to-point-epc-helper.cc (-12 / +51 lines)
 Lines 18-23    Link Here 
18
 * Author: Jaume Nin <jnin@cttc.es>
18
 * Author: Jaume Nin <jnin@cttc.es>
19
 *         Nicola Baldo <nbaldo@cttc.es>
19
 *         Nicola Baldo <nbaldo@cttc.es>
20
 *         Manuel Requena <manuel.requena@cttc.es>
20
 *         Manuel Requena <manuel.requena@cttc.es>
21
 *         Manoj Kumar Rana <manoj24.rana@gmail.com>
21
 */
22
 */
22
23
23
#include <ns3/point-to-point-epc-helper.h>
24
#include <ns3/point-to-point-epc-helper.h>
 Lines 26-31    Link Here 
26
#include <ns3/mac48-address.h>
27
#include <ns3/mac48-address.h>
27
#include <ns3/eps-bearer.h>
28
#include <ns3/eps-bearer.h>
28
#include <ns3/ipv4-address.h>
29
#include <ns3/ipv4-address.h>
30
#include <ns3/ipv4-address-generator.h>
29
#include <ns3/internet-stack-helper.h>
31
#include <ns3/internet-stack-helper.h>
30
#include <ns3/point-to-point-helper.h>
32
#include <ns3/point-to-point-helper.h>
31
#include <ns3/packet-socket-helper.h>
33
#include <ns3/packet-socket-helper.h>
 Lines 52-67    Link Here 
52
{
54
{
53
  NS_LOG_FUNCTION (this);
55
  NS_LOG_FUNCTION (this);
54
56
57
  // To access the attribute value within the constructor
58
  ObjectBase::ConstructSelf (AttributeConstructionList ());
59
55
  // since we use point-to-point links for all S1-U links, 
60
  // since we use point-to-point links for all S1-U links, 
56
  // we use a /30 subnet which can hold exactly two addresses 
61
  // we use a /30 subnet which can hold exactly two addresses 
57
  // (remember that net broadcast and null address are not valid)
62
  // (remember that net broadcast and null address are not valid)
58
  m_s1uIpv4AddressHelper.SetBase ("10.0.0.0", "255.255.255.252");
63
  Ipv4Address s1uIpv4AddressNet = Ipv4Address ("10.0.0.0");
64
  Ipv4AddressGenerator::Init (s1uIpv4AddressNet, Ipv4Mask ("255.255.0.0"));
65
  while (!Ipv4AddressGenerator::IsNetworkAllocated (s1uIpv4AddressNet, Ipv4Mask ("255.255.0.0")))
66
    {
67
      s1uIpv4AddressNet = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
68
    }
69
  m_s1uIpv4AddressHelper.SetBase (s1uIpv4AddressNet, "255.255.255.252");
59
70
60
  m_x2Ipv4AddressHelper.SetBase ("12.0.0.0", "255.255.255.252");
71
  std::cout << "m_s1uIpv4AddressHelper set to " << s1uIpv4AddressNet << std::endl;
61
72
62
  // we use a /8 net for all UEs
73
  Ipv4Address x2Ipv4AddressNet = Ipv4Address ("12.0.0.0");
63
  m_ueAddressHelper.SetBase ("7.0.0.0", "255.0.0.0");
74
  Ipv4AddressGenerator::Init (x2Ipv4AddressNet, Ipv4Mask ("255.255.0.0"));
64
  
75
  while (!Ipv4AddressGenerator::IsNetworkAllocated (x2Ipv4AddressNet, Ipv4Mask ("255.255.0.0")))
76
    {
77
      x2Ipv4AddressNet = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
78
    }
79
  m_x2Ipv4AddressHelper.SetBase (x2Ipv4AddressNet, "255.255.255.252");
80
81
  std::cout << "m_x2Ipv4AddressHelper set to " << x2Ipv4AddressNet << std::endl;
82
83
  // we use a /16 bit IPv4 net for an EPC network
84
  m_uePgwCurrentIpv4Prefix = m_uePgwBaseIpv4Prefix.CombineMask (Ipv4Mask ("255.0.0.0"));  //Initialize
85
  Ipv4AddressGenerator::Init (m_uePgwCurrentIpv4Prefix, Ipv4Mask ("255.255.0.0"));
86
87
  while (!Ipv4AddressGenerator::IsNetworkAllocated (m_uePgwCurrentIpv4Prefix, Ipv4Mask ("255.255.0.0")))
88
    {
89
      m_uePgwCurrentIpv4Prefix = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0"));
90
    }
91
92
  m_ueAddressHelper.SetBase (m_uePgwCurrentIpv4Prefix, "255.255.0.0"); //The helper will assign IPv4 addresses using this 16 bit prefix
93
  //Now we get an unique 16 bit IPv4 prefix for this EPC, which not used by any other EPC
94
95
  std::cout << "m_ueAddressHelper set to " << m_uePgwCurrentIpv4Prefix << std::endl;
96
65
  // create SgwPgwNode
97
  // create SgwPgwNode
66
  m_sgwPgw = CreateObject<Node> ();
98
  m_sgwPgw = CreateObject<Node> ();
67
  InternetStackHelper internet;
99
  InternetStackHelper internet;
 Lines 144-153    Link Here 
144
                   UintegerValue (3000),
176
                   UintegerValue (3000),
145
                   MakeUintegerAccessor (&PointToPointEpcHelper::m_x2LinkMtu),
177
                   MakeUintegerAccessor (&PointToPointEpcHelper::m_x2LinkMtu),
146
                   MakeUintegerChecker<uint16_t> ())
178
                   MakeUintegerChecker<uint16_t> ())
147
  ;
179
     .AddAttribute ("BaseIpv4Prefix",
180
                    "The 8 bit IPv4 prefix to be used for the assignment of IPv4 addresses to PGW and UE.",
181
                    Ipv4AddressValue (Ipv4Address ("7.0.0.0")),
182
                    MakeIpv4AddressAccessor (&PointToPointEpcHelper::m_uePgwBaseIpv4Prefix),
183
                    MakeIpv4AddressChecker ())
184
 ;
148
  return tid;
185
  return tid;
149
}
186
}
150
187
188
TypeId
189
PointToPointEpcHelper::GetInstanceTypeId () const
190
{
191
  return GetTypeId ();
192
}
193
151
void
194
void
152
PointToPointEpcHelper::DoDispose ()
195
PointToPointEpcHelper::DoDispose ()
153
{
196
{
 Lines 184-191    Link Here 
184
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after installing p2p dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());  
227
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after installing p2p dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());  
185
  Ptr<NetDevice> enbDev = enbSgwDevices.Get (0);
228
  Ptr<NetDevice> enbDev = enbSgwDevices.Get (0);
186
  Ptr<NetDevice> sgwDev = enbSgwDevices.Get (1);
229
  Ptr<NetDevice> sgwDev = enbSgwDevices.Get (1);
230
  Ipv4InterfaceContainer enbSgwIpIfaces = m_s1uIpv4AddressHelper.Assign (enbSgwDevices);
187
  m_s1uIpv4AddressHelper.NewNetwork ();
231
  m_s1uIpv4AddressHelper.NewNetwork ();
188
  Ipv4InterfaceContainer enbSgwIpIfaces = m_s1uIpv4AddressHelper.Assign (enbSgwDevices);
189
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after assigning Ipv4 addr to S1 dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
232
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after assigning Ipv4 addr to S1 dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
190
  
233
  
191
  Ipv4Address enbAddress = enbSgwIpIfaces.GetAddress (0);
234
  Ipv4Address enbAddress = enbSgwIpIfaces.GetAddress (0);
 Lines 255-262    Link Here 
255
  Ptr<NetDevice> enb1Dev = enbDevices.Get (0);
298
  Ptr<NetDevice> enb1Dev = enbDevices.Get (0);
256
  Ptr<NetDevice> enb2Dev = enbDevices.Get (1);
299
  Ptr<NetDevice> enb2Dev = enbDevices.Get (1);
257
300
301
  Ipv4InterfaceContainer enbIpIfaces = m_x2Ipv4AddressHelper.Assign (enbDevices);
258
  m_x2Ipv4AddressHelper.NewNetwork ();
302
  m_x2Ipv4AddressHelper.NewNetwork ();
259
  Ipv4InterfaceContainer enbIpIfaces = m_x2Ipv4AddressHelper.Assign (enbDevices);
260
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1 after assigning Ipv4 addr to X2 dev: " << enb1->GetObject<Ipv4> ()->GetNInterfaces ());
303
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1 after assigning Ipv4 addr to X2 dev: " << enb1->GetObject<Ipv4> ()->GetNInterfaces ());
261
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #2 after assigning Ipv4 addr to X2 dev: " << enb2->GetObject<Ipv4> ()->GetNInterfaces ());
304
  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #2 after assigning Ipv4 addr to X2 dev: " << enb2->GetObject<Ipv4> ()->GetNInterfaces ());
262
305
 Lines 319-340    Link Here 
319
  return bearerId;
362
  return bearerId;
320
}
363
}
321
364
322
323
Ptr<Node>
365
Ptr<Node>
324
PointToPointEpcHelper::GetPgwNode ()
366
PointToPointEpcHelper::GetPgwNode ()
325
{
367
{
326
  return m_sgwPgw;
368
  return m_sgwPgw;
327
}
369
}
328
370
329
330
Ipv4InterfaceContainer 
371
Ipv4InterfaceContainer 
331
PointToPointEpcHelper::AssignUeIpv4Address (NetDeviceContainer ueDevices)
372
PointToPointEpcHelper::AssignUeIpv4Address (NetDeviceContainer ueDevices)
332
{
373
{
333
  return m_ueAddressHelper.Assign (ueDevices);
374
  return m_ueAddressHelper.Assign (ueDevices);
334
}
375
}
335
376
336
337
338
Ipv4Address
377
Ipv4Address
339
PointToPointEpcHelper::GetUeDefaultGatewayAddress ()
378
PointToPointEpcHelper::GetUeDefaultGatewayAddress ()
340
{
379
{
(-)a/src/lte/helper/point-to-point-epc-helper.h (-1 / +24 lines)
 Lines 18-23    Link Here 
18
 * Author: Jaume Nin <jnin@cttc.es>
18
 * Author: Jaume Nin <jnin@cttc.es>
19
 *         Nicola Baldo <nbaldo@cttc.es>
19
 *         Nicola Baldo <nbaldo@cttc.es>
20
 *         Manuel Requena <manuel.requena@cttc.es>
20
 *         Manuel Requena <manuel.requena@cttc.es>
21
 *         Manoj Kumar Rana <manoj24.rana@gmail.com>
21
 */
22
 */
22
23
23
#ifndef POINT_TO_POINT_EPC_HELPER_H
24
#ifndef POINT_TO_POINT_EPC_HELPER_H
 Lines 68-75    Link Here 
68
   *  \return The object TypeId.
69
   *  \return The object TypeId.
69
   */
70
   */
70
  static TypeId GetTypeId (void);
71
  static TypeId GetTypeId (void);
72
  TypeId GetInstanceTypeId () const;
71
  virtual void DoDispose ();
73
  virtual void DoDispose ();
72
74
75
  /**
76
   * Get the IPv4 network address used by the EPC.
77
   * The EPC will use a /16 network address.
78
   *
79
   * \returns The EPC IPv4 network address.
80
   */
81
  Ipv4Address GetEpcIpv4NetworkAddress ();
82
73
  // inherited from EpcHelper
83
  // inherited from EpcHelper
74
  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
84
  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
75
  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
85
  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
 Lines 84-94    Link Here 
84
private:
94
private:
85
95
86
  /** 
96
  /** 
87
   * helper to assign addresses to UE devices as well as to the TUN device of the SGW/PGW
97
   * helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW
88
   */
98
   */
89
  Ipv4AddressHelper m_ueAddressHelper; 
99
  Ipv4AddressHelper m_ueAddressHelper; 
90
  
100
  
91
  /**
101
  /**
102
   * The common 8 bit prefix used for the IPv4 address assignment of
103
   * all the EPC networks
104
   */
105
  Ipv4Address m_uePgwBaseIpv4Prefix;
106
107
  /**
108
   * The 16 bit prefix used for the IPv4 address assignment of
109
   * the UE and PGW.
110
   * The current IPv4 prefix will be the first available one in the /8 pool.
111
   */
112
  Ipv4Address m_uePgwCurrentIpv4Prefix;
113
114
  /**
92
   * SGW-PGW network element
115
   * SGW-PGW network element
93
   */
116
   */
94
  Ptr<Node> m_sgwPgw; 
117
  Ptr<Node> m_sgwPgw; 
(-)a/src/lte/test/epc-test-s1u-downlink.cc (-1 / +1 lines)
 Lines 153-159    Link Here 
153
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
153
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
154
154
155
  // hardcoded UE addresses for now
155
  // hardcoded UE addresses for now
156
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.255.0"), 1);
156
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
157
  
157
  
158
158
159
159
(-)a/src/lte/test/epc-test-s1u-uplink.cc (-1 / +1 lines)
 Lines 370-376    Link Here 
370
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
370
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
371
371
372
  // hardcoded UE addresses for now
372
  // hardcoded UE addresses for now
373
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.255.0"), 1);
373
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
374
  
374
  
375
375
376
376
(-)a/src/lte/test/lte-test-cell-selection.cc (-1 / +1 lines)
 Lines 308-314    Link Here 
308
      // Routing of the Internet Host (towards the LTE network)
308
      // Routing of the Internet Host (towards the LTE network)
309
      Ipv4StaticRoutingHelper ipv4RoutingHelper;
309
      Ipv4StaticRoutingHelper ipv4RoutingHelper;
310
      Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
310
      Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
311
      remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
311
      remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
312
312
313
      // Install the IP stack on the UEs
313
      // Install the IP stack on the UEs
314
      internet.Install (ueNodes);
314
      internet.Install (ueNodes);
(-)a/src/lte/test/lte-test-cqa-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 303-309    Link Here 
303
303
304
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
304
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
305
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
305
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
306
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
306
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
307
307
308
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
308
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
309
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
309
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
 Lines 546-552    Link Here 
546
546
547
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
547
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
548
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
548
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
549
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
549
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
550
550
551
551
552
//   LogComponentDisableAll (LOG_LEVEL_ALL);
552
//   LogComponentDisableAll (LOG_LEVEL_ALL);
(-)a/src/lte/test/lte-test-deactivate-bearer.cc (-1 / +1 lines)
 Lines 164-170    Link Here 
164
164
165
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
165
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
166
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
166
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
167
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
167
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
168
168
169
  // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
169
  // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_ALL);
170
170
(-)a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 299-305    Link Here 
299
299
300
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
300
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
301
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
301
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
302
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
302
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
303
303
304
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
304
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
305
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
305
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
 Lines 545-551    Link Here 
545
545
546
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
546
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
547
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
547
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
548
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
548
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
549
549
550
550
551
//   LogComponentDisableAll (LOG_LEVEL_ALL);
551
//   LogComponentDisableAll (LOG_LEVEL_ALL);
(-)a/src/lte/test/lte-test-frequency-reuse.cc (-1 / +1 lines)
 Lines 1464-1470    Link Here 
1464
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
1464
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
1465
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
1465
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
1466
  // interface 0 is localhost, 1 is the p2p device
1466
  // interface 0 is localhost, 1 is the p2p device
1467
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
1467
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
1468
1468
1469
  // Create Nodes: eNodeB and UE
1469
  // Create Nodes: eNodeB and UE
1470
  NodeContainer enbNodes;
1470
  NodeContainer enbNodes;
(-)a/src/lte/test/lte-test-pss-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 300-306    Link Here 
300
300
301
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
301
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
302
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
302
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
303
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
303
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
304
304
305
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
305
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
306
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
306
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
 Lines 546-552    Link Here 
546
546
547
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
547
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
548
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
548
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
549
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
549
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
550
550
551
551
552
//   LogComponentDisableAll (LOG_LEVEL_ALL);
552
//   LogComponentDisableAll (LOG_LEVEL_ALL);
(-)a/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 299-305    Link Here 
299
299
300
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
300
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
301
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
301
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
302
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
302
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
303
303
304
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
304
  //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
305
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
305
  //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
 Lines 545-551    Link Here 
545
545
546
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
546
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
547
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
547
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
548
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
548
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
549
549
550
550
551
//   LogComponentDisableAll (LOG_LEVEL_ALL);
551
//   LogComponentDisableAll (LOG_LEVEL_ALL);
(-)a/src/lte/test/lte-test-ue-measurements.cc (-1 / +1 lines)
 Lines 1744-1750    Link Here 
1744
  // Routing of the Internet Host (towards the LTE network)
1744
  // Routing of the Internet Host (towards the LTE network)
1745
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
1745
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
1746
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
1746
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
1747
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
1747
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
1748
1748
1749
  // Enable layer-3 filtering
1749
  // Enable layer-3 filtering
1750
  Config::SetDefault ("ns3::LteEnbRrc::RsrpFilterCoefficient",
1750
  Config::SetDefault ("ns3::LteEnbRrc::RsrpFilterCoefficient",
(-)a/src/lte/test/test-lte-epc-e2e-data.cc (-1 / +1 lines)
 Lines 177-183    Link Here 
177
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
177
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
178
178
179
  // hardcoded UE addresses for now
179
  // hardcoded UE addresses for now
180
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.255.0"), 1);
180
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
181
  
181
  
182
182
183
  NodeContainer enbs;
183
  NodeContainer enbs;
(-)a/src/lte/test/test-lte-handover-target.cc (-1 / +1 lines)
 Lines 318-324    Link Here 
318
  // Routing of the Internet Host (towards the LTE network)
318
  // Routing of the Internet Host (towards the LTE network)
319
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
319
  Ipv4StaticRoutingHelper ipv4RoutingHelper;
320
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
320
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
321
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
321
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
322
322
323
  // Create Devices and install them in the Nodes (eNB and UE)
323
  // Create Devices and install them in the Nodes (eNB and UE)
324
  NetDeviceContainer enbDevs;
324
  NetDeviceContainer enbDevs;
(-)a/src/lte/test/test-lte-x2-handover.cc (-1 / +1 lines)
 Lines 280-286    Link Here 
280
280
281
      Ipv4StaticRoutingHelper ipv4RoutingHelper;
281
      Ipv4StaticRoutingHelper ipv4RoutingHelper;
282
      Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
282
      Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
283
      remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
283
      remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.0.0"), 1);
284
284
285
      // Install the IP stack on the UEs      
285
      // Install the IP stack on the UEs      
286
      internet.Install (ueNodes);
286
      internet.Install (ueNodes);

Return to bug 2835