DATACOM 01 (Life Is at Stake That Time)
DATACOM 01 (Life Is at Stake That Time)
ROUTING
Scopes:
• ROUTING
• What Is Routing?
• Where Are Routers Used?
• Router Connecting to Other Routers. (LAN-to-LAN and LAN-to-WAN)
• What Should Router Know?
• METRICS
• Hop
• Total Hop Count or Sum of cost per network link.
• Reliability
• Dependability (Bit Error Rate) of each network link.
• Delay
• Useful because it depends on bandwidth, queues, network congestion, and physical distance
• Communication Cost
• Operating expenses of links (private versus public)
• Bandwidth and Load
• THE KNOWN ALGORITHMS
• Routing Table
• Routing Component
• Routing Algorithm
• Flooding
• Distance Vector
• Link State / Dijkstra’s Algorithm
• Bellman-Ford’s Algorithm
• ROUTING PROTOCOLS
• Routing Protocols
• Static Routing
• Dynamic Routing
• The Known Dynamic Categories
• Distance Vector Routing
• RIP
• IGRP (with EIGRP Included)
• Link-State Routing
• EIGRP (Part Of IGRP)
• OSPF
• AUTONOMOUS SYSTEM
1. ROUTING
• Routing is the process of selecting a path for traffic in a network, or between or across multiple networks.
• Routing -is the process of moving packets from one network to another network using routers
• Router is a networking device that forwards data packets between computer networks. Routers perform
the traffic directing functions on the Internet.
Let Me Explain: Routing Is a Networking Process Tool to Send Packets/Data to other Routers According to the
Destination from the Sender. And Router Is the Device in Order to Connect with Other Routers.
• Routing Basics
• Routers focus about networks and the best path to each network.
• The logical network address of the destination host is used to get packets to a network through a routed
network
• Hardware address of the host is used to deliver the packet from a router to the correct destination host.
• Remote Access
• Remote access is the ability to get access to a computer or a network from a remote distance.
Let Me Explain: Remote Access is just a routing towards to remote networks(Remote access server), by a
client host. The Best Example is VPN.
2. METRICS
• Hop
• The number of times that a packet passes through the output port of one router
• Reliability
• Usually refers to the bit error rate of each network link
• Delay
• The length of time that is required to move a packet from source to destination
• Communication Cost
• A configurable value that on Cisco routers is based by default on the bandwidth of the interface
• Bandwidth and Load
• Bandwidth is the data capacity of a link; for instance, normally, a 10-Mbps Ethernet link is
preferable to a 64-kbps leased line
• Load is The amount of activity on a network resource, such as a router or link
Let Me Explain: These are the known routing metrics to understand the calculation of the routing metric. There Are
Some Routers that Uses Only Hop Count, Bandwidth and Load, Others uses Cost and Bandwidth. All that will be
explain more father in the known Routing Protocols. Which is RIP, IGRP, EIGRP and OSPF. HOP Count is the hop you
travel links through every router, Reliability is a metric unit for how this router would be reliable for error free,
Delay Unit is the time that will wait to send to the router. Cost is just for value for link on how fast dose it
response, Load is a unit for every routers reception to the router, but cost is another term to calculate the
bandwidth how faster the router it gets to one another which made by Cisco as said in the definition. And
bandwidth is a unit for how many packets processed in seconds. Data Per Cycle.
Back in those days, RIP Protocols uses Hop Count Metric to Travel around their neighbors. With the algorithm of
Bellman-Ford’s algorithm they have the information they need to travel to other Networks as simple as that.
OSPF is Lining or Sorted which is Shortest to the last or a bit long short distance path in each network.
EIGRP gets technical with the Use of
ROUTHING ALGORITHM
Routing Table
Routing Table
• The router uses the routing table to determine where to send packets. When a packet is received, it compares the
destination IP address contained in the packet with all known routes in the routing table.
• Routing tables can be maintained manually or dynamically. Tables for static network devices do not change unless a
network administrator manually changes them.
Let Me Explain: Routing tables contain route information; Network addresses represent the path of media connections to a
destination. It’s basically the memory of the router. It Routing Table Updates every time and The Metrics Changes due time
when if its dynamic. So, router can distribute packets to the designated router as fast as possible. Unless if network is static,
so there is no change for that.
View: Global or local
• global: graph of entire
network (routers, links)
• Local: partial knowledge of remote parts of networks [distance vector approach]
Global View of the Network Local View Network
Let Me Explain: Network Algorithms has a lot of classifications. But the difference between Global and Local is how they
distribute packets and how they calculate its information in order to designate its source to designation. Global is huge
whenever its dynamic or static. Even a Dynamic router should still calculate every routes path to find its designation.
Local approach in private networks (either public). It handles remote networks to distribute packets from either source to
designation
Centralized or decentralized
• One node maintains view, and distributes routes to other nodes
• All nodes maintain view
Centralized
• A type of network where all users connect to a central server, which is the acting agent for all
communications. This server would store both the communications and the user account information. Most
public instant messaging platforms use a centralized network. Also, called centralized server-structure.
Decentralized
• Decentralized computing is the allocation of resources, both hardware and software, to each
individual workstation, or office location. In contrast, centralized computing exists when the majority of
functions are carried out, or obtained from a remote centralized location. Decentralized computing is a
trend in modern-day business environments.
Let Me Explain: Our Network would be like this and its how we connect to the internet is something like Centralized, well
centralized connects to all in one Route. Decentralized is a bit clustered and it has it own other (remote) networks* and
connects to the main network. Basically, connects to other topologies. Because Centralized Stays in one topology .
Static or Dynamic?
Static:
• Infrequent route changes
• Infrequent view update
• Static link cost (e.g. up/down)
Dynamic:
• Frequent Periodic rout changes
• Frequent view update;
dynamic link cost (e.g. delay)
Flooding is a routing technique in which all the routing nodes participate in routing of all the packets, irrespective of source and
destination.
The routing nodes neither require any information about the network topology nor share link information with their neighbors
or any other node in the network.
As there is no exchange of routing information, this does not lead to communication overhead. Still, this routing technique has
maximum utilization of the network resources, as it floods the network with data packets. The technique uses a wave‐like
transmission of data packets from source towards destination across all links. The source node sends the packet across all its
interfaces to its neighbors.
Let Me Explain: Flooding is the simplest Routing, because its sends the packet to all routers exist in the topology until it reaches
its destination. The purpose of this is to instantly send the packet immediately to the destination for short.
Pseudocode
1 Initialization:
2 N = {A}
3 for all nodes v
4 if v adjacent to A
5 then D(v) = c(A,v)
6 else D(v) = infty
7 Next
8 Loop
9 find w not in N such that D(w) is a minimum
10 add w to N
11 update D(v) for all v adjacent to w and not in N:
12 D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N
Let Me Explain: The Algorithm Works on Which is the Lowest Counts That the Algorithms Detects. In this Example we only
know the Routing Table of A because it starts from A. Even computing all of them will be the same processes or the same
calculation of this algorithm in this example. (if the Routing protocol uses Link-State. (Which where this algorithm uses))
The Bellman-Ford Algorithm by contrast can also deal with negative cost.
These can for example occur when a taxi driver receives more money for a tour than he spends on fuel. If he does not transport
somebody, his cost are positive.
Let Me Explain: According to this logic, there are 3 main process and two sub process which that would be the part of the
main process. Of course we need to initialize all the nodes first from start to all nodes and. The Start’s value would be 0
and the rest is infinity, because we havent calculate it. The First For Process aka the Initialization also initizialise the
number of times to calculate all nodes. The number of the nodes the number of process to loop.
Relaxation is another Discrete Mathematics Term for knowing someones problem to easy to solve, meaning if you cant
solve this node, then solve that other one to make it easier to solve.
Negative Cycle or Negative Circle, is just a problem that algorithm can detect it, because negative circle which the value of
the total link greater then the value of the links then that would be a negative link according to the line if (d[v]> d[u] +
w(u,v))). This is Computer Science topic so I’m stopping here now. The point is From Starting point, flow the length of each
related node update them until all the values of the nodes are now leased and fixed. Here’s an example.
This is the Graph, the process in this Graph is Initialization, and every Nodes or Vertex are set to Infinite.
Let Me Explain: this is the first Iteration The S is the Starting Point S has Two Edge or Links that connects to Vertex E and A.
That Depends on the Link’s Value though (Which is the COST). Same as Every Nodes Starting A to E. Just to Remember the
logic The Value of Node S = 0 because that’s the cost’s Source and adding the length Cost is equal to the next hop that is
why A = 10 and E = 8. This is what you call Relaxation in Computer Science as far as I know.
If there is source of the node is infinite, nothing will change, you have to skip this because there is no cost source was
given. Same as others.
All of these is the end of the first Iteration or the first loop. So in the algorithm it will do it again five times. Until all of these
nodes has still some changes in the table at least to make it least all of these nodes.
Take At Look at the Vertex B going through A, It dint change because the point of goal is find the least value of then vertex
so logically Source Cost = 10 + Link Cost or Cost of the Length = 1 then Target Value of A = 11 and the Destination of the
Value of A = 10 so it won’t be change. And it will be skipped. But Unfortunately, going through D to A and C, has some
changes. Because D’s Cost Source = 9 + cost length (-4) to A =5 and D’s Cost Source = 9 + length (-1) to A = 8. Since they’re
the least, they will be replaced from A = 10 and C = 12 to A= 5 and C= 8. Showing below. Same as other Nodes cost length
changes too.
The Rest of the Iteration never change and the Final Table is the last slide of this paper. That’s the End of the algorithm and
that’s the calculations by using Bellman Ford’s Algorithm.
Some Explanation of The Algorithm Detects A Negative Circle
If the graph contains a circle with a negative sum of edge weights – a Negative Circle, the algorithm probably will not find a
cheapest path.
As can be seen in the example on the right, paths in this case can be infinitely cheap – one keeps on going through the circle.
This problem occurs if the negative circle can be reached from the starting node. Luckily, the algorithm can detect whether a
negative circle exists. This is checked in the last step of the algorithm.
A negative circle can be reached if and only if after iterating all phases, one can still find a short-cut. Therefore, at the end the
algorithm checks one more time for all edges whether the cost of the source node plus the cost of the edge are less than the
cost of the target node. If this is the case for an edge, the message "Negative Circle found" is returned.
One can even find the negative circle with the help of the predecessor edges: One just goes back until one traversed a circle
(that had negative weight).
A cheapest path had to use this circle infinitely often. The cost would be reduced in each iteration.
ROUTING PROTOCOLS
A routing protocol specifies how routers communicate with each other, disseminating information that enables them to select
routes between any two nodes on a computer network
“The prime functionality of the router is to find the best path between two or more nodes that may belong to different networks
connected together.”
Routed protocols used between routers to direct user traffic; also, called network protocols
– Examples: IP, IPX, DECnet, AppleTalk, NetWare, OSI, VINES
Routing protocols used between routers to maintain routing tables
– Examples: RIP, IGRP, OSPF, BGP, EIGRP
STATIC ROUTING
• It is configured by administrators manually
• Mandatory need of destination network id
• It is secure and fast
• Used for small organizations with a network of 10-15 routers
• Administrative distance for static route is 0 and 1.
DYNAMIC ROUTING
• Function(s) of Dynamic Routing Protocols:
• Dynamically share information between routers.
• Automatically update routing table when topology changes.
• Determine best path to a destination.
• Rapid Convergence
DYNAMIC ROUTING PURPOUSE
• The purpose of a dynamic routing protocol is to:
• Discover remote networks
• Maintaining up-to-date routing information
• Choosing the best path to destination networks
• Ability to find a new best path if the current path is no longer available
• Distance vector protocols
• Link-state protocols
Classifying Routing Protocols
• Dynamic routing protocols:
• RIP
• A distance vector interior routing protocol
• IGRP
• The distance vector interior routing developed by Cisco (deprecated from 12.2 IOS and later)
• EIGRP
• The advanced distance vector interior routing protocol developed by Cisco
• OSPF
• A link-state interior routing protocol
• IS-IS
• A link-state interior routing protocol
• BGP
• A path vector exterior routing protocol
RIP (Routing Information Protocol) is a forceful protocol type used in local area network and wide area network. RIP
(Routing Information Protocol) type is categorized interior gateway protocol within the use of distance vector algorithm.
Routing information protocols defined in 1988. It also has version 2 and nowadays both versions are in use. Technically it is
outdated by more sophisticated techniques such as (OSPF) and the OSI protocol IS-IS.
• RIP prevents routing loops by implementing a limit on the number of hops allowed in a path from source to
destination.
• The router transmits its routing table along all its interfaces to the neighboring routers every 30 s. However, a router
may be configured not to broad- cast the routing information along one or more of its interfaces, but to continue to
receive updates along the same interfaces.
• RIP Metrics is Hop Count.
• The maximum number of hops allowed for RIP is 15, which limits the size of networks that RIP can support. A hop
count of 16 is considered an infinite distance and the route is considered unreachable.
RIP
ALGORITHIM USED: Distance Vector Routing, so in other words the known Distance Vector Routing is The Bellman-ford’s
Algorithm. If you’re familiar with logic behind it, you may use the algorithm with this application.
Let Me Explain: Like from the example of Distance Vector Routing, It uses Counting To Infinity in any case if the link went wrong
traveling through affected nodes.
• By default, the IGRP routing protocol uses bandwidth and delay as metrics.
• Additionally, IGRP can be configured to use a combination of variables to determine a composite metric.
• Those variables include:
• Bandwidth
• Delay
• Load
• Reliability
• The metrics that IGRP uses are:
• Bandwidth – The lowest bandwidth value in the path
• Delay – The cumulative interface delay along the path
• Reliability – The reliability on the link towards the destination as determined by the exchange of keepalives
• Load – The load on a link towards the destination based on bits per second
• NO… MTU – The Maximum Transmission Unit value of the path. MTU has never been used by IGRP or
EIGRP as a routing metric.
• IGRP has an administrative distance of 100, more “trustworthy” than RIP at 120.
• This means a Cisco router will prefer an IGRP learned route over a RIP learned route to the same network.]
Interior
“Interior routes are routes between subnets of a network attached to a router interface. If the network attached to a router is
not subnetted, IGRP does not advertise interior routes.”
• Clarification
• IGRP also advertises three types of routes:
• interior, system, and exterior.
• Interior routes are routes between subnets in the network attached to a router interface.
• If the network attached to a router is not subnetted, IGRP does not advertise interior routes.
Exterior
“Exterior routes are routes to networks outside the autonomous system that are considered when identifying a gateway of last
resort. The Cisco IOS software chooses a gateway of last resort from the list of exterior routes that IGRP provides. The software
uses the gateway (router) of last resort if a better route is not found and the destination is not a connected network. If the
autonomous system has more than one connection to an external network, different routers can choose different exterior
routers as the gateway of last resort.”
IGRP EIGRP
Classful Routing Protocol Classless Routing Protocol
VLSM, CIDR
bandwidth = (10,000,000/bandwidth kbps) bandwidth = (10,000,000/bandwidth kbps) * 256
delay = delay/10 delay = (delay/10) * 256
24 bit metric for bandwidth and delay 32 bit metric for bandwidth and delay
Maximum Hop Count = 255 Maximum Hop Count = 224
No differentiation between internal and external routes. Outside routes (redistributed) are tagged as external routes.
Automatic redistribution between IGRP and EIGRP as long as “AS” numbers are the same.
OSPF’s ALGORITHM
• The calculation is done using the Dijkstra algorithm.
• To perform these calculations, the metrics for each of the links is required.
Let Me Explain: OSPF as we all know that this is a link state routing,therefore OSPF uses the Dijkstra’s Algorithm calculating the
Open shortest First Path.
OSPF’s Metrics
• OSPF uses a metric called “Cost” (E)IGRP = Composite, RIP = Hop Count e.t.c.
• Cost is associated with each outgoing interface along an SPF Tree.
• The cost of the whole path = the sum of the costs of the outgoing interfaces along that path.
• Cisco uses the equation: 108/Bandwidth
• Bandwidth = configured bandwidth of the interface (mind the ‘bandwidth’ command).
• However, this value can be changed with the interface command “ip ospf cost {1 - 65,535}
• Cisco bases the link cost on bandwidth. Other vendors may use other metrics to calculate the link cost.
• When using equipment from multiple vendors, ensure the costs match, or you could end up having
sub-optimal routing.
• Default OSPF costs:
• 10Mbps (Ethernet) = 10
• 100Mbps (Fast Ethernet) = 1
• 100Mbps (FDDI) = 1
• T-1 (Serial Interface, 1.544Mbps) = 64
• 56Kbps (Serial Interface, 1.544Mbps default bandwidth) = 64
• HSSI (45Mbps) = 2