在 INET 中,为什么 ARPTest 示例网络需要 500 多秒才能达到 运行?
In INET, why does ARPTest example network take over 500 seconds to run?
在 OMNeT++ 之上的 INET 示例项目 "ARPTest" 运行 中,似乎通过带宽为 512 [=17] 的以太网电缆从三台主机中的每台主机传输 1 兆字节的数据=] 和 100 Mb/s 到服务器。在现实生活中,似乎这种数据传输应该不到一秒钟。但是,当 运行 模拟全速运行时,模拟运行了 500 虚拟秒,但仍未完成。有人可以解释一下关于模拟器时间的这种差异,或者我错过了什么吗?
首先,始终检查日志输出以查看模拟实际在做什么。 运行在快速模式下模拟的问题是日志输出被跳过,因此您看不到实际发生的情况。
现在看你的问题,数据传输的模拟时间和实际传输时间没有差异。
500 秒的模拟时间是由模拟时间限制提供的,通过 sim-time-limit = 500s
在 omnetpp.ini
中设置。
OMNeT++ 将在模拟时间达到 500 秒时停止模拟,而不管要处理的进一步事件。
为了完整起见,我将 post ARP 测试的最终日志输出:
** Event #385441 t=5.831682347368 ARPTest.server.tcp (TCP, id=257) on ACK (inet::tcp::TCPSegment, id=499229)
DETAIL (TCP)ARPTest.server.tcp: Connection 10.0.0.14:1000 to 10.0.0.1:1025 on app[0], connId=8 in LAST_ACK
INFO (TCP)ARPTest.server.tcp: Seg arrived: .1025 > .1000: ack 2347163 win 7504
DETAIL (TCP)ARPTest.server.tcp: TCB: snd_una=2346444 snd_nxt=2346980 snd_max=2347163 snd_wnd=7504 rcv_nxt=1298578 rcv_wnd=7504 snd_cwnd=536 rto=2 ssthresh=3728
DETAIL (TCP)ARPTest.server.tcp: Processing ACK in a data transfer state
DETAIL (TCP)ARPTest.server.tcp: ACK acks our FIN
INFO (TCP)ARPTest.server.tcp: Updating send window from segment: new wnd=7504
INFO (TCP)ARPTest.server.tcp: ACK acks all outstanding segments, cancel REXMIT timer
INFO (TCP)ARPTest.server.tcp: cwnd <= ssthresh: Slow Start: increasing cwnd by one SMSS bytes to cwnd=1072
INFO (TCP)ARPTest.server.tcp: Last ACK arrived
INFO (TCP)ARPTest.server.tcp: Transition: LAST_ACK --> CLOSED (event was: RCV_ACK)
DEBUG (TCP)ARPTest.server.tcp: tcp: LAST_ACK --> CLOSED (on RCV_ACK)
INFO (TCP)ARPTest.server.tcp: Notifying app: CLOSED
INFO (TCP)ARPTest.server.tcp: Deleting TCP connection
** Event #385442 t=5.831682347368 ARPTest.server.tcpApp[0] (TCPEchoApp, id=256) on CLOSED (omnetpp::cMessage, id=499231)
** Event #385443 t=245.831667258618 ARPTest.client.tcp (TCP, id=30) on selfmsg 2MSL (omnetpp::cMessage, id=87)
DETAIL (TCP)ARPTest.client.tcp: Connection 10.0.0.1:1025 to 10.0.0.14:1000 on app[0], connId=7 in TIME_WAIT
DETAIL (TCP)ARPTest.client.tcp: 2MSL timer expired
INFO (TCP)ARPTest.client.tcp: Transition: TIME_WAIT --> CLOSED (event was: TIMEOUT_2MSL)
DEBUG (TCP)ARPTest.client.tcp: tcp: TIME_WAIT --> CLOSED (on TIMEOUT_2MSL)
INFO (TCP)ARPTest.client.tcp: Deleting TCP connection
** Event #385444 t=500 on endsimulation (omnetpp::cEndSimulationEvent)
<!> Simulation time limit reached -- at t=500s, event #385444
** Calling finish() methods of modules
INFO (TCPSessionApp)ARPTest.client.tcpApp[0]: ARPTest.client.tcpApp[0]: ARPTest.client.tcpApp[0]: received 2097152 bytes in 3447 packets
INFO (TCP)ARPTest.client.tcp: ARPTest.client.tcp: ARPTest.client.tcp: finishing with 0 connections open.
INFO (TCP)ARPTest.server.tcp: ARPTest.server.tcp: ARPTest.server.tcp: finishing with 1 connections open.
在日志输出中,您可以清楚地看到,大约在 5.83 秒左右,数据传输的最后确认到达,TCP 连接最终关闭。之后,计时器在大约 245 秒和 500 秒时到期,模拟退出(由于模拟时间限制)。
模拟将继续进行,直到所有计时器 运行 结束或不再需要处理其他事件(无论是本例中的第一种情况)。
在 OMNeT++ 之上的 INET 示例项目 "ARPTest" 运行 中,似乎通过带宽为 512 [=17] 的以太网电缆从三台主机中的每台主机传输 1 兆字节的数据=] 和 100 Mb/s 到服务器。在现实生活中,似乎这种数据传输应该不到一秒钟。但是,当 运行 模拟全速运行时,模拟运行了 500 虚拟秒,但仍未完成。有人可以解释一下关于模拟器时间的这种差异,或者我错过了什么吗?
首先,始终检查日志输出以查看模拟实际在做什么。 运行在快速模式下模拟的问题是日志输出被跳过,因此您看不到实际发生的情况。
现在看你的问题,数据传输的模拟时间和实际传输时间没有差异。
500 秒的模拟时间是由模拟时间限制提供的,通过 sim-time-limit = 500s
在 omnetpp.ini
中设置。
OMNeT++ 将在模拟时间达到 500 秒时停止模拟,而不管要处理的进一步事件。
为了完整起见,我将 post ARP 测试的最终日志输出:
** Event #385441 t=5.831682347368 ARPTest.server.tcp (TCP, id=257) on ACK (inet::tcp::TCPSegment, id=499229)
DETAIL (TCP)ARPTest.server.tcp: Connection 10.0.0.14:1000 to 10.0.0.1:1025 on app[0], connId=8 in LAST_ACK
INFO (TCP)ARPTest.server.tcp: Seg arrived: .1025 > .1000: ack 2347163 win 7504
DETAIL (TCP)ARPTest.server.tcp: TCB: snd_una=2346444 snd_nxt=2346980 snd_max=2347163 snd_wnd=7504 rcv_nxt=1298578 rcv_wnd=7504 snd_cwnd=536 rto=2 ssthresh=3728
DETAIL (TCP)ARPTest.server.tcp: Processing ACK in a data transfer state
DETAIL (TCP)ARPTest.server.tcp: ACK acks our FIN
INFO (TCP)ARPTest.server.tcp: Updating send window from segment: new wnd=7504
INFO (TCP)ARPTest.server.tcp: ACK acks all outstanding segments, cancel REXMIT timer
INFO (TCP)ARPTest.server.tcp: cwnd <= ssthresh: Slow Start: increasing cwnd by one SMSS bytes to cwnd=1072
INFO (TCP)ARPTest.server.tcp: Last ACK arrived
INFO (TCP)ARPTest.server.tcp: Transition: LAST_ACK --> CLOSED (event was: RCV_ACK)
DEBUG (TCP)ARPTest.server.tcp: tcp: LAST_ACK --> CLOSED (on RCV_ACK)
INFO (TCP)ARPTest.server.tcp: Notifying app: CLOSED
INFO (TCP)ARPTest.server.tcp: Deleting TCP connection
** Event #385442 t=5.831682347368 ARPTest.server.tcpApp[0] (TCPEchoApp, id=256) on CLOSED (omnetpp::cMessage, id=499231)
** Event #385443 t=245.831667258618 ARPTest.client.tcp (TCP, id=30) on selfmsg 2MSL (omnetpp::cMessage, id=87)
DETAIL (TCP)ARPTest.client.tcp: Connection 10.0.0.1:1025 to 10.0.0.14:1000 on app[0], connId=7 in TIME_WAIT
DETAIL (TCP)ARPTest.client.tcp: 2MSL timer expired
INFO (TCP)ARPTest.client.tcp: Transition: TIME_WAIT --> CLOSED (event was: TIMEOUT_2MSL)
DEBUG (TCP)ARPTest.client.tcp: tcp: TIME_WAIT --> CLOSED (on TIMEOUT_2MSL)
INFO (TCP)ARPTest.client.tcp: Deleting TCP connection
** Event #385444 t=500 on endsimulation (omnetpp::cEndSimulationEvent)
<!> Simulation time limit reached -- at t=500s, event #385444
** Calling finish() methods of modules
INFO (TCPSessionApp)ARPTest.client.tcpApp[0]: ARPTest.client.tcpApp[0]: ARPTest.client.tcpApp[0]: received 2097152 bytes in 3447 packets
INFO (TCP)ARPTest.client.tcp: ARPTest.client.tcp: ARPTest.client.tcp: finishing with 0 connections open.
INFO (TCP)ARPTest.server.tcp: ARPTest.server.tcp: ARPTest.server.tcp: finishing with 1 connections open.
在日志输出中,您可以清楚地看到,大约在 5.83 秒左右,数据传输的最后确认到达,TCP 连接最终关闭。之后,计时器在大约 245 秒和 500 秒时到期,模拟退出(由于模拟时间限制)。
模拟将继续进行,直到所有计时器 运行 结束或不再需要处理其他事件(无论是本例中的第一种情况)。