Posts

Showing posts from October, 2015

Multicast Routing Algorithms

Image
In this article I’ll expose each multicast routing algorithm that I studied: Flooding, Spanning-Tree, RPB and RPM. Flooding Flooding is the most basic multicast routing algorithm. The way it works is as follows: the router receives a multicast packet on interface Int1 if the packet is “seen” for the first time, then the router duplicates it on all other interfaces. Otherwise, it discards it. The fact of “seeing” the packet or not is trackable by a table entry in the router memory. Flooding does not involve any routing tables. The more links we have the more router memory it consumes. Besides, its loop detection mechanism is weak. Spanning-Tree And I am not referring to the spanning tree protocol . This algorithm was popular among Internet users. Is is based on flooding but instead of doing it all over the place, it is done on each spanning tree. Spanning trees are built on links between routers. A Spanning tree is an active and loop-free path between e...

BGP, The Border Gateway Protocol

Image
Introduction Historically, there was EGP. then came BGP which is a popular Exterior Gateway Protocol . It falls under neither the distance vector, nor the link state family; it is a path vector protocol. Concepts The Border Gateway Protocol is a policy-based routing protocol; we can manipulate the routing packets according to various criteria. It is the protocol with the slowest convergence time.  Without tuning it, it behaves like RIP; path selection occurs based on the hop count, where hops are the autonomous system numbers. The Border Gateway Protocol is used to interconnect between autonomous systems, such as: multihoming Internet connection: when the company has more than one Internet connection with more than one ISP ISP-to-ISP peering. Figure: ISP peering © drpeering.net The Border Gateway Protocol builds path vectors. Each one of them contains: a path to a network prefix ,  and a list of path attributes (for example: the ORIGIN attribute which describes how the prefix was intro...

Autonomous Systems, IGP and EGP

Image
 Interior Gateway Protocols IGP Interior Gateway Protocols are the protocols that run inside an autonomous system. IGPs are all (or most) of the protocols you learned in school (or later in your career): RIP, OSPF, EIGRP, IS-IS,… IGP can be redistributed into EGPs. Exterior Gateway Protocols EGP An exterior gateway protocol is used to route packets between autonomous systems. The most famous one is BGP. EGPs can be redistributed into IGPs. A definition of Autonomous Systems An autonomous system (AS) is a group of IGPs that are administered by the same authority. We can’t really define autonomous systems as a number of routers running one IGP, because there are companies that merge, and their internetworks form one single autonomous system. Autonomous system can mean also the routing process domain. For example, a router that is running an OSPF process number 1 is an autonomous system. Another OSPF process that runs on the same router is another auton...

DNS Name Compression

Image
In this article I explain how the DNS name compression works and I give an example. DNS name compression A DNS response message can contain the same domain name multiple times. This repetition is a waste of bits in the message. A compression technique can be used to reduce the number used bits and replace the repeated domain name by a pointer. A compression label is a pointer that appears in the packet instead of the count byte and the following label items. It is written on 16 bits and has the following format: Figure: the DNS Offset field © IBM.com Remember when I said that the label length of a data label is one byte long, and its value is between 0 and 63? 63 is 00111111 in binary. The pointer, however, has the first two bits set to 1, to differentiate it from data labels. Here is how the pointer is structured : the first 2 bits are set to 1, the 14 remaining bits describe the offset, i.e. the position of the compression target from the beginning of the DNS message. The pointer can...

Distance Vector Protocols: The Bellman-Ford Algorithm

Image
The goal of Distance vector protocols is to build the shortest path from one vertex to all the other vertices, just like the Link State protocols .   The basic concept of a distance vector protocol is to build a distance vector  that contains the shortest path from the source Vertex to each destination C d (d from 1 to n , the number of destinations ).  It’s a set of distances from a router to all the other routers in the topology. The best path to each destination is called least cost path . We will use the terms “metric” and “cost” interchangeably. We also refer to “least cost path” or “shortest path” interchangeably” Also we define “neighbors” as routers directly connected to each other. Routing information is exchanged locally, i.e. between neighbors. Each router starts by learning about its neighbors, then the neighbors of its neighbors, etc. The most common distance vector algorithm used in Distance Vector pro...

Routing Approaches

Image
Here are the major approaches in IP routing. Flooding copies of a packet are flooded on all the network links a packet that arrives to a node is copied to all interfaces except the one on which it came no state is maintained may lead to a loop ensures that the end host gets the packet there is no routing table involved used when we have no idea of the network topology or when we can not trust it used also in some network state transitions Source Routing the work happens at the end host. is a good example of the end-to-end design principle in networking the source host knows about the network topology the source host controls the path of the packet: the source host provides in advance the list of nodes through which the packet traverses. The IP addresses of these nodes are written into the packet there is no routing table involved Spanning Trees Before learning about spanning trees, let’s recall the construct of forwarding tables.  Forwarding table we talked about the forwarding ta...

DHCP - Dynamic Host Control Protocol

Image
I expose in this blog post my DHCP study notes. We aboard the allocation types and the packet format. Then we see a real wireshark trace. In the following sections I refer to DHCP clients and DHCP servers as simply “client” and “server”. DHCP allocation types There are three types of DHCP allocations: dynamic allocation : the basic one. A client is assigned an IP address from the DHCP pool and the address can be revoked or changed automatic allocation : A client is assigned an IP address from the DHCP pool and the address is never revoked manual allocation : A client is assigned the same IP address. And this IP address is not part of the DHCP pool DHCP message format DHCP messages are extensions of BOOTP messages. They basically have the same format except that DHCP adds some fields. The format of a DHCP message is as follows: Message format © support.huawei.com Op : stands for Operations. Identifies whether the message is a request (1) or a reply ...