BGP overview

Would like to put some facts about most famous routing protocol. BGP - Border Gateway Protocol According to Wikipedia currently we are using the version (BGP4), which was published as RFC 4271 in 2006. BGP4 has been in use on the Internet since 1994. Basically the world was changed by the 3 napkin protocol, the story and the picture are on Network Collective Podcast. Its simplified finite state machine can be found on Wikipedia. ...

December 8, 2017 · 4 min

Finite State Machines (FSM)

Great approach of understanding how the protocol or program should work is to check it’s FSM - Finite State machine. It describes the processes of protocol, where it starts and how and where it ends. STATE 1 -> STATE2 -> STATE3. For example we can check the TCP FSM on tcpipguide.com. There you can see the procedure of syn, synack, ack. Also we can see how connection is being closed using Fin or timeouts. ...

December 8, 2017 · 1 min

ARP - Address Resolution Protocol

ARP resolves the mapping issue between two different size protocols. It allows to MAP an IP(32 bit) and MAC(48 bit) together. How does it work in a nutshell : Let’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) : As 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 ...

December 8, 2017 · 2 min

A bit of TCP history

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. Link : https://lagunita.stanford.edu/courses/Engineering/Networking-SP

December 4, 2017 · 1 min

VRRP Concepts

Some quick facts : Protocol - 112; Multicast address 224.0.0.18; Preemption Enabled(by default);Priority=100 + highest IP; Timers 1/3.6;Only master sends hellos; **During the re-election all members will send multicast packets with same virtual source MAC - switch may see port flapping in that moment. ** Can’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 ? : ...

November 3, 2017 · 3 min

Error Detection - Checksum

So how does the checksum works ? Both 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’s take the example from one of YouTube videos with a great explanation of how Checksum is working. Taking the numbers which we want to transmit : 25 11 12 7 13 4 Both devices should agree on checksum - let it be number 16 ...

September 29, 2017 · 2 min

A bit info about ICMP, ping and traceroute

I’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 the Internet Control Message Protocol : runs over the network layer, so it’s encapsulated in IP datagrams unreliable, simple datagram service, no retransmission if a message doesn’t reach the destination an ICMP message takes the IP header of the original datagram plus the first 8 bytes of its payload, then gets marked with a type and code. Types and codes are in RFC 792 and the IANA registry host unreachable - the datagram reaches the last router, but that router doesn’t know where the host is port unreachable - the port in the packet isn’t recognized on the receiver’s side How ping uses ICMP : ...

September 28, 2017 · 2 min

The TCP and UDP segment format

Putting this here just for reference as repeating Stanford Networking course. Some of important fields in TCP Segment : Destination port - tells the TCP layer which application should get the bytes on ether end. **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) ...

September 22, 2017 · 2 min

Big and Little Endian

Big endian - most significant byte stored in smallest address, read from left to right. Let’s take a 32-bit value : 0x09080706 : 09|08|07|06 byte address : x|x+1|x+2|x+3 For example 32-bit value 5 writing as 0x00000005 is a Big endian. Little endian - least significant byte is stored in smallest address, read from right to left. 32-bit value would be stored in memory in following way : 0x09080706 : 06|07|08|09 byte address : x|x+1|x+2|x+3 For example little endian value would be 16-bit value **53 **in 0x3500 ...

August 28, 2017 · 1 min

Playing with Arduino

Some scripts for light LED control on arduino : my github Communicating with arduino through serial interface, 0 = turning off the lights, 1 = turning them on. https://www.arduino.cc/en/Reference/Serial Let it blink with different intervals :)

August 25, 2017 · 1 min