examples: Update fifth.cc and the cwnd plot in the tutorial

This commit is contained in:
Mohit P. Tahiliani
2022-03-29 23:19:17 +05:30
parent 43d7c91d3f
commit 44c85d30ca
2 changed files with 10 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -79,6 +79,16 @@ main (int argc, char *argv[])
{ {
CommandLine cmd (__FILE__); CommandLine cmd (__FILE__);
cmd.Parse (argc, argv); cmd.Parse (argc, argv);
// In the following three lines, TCP NewReno is used as the congestion
// control algorithm, the initial congestion window of a TCP connection is
// set to 1 packet, and the classic fast recovery algorithm is used. Note
// that this configuration is used only to demonstrate how TCP parameters
// can be configured in ns-3. Otherwise, it is recommended to use the default
// settings of TCP in ns-3.
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue ("ns3::TcpNewReno"));
Config::SetDefault ("ns3::TcpSocket::InitialCwnd", UintegerValue (1));
Config::SetDefault ("ns3::TcpL4Protocol::RecoveryType", TypeIdValue (TypeId::LookupByName ("ns3::TcpClassicRecovery")));
NodeContainer nodes; NodeContainer nodes;
nodes.Create (2); nodes.Create (2);