How to get a broadcast address on LTE network.

128 views
Skip to first unread message

Yutaka.M

unread,
Apr 30, 2017, 4:01:57 PM4/30/17
to ns-3-users
Hi All,

I want to get a broadcast address on LTE network.
I sent a packet from remotehost(eNB) to one UE.
But, I don't know how to get broadcast address of UEs. (line:77)

following code: 
------------------------------------------------------------------------------------------------------------------------------
  // Creation ltehelper
  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();

  // Creation epcHelper
  Ptr<PointToPointEpcHelper>  epcHelper = CreateObject<PointToPointEpcHelper> ();
  lteHelper->SetEpcHelper (epcHelper);

  // Creation epc node
  Ptr<Node> pgw = epcHelper->GetPgwNode ();

  // Create a single RemoteHost
  NodeContainer remoteHostContainer;
  remoteHostContainer.Create (1);
  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
  InternetStackHelper internet;
  internet.Install (remoteHostContainer);

  // Create the Internet
  PointToPointHelper p2ph;
  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("150Mb/s")));
  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (1500));
  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
  Ipv4AddressHelper ipv4h;
  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
  // interface 0 is localhost, 1 is the p2p device
  //Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);

  Ipv4StaticRoutingHelper ipv4RoutingHelper;
  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);

  NodeContainer enbNodes;
  enbNodes.Create(1);
  NodeContainer ueNodes;
  ueNodes.Create(3);

  // Install LTE Devices to the nodes
  NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbNodes);
  NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ueNodes);

  // Install the IP stack on the UEs
  internet.Install (ueNodes);
  Ipv4InterfaceContainer ueIpIface;
  ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevs));

  // Assign IP address to UEs, and install applications
  for (uint32_t u = 0; u < ueNodes.GetN (); ++u)
    {
      Ptr<Node> ueNode = ueNodes.Get (u);
      // Set the default gateway for the UE
      Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNode->GetObject<Ipv4> ());
      ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
    }

  // Attach one UE per eNodeB
  lteHelper->Attach (ueLteDevs, enbLteDevs.Get (0));
  
  // Install and start applications on UEs and remote host
  Ptr<EpcTft> tft = Create<EpcTft> ();
  EpcTft::PacketFilter pf;
  pf.localPortStart = 1234;
  pf.localPortEnd = 1234;
  tft->Add (pf);
  lteHelper->ActivateDedicatedEpsBearer (ueLteDevs, EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT), tft);

  double interPacketInterval = 1000.0;

  uint16_t dlPort = 9;
  UdpEchoServerHelper dlServer(dlPort);
  ApplicationContainer serverApps = dlServer.Install(ueNodes);
  PacketSinkHelper dlPacketSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
  serverApps.Add (dlPacketSinkHelper.Install (ueNodes));

  UdpEchoClientHelper dlClient (ueIpIface.GetAddress (0), dlPort);
  //UdpEchoClientHelper dlClient (ueIpIface.GetBroadcast (), dlPort); // I want to get broadcast address
  dlClient.SetAttribute ("Interval", TimeValue (MilliSeconds(interPacketInterval)));
  dlClient.SetAttribute ("MaxPackets", UintegerValue(1000000));

  ApplicationContainer clientApps = dlClient.Install(remoteHost);

  serverApps.Start (Seconds (0.01));
  clientApps.Start (Seconds (0.01));
------------------------------------------------------------------------------------------------------------------------------

Please help me out.

Thanks
Yutaka.M

Konstantinos

unread,
May 1, 2017, 1:10:13 PM5/1/17
to ns-3-users
Hi,

There is no such Broadcast address in LTE systems as in WIFI.
You will need to implement the eMBMS service https://en.wikipedia.org/wiki/Multimedia_Broadcast_Multicast_Service.

Regards,
K

Yutaka.M

unread,
May 1, 2017, 1:35:18 PM5/1/17
to ns-3-users
Hi Konstantinos

Thank you for your help.
I expect the eMBMS in the future.

2017年5月2日火曜日 2時10分13秒 UTC+9 Konstantinos:
Reply all
Reply to author
Forward
0 new messages