
{"id":1552,"date":"2010-05-24T17:37:23","date_gmt":"2010-05-24T12:07:23","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=1552"},"modified":"2010-05-24T17:37:23","modified_gmt":"2010-05-24T12:07:23","slug":"explicit-congestion-notification","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/05\/24\/explicit-congestion-notification\/","title":{"rendered":"explicit congestion notification"},"content":{"rendered":"<pre>\n$cat \/proc\/sys\/net\/ipv4\/tcp_ecn\n2\n$\n<\/pre>\n<p>\nThe tcp_ecn variable turns on Explicit Congestion Notification in TCP connections. This is used to automatically tell the host when there are congestions in a route to a specific host or a network. This can be used to throttle the transmitters to send packets in a slower rate over that specific router or firewall.<\/p>\n<p>The tcp_ecn variable takes a boolean value and is per default set to 0, or turned off. If you want to turn this on in your kernel, you should set this variable to 1.<br \/>\ntext  under  GNU FDL\n<\/p>\n<pre>\nDate: Fri, 8 May 1998 13:54:39 -0400 (EDT)\nFrom: \"Jamal Hadi Salim\" \nTo: ecn-interest@research.att.com\nSubject: tcpdump patch to print ECN info\nMessage-ID: \n\n\nagainst 3.4a5; feel free to change the output\n\n\n-----------------------------\ndiff -ru tcpdump-3.4a5-orig\/print-ip.c tcpdump-3.4a5\/print-ip.c\n--- tcpdump-3.4a5-orig\/print-ip.c       Fri May  8 13:42:02 1998\n+++ tcpdump-3.4a5\/print-ip.c    Fri May  8 13:03:45 1998\n@@ -490,7 +490,14 @@\n                (void)printf(\" (DF)\");\n\n        if (ip-&gt;ip_tos)\n+               {\n                (void)printf(\" [tos 0x%x]\", (int)ip-&gt;ip_tos);\n+               \/* ECN bits *\/\n+               if (ip-&gt;ip_tos &amp;0x01)\n+               (void)printf(\" [CE] \");\n+               if (ip-&gt;ip_tos &amp;0x02)\n+               (void)printf(\" [ECT] \");\n+               }\n        if (ip-&gt;ip_ttl ip_ttl);\n\ndiff -ru tcpdump-3.4a5-orig\/print-tcp.c tcpdump-3.4a5\/print-tcp.c\n--- tcpdump-3.4a5-orig\/print-tcp.c      Fri May  8 13:42:02 1998\n+++ tcpdump-3.4a5\/print-tcp.c   Fri May  8 13:32:06 1998\n@@ -75,6 +75,7 @@\n #define TCPOPT_CCECHO          13      \/* T\/TCP CC options (rfc1644) *\/\n #endif\n\n+#define ECE_ON         0x40    \/* ECN notify *\/\n struct tha {\n        struct in_addr src;\n        struct in_addr dst;\n@@ -143,6 +144,9 @@\n                        putchar('P');\n        } else\n                putchar('.');\n+       flags = tp-&gt;th_flags;\n+       if (flags &amp; ECE_ON)\n+               printf(\" [TCP-ECE]\");\n\n        if (!Sflag &amp;&amp; (flags &amp; TH_ACK)) {\n                register struct tcp_seq_hash *th;\n\n--------------------------------------------------\n\ncheers,\njamal\n\nComputing Technology Labs, Nortel\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$cat \/proc\/sys\/net\/ipv4\/tcp_ecn 2 $ The tcp_ecn variable turns on Explicit Congestion Notification in TCP connections. This is used to automatically tell the host when there are congestions in a route to a specific host or a network. This can be used to throttle the transmitters to send packets in a slower rate over that specific &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/05\/24\/explicit-congestion-notification\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;explicit congestion notification&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/1552"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=1552"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/1552\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=1552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=1552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}