{"id":184,"date":"2018-01-18T00:57:21","date_gmt":"2018-01-18T00:57:21","guid":{"rendered":"https:\/\/www.kuncar.net\/blog\/?p=184"},"modified":"2018-12-03T22:09:09","modified_gmt":"2018-12-03T22:09:09","slug":"packeth-tutorial-part-i-the-interface-and-the-packet-builder-2","status":"publish","type":"post","link":"https:\/\/www.kuncar.net\/blog\/2018\/packeth-tutorial-part-i-the-interface-and-the-packet-builder-2\/","title":{"rendered":"PackEth tutorial part I \u2013 The Interface and The Packet Builder"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-185\" src=\"https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/PackEth-150x150.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/PackEth-150x150.png 150w, https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/PackEth-300x300.png 300w, https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/PackEth-100x100.png 100w, https:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2018\/01\/PackEth.png 512w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><span style=\"font-size: 14px;\">In one of my previous posts I have mentioned great piece of software called\u00a0<a title=\"PackEth home \" href=\"http:\/\/packeth.sourceforge.net\/packeth\/Home.html\" target=\"_blank\" rel=\"noopener\">PackEth<\/a>\u00a0and I have also promised that will write up a separate article about it as I just think this amazing tool deserves as much attention as I can give it.\u00a0 So what does this software do? \u00a0Well let me quote the author \u201d\u00a0<em>PackETH is GUI and CLI packet generator tool for Ethernet<\/em>\u2026It\u00a0<em>allows you to create and send any possible packet or sequence of packets on the Ethernet link.\u201d\u00a0<\/em>I would add that that it is the only tool I have found that actually allows you to assemble Ethernet frames and a IP packets that actually does what you would expect it to do while being multi-platform and incredibly stable. I think I have never seen it crashing which speaks for itself. \u00a0This article will focus around version 1.6 as that is the one that has both Linux and Windows versions available. The drawback is that at the time of writing the L3 IPv6 support is not included.<\/span><\/span><\/p>\n<h3><strong><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Introduction<\/span><\/strong><\/h3>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Getting the package is quite simple as it is a a project hosted on\u00a0<a title=\"PackETH download on sourceforge\" href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/sourceforge.net\/projects\/packeth\/files\/\" target=\"_blank\" rel=\"noopener\">sourceforge<\/a>. There are versions available fro r Windows Linux and MacOS. But if you are using Linux then there is a good chance that the package will be in your repository (it is present in Debian stable and \u00a0Ubuntu). Installation is simple \u2013 in windows just unpack the .zip file and run packeth.exe \u2013 And yes it is completely standalone software so no installation no garbage in registry etc. The installation has all libraries included so the folder after unpacking has about 18MB which I think is very reasonable. I would recommend using Linux version as along with Packeth you will be most likely using WireShark as well and that has some issues on L2 in windows. If you are happy with L3 testing only then the OS choice is irrelevant.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The Gui will open in the builder mode which is probably the most useful and most interesting mode of all the ones that are offered. Switching between the mode you can on the top left part of the menu.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/GUI-main-controlls.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-631 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/GUI-main-controlls.png\" alt=\"GUI-main-controlls\" width=\"552\" height=\"64\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">In the middle section you can save and load configuration you have made in the past for repeated testing. In the interface button you will have a selection of interface you can use for PackETH \u2013 in Linux it is simple ethX interface. Under windows it is bit more complicated as PackETH doesn\u2019t use the \u201chuman readable\u201d name a.k.a. local network 1 or similar but instead it uses the system name which looks like this<\/span><\/p>\n<blockquote><p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">\\Device\\NPF_{653EFF5C-E308-4494-A7DC-1C65E8BCE92F}<\/span><\/p><\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">If you are wondering where is that name coming from it is an ID from WinPcap library and there is no simple way how to find out which ID is which interface but as normally you want to use just one \u2013 you can just disable all the others and read the ID in PackETH. The most important thing is \u2013 if you are not a superuser (or have permitted access to network cards on the machine) the interface list will be empty.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The send button is simply sending the frame\/stream from the interface. The stop button us useful only when you are running continuous streams as in all other cases.<\/span><\/p>\n<h3><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Builder mode<\/span><\/h3>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Is the basic and most interesting for me personally as it allows for complete buildup of a L2 frame\/ L3 packet \/ L4 datagram. It has multiple options and parts which make it incredibly handy.<\/span><\/p>\n<h4><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Data Link Layer<\/span><\/h4>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Before going into Data Link Layer of the builder \u2013 just a small reminder of how ethernet frame looks like:<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ethernet-frame.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-636 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ethernet-frame.jpg\" alt=\"ethernet frame\" width=\"640\" height=\"52\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">In the Link layer section you can choose which standard of Ethernet you want to use for your frame. The majority of Ethernet traffic in networks nowadays is Ethernet Version II (Also known as DIX). In the last data I\u2019ve read about this topic about 5 years ago were showing that Ethernet II is about 95% of all Ethernet traffic. This should be taken in account when you build your frames as the NIC in your PC might not even be able to build 802.3 frame due to driver restrictions. I have seen this on multiple PCs. Also the receiving party might be dropping this type of frames as despite the attempted compatibility not many vendors actually care about this at all.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ethertype.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-634 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ethertype.png\" alt=\"ethertype\" width=\"658\" height=\"229\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">If you chose the Ethernet version II frame format the\u00a0<a title=\"Ethertype on Wikipedia\" href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/en.wikipedia.org\/wiki\/Ethertype\" target=\"_blank\" rel=\"noopener\">ethertype<\/a>\u00a0field (also known as DIX type) will become available. This field identifies what protocol is encapsulated in the frame. The current options are:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">IPv4 \u00a0&#8211; 0800<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">IPv6 &#8211;\u00a086DD<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">ARP \u2013 0806<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">User defined \u2013 whatever number you can fit in two octets<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Be aware that there is no internal logic of PackETH stopping you from selecting let\u2019s say IPv4 DIX type and then building and ARP packet on higher layer which is incredible advantage if you want to test behavior of equipment to invalid types of traffic, but is easy to overlook when you are not after such specialty.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">When we\u2019re in the Data Link layer the next after ethertype is 802.1Q and (in)famous QinQ.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">As you can see in the \u00a0picture of the Ethernet frame the first field in the 802.1Q shim is the TPID which identifies the following data as part of the shim rather than Ethertype. This fields is followed by\u00a0 PCP (Priority code point) which is defined in 802.1p and is used for CoS. The priority can be selected from the menu \u2013 it also tells the standard meaning of the p-bit in question. But be aware that the numeric value actually means nothing as long as the devices passing this traffic are p-bits aware. Also the mapping is based on standard\u2019s recommendations so in every network it can be used as seen fit by the network admins.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/802.1p.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-638 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/802.1p.png\" alt=\"802.1p\" width=\"618\" height=\"298\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The CFI (canonical format identifier) has been deprecated and re-used drop eligibility but generally it can be just ignored as most equipment just ignores it anyway. The filed of interest is the VID which defines the VLAN ID. The problem with it is that it must be written in hexadecimal digits which is not exactly user friendly but should be no big problem.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The biggest topic in this part is the QinQ. Let\u2019s start with the definition of what is QinQ. As the name suggest it is abbreviation for all sorts of nested VLANs (aka 802.1Q in 8021Q). This practice started as totally non-standard behavior and as a result it has been implemented in many different ways before a standard has been written. The major issue is that the standard is fairly new and mos of network vendors actually doesn\u2019t support the standardized version. Fortunately PackETH support all versions that exist plus some more as you can define whatever you want. So what are our options in the TPID field for QinQ for the outer\/SP tag ?<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ethertype-QinQ.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-639 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ethertype-QinQ.png\" alt=\"ethertype-QinQ\" width=\"557\" height=\"181\" \/><\/a><\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">0\u00d78100 \u2013 the common vlan \u2013 as most vendors even nowadays support and do the original 802.1Q in 802.1Q \u2013 extremely common \u2013 default almost everywhere<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">0\u00d79100,0\u00d79200 (and missing 0\u00d79300) \u2013 proprietary outer\/SP tags used by vendors like Cisco an Juniper and is fairly common on decent equipment<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">0x8a88 \u2013 802.1ad format that almost no-one supports<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">So the outer tag we must select from a drop-down list and the TPID for the inner\/C tag is \u00a0always 0\u00d78100 (that is why the filed is grayed out). So the only thing to do is fill in the VIDs for outer tag and the inner-one. The only next step is to select what is the next layer protocol as L2 configuration is finished.<\/span><\/p>\n<h4><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Network Layer<\/span><\/h4>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">In the network layer you can chose between ARP and IPv4 (ind IPv6 in the newer version) and user defined payload. All of these are quite simple.<\/span><\/p>\n<h5><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><strong>This is how IPv4 setup looks like:<\/strong><\/span><\/h5>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/IPv4-header.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-646 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/IPv4-header.png\" alt=\"IPv4-header\" width=\"639\" height=\"146\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Let\u2019s go through the header fields:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Version \u2013 should be always set to 4 (that\u2019s why it\u2019s called IPv4)<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Header length \u2013 IPv4 has a variable header length due to existence of \u201coptions\u201d field at the least significant position (this causes a lot of issues with L3 aware devices and was important driver in IPv6 development) The header length is in increments of 4 Bytes so the most common value of 20 Bytes would be equal to the default value of 5. This field uses hexadecimal numbers so the allowed values are from 1 to F<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">ToS field as originally defined in\u00a0<a title=\"ToS - RFC2474\" href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/tools.ietf.org\/html\/rfc2474\" target=\"_blank\" rel=\"noopener\">RFC2474<\/a>\u00a0Is no longer used as ToS (Type of Service) in about 99% of networks and is deprecated in favor of\u00a0<a title=\"Cisco's take on DSCP\" href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.cisco.com\/en\/US\/technologies\/tk543\/tk766\/technologies_white_paper09186a00800a3e2f.html\" target=\"_blank\" rel=\"noopener\">DSCP<\/a>\u00a0(Differentiated Services Code Points) and these are options available:<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/TOS-DSCP-main.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-648 aligncenter\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/TOS-DSCP-main.png\" alt=\"ToS and DSCP options\" width=\"444\" height=\"221\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">As I have never really used ToS for anything I will not really dive into explaining the variables on this place. I might do that in article I am preparing about QoS theory and its implementation in some equipment types.<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Total length \u2013 calculates the total length of the packet and unless you want to check behavior for runt packets keep it on auto so you will generate valid packets<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Identification \u2013 this is completely useless field no 99% cases as it is only used for reassembly of fragmented packets<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Flags \u2013 very important as it allows\/disallows fragmentation of the frame \u2013 the best practice here is for the packet to be set to 2 (do not fragment), the other option is \u201cmore fragments\u201d \u00a0anyway this seems to be broken in the 1.6 windows version and all three values are always zeroes<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ipv4-flags.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-650 aligncenter\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ipv4-flags.png\" alt=\"ipv4-flags\" width=\"295\" height=\"179\" \/><\/a><\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Fragment offset \u2013 again in my testing I have found no use for playing with fragmented packets<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">TTL \u2013 Time to live \u2013 number which is decreasing while the packet is being processed through L3 device might get very handy when you need to prove how many hops away your receiver is<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Protocol \u2013 code informing about what higher-level protocol is encapsulated in the IP packet (options ate TCP,UDP,ICMP and IGMP) again this is just a number in the header of the packet and doesn\u2019t prevent mixup with different protocol actually being configured in upper layer.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Header checksum \u2013 does exactly what you would expect and again \u2013 Unless you are testing runts there is no need to uncheck the tick-box that calculates the checksum for you<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Source and destination addresses \u2013 These do not need any comment<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Options \u2013 a barely used field \u2013 I don\u2019t think I ever seen it used and I have never used it myself as far as I remember<\/span><\/li>\n<\/ul>\n<h5><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">ARP<\/span><\/h5>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">If you think \u2013 that the IPv4 was pretty simple then ARP will look like a piece of cake. I have to say I like the possibility to send fake ARPs around the network as you can easily populate various tables (specifically APR and switching tables on L2\/L3 devices) without having the real source in the network. This allows you to see behavior of elements of your network that would be difficult to observe otherwise. Well there is not much to say about it and here is the screen-shot:<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ARP.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-652 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ARP.png\" alt=\"ARP\" width=\"684\" height=\"130\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">As you probably know ARP has been deprecated in IPv6 and it is now a component of the IP protocol itself and is know as neighbor solicitation.<\/span><\/p>\n<h4><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Session Layer<\/span><\/h4>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The session layer provides you with following options : UDP, TCP, ICMP ang IGMP. I will cover all of them briefly as I most of the time do not work with L4. Also IGMP and RTP will be covered in greater detail in an upcoming article about multicasting.<\/span><\/p>\n<h5><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">UDP<\/span><\/h5>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Is the most common protocol I am using as most of the data I am normally dealing with are various voice frames. The Protocol itself is minimalistic and so is the possible setup as you can see below:<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/UDP.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-664 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/UDP.png\" alt=\"UDP\" width=\"627\" height=\"282\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The one thing I would like to point out is the option to apply some specific patter of your choice (so ti is not random. This is etremely useful if you have a suspicion that a specific frame with (or within) a specific patter inside is causing some troubles in your network.<\/span><\/p>\n<h5><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">TCP<\/span><\/h5>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">TCP is unlike UDP statefull so it must have way more options included to accommodate the windowing mechanism and 3 way handshake and some other minor things. There is a very nice article on Wikipedia about\u00a0<a title=\"Transmission Control Protocol\" href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/en.wikipedia.org\/wiki\/Transmission_Control_Protocol\" target=\"_blank\" rel=\"noopener\">TCP<\/a>\u00a0and as I normally do not care much about L4 in testing I will not elaborate on the details here. This is hw the GUI looks like with all the options it has:<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/TCP.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-665 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/TCP.png\" alt=\"TCP\" width=\"622\" height=\"278\" \/><\/a><\/span><\/p>\n<h5><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">ICMP<\/span><\/h5>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">This is probably the most interesting of all the L4 protocols as you can actually invoke some actions from the network nodes. The main two options are echo request and echo reply which allows you to send ping to specific nodes (which is not that special) but also fake reply which I have found very useful in the past. The other option is to send network unreachable datagram with all the messages but unless you do testing of L4 aware network (like some firewalls) then it is not of \u00a0much interest.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ICMP.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-666 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/ICMP.png\" alt=\"ICMP\" width=\"618\" height=\"164\" \/><\/a><\/span><\/p>\n<h5><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">IGMP<\/span><\/h5>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The Internet Group Management Protocol is a predominantly last mile protocol used for membership in various multicast groups. IT is widely used for multimedia delivery specifically \u2013 IPTV. It exists in 3 versions and V2 is most widely used (at least to my knowledge). \u00a0IGMP is rather simple as it has basically only two types of messages \u2013 Query (from router) and Report (from client). As you can see all of those are available to you which is ideal when troubleshooting both ends of the multicast network as combined with Wireshark you can emulate the required response.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"><a href=\"https:\/\/web.archive.org\/web\/20140420141232\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/IGMP.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-667 alignnone\" src=\"https:\/\/web.archive.org\/web\/20140420141232im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2013\/03\/IGMP.png\" alt=\"IGMP\" width=\"625\" height=\"217\" \/><\/a><\/span><\/p>\n<h3><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Conclusion<\/span><\/h3>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The other three parts &#8211;\u00a0 Gen-B mode, Gen-S mode and PCAP will be discussed separately in a follow up article as I must try keeping the length on a readable level.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In one of my previous posts I have mentioned great piece of software called\u00a0PackEth\u00a0and I have also promised that will write up a separate article about it as I just think this amazing tool deserves as much attention as I can give it.\u00a0 So what does this software do? \u00a0Well let me quote the author &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.kuncar.net\/blog\/2018\/packeth-tutorial-part-i-the-interface-and-the-packet-builder-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;PackEth tutorial part I \u2013 The Interface and The Packet Builder&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,13,14],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-linux","category-networks","category-recovered","category-testing"],"_links":{"self":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":2,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":194,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/184\/revisions\/194"}],"wp:attachment":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}