diff --git a/doc/tutorial/figures/cwnd.png b/doc/tutorial/figures/cwnd.png index a8153cf6b..e78ad710e 100644 Binary files a/doc/tutorial/figures/cwnd.png and b/doc/tutorial/figures/cwnd.png differ diff --git a/examples/tutorial/fifth.cc b/examples/tutorial/fifth.cc index cf660d988..412e55ad4 100644 --- a/examples/tutorial/fifth.cc +++ b/examples/tutorial/fifth.cc @@ -79,6 +79,16 @@ main (int argc, char *argv[]) { CommandLine cmd (__FILE__); 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; nodes.Create (2);