{"title":"基于软件的高精度时间戳抓包技术","authors":"P. Orosz, T. Skopko","doi":"10.1109/ICSNC.2010.65","DOIUrl":null,"url":null,"abstract":"Widely used network measurement applications, such as tcpdump and Wireshark, use the same common libpcap packet capture library. Libpcap assigns a 10-6 second precision timestamp to all processed frames. Higher physical bandwidth implies shorter inter-arrival times between consecutive frames. Therefore timestamp precision must be proportional to the link speed. Latest version 1.0.x of libpcap provides 10-6 second native resolution, however pcap format supports a larger 2 x 32-bit timestamp value for each stored packets. On Gigabit Ethernet or faster networks, timestamp resolution that works in the microsecond domain may not enable us to precisely reproduce the time-domain relation between consecutive frames. Therefore overall analysis of the data transmission could drive to a false result. Independently from one other, five impact factors could directly bias the generation of timestamps: hardware architecture, NIC driver operation mode, clock source, kernel queue handler and the libpcap itself. In an idealized case generated timestamps are always converging and suitably close to the real arrival or transmission time of each frames so to conserve the original inter-arrival time values. For packet capturing with libpcap, it is assumed that timestamping performed when a frame is enqueued to the kernel’s input packet queue. Accordingly these timestamps represents the time moment when a frame reaches the input queue. Libpcap must retrieve these timestamps from the kernel. Timestamp resolution of network measurement applications must be increased according to the requirements of advanced high speed data networks. In our paper we are going to show an alternative libpcap-based solution that features nanosecond precision timestamping.","PeriodicalId":152012,"journal":{"name":"2010 Fifth International Conference on Systems and Networks Communications","volume":"68 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2010-08-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"13","resultStr":"{\"title\":\"Software-Based Packet Capturing with High Precision Timestamping for Linux\",\"authors\":\"P. Orosz, T. Skopko\",\"doi\":\"10.1109/ICSNC.2010.65\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Widely used network measurement applications, such as tcpdump and Wireshark, use the same common libpcap packet capture library. Libpcap assigns a 10-6 second precision timestamp to all processed frames. Higher physical bandwidth implies shorter inter-arrival times between consecutive frames. Therefore timestamp precision must be proportional to the link speed. Latest version 1.0.x of libpcap provides 10-6 second native resolution, however pcap format supports a larger 2 x 32-bit timestamp value for each stored packets. On Gigabit Ethernet or faster networks, timestamp resolution that works in the microsecond domain may not enable us to precisely reproduce the time-domain relation between consecutive frames. Therefore overall analysis of the data transmission could drive to a false result. Independently from one other, five impact factors could directly bias the generation of timestamps: hardware architecture, NIC driver operation mode, clock source, kernel queue handler and the libpcap itself. In an idealized case generated timestamps are always converging and suitably close to the real arrival or transmission time of each frames so to conserve the original inter-arrival time values. For packet capturing with libpcap, it is assumed that timestamping performed when a frame is enqueued to the kernel’s input packet queue. Accordingly these timestamps represents the time moment when a frame reaches the input queue. Libpcap must retrieve these timestamps from the kernel. Timestamp resolution of network measurement applications must be increased according to the requirements of advanced high speed data networks. In our paper we are going to show an alternative libpcap-based solution that features nanosecond precision timestamping.\",\"PeriodicalId\":152012,\"journal\":{\"name\":\"2010 Fifth International Conference on Systems and Networks Communications\",\"volume\":\"68 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2010-08-22\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"13\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2010 Fifth International Conference on Systems and Networks Communications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICSNC.2010.65\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2010 Fifth International Conference on Systems and Networks Communications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSNC.2010.65","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 13
摘要
目前广泛应用的网络测量应用,如tcpdump、Wireshark等,都使用了通用的libpcap抓包库。Libpcap为所有处理过的帧分配一个10-6秒精度的时间戳。更高的物理带宽意味着更短的连续帧之间的到达时间。因此,时间戳精度必须与链路速度成正比。最新版本1.0。libpcap的X提供了10-6秒的原生分辨率,但是pcap格式为每个存储的数据包支持更大的2 X 32位时间戳值。在千兆以太网或更快的网络上,在微秒域工作的时间戳分辨率可能无法使我们精确地再现连续帧之间的时域关系。因此,对数据传输的整体分析可能会导致错误的结果。五个独立的影响因素可以直接影响时间戳的生成:硬件架构、网卡驱动程序操作模式、时钟源、内核队列处理程序和libpcap本身。在理想情况下,生成的时间戳总是收敛并适当地接近每帧的真实到达或传输时间,以保留原始的到达时间值。对于使用libpcap捕获数据包,假定在将帧加入内核的输入数据包队列时执行时间戳。因此,这些时间戳表示帧到达输入队列时的时间时刻。Libpcap必须从内核中检索这些时间戳。根据先进的高速数据网络的要求,必须提高网络测量应用的时间戳分辨率。在本文中,我们将展示另一种基于libpcap的解决方案,该解决方案具有纳秒精度时间戳。
Software-Based Packet Capturing with High Precision Timestamping for Linux
Widely used network measurement applications, such as tcpdump and Wireshark, use the same common libpcap packet capture library. Libpcap assigns a 10-6 second precision timestamp to all processed frames. Higher physical bandwidth implies shorter inter-arrival times between consecutive frames. Therefore timestamp precision must be proportional to the link speed. Latest version 1.0.x of libpcap provides 10-6 second native resolution, however pcap format supports a larger 2 x 32-bit timestamp value for each stored packets. On Gigabit Ethernet or faster networks, timestamp resolution that works in the microsecond domain may not enable us to precisely reproduce the time-domain relation between consecutive frames. Therefore overall analysis of the data transmission could drive to a false result. Independently from one other, five impact factors could directly bias the generation of timestamps: hardware architecture, NIC driver operation mode, clock source, kernel queue handler and the libpcap itself. In an idealized case generated timestamps are always converging and suitably close to the real arrival or transmission time of each frames so to conserve the original inter-arrival time values. For packet capturing with libpcap, it is assumed that timestamping performed when a frame is enqueued to the kernel’s input packet queue. Accordingly these timestamps represents the time moment when a frame reaches the input queue. Libpcap must retrieve these timestamps from the kernel. Timestamp resolution of network measurement applications must be increased according to the requirements of advanced high speed data networks. In our paper we are going to show an alternative libpcap-based solution that features nanosecond precision timestamping.