[{"content":"int main(void) { printf(\u0026#34;hello, world (again)\\n\u0026#34;); return 0; /* 8 years later */ } Second attempt at blogging. Let\u0026rsquo;s see if this one sticks.\n","permalink":"https://punt2cpu.net/2026/10/13/hello-world-2/","summary":"\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-c\" data-lang=\"c\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003eint\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003emain\u003c/span\u003e(\u003cspan style=\"color:#66d9ef\"\u003evoid\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e{\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003eprintf\u003c/span\u003e(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;hello, world (again)\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e\\n\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e;  \u003cspan style=\"color:#75715e\"\u003e/* 8 years later */\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e}\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eSecond attempt at blogging. Let\u0026rsquo;s see if this one sticks.\u003c/p\u003e","title":"Hello World 2"},{"content":"My notes on where AI/ML networking stands in October 2026. This area moves fast and there is a lot of active research going on, so parts of this will age quickly. Naming is NVIDIA\u0026rsquo;s (NVLink, NCCL, PXN), AMD and Intel have their own terms for similar things.\nTraffic For comparison, a normal DC Clos carries lots of small TCP flows. ECMP spreads them fine, TCP recovers from drops, 3:1 oversubscription is ok.\nA training back-end has no TCP in the data path. GPUs use RDMA (RoCEv2 or InfiniBand) and NCCL collectives (all-reduce, all-to-all). All GPUs wait for each other, so the slowest flow sets the job speed. Few huge flows, ECMP can easily put two on the same link. RDMA recovery from drops is expensive, one drop can stall the whole collective.\nNetworks scale-up: NVLink inside the server or rack (AMD has Infinity Fabric / UALink, Intel Gaudi uses Ethernet ports) back-end: GPU to GPU, 1:1, mostly plain L3 with eBGP (RFC 7938), VXLAN (RFC 7348) when GPUs are shared between tenants front-end: mgmt, tenant access, often EVPN-VXLAN (RFC 8365) storage: often its own fabric Rail-optimized 8 GPUs and 8 NICs per server. NIC1 of every server goes to leaf1, NIC2 to leaf2 and so on, each leaf is a rail. GPU n talks to GPU n on other servers and stays on one leaf.\nCross-rail with PXN: data is copied over NVLink to the local GPU3 and leaves on rail 3. Without PXN it goes leaf1 -\u0026gt; spine -\u0026gt; leaf3. Busy spines often mean all-to-all traffic (MoE) or PXN switched off.\nCongestion control InfiniBand uses credit-based flow control, so there are no congestion drops. The subnet manager runs the fabric.\nRoCEv2 is RDMA over UDP 4791 on Ethernet and needs help with congestion. DCQCN was built by Microsoft and Mellanox around 2015 for RDMA in Microsoft\u0026rsquo;s datacenters, cloud storage being one of the main use cases. With PFC alone, congestion pauses the whole priority hop by hop, which causes head-of-line blocking and unfairness. With DCQCN the switch marks ECN, the receiver sends CNPs back and the sender slows down before queues fill up.\nECN thresholds (Kmin, Kmax, Pmax) often need tuning per fabric. Kmin too high and PFC fires first, too low and you lose throughput.\nMy view is that PFC should be the last resort, a safety net with the watchdog on that ideally never triggers. Pause storms and deadlocks happen in real life. Not everyone agrees, Meta turned DCQCN off on their 400G fabric and runs PFC only, with congestion handled in the collective library. A study of DCQCN, DCTCP, TIMELY and HPCC also found they made little difference for training workloads.\nResearch is very active here: delay-based congestion control, HPCC, packet spraying with NIC reordering, Ultra Ethernet. UEC 1.0 came out in 2025, 1.1 is just out with in-network collectives and smaller headers.\nLow hanging fruit when troubleshooting MTU mismatch somewhere in the path PFC/ECN config not the same on all ports DSCP trust missing bad optic with high BER, job is slow and nothing alarms counters: pause frames, ECN marks, CNPs, queue drops, FEC nccl-tests baseline while the fabric is healthy Videos Great source of insights, Petr Lapukhov with Jeff Doyle and Jeff Tantsura on AI/ML data center design:\nPart 1 Part 2 Part 3 Part 4 ","permalink":"https://punt2cpu.net/2026/10/13/ml-networking-snapshot-202610/","summary":"\u003cp\u003eMy notes on where AI/ML networking stands in October 2026. This area moves fast and there is a lot of active research going on, so parts of this will age quickly. Naming is NVIDIA\u0026rsquo;s (NVLink, NCCL, PXN), AMD and Intel have their own terms for similar things.\u003c/p\u003e\n\u003ch2 id=\"traffic\"\u003eTraffic\u003c/h2\u003e\n\u003cp\u003eFor comparison, a normal DC Clos carries lots of small TCP flows. ECMP spreads them fine, TCP recovers from drops, 3:1 oversubscription is ok.\u003c/p\u003e","title":"ML networking snapshot 202610"},{"content":"Two really great books that will help you get into the basics of SAN :\nIntroduction to Storage Area Networks\nFibre Channel over Ethernet (FCoE) Data Center Bridging (DCB) Concepts and Protocols\n","permalink":"https://punt2cpu.net/2018/02/22/storage-area-networks-books/","summary":"\u003cp\u003eTwo really great books that will help you get into the basics of SAN :\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.redbooks.ibm.com/redbooks/pdfs/sg245470.pdf\"\u003eIntroduction to Storage Area Networks\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"ibm_storage_area\" loading=\"lazy\" src=\"/2018/02/22/storage-area-networks-books/ibm_storage_area.png\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.emc.com/collateral/hardware/technical-documentation/h6290-fibre-channel-over-ethernet-techbook.pdf\"\u003eFibre Channel over Ethernet (FCoE) Data Center Bridging (DCB) Concepts and Protocols\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"fcoe_emc\" loading=\"lazy\" src=\"/2018/02/22/storage-area-networks-books/fcoe_emc.png\"\u003e\u003c/p\u003e","title":"Storage Area Networks - Books"},{"content":"Just finished the TCP course from **INE ** :\nCCIE R\u0026amp;S: Understanding Transmission Control Protocol (TCP) Really recommend this to anyone who is interested in a bit deeper dive of how TCP works, great quality content, **Keith Bogart **is doing amazing job as instructor !\nSome TCP facts which I didn\u0026rsquo;t mentioned in my previous post :\nBefore TCP connection is established TCP goes through the following steps: Closed Initial State Active Open (APP notifies the CPU and requests for service time) - client side Transmission Control Block setup process - CPU creates TCB to keep track of each new TCP connection - for each TCP session we create a new TCB with unique identifier (socket - SRC IP; SRC TCP Port; DST IP; DST TCP Port) Initial sequence number will be random to prevent attacks on TCP When TCB is ready we are sending SYN(x random Seq# number) - this is called a Syn Sent State Receiving Syn(y random seq# number from server) + ACK (seq# x + 1) Sending ACK(seq# y+1) for that TCP Client side state changes to Established This is Active Open - TCB creation process, initiated only per need of client.\nAlso we have Passive Open (server - listening process)\nThe initial state - closed TCB creates partiality filled socket - so called unspecified passive open From server is listening on specific port, when receives a SYN from client Changes the state to Syn Received Then responds with ACK and state changes to Established A bit about Nagle :\nOn by default on most of operating systems When congestion occurs might be harmful - Storage vendors advising to disable it Basically what Nagle does after getting the CPU time is gathers the data from Buffer and stores it - doesn\u0026rsquo;t send anything **until we have a bytes on a flight ** = unacknowledged bytes If yes it will keep storing until his he has those **unack **bytes, after receiving ACKs for them it will send out multiple segments which we collected from buffer. **MSS VS MTU **\nTCP checks the MTU and configures MSS accordingly. If we have a jumbo MTU 9216 MSS will be 9216 - 20 (IP Header) - 20 TCP header.\nRelative Sequence Number in Wireshark and Subdisector\nWireshark by default shows not the real sequence numbers but the relative ones - this can be changed in menu When troubleshooting HTTP long responds - be aware that by default **Allow subdisector to reassemble TCP stream **in Wireshark is enabled - which could bring a lot of confusion as it reasembles the packets and wait of full web page load, instead of getting the picture in 1ms you can see it wireshark as getting in 30 seconds, despite that there was no problem at all. Recomending to view a video on this : Wireshark Tutorial Series #2. Tips and tricks used by insiders and veterans **Sequence Numbers **\nBuilt to count the bytes in segment When segment sent only with ACK without the data you might see that seq# is not incrementing - as there is nothing to count Also it might increment even while empty - this called phantom byte - add +1 to seq# **About the Missed ACKs **\nNot each sent segment will receive an ACK for it - might be we will be acking each 5 segments **RTO **- Re-transmission timeout value - depends on RTT, also so called SRTT Smooth RTT - when we are comparing multiple RTT values and taking the average. Why TCP is reliable ? Because before and after sending the Segment it puts it into the **Re-transmission Queue **and only after receiving an ACK it removes the segment from there. Duplicate ACKs are appearing after one of the segments has been delivered but other one was lost - then we are repeating the last ACKed segment - selective repeat here comes into play with option field which helps to retransmit only what is missing. Sliding Window Rules :\nBytes sent and acknowledged - removing from retransmission queue. Bytes sent but not yet acknowledged Bytes not yet sent for which receiver is ready - usable window Bytes not sent and receiver is not ready to receive them **Urgent Bit **\nNo priorities here, just flagging the segment about it\u0026rsquo;s urgency - TCP does nothing special here, only allows to upper layer APP to identify the urgent packet. So no VIP delivery from the TCP side. Urgent pointer field points to the first byte of non urgent data. ","permalink":"https://punt2cpu.net/2018/02/22/more-about-tcp/","summary":"\u003cp\u003eJust finished the TCP course from **INE ** :\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ca href=\"https://streaming.ine.com/c/ccie-rs-understaning-tcp\"\u003eCCIE R\u0026amp;S: Understanding Transmission Control Protocol (TCP) \u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eReally recommend this to anyone who is interested in a bit deeper dive of how TCP works, great quality content, **\u003ca href=\"https://www.linkedin.com/in/keith-bogart-2a75042/\"\u003eKeith Bogart\u003c/a\u003e **is doing amazing job as instructor !\u003c/p\u003e\n\u003cp\u003eSome TCP facts which I didn\u0026rsquo;t mentioned in my previous post :\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eBefore TCP connection is established TCP goes through the following steps:\u003c/li\u003e\n\u003cli\u003eClosed Initial State\u003c/li\u003e\n\u003cli\u003eActive Open (APP notifies the CPU and requests for service time) - client side\u003c/li\u003e\n\u003cli\u003eTransmission Control Block setup process  - CPU creates TCB to keep track of each new TCP connection - for each TCP session we create a new TCB with unique identifier (socket - \u003cstrong\u003eSRC IP; SRC TCP Port; DST IP; DST TCP Port\u003c/strong\u003e)\u003c/li\u003e\n\u003cli\u003eInitial sequence number will be random to prevent attacks on TCP\u003c/li\u003e\n\u003cli\u003eWhen TCB is ready we are sending SYN(x random Seq# number) - this is called a \u003cstrong\u003eSyn Sent State\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003eReceiving Syn(y random seq# number from server) + ACK (seq# x + 1)\u003c/li\u003e\n\u003cli\u003eSending ACK(seq# y+1) for that\u003c/li\u003e\n\u003cli\u003eTCP Client side state changes to Established\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThis is Active Open - TCB creation process, initiated only per need of client.\u003c/p\u003e","title":"More about TCP"},{"content":"Old known stuff, probably for everybody who is somehow related to networking, but anyway, putting it here too.\nIEEE 802.3x - Wikipedia link\nIf QoS is enabled and you like to prioritize the traffic, flow control needs to be disabled,as it doesn\u0026rsquo;t care about any higher level prioritization, just when ingress traffic is coming in faster than receiver can accept it, flow control will kick in and send pause frames until the ingress-egress rate will be equalized or ingress rate is lower than egress of that interface.\nA bit more info from Dell FTOS 9 documentation about flow control :\nI would use it only for storage - for example iscsi traffic, in separated network, then it won\u0026rsquo;t do any harm.. probably :)\nBut of course no way of using it on trunk links, other switch facing links and etc.\n","permalink":"https://punt2cpu.net/2018/02/21/a-bit-about-old-l2-flow-control/","summary":"\u003cp\u003eOld known stuff, probably for everybody who is somehow related to networking, but anyway, putting it here too.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Ethernet_flow_control\"\u003eIEEE 802.3x\u003c/a\u003e - Wikipedia link\u003c/p\u003e\n\u003cp\u003eIf QoS is enabled and you like to prioritize the traffic, flow control needs to be disabled,as it doesn\u0026rsquo;t care about any higher level prioritization, just when ingress traffic is coming in faster than receiver can accept it, flow control will kick in and send pause frames until the ingress-egress rate will be equalized or ingress rate is lower than egress of that interface.\u003c/p\u003e","title":"Flowcontrol IEEE 802.3x"},{"content":"Installing – Let\u0026rsquo;s use Debian based manager :\nApt-get install open-iscsi\nApt-get install iperf\nApt-get install nload\nScanning for targets :\nIscsiadmin -m discovery -t st -p target_ip\nIscsiadm -m node -u\nIscsiadm -m node \u0026ndash;login\nCheck if you see the object :\nLsblk\nNew disk should appear in dev - like sdx \\-sdx1\nHow to partition (if wasn’t partitioned yet)\nFdisk /dev/sdc\nN\nP\nEnter\nw\nMkfs.ext4 /dev/sdx1\nConnecting the drive to system\nFsck /dev/sdc1\nMount /dev/sdc1 /mnt\nCreating big file with random data :\nDd if=/dev/urandom of=rnd.20G count=1024 bs=20M\nAlso you can check the copy speed live via rsync (when copying from mount location to mount for example) –\nrsync \u0026ndash;progress source destination\nLive interface monitoring can be done via\nnload – same like top but for nics\nAnd at the end if you’d like to check what is the performance of network(without storage) – connect second host to same switch and run iperf\nIperf -s (on servers side)\nIperf -c x.x.x.x -d (-D option for simultaneous bi-directional bandwidth measurement)\n","permalink":"https://punt2cpu.net/2018/01/31/mounting-the-iscsi-target-and-checking-performance/","summary":"\u003cp\u003e\u003cstrong\u003eInstalling – Let\u0026rsquo;s use Debian based manager\u003c/strong\u003e :\u003c/p\u003e\n\u003cp\u003eApt-get install open-iscsi\u003c/p\u003e\n\u003cp\u003eApt-get install iperf\u003c/p\u003e\n\u003cp\u003eApt-get install nload\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eScanning for targets :\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eIscsiadmin -m discovery -t st -p target_ip\u003c/p\u003e\n\u003cp\u003eIscsiadm -m node -u\u003c/p\u003e\n\u003cp\u003eIscsiadm -m node \u0026ndash;login\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCheck if you see the object :\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eLsblk\u003c/p\u003e\n\u003cp\u003eNew disk should appear in dev - like \u003cstrong\u003esdx \\-sdx1\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHow to partition (if wasn’t partitioned yet)\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eFdisk /dev/sdc\u003c/p\u003e\n\u003cp\u003eN\u003c/p\u003e\n\u003cp\u003eP\u003c/p\u003e\n\u003cp\u003eEnter\u003c/p\u003e\n\u003cp\u003ew\u003c/p\u003e\n\u003cp\u003eMkfs.ext4 /dev/sdx1\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConnecting the drive to system\u003c/strong\u003e\u003c/p\u003e","title":"Mounting the iscsi target and checking performance."},{"content":"End to end delay is the time from when we sent the first bit of the first line until last bit arrives to destination.\nBasically everything can be determined except queuing delay - it\u0026rsquo;s an unpredictable variable.\n","permalink":"https://punt2cpu.net/2017/12/09/end-to-end-delay/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/End-to-end_delay\"\u003eEnd to end delay\u003c/a\u003e is the time from when we sent the first bit of the first line until last bit arrives to destination.\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"endtoend\" loading=\"lazy\" src=\"/2017/12/09/end-to-end-delay/endtoend.png\"\u003e\u003c/p\u003e\n\u003cp\u003eBasically everything can be determined except queuing delay - it\u0026rsquo;s an unpredictable variable.\u003c/p\u003e","title":"End to End delay"},{"content":"Packetization delay is basically how close together we can pack a bits.\nSo it\u0026rsquo;s the time from when the first to the last bit of a packet is transmitted.\nFormula would be : Packetization delay = P(size) / R(transmit rate)\n","permalink":"https://punt2cpu.net/2017/12/09/packetization-delay/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Transmission_delay\"\u003ePacketization delay\u003c/a\u003e is basically how close together we can pack a bits.\u003c/p\u003e\n\u003cp\u003eSo it\u0026rsquo;s the time from when the first to the last bit of a packet is transmitted.\u003c/p\u003e\n\u003cp\u003eFormula would be : Packetization delay = \u003cstrong\u003eP\u003c/strong\u003e(size) / \u003cstrong\u003eR\u003c/strong\u003e(transmit rate)\u003c/p\u003e","title":"Packetization delay"},{"content":"Propagation delay - l is the amount of time it takes for a single bit to travel over a link at propagation speed c.\nFormula would be PropagationDelay=l(cable lenght)/c(speed)\n","permalink":"https://punt2cpu.net/2017/12/09/propagation-delay/","summary":"\u003cp\u003e\u003ca href=\"https://en.wikipedia.org/wiki/Propagation_delay\"\u003ePropagation delay\u003c/a\u003e - \u003cstrong\u003el\u003c/strong\u003e is the amount of time it takes for a single bit to travel over a link at propagation speed \u003cstrong\u003ec\u003c/strong\u003e.\u003c/p\u003e\n\u003cp\u003eFormula would be PropagationDelay=\u003cstrong\u003el\u003c/strong\u003e(cable lenght)/\u003cstrong\u003ec\u003c/strong\u003e(speed)\u003c/p\u003e","title":"Propagation delay"},{"content":"As we know TCP is called reliable - connection-oriented protocol. But why ?\nBasically because it keeps the data in its buffer before and after sending it, it makes sure that data was delivered in sequence and receiver send the confirmation about received data (ack). Otherwise data will be re-transmitted there are different ways to re-send the data, let\u0026rsquo;s explore some of them.\nSo what is happening under the hood of this massive (big overhead comparing to UDP protocol).\nSome ideas about TCP congestion mechanisms :\nWere created with intention that small buffers (of devices) would overflow, packet loss will trigger and TCP would react. - All good and cool, but in 2017 we have a huge buffers and this might cause some problems here, because it takes time before they will overflow, it creates a delays. With very small buffers we also have a problem, in case if we have burst of packets and due to small buffer one/some of them would get lost the TCP can treat them as a congestion - afterwards it will reduce its congestion window and as the result links won\u0026rsquo;t be able to be filled completely. Link flapping - this stuff is common in campus networks - link flapping, fading can trick the TCP into thinking that there is an extreme congestion in the network and therefore it should do exponential re-transmissions To avoid many bad stuff we have mechanisms like :\nsliding window - changing the window size depending on successfully received traffic stop and wait - one frame per ACK, basically N size of data can be sent until the next ACK cumulative acks - if I Acknowledge packet 3 that means I also acknowledge that I received 2 packets before this one. Go back to N - in case if single packet is lost we will re-transmit all the segment(is good when there are burst of losses), when senders window is larger than receivers ,protocol will use go back to N. Selective repeat - we will re-transmit that packet and only that which was lost Very important to make sure that we are not re-transmitting to early. Mainly TCP is the end to end host based congestion control mechanism.\nIt reacts to events observable of the end host Uses TCP\u0026rsquo;s sliding window and flow control Tries to figure out how many packets can safely be outstanding in the network at the time. You can memorize very simple form of TCP congestion mechanism and build everything on top of it - at least i\u0026rsquo;m doing so, I might be wrong :)\nAIMD - Additive increase, multiplicative decrease\nBasically if packet was received without errors and we got the ACK, we would increase the size of window field : w+1/w If packet was dropped we would use following formula w=w/2 - so basically after first dropped packet we will be cutting the window to half. AIMD also helps us to fully use the links - window size expands according to AIMD to probe how many bytes the pipe can hold.\nSummary for AIMD :\nThroughput of AIMD flow is sensitive to the drop probability and very sensitive to RTT - round trip time. With many flows each flow will follow it\u0026rsquo;s own AIMD rule. We have several TCP flow control methods :\nTCP** TAHOE**\nslow start (on connection startup to quickly find network capacity or packet timeout) window starts at max MSS increasing window for each ACK packet Exponentially grow congestion window to sense network capacity congestion avoidance state - to carefully probe when close to maximum network capacity triple duplicate acks fast re-transmission means don\u0026rsquo;t wait for a time out to re-transmit a missing segment if you receive a tripe duplicate ACK. FSM for Tahoe Mechanism :\nTCP RENO.\nBehaves identical as Tahoe on timeout\nOn triple duplicate ACK it : sets threshold to congestion window 2 sets congestion window to congestion win/2 - fast recoevry Inflate congestion window size (fast recovery) Retrasmit missing segments (fast retransmit) stay in congestion avoidance state TCP Reno adds in additional optimization, three duplicate ACKs don\u0026rsquo;t cause TCP to lose an RTT worth of trasnmission it waits for the missing segments to be acked. FSM for Reno Mechanism :\nBasically the difference between Tahoe and Reno is a fast recovery.\nObservation signals :\nincreasing ACKs : transfer is going well duplicate ACKs : something was lost, delayed timeout - bad stuff :) In TCP we are also using self-clocking - with help of this sender knows that packet has left the network.\n**@Credits to Stanford university for providing such a great course - almost all info here is taken from Networking self paced course. **\n","permalink":"https://punt2cpu.net/2017/12/08/tcp-congestion-control/","summary":"\u003cp\u003eAs we know TCP is called reliable - connection-oriented protocol. But why ?\u003c/p\u003e\n\u003cp\u003eBasically because it keeps the data in its buffer before and after sending it, it makes sure that data was delivered in sequence and receiver send the confirmation about received data (ack). Otherwise data will be re-transmitted there are different ways to re-send the data, let\u0026rsquo;s explore some of them.\u003c/p\u003e\n\u003cp\u003eSo what is happening under the hood of this massive (big overhead comparing to UDP protocol).\u003c/p\u003e","title":"TCP congestion control"},{"content":"Would like to put some facts about most famous routing protocol.\nBGP - Border Gateway Protocol\nAccording to Wikipedia currently we are using the version (BGP4), which was published as RFC 4271 in 2006.\nBGP4 has been in use on the Internet since 1994.\nBasically the world was changed by the 3 napkin protocol(picture was found on Network Collective Podcast):\nIts simplified finite state machine is (taken from wiki) :\nSome basics from BGP :\nAutonomous routing protocol based on path vector mechanism Slowest routing protocol By default if route goes down BGP won\u0026rsquo;t flap it, will wait for 30 seconds before notifying\nHelps you to be reachable from multiple service providers\nTo fastly reconverge BGP uses internal routing protocols, it relies on lower layer IGP\nOpposite to other routing protocols BGP has not trust for the neighbors(have multiple filters, you need to agree with you BGP peers how and what will be traversed through he link before you can establish it.\nBGP runs on top of TCP port 179\nHas triggered updates (5 seconds internal, 30 seconds external)\n13 Different metrics for finding the best route. (largest wieght, highest local preference, locally originated, shortest as path, lowest origin type,lowest med and etc.)\nAll neighbors needs to be manually set -\nneighbor ip remote-as as_number RFC rule about the traffic and BGP - when the packet leaves your AS - it\u0026rsquo;s not your traffic anymore, so basically you can\u0026rsquo;t tell anyone else what to do with their traffic.\nNeighbor must be manually set and directly reachable\nMultiple session to same neighbor are not permitted and will be dropped.\nNetwork command will work differently - you really need to have the network which you want to advertise in your routing table, otherwise it won\u0026rsquo;t be advertised.It needs to be a direct match to the routing table\nBGP packets :\nOpen - After configuring neighbor send a hello to neighbor router Update - Used to update the routing table or send any updates for changes Keep alive - BGP has it\u0026rsquo;s on keepalive mechanism Notification - Any BGP error condition events or any changes would generate a notification messages BGP states Idle - Have a neighbor connected but didn\u0026rsquo;t talked yet - usually we would see router stuck in this status when something is miss-configured. Active - Tries to establish a communication - a lot of issues also happens here Open sent Open confirm Established - all good Enabling BGP and adding neighbor is really simple : conf t router xx neighbor x.x.x.x remote-as xx Default hold time is 180 seconds - this is the interval after which neighbor will be considered as dead. After applying any BGP rule you need to clear the session : clear ip bgp * (dangerous :) don\u0026rsquo;t use this in production BGP won\u0026rsquo;t advertise anything until you won\u0026rsquo;t specify what to advertise Usually ISP is putting the filter so you will be able to send only those routes which you have agreed with them Filtering is happening by using the route maps When reading the AS-Path value read it from right to left, you will be able to understand in how many autonomous systems this route has passed. Also this is the anti-loop mechanism, if router will see it\u0026rsquo;s own AS in the path it will drop it. BGP attributes are attached to every route advertisement Route-map is something similar to access-lists, it performs a if then statements which are called match/set - used for modifying the bgp attributes, policy routing, route filtering. EBGP is used to receive the routes and exchange them to uplinks IBGP - used for connection in the same AS IBGP does not modify any BGP attributes IBGP has no loop prevention mechanism BGP split horizon rule is to never advertise a route you received via ibgp to another ibgp peer. - So because of this you need to have a full mesh between your ibgp neighbors or use the route reflectors IBGP peers should be formed by using a loopback interfaces - just to have a multiple paths in case of link failure. IBGP and EBGP have different ad distance : EBGP learned path AD = 20; IBGP = 200 EBGP neighbors must be directly connected, but to bend a rules a bit we can use the ebgp_multihop option. neighbor xx.xx.xx.xx\nebgp-multihop 2 ( in case if we are using loopback for EBGP)\nDefault route 0.0.0.0 won\u0026rsquo;t allow to form a EBGP Don\u0026rsquo;t foget to remove the private-as numbers before advertising to other EBGP peers. Don\u0026rsquo;t forget to put the route reflectors in cluster - to avoid loops To create AS in the AS confederations can be used. And there is many more, BGP nowadays is being used everywhere and often for other goals as it was designed, anyway if you want to learn more I would suggest to visiting following links :\nhttp://packetpushers.net/podcast/podcasts/show-355-whats-wrong-bgp-ietf-99/\nhttp://thenetworkcollective.com/2017/09/hon-li-bgp/\nhttps://www.cbtnuggets.com/it-training/cisco-ccip-bgp-642-661\n","permalink":"https://punt2cpu.net/2017/12/08/bgp-overview/","summary":"\u003cp\u003eWould like to put some facts about most famous routing protocol.\u003c/p\u003e\n\u003cp\u003eBGP - Border Gateway Protocol\u003c/p\u003e\n\u003cp\u003eAccording to \u003ca href=\"https://en.wikipedia.org/wiki/Border_Gateway_Protocol\"\u003eWikipedia\u003c/a\u003e currently we are using the version (BGP4), which was published as \u003ca href=\"https://tools.ietf.org/html/rfc4271\"\u003eRFC 4271\u003c/a\u003e in 2006.\u003c/p\u003e\n\u003cp\u003eBGP4 has been in use on the Internet since 1994.\u003c/p\u003e\n\u003cp\u003eBasically the world was changed by the 3 napkin protocol(picture was found on \u003ca href=\"http://thenetworkcollective.com/2017/09/hon-li-bgp/\"\u003eNetwork Collective Podcast\u003c/a\u003e):\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"bgp-napkin.jpg\"\u003e\u003cimg alt=\"bgp-napkin\" loading=\"lazy\" src=\"/2017/12/08/bgp-overview/bgp-napkin.jpg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eIts simplified finite state machine is (taken from wiki) :\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"670px-BGP_FSM.svg\" loading=\"lazy\" src=\"/2017/12/08/bgp-overview/670px-bgp_fsm-svg.png\"\u003e\u003c/p\u003e\n\u003cp\u003eSome basics from BGP :\u003c/p\u003e","title":"BGP overview"},{"content":"Great approach of understanding how the protocol or program should work is to check it\u0026rsquo;s FSM - Finite State machine.\nIt describes the processes of protocol, where it starts and how and where it ends.\nSTATE 1 -\u0026gt; STATE2 -\u0026gt; STATE3.\nFor example we can check the TCP FSM :\nPicture taken from http://www.tcpipguide.com/free/t_TCPOperationalOverviewandtheTCPFiniteStateMachineF-2.htm In picture above we can see the procedure of syn, synack, ack. Also we can see how connection is being closed using Fin or timeouts.\nBy following link below you can find an overview of RSTP state machine :\nhttp://www.ieee802.org/1/files/public/docs2000/1wProposedStateDiagrams041.pdf\n","permalink":"https://punt2cpu.net/2017/12/08/finite-state-machines-fsm/","summary":"\u003cp\u003eGreat approach of understanding how the protocol or program should work is to check it\u0026rsquo;s \u003ca href=\"https://en.wikipedia.org/wiki/Finite-state_machine\"\u003eFSM\u003c/a\u003e - Finite State machine.\u003c/p\u003e\n\u003cp\u003eIt describes the processes of protocol, where it starts and how and where it ends.\u003c/p\u003e\n\u003cp\u003eSTATE 1 -\u0026gt; STATE2 -\u0026gt; STATE3.\u003c/p\u003e\n\u003cp\u003eFor example we can check the TCP FSM :\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"tcpfsm\" loading=\"lazy\" src=\"/2017/12/08/finite-state-machines-fsm/tcpfsm.png\"\u003e\u003c/p\u003e\n\u003cp\u003ePicture taken from \u003ca href=\"http://www.tcpipguide.com/free/t_TCPOperationalOverviewandtheTCPFiniteStateMachineF-2.htm\"\u003ehttp://www.tcpipguide.com/free/t_TCPOperationalOverviewandtheTCPFiniteStateMachineF-2.htm \u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eIn picture above we can see the procedure of syn, synack, ack. Also we can see how connection is being closed using Fin or timeouts.\u003c/p\u003e","title":"Finite State Machines (FSM)"},{"content":"ARP resolves the mapping issue between two different size protocols.\nIt allows to MAP an IP(32 bit) and MAC(48 bit) together.\nHow does it work in a nutshell :\nLet\u0026rsquo;s assume that we have two hosts on different networks - A and B, we want them to communicate with each other, what will happen when host A will try reaching the host B for the first time (arp cache empty) :\nAs we can determine by ip and subnet mask combination that host B is on another network , Host A will send a broadcast packet which will contain the following fields : HW : 1 (Ethernet) Protocol : 0x0800 IP HW length : (6) 48 bit Protocol length : (4) 32-bit OPCode : 1 (Request) H/W Source : aa:aa:aa:aa:aa:aa - MAC of host A Protocol source : 192.168.0.2 - IP of host A HW Dest - ff:ff:ff:ff:ff:ff - MAC of broadcast address Protocol dest 192.168.0.1 - **ip of gateway ** Gateway will respond with ARP reply\nHW : 1 (Ethernet) Proocol : 0x0800 IP HW length : 6 48 bit Protocol length : (4) 32-bit OPCode : 2 (Reply) H/W Source : gg:gg:gg:gg:gg:gg - **Gateways MAC ** Protocol source : 192.168.0.1 - IP of gateway HW Dest - : aa:aa:aa:aa:aa:aa Protocol dest : 192.168.0.2 - IP of host A The same will happen from other side - if gateway has no ARP entry for host B it will broadcast the ARP request to same broadcast domain(let\u0026rsquo;s assume we are using only one router) it will get a response from the host and will save its address to arp cache.\nAfter request reply exchange we will have the gateway in our arp-cache now we can send the packets to B using the gateway.\nHost A will send a packet to default gateway with destination MAC of default gateway and destination IP of host B. Before sending the packet further gateway will change the source MAC to its own, destination IP will be left the same. Host B will reply, MAC of gateway will be the dest MAC, and ip of host A will be dest IP. We need not to forget about :\nGratuitous ARP - in case if machine is changing it\u0026rsquo;s MAC or services are being moved, we can have a wrong data cached in ARP caches of devices, to update it machine can send gratuitous arp requests.\nhttps://wiki.wireshark.org/Gratuitous_ARP ","permalink":"https://punt2cpu.net/2017/12/08/arp-address-resolution-protocol/","summary":"\u003cp\u003eARP resolves the mapping issue between two different size protocols.\u003c/p\u003e\n\u003cp\u003eIt allows to MAP an IP(32 bit) and MAC(48 bit) together.\u003c/p\u003e\n\u003cp\u003eHow does it work in a nutshell :\u003c/p\u003e\n\u003cp\u003eLet\u0026rsquo;s assume that we have two hosts on different networks - A and B, we want them to communicate with each other, what will happen when host A will try reaching the host B for the first time (arp cache empty) :\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eAs we can determine by ip and subnet mask combination that host B is on another network , Host A will send a broadcast packet which will contain the following fields :\u003c/li\u003e\n\u003c/ol\u003e\n\u003cul\u003e\n\u003cli\u003eHW : 1 (Ethernet)\u003c/li\u003e\n\u003cli\u003eProtocol : 0x0800 IP\u003c/li\u003e\n\u003cli\u003eHW length : (6) 48 bit\u003c/li\u003e\n\u003cli\u003eProtocol length : (4) 32-bit\u003c/li\u003e\n\u003cli\u003eOPCode : 1 (\u003cstrong\u003eRequest\u003c/strong\u003e)\u003c/li\u003e\n\u003cli\u003eH/W \u003cstrong\u003eSource\u003c/strong\u003e : aa:aa:aa:aa:aa:aa - \u003cstrong\u003eMAC of host A\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003eProtocol \u003cstrong\u003esource\u003c/strong\u003e : 192.168.0.2 - \u003cstrong\u003eIP of host A\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003eHW \u003cstrong\u003eDest\u003c/strong\u003e - ff:ff:ff:ff:ff:ff - \u003cstrong\u003eMAC of broadcast address\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003eProtocol \u003cstrong\u003edest\u003c/strong\u003e 192.168.0.1 - **ip of gateway **\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eGateway will respond with ARP reply\u003c/p\u003e","title":"ARP - Address Resolution Protocol"},{"content":" 1974: 3-way handshake 1978: TCP and IP split into TCP/IP 1983: Jan 1, ARPAnet switches to TCP/IP 1986: Internet begins to suffer a congestion collapse 1987-8: Van Jacobson fixes TCP, publishes seminal TCP paper (Tahoe) 1990: Fast recovery was added (Reno) Taken from Stanford university Networking course.\nLink : https://lagunita.stanford.edu/courses/Engineering/Networking-SP\n","permalink":"https://punt2cpu.net/2017/12/04/a-bit-of-tcp-history/","summary":"\u003cul\u003e\n\u003cli\u003e1974: 3-way handshake\u003c/li\u003e\n\u003cli\u003e1978: TCP and IP split into TCP/IP\u003c/li\u003e\n\u003cli\u003e1983: Jan 1, ARPAnet switches to TCP/IP\u003c/li\u003e\n\u003cli\u003e1986: Internet begins to suffer a congestion collapse\u003c/li\u003e\n\u003cli\u003e1987-8: Van Jacobson fixes TCP, publishes seminal TCP paper (Tahoe)\u003c/li\u003e\n\u003cli\u003e1990: Fast recovery was added (Reno)\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eTaken from Stanford university Networking course.\u003c/p\u003e\n\u003cp\u003eLink : \u003ca href=\"https://lagunita.stanford.edu/courses/Engineering/Networking-SP\"\u003ehttps://lagunita.stanford.edu/courses/Engineering/Networking-SP\u003c/a\u003e\u003c/p\u003e","title":"A bit of TCP history"},{"content":"Some quick facts :\nProtocol - 112; Multicast address 224.0.0.18; Preemption Enabled(by default);Priority=100 + highest IP; Timers 1/3.6;Only master sends hellos;\n**During the re-election all members will send multicast packets with same virtual source MAC - switch may see port flapping in that moment. ** Can\u0026rsquo;t advertise less than a 1 second timer - because of 1 byte field which can be 0 or 1, timers needs to be set on each router locally if you want to have a lower than 1 sec. You better set the timers equally otherwise you might have two master scenario What problem does it solves ? :\n-It\u0026rsquo;s designed to eliminate the single point of failure in a statically routed network.\nIn a nutshell - we are making one logical router of two physical ones.\nFrom user guide :\nVRRP specifes a MASTER router that owns the next hop IP and MAC address for end stations on a local area network (LAN). The\nMASTER router is chosen from the virtual routers by an election process and forwards packets sent to the next hop IP address. If the\nMASTER router fails, VRRP begins the election process to choose a new MASTER router and that new MASTER continues routing trafc\nVRRP uses the virtual router identifer (VRID) to identify each virtual router confgured. The IP address of the MASTER router is used as\nthe next hop address for all end stations on the LAN. The other routers the IP addresses represent are BACKUP routers.\nRFC3768 describes this in details, but basically we have one virtual router with virtual ip and hosts which are using that virtual IP as a gateway, in case if one of the routers from VRRP instance will fail other will still be routing the packets.\nIn VRRP we have a Master/Backup routers, election process is based on highest IP or router priority.\nMaster router will be actively working on routing the packets while backup router should \u0026ldquo;keep the silence\u0026rdquo; and monitor the availability of master router(using keep alive messages).\nWhat Backup router does while its in the Backup state: taken from RFC3768\nWhile in this state, a VRRP router MUST do the following:\n- MUST NOT respond to ARP requests for the IP address(s) associated\nwith the virtual router.\n- MUST discard packets with a destination link layer MAC address\nequal to the virtual router MAC address.\n- MUST NOT accept packets addressed to the IP address(es) associated\nwith the virtual router.\nIn case of different events :\nIf a Shutdown event is received, then:\no Cancel the Master_Down_Timer\no Transition to the {Initialize} state\nIf the Master_Down_Timer fires, then: o Send an ADVERTISEMENT\no Broadcast a gratuitous ARP request containing the virtual\nrouter MAC address for each IP address associated with the\nvirtual router\no Set the Adver_Timer to Advertisement_Interval\no Transition to the {Master} state\nIf an ADVERTISEMENT is received, then: o Set the Master_Down_Timer to Skew_Time\nelse:\nIf Preempt_Mode is False, or If the Priority in the\nADVERTISEMENT is greater than or equal to the local\nPriority, then:\no Reset the Master_Down_Timer to Master_Down_Interval\nelse:\no Discard the ADVERTISEMENT\nWhat master router does during :\nWhile in the {Master} state the router functions as the forwarding\nrouter for the IP address(es) associated with the virtual router.\nWhile in this state, a VRRP router MUST do the following:\n- MUST respond to ARP requests for the IP address(es) associated\nwith the virtual router.\n- MUST forward packets with a destination link layer MAC address\nequal to the virtual router MAC address.\n- MUST NOT accept packets addressed to the IP address(es) associated\nwith the virtual router if it is not the IP address owner.\n- MUST accept packets addressed to the IP address(es) associated\nwith the virtual router if it is the IP address owner.\nHere is an example of VRRP config on Dell N-Series switches.\nConfiguring two instances for different sub-networks in vlan 50.\nOn Cisco :\nIn case if you are using Dell Force10 Switches, you can put the VRRP on top of VLT, this would allow you to have both VRRP MAC addresses populated in your LOCAL_DA Switch CAM-Table and allow the active-active routing instead of active-passive as it\u0026rsquo;s described in RFC.To check that MACs are being populated on both VLT peers you can use a command : **show cam mac stack-unit 0 port-set 0 | grep **vrrp_virtual_mac\nNice article about this can be found under this link.\n","permalink":"https://punt2cpu.net/2017/11/03/vrrp-concepts/","summary":"\u003cp\u003eSome quick facts :\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eProtocol - 112; Multicast address 224.0.0.18; Preemption Enabled(by default);Priority=100 + highest IP; Timers 1/3.6;Only master sends hellos;\u003c/strong\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e**During the re-election all members will send multicast packets with same virtual source MAC - switch may see port flapping in that moment. **\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eCan\u0026rsquo;t advertise less than a 1 second timer - because of 1 byte field which can be 0 or 1, timers needs to be set on each router locally if you want to have a lower than 1 sec.\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eYou better set the timers equally otherwise you might have two master scenario\u003c/strong\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eWhat problem does it solves ? :\u003c/p\u003e","title":"VRRP Concepts"},{"content":"So what is a VLT and what does it does :\nVirtual link trunking (VLT) allows physical links between two Dell switches to appear as a single virtual link to the network core or other\nswitches such as Edge, Access, or top-of-rack (ToR). As a result, the two physical switches appear as a single switch to the connected\ndevices.\nBasically we are creating one logical switch out of two physical switches.\nFrom the left we see how it looks when interconnected physically, from right how end device sees it.\nConfiguration steps :\n1.Enable spanning tree - RSTP and PVST supported - step is optional, but nevertheless recommended.\nconfigure protocol spanning-tree rstp bridge-priority 4096 (primary VLT switch) bridge-priority 8192 (Secondary VLT switch) no disable Recommended to have a root bridge on VLT master and to set STP priority to secondary VLT switch in case if the first fails no to have topology change when other third unknown device would become a root.\n2. Configure ports for VLTi link :\nconfigure interface range fortyGigE 0/56 , fortyGigE 0/60 no shutdown interface port-channel 100 channel-member fortyGigE 0/56,60 no shutdown Create VLT domain on both switches, don\u0026rsquo;t forget to create a backup-link configure vlt domain 1 primary-priority 10 (primary VLT switch) primary-priority 20 (Secondary VLT switch) back-up destination 192.168.0.2 (Primary VLT switch, management interface) back-up destination 192.168.0.3 (Secondary VLT switch management interface) peer-link port-channel 100 Backup links are needed to have a heartbeat messages flowing between two switches.\nVLT also would work without the heartbeat but then you can encounter possible split brain scenario in case of VLTi link failure.\nAfter configuring the VLT we should get the following picture :\nNow let\u0026rsquo;s attach a device to our VLT switches.\nOn both VLT members pick up a port for redundant connection :\ninterface port-channel xx\nno ip address\nswitchport\nchannel-member tex/x/x\nno shut\nvlt-peer-lag port-channel 110\nAnd you are ready to go.\nYou can tweak the stuff like dampening - just to give some time for routing and other protocols to get online after rebooting the switch ,as ports will get up faster and devices without knowing that routing protocol is not ready yet may black hole the traffic.\nYou can also play with spanning-tree metrics - to have interruption after reboot as small as possible.\nVLT behavior :\nYou can check that MACs are being synced using the command :\nshow mac-address-table count\nSome of the of interesting points to remember (more you can find by downloading the user guide)\nWhen you enable Layer 3 routing protocols on VLT peers, make sure the delay-restore timer is set to a value that allows sufcient time\nfor all routes to establish adjacency and exchange all the L3 routes between the VLT peers before you enable the VLT ports.\nRSTP and PVST is supported only, no other spanning-tree would work properly in vlt config\nStacking is not allowed when configuring the VLT.\nIf the source is connected to an orphan (non-spanned, non-VLT) port in a VLT peer, the receiver is connected to a VLT (spanned) portchannel, and the VLT port-channel link between the VLT peer connected to the source and ToR is down, trafc is duplicated due to\nroute inconsistency between peers. To avoid this scenario, Dell Networking recommends confguring both the source and the receiver\non a spanned VLT VLAN.\nIn a scenario where one hundred hosts are connected to a Peer1 on a non-VLT domain and trafc ﬂows through Peer1 to Peer2; when\nyou move these hosts from a non-VLT domain to a VLT domain and send ARP requests to Peer1, only half of these ARP requests reach\nPeer1, while the remaining half reach Peer2 (because of LAG hashing). The reason for this behavior is that Peer1 ignores the ARP\nrequests that it receives on VLTi (ICL) and updates only the ARP requests that it receives on the local VLT. As a result, the remaining\nARP requests still points to the Non-VLT links and trafc does not reach half of the hosts. To mitigate this issue, ensure that you\nconfgure the following settings on both the Peers (Peer1 and Peer2): arp learn-enable and mac-address-table stationmove refresh-arp\nDon\u0026rsquo;t use any VLAN config on VLTi - switch will match the vlans automatically\nDon\u0026rsquo;t use Dynamic lang on VLTI - static is recommended\nIn a VLT domain, the following software features are supported on VLTi: link layer discovery protocol (LLDP), ﬂow control, port\nmonitoring, jumbo frames, and data center bridging (DCB)\nIf the link between the VLT peer switches is established, changing the VLT system MAC address or the VLT unit-id causes the link\nbetween the VLT peer switches to become disabled. However, removing the VLT system MAC address or the VLT unit-id may\ndisable the VLT ports if you happen to confgure the unit ID or system MAC address on only one VLT peer at any time.\nIf the link between VLT peer switches is established, any change to the VLT system MAC address or unit-id fails if the changes\nmade create a mismatch by causing the VLT unit-ID to be the same on both peers and/or the VLT system MAC address does not\nmatch on both peers\nIf VLTi connectivity with a peer is lost but the VLT backup connectivity indicates that the peer is still alive, the VLT ports on the\nSecondary peer are orphaned and are shut down.\nAlso the L3 VLANS would be shut down too\nSome failure scenarios :\nOverall VLT is a great thing for load balancing, redundancy and availability (you can upgrade the switches one by one without having a downtime) - In stack this wouldn\u0026rsquo;t be possible.\nAll info and images were taken from Dell User guide for S4048-ON switch, you can download it by following this link : http://downloads.dell.com/manuals/all-products/esuprt_ser_stor_net/esuprt_networking/esuprt_net_fxd_prt_swtchs/force10-s4048-on_administrator%20guide15_en-us.pdf In user guide you can find a lot of detailed info about all the possible switch OS functions and how to use/implement/troubleshoot them.\n","permalink":"https://punt2cpu.net/2017/11/03/dell-networking-vlt-concepts/","summary":"\u003cp\u003eSo what is a VLT and what does it does :\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eVirtual link trunking (VLT) allows physical links between two Dell switches to appear as a single virtual link to the network core or other\u003cbr\u003e\nswitches such as Edge, Access, or top-of-rack (ToR). As a result, the two physical switches appear as a single switch to the connected\u003cbr\u003e\ndevices.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eBasically we are creating one logical switch out of two physical switches.\u003c/p\u003e","title":"Dell Networking VLT concepts"},{"content":"Some important points about VLT Peer routing technology.\nPeer routing enables one VLT node to act as a proxy gateway for the other peer in a VLT domain. When you enable routing on VLT peers,\nyou can also enable the peer routing feature. In a nutshell, when peer-routing is enabled on both VLT switches you can load-balance, the L3 packets through both switches - as this allows a switch in VLT domain to forward traffic on behalf of its peer switch.\nExample how VLT forwards the traffic without peer-routing enabled :\nWhen you enable peer-routing :\nImages taken from Configuration guide\nPeer-routing helps to avoid sub-optimal routing, reduces the latency by avoiding another hop in traffic path, no need to have VRRP.\nKeep in mind in case if switch - Peer-1 will fail with peer routing enabled, your traffic will still be forwarded without any interruption - but as you don\u0026rsquo;t have any virtual IP address any control or management plane requests won\u0026rsquo;t be answered by Switch-1\u0026rsquo;s peer.\nSo basically by enabling peer routing we have only one goal - redundancy and traffic sharing for L3 protocols.\nDuring the bootup of VLT peer switches, a forwarding loop may occur until the VLT confgurations are applied on each switch and the\nprimary/secondary roles are determined.\nTo prevent the interfaces in the VLT interconnect trunk and RSTP-enabled VLT ports from entering a Forwarding state and creating a\ntraffic loop in a VLT domain, take the following steps.\n1 Configure RSTP in the core network and on each peer switch as described in Rapid Spanning Tree Protocol (RSTP).\nDisabling RSTP on one VLT peer may result in a VLT domain failure.\n2 Enable RSTP on each peer switch.\nPROTOCOL SPANNING TREE RSTP mode\nno disable\n3 Configure each peer switch with a unique bridge priority.\nPROTOCOL SPANNING TREE RSTP mode\nbridge-priority\nMore info about peer-routing advantages comparing to VRRP.\nhttps://hasanmansur.com/2016/06/09/vlt-peer-routing-and-routed-vlt/\n","permalink":"https://punt2cpu.net/2017/10/02/dell-vlt-peer-routing/","summary":"\u003cp\u003eSome important points about VLT Peer routing technology.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003ePeer routing enables one VLT node to act as a proxy gateway for the other peer in a VLT domain. When you enable routing on VLT peers,\u003cbr\u003e\nyou can also enable the peer routing feature.  \u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eIn a nutshell, when peer-routing is enabled on both VLT switches you can load-balance, the L3 packets through both switches - as this allows a switch in VLT domain to forward traffic on behalf of its peer switch.\u003c/p\u003e","title":"Dell VLT Peer-Routing"},{"content":"So how does the checksum works ?\nBoth devices needs to agree on checksum number - will it be odd or even The higher the number is the more precise is the check Let\u0026rsquo;s take the example from one of YouTube videos with a great explanation of how Checksum is working.\nTaking the numbers which we want to transmit :\n25 11 12 7 13 4\nBoth devices should agree on checksum - let it be number 16\nSum up the numbers 25+11+12+7+13+4=72 Divide them by checksum 72/16=4.5(ignore what is after the .) so we have 4 4*16=**64 **= 72 - 64 = **8 ** Now 8 is a checksum First device takes the numbers and writes them to tcp/ip stack, puts also the number 8 to the checksum field - to transmit it with actual message, this part helps to know if the rest of message is correct and right Second device reads the numbers from tcp/ip stack and performs the checksum check, if it get\u0026rsquo;s the same value = 8 that means that data wasn\u0026rsquo;t corrupted and we can trust it. This is a very fast check to compute, but unfortunately checksum is not robust and not reliable it can help only against single bit error.\nFor example if we would send 25 11 12 7 13 4 but message will arrive as 24 12 12 7 13 4 it will also be 72 and checksum won\u0026rsquo;t detect any problems here.\nIP Checksum picture taken from Stanford Networking Course\n","permalink":"https://punt2cpu.net/2017/09/29/error-detection-checksum/","summary":"\u003cp\u003eSo how does the checksum works ?\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eBoth devices needs to agree on checksum number - will it be odd or even\u003c/li\u003e\n\u003cli\u003eThe higher the number is the more precise is the check\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eLet\u0026rsquo;s take the example from one of YouTube videos with a great explanation of how Checksum is working.\u003c/p\u003e\n\u003cp\u003eTaking the numbers which we want to transmit :\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003e25 11 12 7 13 4\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eBoth devices should agree on checksum - let it be number \u003cstrong\u003e16\u003c/strong\u003e\u003c/p\u003e","title":"Error Detection - Checksum"},{"content":"I\u0026rsquo;ve went through RFC 792 and would like to share some basic(high level) info about ICMP and how we are using it. ICMP is an INTERNET CONTROL MESSAGE PROTOCOL It runs over network layer - so it\u0026rsquo;s encapsulated in IP datagrams Unreliable - Simple datagram service, there is no retries to re transmit the messages in case if it failed to reach the destination ICMP message is generated using the header of IP datagram(source address, destination address) and it takes first 8 bytes from original IP datagram payload,afterwards the message will be marked with type and code. Some of the types : Host unreachable - when IP datagram gets to the last router but last router doesn\u0026rsquo;t know where the host is Port unreachable - means that the ports that\u0026rsquo;s contained inside of outgoing packet is not being recognized at receivers end How does the PING uses ICMP :\nThe ping application calls ICMP directly, it sends ICMP echo request - message type 8 code 0 to receiver.\nthat get\u0026rsquo;s encapsulated into IP datagram, flows through the network, when receiver will get it it will send echo reply - type 0 code 0\nHow Traceroute uses ICMP and UDP - *nix version, as Windows uses pure ICMP sends the echo requests until they won\u0026rsquo;t get echo reply from the target(link) :\nFor TRACEROUTE the goal is to discover all routers in the path, show the path and provide the round trip delay.\nWhen execute the traceroute it generates an UDP message which will be encapsulated in IP datagram, TTL will be set to 1 for the first message.\nAfter reaching the first router, TTL will be decremented and equal to 0, that will force the router to drop the packet and generate a ICMP message back to sender with **ICMP Type 11 **= which means TTL expired.\nTo send that TTL expired message back router will take the IP header data and first 8 bytes from IP payload.\nWhen TTL expired message will reach the source - traceroute will know that TTL has expired and this message has arrived from first hop router, also traceroute will measure the round-trip-time ( how long it took from sending the UDP message to receiving TTL expired back)\nNow it will generate a second UDP message only with one change - the TTL field value will be increased to 2, then the same to 3 and etc. it will stop only when destination port unreachable message arrives back.\nTraceroute by generating the requests also generates a random unusable UDP port number, when our UDP datagram will get through all the routers to destination, receiver won\u0026rsquo;t be able to recognize the UDP port number and will send the ICMP Type 3 Code 3 Message - Destination Port Unreachable - after receiving that Traceroute will end the trace.\nPicture of ICMP types taken from Stanford Networking course http://online.stanford.edu/course/introduction-computer-networking\n","permalink":"https://punt2cpu.net/2017/09/28/a-bit-info-about-icmp-ping-and-traceroute/","summary":"\u003ch5 id=\"ive-went-through-rfc-792and-would-like-to-share-some-basichigh-level-info-about-icmp-and-how-we-are-using-it\"\u003eI\u0026rsquo;ve went through \u003ca href=\"https://tools.ietf.org/html/rfc792\"\u003eRFC 792\u003c/a\u003e and would like to share some basic(high level) info about ICMP and how we are using it.\u003c/h5\u003e\n\u003ch5 id=\"icmp-is-an-internet-control-message-protocol\"\u003eICMP is an INTERNET CONTROL MESSAGE PROTOCOL\u003c/h5\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ch5 id=\"it-runs-over-network-layer---so-its-encapsulated-in-ip-datagrams\"\u003eIt runs over network layer - so it\u0026rsquo;s encapsulated in IP datagrams\u003c/h5\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ch5 id=\"unreliable---simple-datagram-service-there-is-no-retries-to-re-transmit-the-messages-in-case-if-it-failed-to-reach-the-destination\"\u003eUnreliable - Simple datagram service, there is no retries to re transmit the messages in case if it failed to reach the destination\u003c/h5\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ch5 id=\"icmp-message-is-generated-using-the-header-of-ip-datagramsource-address-destination-address-and-it-takes-first-8-bytes-from-original-ip-datagram-payloadafterwards-the-message-will-be-marked-with-type-and-code-some-of-the-types-icmp_\"\u003eICMP message is generated using the header of IP datagram(source address, destination address) and it takes first 8 bytes from original IP datagram payload,afterwards the message will be marked with type and code. Some of the types : \u003cimg alt=\"icmp_types\" loading=\"lazy\" src=\"/2017/09/28/a-bit-info-about-icmp-ping-and-traceroute/icmp_types.png\"\u003e\u003c/h5\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ch5 id=\"host-unreachable---when-ip-datagram-gets-to-the-last-router-but-last-router-doesnt-know-where-the-host-is\"\u003eHost unreachable - when IP datagram gets to the last router but last router doesn\u0026rsquo;t know where the host is\u003c/h5\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003ch5 id=\"port-unreachable---means-that-the-ports-thats-contained-inside-of-outgoing-packet-is-not-being-recognized-at-receivers-end\"\u003ePort unreachable -  means that the ports that\u0026rsquo;s contained inside of outgoing packet is not being recognized at receivers end\u003c/h5\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eHow does the PING uses ICMP :\u003c/p\u003e","title":"A bit info about ICMP, ping and traceroute"},{"content":"Putting this here just for reference as repeating Stanford Networking course.\nSome of important fields in TCP Segment :\nDestination port - tells the TCP layer which application should get the bytes on ether end.\n**Source port **Says where the data should get back, when app starts sending the data it generates unique source port number - to be able to receive the data back. (to differentiate the connection between host A and B)\n**Sequence number **Indicates the position of the byte stream in TCP Data field.\n**Acknowledgment Sequence **Tells the other end which byte we are expecting next, also says that until now we have received all data correctly.\n**16 Bit Checksum **- To detect corrupt data, bit errors on the wire for example.\n**Header length **Tells how long the header is, also shows how many options are present.\n**Flags **: **ack, urg, push bit, reset flag, syn, fin **\n**Window Size **- Could be 1 - means stop and wait, could be 0 means connection will be closed, could be 1500 or other value means that much of bytes we can send without the acknowledge.\nThe unique id of a TCP connection.\nIn IPv4 Header we have IP Dest. A.; IP Source A., Protocol ID=TCP = 104-bit globally unique ID.\nAs the first steps host a increments source port for every new connection.\nThen TCP picks ISN (initial sequence number) to avoid overlap with previous connection with same ID.\n**UDP **\nUDP has only 4 header fields unlike TCP which as 10.\nFields :\nSource port, Destination Port, **Length, Checksum(Optional field) **if it\u0026rsquo;s used then it\u0026rsquo;s calculated with UDP header and data otherwise it\u0026rsquo;s filled with 0 fields.\nIn a nutshell UDP is unreliable delivery - no acks, no way to detect missing datagrams, no flow control, packets may show up in any order, TCP has all those function and the issue of TCP is that TCP datagram is much bigger than UDP and carries a lot of features which might be not needed for apps like video streaming or DNS or features like flow control might be already implemented in APP itself. For example right now we are observing more and more intensive usage of protocol QUIC in network.\n","permalink":"https://punt2cpu.net/2017/09/22/the-tcp-segment-format-and-how-it-works/","summary":"\u003cp\u003ePutting this here just for reference as repeating Stanford Networking course.\u003c/p\u003e\n\u003cp\u003eSome of important fields in \u003cstrong\u003eTCP\u003c/strong\u003e Segment :\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDestination port\u003c/strong\u003e - tells the TCP layer which application should get the bytes on ether end.\u003c/p\u003e\n\u003cp\u003e**Source port **Says where the data should get back, when app starts sending the data it generates unique source port number - to be able to receive the data back. (to differentiate the connection between host A and B)\u003c/p\u003e","title":"The TCP and UDP segment format"},{"content":"Big endian - most significant byte stored in smallest address, read from left to right.\nLet\u0026rsquo;s take a 32-bit value :\n0x09080706 :\n09|08|07|06\nbyte address : x|x+1|x+2|x+3\nFor example 32-bit value 5 writing as 0x00000005 is a Big endian.\nLittle endian - least significant byte is stored in smallest address, read from right to left.\n32-bit value would be stored in memory in following way :\n0x09080706 :\n06|07|08|09\nbyte address : x|x+1|x+2|x+3\nFor example little endian value would be 16-bit value **53 **in 0x3500\nUseful info about this :\n","permalink":"https://punt2cpu.net/2017/08/28/big-and-little-endian/","summary":"\u003cp\u003e\u003cstrong\u003eBig endian\u003c/strong\u003e - \u003cstrong\u003emost significant\u003c/strong\u003e byte stored in smallest address,  read from \u003cstrong\u003eleft to right\u003c/strong\u003e.\u003c/p\u003e\n\u003cp\u003eLet\u0026rsquo;s take a 32-bit value :\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e0x09080706\u003c/strong\u003e :\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003e\u003cstrong\u003e09|08|07|06\u003c/strong\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cstrong\u003ebyte address : x|x+1|x+2|x+3\u003c/strong\u003e\u003cbr\u003e\nFor example \u003cstrong\u003e32-bit\u003c/strong\u003e value \u003cstrong\u003e5\u003c/strong\u003e writing as \u003cstrong\u003e0x00000005\u003c/strong\u003e is a Big endian.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLittle endian\u003c/strong\u003e - \u003cstrong\u003eleast significant\u003c/strong\u003e byte is stored in smallest address, read from \u003cstrong\u003eright to left.\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e32-bit value would be stored in memory in following way :\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e0x09080706\u003c/strong\u003e :\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003e\u003cstrong\u003e06|07|08|09\u003c/strong\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e\u003cstrong\u003ebyte address : x|x+1|x+2|x+3\u003c/strong\u003e\u003cbr\u003e\nFor example little endian value would be \u003cstrong\u003e16-bit\u003c/strong\u003e value **53  **in \u003cstrong\u003e0x3500\u003c/strong\u003e\u003c/p\u003e","title":"Big and Little Endian"},{"content":"Some scripts for light LED control on arduino :\nmy github\nCommunicating with arduino through serial interface, 0 = turning off the lights, 1 = turning them on.\nhttps://www.arduino.cc/en/Reference/Serial\nLet it blink with different intervals :)\n","permalink":"https://punt2cpu.net/2017/08/25/playing-with-arduino/","summary":"\u003cp\u003eSome scripts for light LED control on arduino :\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/uc0d3r1\"\u003emy github\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eCommunicating with arduino through serial interface, 0 = turning off the lights, 1 = turning them on.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.arduino.cc/en/Reference/Serial\"\u003ehttps://www.arduino.cc/en/Reference/Serial\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"blinking_the_lights\" loading=\"lazy\" src=\"/2017/08/25/playing-with-arduino/blinking_the_lights.png\"\u003e\u003c/p\u003e\n\u003cp\u003eLet it blink with different intervals :)\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"blinking_intervals\" loading=\"lazy\" src=\"/2017/08/25/playing-with-arduino/blinking_intervals.png\"\u003e\u003c/p\u003e","title":"Playing with Arduino"},{"content":"Would like to share a great course about interesting approaches to understand our mind how it is working and how to be more effective in learning new things.\nhttps://www.coursera.org/learn/learning-how-to-learn\nAbsolutely free course, enjoy it !\nI\u0026rsquo;ve went through it a long time ago but didn\u0026rsquo;t took any notes, on pastebin found pretty good summarized notes of this course : https://pastebin.com/JNbGxvpQ learning_how_to_learn_notes\n","permalink":"https://punt2cpu.net/2017/08/25/learning-how-to-learn/","summary":"\u003cp\u003eWould like to share a great course about interesting approaches to understand our mind  how it is working and how to be more effective in learning new things.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.coursera.org/learn/learning-how-to-learn\"\u003ehttps://www.coursera.org/learn/learning-how-to-learn\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eAbsolutely free course, enjoy it !\u003c/p\u003e\n\u003cp\u003eI\u0026rsquo;ve went through it a long time ago but didn\u0026rsquo;t took any notes, on \u003cstrong\u003epastebin\u003c/strong\u003e found pretty good summarized notes of this course : \u003ca href=\"https://pastebin.com/JNbGxvpQ\"\u003ehttps://pastebin.com/JNbGxvpQ \u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"learning_how_to_learn_notes3.pdf\" title=\"learning_how_to_learn_notes\"\u003elearning_how_to_learn_notes\u003c/a\u003e\u003c/p\u003e","title":"Learning how to learn"},{"content":"More efficient way of doing things with any programming language is using the loops.\nhttps://wiki.python.org/moin/ForLoop\nExample of creating 32 vlans on cisco switch :\nThe code looks more readable and you can scale it now :)\n","permalink":"https://punt2cpu.net/2017/08/25/creating-the-vlans-using-python-and-loops/","summary":"\u003cp\u003eMore efficient way of doing things with any programming language is using the loops.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://wiki.python.org/moin/ForLoop\"\u003ehttps://wiki.python.org/moin/ForLoop\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eExample of creating \u003cstrong\u003e32\u003c/strong\u003e vlans on cisco switch :\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"vlans_loops\" loading=\"lazy\" src=\"/2017/08/25/creating-the-vlans-using-python-and-loops/vlans_loops.png\"\u003e\u003c/p\u003e\n\u003cp\u003eThe code looks more readable and you can scale it now :)\u003c/p\u003e","title":"Creating the vlans using Python and Loops"},{"content":"Just a short example how you can create a VLANs on Cisco switch.\nUsing Linux machine for executing the python and GNS3 Cisco Ether-switch\nJust trying to get it working, this is definetely not an example how the production program should look like, at least the loop and more variables could be used here, but for now only hard-coding the stuff :)\nVideo number 2\nYT:_XGtQRUWasQ\n","permalink":"https://punt2cpu.net/2017/08/24/python-creating-the-vlans-on-the-cisco-switch/","summary":"\u003cp\u003eJust a short example how you can create a VLANs on Cisco switch.\u003c/p\u003e\n\u003cp\u003eUsing Linux machine for executing the python and GNS3 Cisco Ether-switch\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"gns3_ubuntu_mapped_to_ether_Switch\" loading=\"lazy\" src=\"/2017/08/24/python-creating-the-vlans-on-the-cisco-switch/gns3_ubuntu_mapped_to_ether_switch.png\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"creating_vlans\" loading=\"lazy\" src=\"/2017/08/24/python-creating-the-vlans-on-the-cisco-switch/creating_vlans.png\"\u003e\u003c/p\u003e\n\u003cp\u003eJust trying to get it working, this is definetely not an example how the production program should look like, at least the loop and more variables could be used here, but for now only hard-coding the stuff :)\u003c/p\u003e\n\u003cp\u003eVideo number \u003cstrong\u003e2\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eYT:_XGtQRUWasQ\u003c/p\u003e","title":"Python, creating the vlans on the Cisco switch"},{"content":"Scanning for wifi networks :\nifconfig wlan0 up scan\nSetting up your wifi device :Network-Wireless\nThis example shows the Atheros ath0 wireless adapter.Add an entry for this network to /etc/wpa_supplicant.conf. If the file does not exist, create it. Replace myssidand mypsk with the SSID and PSK provided by the network administrator.\nnetwork={\nssid=\u0026ldquo;myssid\u0026rdquo; psk=\u0026ldquo;mypsk\u0026rdquo;\n}\nAdd entries to /etc/rc.conf to configure the network on startup:\nwlans_ath0=\u0026ldquo;wlan0\u0026rdquo;\nifconfig_wlan0=\u0026ldquo;WPA SYNCDHCP\u0026rdquo;\nRestart the computer, or restart the network service to connect to the network:\n# service netif restart\nAfter 8.0v, it is necessary to create a wlan clone device of the actual wifi card :\n# ifconfig wlan0 create wlandev ath0\n# ifconfig wlan0 up list scan\n","permalink":"https://punt2cpu.net/2017/08/24/small-how-to-setup-a-wifi-device-on-your-freebsd-machine/","summary":"\u003cp\u003eScanning for wifi networks :\u003cbr\u003e\nifconfig wlan0 up scan\u003c/p\u003e\n\u003cp\u003eSetting up your wifi device :\u003ca href=\"https://www.freebsd.org/doc/en/books/handbook/network-wireless.html\"\u003eNetwork-Wireless\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eThis example shows the Atheros ath0 wireless adapter.Add an entry for this network to /etc/wpa_supplicant.conf. If the file does not exist, create it. Replace myssidand mypsk with the SSID and PSK provided by the network administrator.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003enetwork={\u003c/p\u003e\n\u003cp\u003essid=\u0026ldquo;myssid\u0026rdquo; psk=\u0026ldquo;mypsk\u0026rdquo;\u003c/p\u003e\n\u003cp\u003e}\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eAdd entries to /etc/rc.conf to configure the network on startup:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003ewlans_ath0=\u0026ldquo;wlan0\u0026rdquo;\u003cbr\u003e\nifconfig_wlan0=\u0026ldquo;WPA SYNCDHCP\u0026rdquo;\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eRestart the computer, or restart the network service to connect to the network:\u003cbr\u003e\n\u003cstrong\u003e# service netif restart\u003c/strong\u003e\u003cbr\u003e\nAfter 8.0v, it is necessary to create a wlan clone device of the actual wifi card :\u003cbr\u003e\n\u003cstrong\u003e# ifconfig wlan0 create wlandev ath0\u003c/strong\u003e\u003cbr\u003e\n\u003cstrong\u003e# ifconfig wlan0 up list scan\u003c/strong\u003e\u003c/p\u003e","title":"Small how to setup a WiFI device on your FreeBSD machine."},{"content":"**APT-GET **\nIn case if your access is going through proxy server you need to provide the credentials to APT.\nJust create an apt.conf file in /etc/apt/ and add there the following entry :\nAcquire::http::Proxy \u0026ldquo;http://proxyadd:port\u0026rdquo;;\nIn case if authentication is needed :\nAcquire::http::Proxy \u0026ldquo;http://username:password@proxyadd:port\u0026rdquo;;\n**YUM **\n/etc/yum.conf\nproxy=http://proxyadd:port\nproxy_username=user\nproxy_password=passwd\n","permalink":"https://punt2cpu.net/2017/08/24/apt-getyum-through-proxy/","summary":"\u003cp\u003e**APT-GET **\u003c/p\u003e\n\u003cp\u003eIn case if your access is going through proxy server you need to provide the credentials to APT.\u003c/p\u003e\n\u003cp\u003eJust create an apt.conf file in \u003cstrong\u003e/etc/apt\u003c/strong\u003e/ and add there the following entry :\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eAcquire::http::Proxy \u0026ldquo;http://proxyadd:port\u0026rdquo;;\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003eIn case if authentication is needed :\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eAcquire::http::Proxy \u0026ldquo;http://username:password@proxyadd:port\u0026rdquo;;\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e**YUM **\u003c/p\u003e\n\u003cp\u003e/etc/yum.conf\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eproxy=http://proxyadd:port\u003cbr\u003e\nproxy_username=user\u003cbr\u003e\nproxy_password=passwd\u003c/p\u003e\n\u003c/blockquote\u003e","title":"Apt-get/Yum through proxy"},{"content":"Starting to figure it out how python syntax is working and how we can use internal libraries to connect to switches.\nLet\u0026rsquo;s take the telnetlib\nHere is a short example of connecting to switch and changing it\u0026rsquo;s hostname.\nExample of script was taken from telnetlib: https://docs.python.org/2/library/telnetlib.html Great free content to learn the Python and Networking automation\n","permalink":"https://punt2cpu.net/2017/08/24/connecting-to-the-switch-using-python/","summary":"\u003cp\u003eStarting to figure it out how python syntax is working and how we can use internal libraries to connect to switches.\u003c/p\u003e\n\u003cp\u003eLet\u0026rsquo;s take the telnetlib\u003c/p\u003e\n\u003cp\u003eHere is a short example of connecting to switch and changing it\u0026rsquo;s hostname.\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"telnet_connect\" loading=\"lazy\" src=\"/2017/08/24/connecting-to-the-switch-using-python/telnet_connect.png\"\u003e\u003c/p\u003e\n\u003cp\u003eExample of script was taken from \u003cstrong\u003etelnetlib\u003c/strong\u003e: \u003ca href=\"https://docs.python.org/2/library/telnetlib.html\"\u003ehttps://docs.python.org/2/library/telnetlib.html \u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eGreat free content to learn the Python and Networking automation\u003c/p\u003e\n\u003cdiv style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\"\u003e\n\t\t\t\u003ciframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\" loading=\"eager\" referrerpolicy=\"strict-origin-when-cross-origin\" src=\"https://www.youtube.com/embed/IhroIrV9_7w?autoplay=0\u0026amp;controls=1\u0026amp;end=0\u0026amp;loop=0\u0026amp;mute=0\u0026amp;start=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;\" title=\"YouTube video\"\u003e\u003c/iframe\u003e\n\t\t\u003c/div\u003e","title":"Connecting to the Switch using Python"},{"content":"int main() {\nprintf (\u0026quot;\nThis is my first blog and first blogging experience, most likely I will abandon and forget it, but nevertheless this needs to be at least tried. I will try to blog about design, troubleshooting, configuration and automation of networks + everything else what I\u0026rsquo;m trying to learn and master (C, Embedded systems, Python, Security, Computer Architecture)\nTo make this entry useful would like to share two great podcasts about networking and technology, the idea about blogging came to me after listening one of the series on Packetpushers, thanks guys for providing an outstanding content !\nPretty new blog but with an awesome content and deep technical dive is :\nNetwork Collective\nTake your time and check out those links !\n“The only true wisdom is in knowing you know nothing.” – Socrates\n\u0026ldquo;); } ","permalink":"https://punt2cpu.net/2017/08/23/first_post/","summary":"\u003ch6 id=\"int-main\"\u003eint main()\u003c/h6\u003e\n\u003cp\u003e{\u003c/p\u003e\n\u003cp\u003eprintf (\u0026quot;\u003c/p\u003e\n\u003cp\u003eThis is my first blog and first blogging experience, most likely I will abandon and forget it, but nevertheless this needs to be at least tried. I will try to blog about design, troubleshooting, configuration and automation of networks + everything else what I\u0026rsquo;m trying to learn and master (C, Embedded systems, Python, Security, Computer Architecture)\u003c/p\u003e\n\u003cp\u003eTo make this entry useful would like to share two great podcasts about networking and technology, the idea about blogging came to me after listening one of the series on \u003ca href=\"http://packetpushers.net/podcast/podcasts/show-345-career/\"\u003ePacketpushers\u003c/a\u003e, thanks guys for providing an outstanding content !\u003c/p\u003e","title":"First post"},{"content":"Marius. Network engineer, mostly debugging switches and routing stacks. These days looking at FRR and SONiC code. marius@punt2cpu.net\n","permalink":"https://punt2cpu.net/about/","summary":"\u003cp\u003eMarius. Network engineer, mostly debugging switches and routing stacks. These days looking at FRR and SONiC code.\n\u003ca href=\"mailto:marius@punt2cpu.net\"\u003emarius@punt2cpu.net\u003c/a\u003e\u003c/p\u003e","title":"whoami"}]