{"id":756,"date":"2024-11-30T11:32:15","date_gmt":"2024-11-30T08:32:15","guid":{"rendered":"https:\/\/itgen.itbumper.com\/?page_id=756"},"modified":"2024-12-14T02:57:41","modified_gmt":"2024-12-13T23:57:41","slug":"0020_cisco-routing","status":"publish","type":"page","link":"https:\/\/itgen.itbumper.com\/?page_id=756","title":{"rendered":"0020_Cisco: Routing"},"content":{"rendered":"<p><span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"0:7\">Extract<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"8:2\">from<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"11:6\">lectures<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"18:2\">on<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"21:13\">routing<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"43:4\">CCNA<\/span> <span class=\"EzKURWReUAB5oZgtQNkl\" data-src-align=\"35:7\">level.<\/span><\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nDynamic Routing\n\n#WILDCARD MASK\n#EX1: 10.0.12.0\/30, then do 32-30=2, count two bits (2+1=3)\n#\tThe network mask will be: 255.255.255.(255-3=252)\n#\tThe wildcard mask will be: 0.0.0.3\n\n#EX2: 10.0.12.0\/28, then do 32-28=4, count four bits (8+4+2+1=15)\n#\tThe network mask will be: 255.255.255.(255-15=240)\n#\tThe wildcard mask will be: 0.0.0.15\n\n#Default route\n#Network route\n#HOST route\n#Floating static\n\n#adjacencies = neighbor relationships\n#lower Metric = superior\n\n#DYNAMIC ROUTING PROTOCOLS\n#\tIGP - Interior Gateway Protocol \n#\t\tWorks in a single AS\n#\t\t\tDistance Vector Protocol = ie RIP, EIGRP\n#\t\t\tLink State Protocol\t\t = ie OSPF, Is-Is\n\n#\tEGP - Exterior Gateway Protocol\n#\t\tWorks between different AS\n\t\t\tPath vector Protocol\t=ie BGP\n###ECMP = Equal Cost Multi Path (balancing)####\n\n#network\t&#x5B;XXX\/Y]\n#\t\t\t  |  |\n#\t\t\t  |\t metric of the route \n#\t\t\t  Administative Distance (AD)\n\n#---------------------------------------------------------------------------------------|\n#Route protocol \t\t|  AD\t|\t\t\t\tMetric based on #\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#Directly connected\t\t|\t0\t|\tTotal cost (1+1+.)\t\t\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#Static\t\t\t\t\t|\t1\t|\tAlways 0\t\t\t\t\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#External BGP\t\t\t|\t20\t|\tPath attributes, ie AS_PATH\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#EIGRP\t\t\t\t\t|\t90\t|\tBased on bandwidth, delay (and + 3 unused metrics)\t|\n#---------------------------------------------------------------------------------------|\n#IGRP\t\t\t\t\t|\t100\t|\tBased on bandwidth, delay (and + 3 unused metrics)\t|\n#---------------------------------------------------------------------------------------|\n#OSPF\t\t\t\t\t|\t110\t|\tCost based on bandwidth\t\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#IS-IS\t\t\t\t\t|\t115\t|\tCost total metric each link\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#RIP\t\t\t\t\t|\t120\t|\tHop count\t\t\t\t\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#EIGRP (external)\t\t|\t170\t|\tBased on bandwidth, delay (and + 3 unused metrics)\n#---------------------------------------------------------------------------------------|\n#Internal BGP\t\t\t|\t200\t|\tPath attributes, ie AS_PATH\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n#Unusable route\t\t\t|\t253\t|\t\t\t\t\t\t\t\t\t\t\t\t\t\t|\n#---------------------------------------------------------------------------------------|\n\n#RIP\n#Max hop count = 15. One router = 1 hop.\n#RIP v1, v2 used for IP v4, \n#RIP(ng) - next generation used for IP v6\n#Two message types: REQUEST=RESPONSE \/ 30 seconds\n\n#v1 - advertises classful addresses (Classs A,B,C)\n#\t- doesn`t support VLSM, CIDR\n#\t- doesn`t include subnet mask information\n#\tEx: 10.1.1.0\/24 --&gt;10.0.0.0 Class A, so assumed to be \/8\n#\tEx: 172.16.192.0\/18 will become 172.16.0.0, Class B, so assumed to be \/16\n#Messages are broadcast to 255.255.255.255\n\n#v2 - supports CIDR, VLSM\n#\t- includes subnet mask information in advertisement\n#\t- messages are multicast 224.0.0.9\n\nenable\n\tconfigure terminal\n\t\trouter rip\t\t\t\t\t\t\t\t\t#to activate RIP protocol\n\t\t\tversion 2\t\t\t\t\t\t\t\t#to set OSPF version\n\t\t\tno auto summary\t\t\t\t\t\t\t#to disable auto summary (shows all route entries) \n\t\t\tnetwork 10.0.12.0\t\t\t\t\t\t#to advertise all interfaces covered by 10.0.0.0\/8\n\t\t\tpassive interface &lt;interface name&gt;\t\t#to deny get advertisements from other routers behind this interface\n\t\t\tdefault-information originate\t\t\t#to share default route to other routers\n\t\t\tdistance &lt;0-255&gt;\t\t\t\t\t\t#to change the Administative Distance\n\t\t\tmaximum-paths &lt;1-16&gt;\t\t\t\t\t#route entries with equal AD will show in routes list (balancing)\n\t\t\tip route 0.0.0.0 0.0.0.0 192.168.1.1\t#to set default route\n\tshow ip protocols\n\t\n\n#EIGRP - Enhanced Interior Gateway Routing Protocol\n#works faster  than RIP\n#doesn`t have limit of hops\n#by default EIGPR metric uses bandwidth + delay\n#bandwidth ot the slowest link + the delay of all links\n#sends messages using muticast address 224.0.0.10\n#can performs unequal-cost load-balancing (by default ECMP load-balancing over 4 paths like RIP)\n\n#&#x5B;XXX\/YYY]\n#XXX = Feasible Distance - router`s metric value to the route`s destination. (full distance)\n#YYY = Reported Distance from neighbor router to the last touter (aka Advertized Distance) \n#Successor - the router with the lowest metric ti the destination (the best route)\n#Feasible Successor - an alternative route to the destination (not the best route) which meeets the feasiblity condition\n#Feasibility condition - a route is considered a feasible successor it it`s reported distance  (RD or AD) is lower than the\n#the successor route`s feasible distance (FD)\n\n#Ex:   FD\n#\t&#x5B;28672 \/ 28416 ]\n#\t&#x5B;30976 \/ 28416 ]\n#\t\t\tRD \/ AD\n\t\t\n#Balancing\t\/ variance &lt;number&gt;\n#Ex for variance 2\n#\t&#x5B;28672 \/ 28416 ] - FD=28672, 28672*2=57344 \/ if variance=3, then 28672*3 etc\n#\t&#x5B;30976 \/ 28416 ] - compare 57344 with 30976, so 30976 is less than 57344, so the route via 30976 can now be used for LB\t\n\n#1. Write the ip address in binary format\n#2. Write the network address in binary format\n#3. Compare bitwise. If equal then 0, if not then 1\n#Ex: Interface IP address 172.16.1.14, Advertisement network 172.16.1.0 - the IP interface address will be add to EIGPR\n#\t\t\t\t\t\t  172.16.1.15, Advertisement network 172.16.1.0 - the IP interface address will be add to EIGPR\n#\t\t\t\t\t\t  172.16.1.7,  Advertisement network 172.16.1.0 - the IP interface address will be NOT add to EIGPR\n#\n#\n\t\troute eigrp &lt;number&gt;\t\t\t\t\t\t#to activate EIGRP protocol. Number must be the same on all routers\n\t\t\tno auto summary\t\t\t\t\t\t\t#to disable auto summary (shows all route entries)\n\t\t\tnetwork &lt;network&gt; &lt;wildcard mask&gt;\t\t#to advertise the network\n\t\t\tnetwork 10.0.0.0\t\t\t\t\t\t#can be advertise this way too\n\t\t\tpassive-interface\t\t\t\t\t\t#to deny get advertisements from other routers behind this interface\n\t\t\tvariance 2\t\t\t\t\t\t\t\t#Feasible Successor routes with an FD up to 2x successor route`s FD\t\n\n\tshow ip eigrp topology\t\t\t\t\t\t\t#to show everything about eigrp on the router\n\tshow ip route eigrp\t\t\t\t\t\t\t\t#to show only eigrp enteries on the route table \n\tshow ip protocols\n\t\n#OSPF - Open Short Path First\n#Stands for:\n#v1 - not in use anymore\n#v2 - used for IP v4\n#v3 - used for IP v6\n#LSA - Link State Advertisement\n#LSDB - Link State Database\n#Every router builds a map\n#Routers will flood LSAs until all routers in the OSPF Area develop the same map of the network (LSDB)\n#LSA`s age time is 30 minutes\n#Backbone = Area 0\n#OSPF areas should be contiguous \n\n#Router ID order of priority\n#1-Manual Configuration\n#2-Highest IP address on a loopback interface\n#3-Highest IP address on a physical interface\n\n#ASBR - Autonomous System Boundary Router (on the edge between AS) - goes outside ie Internet\n#Max path by default is 4\n#ABR - between Areas\n#COST - default reference bandwidth is 100 mbit\/s\n#\treference cost for 10 mbit\/s interface is: 100mbit\/s:10mbit\/s=10\n#\t\t\t\t   for 100 mbit\/s interface is: 100mbit\/s:100mbit\/s=1\n#\t\t\t\t\tbut!\n#\t\t\t\t   for 1000 mbit\/s interface is: 100mbit\/s:1000mbit\/s=1 too, not good! Then do ...\n#\tauto-cost reference-bandwidth 100000\t- it must be applied on all routers\n#\treference cost for 10 mbit\/s interface is: 100000mbit\/s:10mbit\/s=10000\n#\t\t\t\t   for 100 mbit\/s interface is:100000mbit\/s:100mbit\/s=1000\n#\t\t\t\t   for 1 Gbit\/s interface is: 100000mbit\/s:1000mbit\/s=100\n#\t\t\t\t   for 10Gbit\/s interface is: 100000mbit\/s:100000mbit\/s=10\n#\t\t\t\t\t\n\t\trouter ospf 1\n\t\t\tnetwork &lt;network&gt; wildcard mask area &lt;area number&gt;\t#add the network to the OSPF\n\t\t\tpassive interface\t&lt;interface name&gt;\t\t\t\t#to deny get advertisements from other routers behind this interface\n\t\t\tdefault-information originate\t\t\t\t\t\t#to share default route to other routers\n\t\t\trouter-ID &lt;ID&gt;\t\t\t\t\t\t\t\t\t\t#to set router ID\n\t\t\tmaximum-paths &lt;1-32&gt;\t\t\t\t\t\t\t\t#\n\t\t\tdistance &lt;number&gt;\t\t\t\t\t\t\t\t\t#to change distance\n\t\t\tauto-cost reference-bandwidth 100000\t\t\t\t#must be applied on all routers\n\t\tip route 0.0.0.0 0.0.0.0 &lt;IP add&gt;\t\t\t\t\t\t#to set default route. The router becomes ASBR\n\t\tinterface &lt;interface&gt;\n\t\t\tip ospf cost &lt;1-65535&gt;\t\t\t\t\t\t\t\t#to set cost manually on the interface\n\t\t\tbandwidth &lt;kbit\/s&gt;\t\t\t\t\t\t\t\t\t#to set bandwidth on the interface\n\tshow ip protocols\n\tclear ip ospf proccess\t\t\t\t\t\t\t\t\t\t#ie restart OSPF proccess\n\tshow ip ospf interface brief\t\t\t\t\t\t\t\t#\n\tshow ip ospf neighbor\t\t\t\t\t\t\t\t\t\t#\n\tshow ip ospf interface &lt;interface&gt;\t\t\t\t\t\t\t# \n\tshow ip ospf database\n\t\n#There is another way to change cost. Use Bandwidth on the interface. This bandwidth is not the same as D-Link.\n#Cisco uses bandwidth to set counting for OSPF cost, EIGPR metric etc\n \t\n#OSPF Neighbors\n#Hello timers by default is 10 seconds, sends by routers to 224.0.0.5 - Multicast IP Addr for OSPF routers\n#Dead Timer by default is 40 seconds and its counts down. Then 0 and no Hello packets, the neighbor will removed\n#Dead Timer by default For Non Broadcast network is 120 seconds, Hello - 30 seconds\n#IP header in the protocol`s header is 89\n\n#Stages of the port on the router. There are 7 stages\n# Down\n# Init - sends the Hello packet\n# 2-way - it means that router recieved the Hello packet from other router. Now they know each other\n#===now routers become to DR (Designated Router) or BDR (Backup Designated Router)\n# Exstart - the router with higher RID become Master and initiate the exchange\n#\t\t  - the router with the lower RID will become Slave\n#\t\t  - they will exchange DBD (Database Description) packets\n# Exchange - compare its DBD and request only new LSA, than it hasn`t\n# Loadind - loading proccess\n#\t=loading states=\n#\tLSR - Link State Request\n#\tLSU - Link State Update\n#\tLSAck - Link State Acknoledge\n#\tShare LSAs to synchronize LSDB\n# Full - All done.\n\n#The other way to add the interface to the OSPF proccess\n\t\tinterface &lt;interface&gt;\n\t\t\tip ospf &lt;proccess number&gt; area &lt;aren number&gt;\n\t\t\t\n#It is possible to make all interfaces passive and then add the interface manually\n\t\trouter ospf &lt;ospf number&gt;\n\t\t\tpassive-interface default\n\t\t\tno passive-interface &lt;interface&gt;\n\t\t\t\n#OSPF Network Types\n# Broadcast \t\t- Ethernet and FDDI (DR+BDR)\n# Point to Point \t- PPP and HDLC (no DR and no BDR) \n# Non-Broadcast\t\t- Frame Relay and X.25\n\n#DR and BDR must be elected on each subnet (Only DR if there is no OSPF neighbors)\n#Routers are not the DR or BDR become a DROther\n\n\n#DR and BDR election ordered of priority\n# Highest OSPF interface priority (by default they are the same = 1)\n# Highest OSPF Router ID\/ First place becomes DR for the subnet, second place becomes BDR\n# If OSPF interface priority set to 0, then it will not become DR or BDR for the interface subnet\n# If OSPF interface priority set to 255 it makes this router DR\n# To apply changes use command clear ip ospf proccess\n# Each router can exchange LSA only with DR or BDR. DRother routers don`t exchange LSA at all.\n\n#PPP Network Type\n#The default encapsulation is HDLC\n\t\tint S1 \t#Serial\n\t\t\tencapsulation ppp\n\t\t\tclock rate &lt;bits per second&gt;\n\tshow controllers &lt;interface ID&gt;\n\n#To change P2P to Broadcast\n\t\tinterface &lt;interface&gt;\n\t\t\tno ip ospf network point-to-point\n\n#OSPF Neighbor Requirements\n# 1.Area number must match\n# 2.Interfaces must be in the same subnet\n# 3.OSPF proccess must not be shutdown\n# 4.OSPF routers ID must be unique\n# 5.Hello and Dead timers must match (no ip ospf hello-interval , no ip ospf dead-interval)\n# 6.Authentication settings must match (to enable use ip ospf authentication)\n# 7.IP MTU settings must match. If not you can`t reach Full State. (ip mtu &lt;bits&gt;)\n# 8. OSPF network type must match. (You can see Full State, check the routing table)\n\n#LSA TYPES\n#The OSPF LSDB is mase up of LSAs. There are 11 types of LSA, but only 3 should be aware of the CCNA\n# Type 1 - Router LSA\n# Type 2 - Network LSA\n# Type 5 - AS External LSA\n\n#Type 1\n#Every OSPF router generates this type of LSA\n#It identifies the router using its router-ID\n#It also lists networks attached ti the router`s OSPF activated interfaces\n\n#Type 2\n#Generated by the DR of each &quot;multi-access&quot; network (ie the broadcast network type)\n#List all routers which are attached to the &quot;multi-access&quot; network\n\n#Type 5\n#Generated by ASBR to describe routes to destination outside the AS (OSPF Domain)\n\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>Extract from lectures on routing CCNA level.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/756"}],"collection":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=756"}],"version-history":[{"count":3,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/756\/revisions"}],"predecessor-version":[{"id":838,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/756\/revisions\/838"}],"wp:attachment":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}