examples/simple-global-routing.cc
changeset 3381 3cdd9d60f7c7
parent 3181 26e7f865c548
child 4218 debf1a8a96d3
equal deleted inserted replaced
3380:38b8549b1ad3 3381:3cdd9d60f7c7
    90   internet.Install (c);
    90   internet.Install (c);
    91 
    91 
    92   // We create the channels first without any IP addressing information
    92   // We create the channels first without any IP addressing information
    93   NS_LOG_INFO ("Create channels.");
    93   NS_LOG_INFO ("Create channels.");
    94   PointToPointHelper p2p;
    94   PointToPointHelper p2p;
    95   p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps"));
    95   p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
    96   p2p.SetChannelParameter ("Delay", StringValue ("2ms"));
    96   p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));
    97   NetDeviceContainer d0d2 = p2p.Install (n0n2);
    97   NetDeviceContainer d0d2 = p2p.Install (n0n2);
    98 
    98 
    99   NetDeviceContainer d1d2 = p2p.Install (n1n2);
    99   NetDeviceContainer d1d2 = p2p.Install (n1n2);
   100   
   100   
   101   p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps"));
   101   p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps"));
   102   p2p.SetChannelParameter ("Delay", StringValue ("10ms"));
   102   p2p.SetChannelAttribute ("Delay", StringValue ("10ms"));
   103   NetDeviceContainer d3d2 = p2p.Install (n3n2);
   103   NetDeviceContainer d3d2 = p2p.Install (n3n2);
   104   
   104   
   105   // Later, we add IP addresses.  
   105   // Later, we add IP addresses.  
   106   NS_LOG_INFO ("Assign IP Addresses.");
   106   NS_LOG_INFO ("Assign IP Addresses.");
   107   Ipv4AddressHelper ipv4;
   107   Ipv4AddressHelper ipv4;