我需要公式来准确计算1千兆网卡的带宽。我正在做的是发送第2层数据包@ 1Gbps,但我的软件显示6oo Mbps。对于1千兆网卡的准确带宽公式的需求
整个实验是背靠背的。没有交换机无路由器。
这是我做的。
// LinkSpeed = 1Gb
UINT nBandwidth = LinkSpeed/100;//Mbps
nBandwidth = nBandwidth/8; //Bytes/sec
nBandwidth = nBandwidth/FrameLength;
//Frames/Sec. Frame Length = 1518
UINT FramesPerBurst = (nBandwidth*Sleeptime)/1000;
//Frames/Burst
UINT nBufferSpaceNeededPerFrame = FrameLength-4 + sizeof(dump_bpf_hdr));
UINT nTxBufferSize = FramesPerBurst * nBufferSpaceNeededPerFrame;
unsigned char* pTxBuffer = new
unsigned char[m_nTxBufferSize];
一个小问题 - 你不会在千兆位上发生冲突,因为所有实际的GigE系统都是全双工的。 – 2008-12-05 09:03:52