RIP (Routing Information Protocol)

  • RIP is purely distance vector protocol
  • Distance vector – means how much distance in which path to reach destination
  • Whenever updates are sent, the network information contain two aspects about the network
    1. Distance – how far the network is.
    2. Direction – what is the way to reach that network
  • Distance vector algorithm helps the router share only a small amount of information with each other.
  • Distance vector routing algorithm follows routing by rumours
  • Updates are periodically sent (every 30 seconds), the entire routing table is shared within each update.
  • Updates are broadcasted
  • Distance vector algorithm intermix two concepts:
    1. Router announcing its presence
    2. Router sharing network information
  • RIP calculate distance using hop counts. (means no of routers between to reach network)
  • RIP is made for homogeneous networks (in the context of cable speed)
  • RIP is made for smaller networks
  • The maximum allowable hop counts in RIP is 15 hops, if a network is 16 hops away from a router, then the network considered as unreachable.
  • RIP has AD – 120
  • Administrative distance:
    1. Means the trustworthiness of the protocol
    2. Route with lower AD value is preferred first in routing table.
  • RIP uses bellman-ford-Fulkerson algorithm
  • RIP has two version for IPv4
    1. RIPv1
    2. RIPv2
  • RIP is open standard protocol
  • RIP timers:
    1. Update timer – 30 seconds
    2. Invalid timer – 180 seconds
    3. Hold down timer – 180 seconds
    4. Flush timer – 240 seconds
  • RIP supports load balancing (6 equal paths)
  • RIP uses Classful routing (subnetting not supported)
  • Configuration:
    • router(config)# router rip
    • router(config-router)# network <network address>
  • Network command is used to enable RIP process on that interface
  • RIP uses UDP as its transport protocol and is assigned the reserved port no 520.

Timers in RIP:

  • Update timer: This is how often we send routing updates, the default is every 30 seconds
  • Invalid timer: the number of seconds since we receive the last valid update, once this time expires the route goes into hold down time. The default is 180 seconds
  • Hold down timer: the number of seconds that we wait before we accept any new update for that route that is in the hold down, the default is 180 seconds
  • Flush timer: how many seconds since we received the last valid update until we throw the route away, the default is 240 seconds
  • Graph:
  • Here invalid timer (180 seconds) and flush timer (240 seconds) start at the same time
  • Once the invalid timer expires, the hold down timer starts running ….. 60 seconds, later the flush timer is expired and the route is removed from the routing table, because of this the hold down timer is active for 60 seconds, not 180 seconds (as per above graph)
  • What happened when the route in the hold down timer is learning from another router with lower metric during the hold down time
  • Unfortunately the router doesn’t care about it all….the route remains in hold down time.

RIP features:

  • Split horizon:
    • The network information that a router learns on an interface cannot be sent back via that same interface
  • Route poison:
    • It is a method of quickly forgetting invalid route information from other router’s routing tables by changing its hop count to be unreachable (16 hops) and sending a routing update.
  • Triggered updates:
    • Whenever there is any change with network information (topology change) it is forwarded immediately without waiting for the periodic timer.
  • Counting to infinity:
    • Count to infinity is there in RIP to get avoid loops.
RIPv1RIPv2
Supports Classful (Subnet mask not send in updates)Supports classless (Subnet mask is send in updates)
Uses broadcasting (255.255.255.255)Uses multicasting (224.0.0.9)
Supports triggered updatesSupports triggered updates
No authentication supportSupports authentication Plain text    2.  MD5 (encryption)

ACL (Access Control List)

Q. what is the purpose of access control list?
Ans. ACLs are used to match the traffic.
Q. what is traffic?
Ans. Traffic is a flow of data from a source to destination.
Q. why do we match traffic?
Ans. We match the to take permit or deny decisions on the traffic, that weather the traffic will be allowed to go, or it will be dropped.

  • Access control list act as very good security tools.
  • ACLs are used to exercise control over network traffic.
  • ACL is a list as the name says, and it can contain multiple statements within it.
  • With the help of those statements we either match traffic or unmatch traffic.
  • Matched traffic is allowed  – permit statement
  • Unmatched traffic is dropped  – Deny statement
  • With ACLs router works as packet filtering firewall
  • Router takes filtering decisions based on L3 header and L4 header
    • L3 header contain source IP, destination IP, protocol number.
    • L4 header contain source port, destination port numbers.
  • To perform network traffic filtering we apply the ACL on the interface of a router.

Access Control List Rules:

  • The traffic is compared to the Access Control List statements in a sequential order (top to bottom).
  • The moment there is a match with a particular statement, then the associated action is taken and no further comparisons are done.
  • Every ACL contains an invisible statement which is placed at the bottom of the Access List.
  • This statement says deny everything else.
  • We do not have to configure this statement.
  • This invisible statement is also called implicit deny statement.
  • Implicit deny can be overridden by “permit any” statement.

Types of ACLs:

  1. Standard ACL : (1-99)
    • With standard ACLs we can only match the source address for the traffic.
    • With standard ACLs we cannot match traffic specifically.
  2. Extended ACL : (100-199)
    • With extended ACLs we can match source address, destination address, protocol for the traffic.
    • We can match traffic specifically with an extended ACL.

Differences between Standard – Extended ACL

Standard ACLExtended ACL
It takes decisions based on the source IP.It can take decision based on source IP,
destination IP, Protocol, source port, destination port.
Implemented close to destination.Implemented close to source.
ACL number range: 1 – 99.ACL number range: 100 – 199.
Works on both direction.Works on single direction.
Works on all services.Can work on single service.

Note:

  • We know that ACLs are applied on the interfaces of a router to perform network traffic filtering.
  • But an ACL can be applied on an interface of a router in one of the two directions.
    1. Inbound
      • Inbound means while coming into the interface we match with the statements and decide to allow or deny.
    2. Outbound
      • Outbound means while going outside the interface we match with the statements and decide to allow or deny.
  • Two different formats for configuring ACLs
    1. Numbered Access List Format:
      • With numbered access list format, we can only make numbered ACLs.
      • Ex:    access-list 100
      • Numbered ACL can’t be modified once created.
      • Number ACL has limited number range to create ACL’s
      • To overcome these limitation, named ACL is introduced.         
    2. Named Access List Format.
      • With named access list format, you can make both numbered and named ACLs.
      • Ex:    ip access-list extended
      • Named ACL have no limitation. ( as alphanumerical names are unlimited)
      • Named ACL are case sensitive.
      • With named ACL format we can delete particular statement from the ACL.
      • We can insert a particular statement between two already configured statements. (ACL order can be changed)
      • These configured statements automatically get sequence numbers.
      • Sequence numbers start from 10 and they can increment by 10
      • Example:   
        • 10 statement
        • 20 statement 2
        • 30 statement 3
      • If you want to delete any particular statement, then just no to the sequence number of that particular statement.
      • Ex:      no 20
      • If you want to insert a new statement between two already configured statements, then just 15 statement or 25 or 35.
      • Example:   
        • 10 statement 1
        • 15 statement
        • 20 statement 2
        • 30 statement 3

ACL Implementation:

  • First understand the requirement.
    • First understand need to implement ACL.
    • Which traffic should be denied and which traffic should be allowed.
  • Identify source IP, destination IP, protocol, source port, destination port.
    • Identify Ip addresses from which to which the traffic should be filtered.
    • Identify IP protocols to filter the traffic.
    • Ex: TCP, UDP, IP, EIGRP, ICMP, OSPF….
    • Identify TCP/UDP ports that should be filtered.
    • Ex: HTTP, FTP, DNS, SMTP, TELNET…..
  • Select the type of ACL (standard/extended) to implement.
    • Select standard or extended ACL which is best suitable for the task.
    • Standard ACL is a subset of extended ACL.
    • Extended ACL can be implemented for all types of scenarios.
  • Identify the traffic flow (in bound/out bound)
    1. In bound:  The traffic entering into the router.
      • It filters the traffic before the packet is processed, does not consumes router resources.
    2. Out bound:  The traffic leaving from router.
      • It filters the traffic after the packet is processed, consumes router resources.
  • Select the router as a filtering point.
  • Create the ACL on the router and implement ACL on appropriate interface.
    • Create ACL in global configuration mode.
    • Implement ACL on one of the interface, in interface mode.

Differences between Numbered and Named ACL:

Numbered ACLNamed ACL
Numbers are used:
Standard: 1-99               
Extended: 100-199
Alphanumeric names are used:
Standard: ccna
Extended: ccnp23
Names are unique and sensitive.
Can’t be modifiedCan be modified
Statement order can’t be changedStatement order can be changed
Limited featuresEnhanced features
Types: standard & ExtendedTypes: standard & Extended

NAT (Network address translation)

  1. What is NAT?
    • Network address translation
    • All the LANs uses private IP addressing scheme
    • Private IP addresses are not routable in public networks
    • To access public network public IP is required
    • Systems with in the LAN communicate with private IP addresses, these private IP addresses are translated into public IP addresses while accessing public networks (internet)
    • When reply come back, public IP address are translated back to private IP addresses before forwarding data to systems
    • Private to public and public to private IP translation is called NAT
    • Generally NAT operations are taken care by router
  2. NAT terms:
    • Inside local – an inside device with an assigned private IP address
    • Inside global – an inside device with a mapped public IP address
    • Outside local – an outside device with an assigned private IP address
    • Outside global – an outside device with a mapped public IP address
  3. Types of NAT:
    1. Static NAT:
      • In static NAT one private IP address is mapped to one public IP
      • Also called as 1 to 1 NAT
      • It is not possible to map every private IP to public IP
      • Generally static NAT is used for public servers
    2. Dynamic NAT:
      • In Dynamic NAT a group of private IP addresses are mapped to a pool of public IP addresses
      • NAT comes dynamically on first come first serve basis
      • Access-list is created to specify a group of private IP addresses
      • A pool is created with public IP addresses
      • Access-list is mapped with the pool.
    3. PAT (Port address translation):
      • Port address translation
      • Overloading of NAT is called PAT
      • In PAT all the private IP addresses are translated to a single public IP address
      • Router uses source number as a reference to avoid ambiguity in translations
      • If source port is also same, translate that port to a random value and memorize them in cache.
      • When the reply come back, public IP address is translated to private IP addresses with source port reference.
      • Translated port numbers are changed to original value.
      • With PAT multiple systems can access public network with a single public IP address

STP (SPANNING TREE PROTOCOL)

STP is used by switches to avoid loops.

  1. Q. How loops are formed?
    • Ans. When a designer goes for a redundant design then loops are formed.
  2. Problems that come with loops?
    • Broadcast storms
    • MAC address table corruption
    • Multiple copies of the same frame revolve around the network.

STP Terms and Terminologies.

  1. Root Bridge:
    • Root Bridge is elected with in a switches network.
    • Root Bridge is considered as the focal (center) point of the switched network.
    • All the other switches find that which of their ports will be blocked and which of their ports will be kept in forwarding state from the perspective of the root bridge.
  2. Root Bridge Election:
    • Root Bridge is elected on the basis of bridge ID.
    • Bridge ID is an 8 byte value, and it is made up of two parts:
      1. Bridge priority (2 Byte) lower preferred.
      2. Bridge MAC address (6 Byte) lower preferred.
  3. Non Root Bridge:
    • Bridge which are not Root Bridge are Non Root Bridges.
    • All the Non Root Bridges find only one best path going towards the Root Bridge, and they keep the path open. But all the other alternate paths going to the Root Bridge from the Non Root Bridge are blocked.
  4. Port Cost:
    • Each port is assigned a cost by Spanning Tree Protocol, and using this cost the Non Root Bridge finds that which path is the best and which is not.
      1. Ethernet : 100
      2. Fast Ethernet : 19
      3. Gigabit Ethernet : 4
      4. 10 Gigabit Ethernet : 2
  5. BPDU (Bridge Protocol Data Unit):
    • Switches communicate to each other in STP and perform all the jobs of STP using Bridge Protocol Data Unit Messages.
    • BPDUs are sent every 2 seconds out of all ports of a switch.
    • BPDU contains many fields within it:
      1. Sender Bridge ID
      2. Root Bridge ID
      3. Root Path Cost: The distance from a Bridge to reach the Root Bridge.
  6. Initial root bridge election process:
    • Initially when we connect switches, then all of them will think they are Root Bridge.
    • Once they start receiving each other BPDU’s then they compare their bridge ID’s.
    • Lower bridge ID is preferred and finally Root Bridge is elected.
    • Only the root bridge originates BPDU messages.
    • Non Root Bridge do not originate BPDU messages, they forward those BPDU’s that they receive from Root Bridge.

STP Port Roles:

  1. Root Port Role
    • Root port is not elected on the Root Bridge.
    • Root port is only elected on the Non Root Bridge.
    • Through the Root Port from a Non Root Bridge it is the shortest to reach the Root Bridge.
    • Only one Root Bridge is elected on a Non Root Bridge.
  2. Designated Port Role
    • Designated port is that port through which BPDUs are sent.
    • BPDUs cannot be sent via Root Port or Blocked Port.
    • Designated port becomes that port on a segment, which provides a better path to reach the Root Bridge.
    • In each segment one designated port is elected for sure.
  3. Blocked Port Role
    • Blocked port role is assigned to that port which could neither become a Root port nor designated port.

How the superiority is claimed in STP?

  • Superiority is claimed in STP with the help of BPDU messages.

How the superiority of BPDU is claimed?

  • Lowest Root Bridge ID (Root Bridge is elected)
  • Lowest Root Path cost (used to elect the Root port)
  • Lowest Sender Bridge ID
  • Lowest Sender Port ID

Note: The moment a BPDU enters a Port, The cost of that port is added to the Root path cost field.

STP Port states:

  • When the switches are first connected, they start talking each other in STP using BPDU messages, and it takes some time for them to assign roles to their ports.
  • So we have to give some time to the switches to first assign the port roles and make the port go into Forwarding state or blocking state depending on the port roles that they got assigned with.
  • Port States:
    1. Disabled
      • Disabled is technically not an STP state.
      • Because disabled state means that the port is non-operational.
    2. Listening
      • When the port is first started the port remains in listening state for 15 seconds.
      • This state is dedicatedly given to that it can send and receive BPDUs and define the port roles.
      • During this state the actual data cannot be forwarded.
      • MAC addresses cannot be learnt on ports during this state.
    3. Learning
      • After listening state, the port jumps to learning state and spends another 15 seconds in learning state.
      • In learning state the port can start learning MAC addresses, but still data cannot be forwarded.
    4. Forwarding
      • In this state the actual data can be forwarded.
      • BPDUs can be sent and received according to the role which the port has got.
      • MAC addresses can be learnt.
        • Root Port: Forwarding State
        • Designated: Forwarding State
    5. Blocking
      • MAC addresses cannot be learnt.
      • Actual data cannot be forwarded.
      • BPDUs cannot be sent.
      • But BPDUs can be received.

Types of Spanning Tree Protocol:

  1. IEEE 802.1D (Common Spanning Tree)
    • Open standard
    • For all VLANs there is a single instance of Spanning Tree running.
    • There will be a single logical loop free topology.
    • Load balance is not possible with IEEE 802.1D.
    • Utilizes less CPU.
  2. Per VLAN Spanning Tree
    • Cisco Proprietary
    • Each VLAN has its individual instance of Spanning Tree running.
    • Load balancing is possible with PVST.
    • Utilizes more CPU.
  3. Rapid Spanning Tree (802.1W) (802.1D-2004)
    • Open Standard
  4. Rapid Per VLAN Spanning Tree
    • Cisco proprietary
  5. Multiple Spanning Tree (802.1S)
    • Open standard

Inter VLAN Routing

  • Inter VLAN routing means communication between different VLANs.
  • We know that communication between VLANs is not possible at layer 2.
  • If we want different VLANs to communicate with each other, we want layer 3 concept.
  • This is why we call Inter VLAN communication – Inter VLAN routing.
  • From the 1st method we observe that for every VLAN we have to connect a physical link to router to perform IVR. It is difficult when there are many VLANs.
  • So they come up with the 2nd method Router on a stick.
  • To support ISL or 802.1q routing on a fast Ethernet interface, the router’s interface is divided into logical interfaces – one for each VLAN – as shown in the figure.
  • These are called sub interfaces.
  • You can set the interface to trunk with the encapsulation command.
  • In the 2nd method also there are some limitations (Bottle neck), to overcome that we have to use a gigabit Ethernet port for IVR.
  • This limitation is overcome in 3rd method. (IVR using MLS)

In this method IVR is done by using layer 3 switch, by enabling ip routing on it.

VLAN Trunking Protocol

  • VTP is a cisco proprietary protocol.
  • VTP is used to share VLAN information automatically between cisco switches.

There are few things that are taken into consideration when configuring VTP.

  • The switches need to belong to the same VTP domain if you want them to share VLAN information automatically.
  • VTP updates can only be sent via trunk ports, they cannot be sent via access ports.
  • VTP has authentication feature, so if authentication is enabled then the passwords must match on all the switches.
  • If a switch belongs to VTP domain null (nothing), then such a switch cannot originate VTP messages.
  • By default cisco switches are configured with VTP domain NULL.
  • A switch can be kept in one of VTP modes.
    • VTP server switch
    • VTP client switch
    • VTP transparent switch
  • These modes define how a switch will behave in VTP:
    • How the switch will send VTP messages.
    • And how the switch will receive VTP messages.
  • VTP server switch is that switch we create, delete and modify VLANs.
  • VTP server switches send updates with the help of which they provide VLAN information to other switches.
  • VTP client switch receives information from VTP server switch, you cannot create, delete and modify VLANs on client switch.
  • By default all the switches are in VTP server mode.
  • BY default VTP is enabled on cisco switches.
  • Configuration revision number value.
    • CR number starts from 0 on all the switches, be it server switch, client switch or transparent switch.
    • Whenever there is a change in the VLAN database, this value is incremented by 1.
    • CR number value always remains 0 on the transparent switch.
  • Transparent switches do not process VTP updates themselves, but they do act as a VTP relay agents.
  • VTP Transparent switches maintain its own local VLAN database that it does not shares with anyone.
  • It does not originate VTP messages itself.

VLAN Tagging

  • On trunk ports VLAN tagging occurs.
  • VLAN tagging does not occur in access ports.
  • There are two techniques for VLAN tagging:
    1. DOT1q (open standard : IEEE 802.1q)
      • DOT1q adds only a 4 byte field on the data with the help of which it helps identify the VLAN to which the data belongs to.
      • A 4 byte tag is added within the Ethernet header.  (between SMAC and Ethertype)
      • DOT1q tag – 4 byte:
        • VLAN ID (12 bit field)
        • TPID  (Tag Protocol Identifier) (2 byte)
        • Priority (3 bit)
        • CFI (Canonical Frame Identifier) (1 byte)
      • Native VLAN concept is there in DOT1q
      • Native VLANs data goes untagged via trunk ports.
    2. ISL (cisco proprietary  : Inter Switch Link)
      • ISL adds 30 bytes on the data with the help of which it does the same job that DOT1q does.
      • Even cisco recommends us to use DOT1q instead of ISL.
      • 26 byte ISL header is added in front of Ethernet frame and 4 byte of ISL trailer is added at end.
      • Native VLAN concept is not there in ISL.
  • It is recommended to set native VLAN to a VLAN number which is not even being used within the network.
  • Native VLAN concept is a bogus concept in today’s world.

DTP (Dynamic Trunking Protocol)

  • DTP is a Cisco proprietary protocol.
  • DTP is used by cisco switches to find weather the other switch automatically wants to negotiate trunk or not.
  • If both the switches agree to negotiate trunk, then automatically trunk is formed.
  • DTP by default runs on all the ports of cisco switches.
  • DTP messages are sent every 30 seconds.
  • DTP modes:
    1. Dynamic auto
      • Dynamic auto mode prefers to remain access port, but if someone willing to asks dynamic auto mode to negotiate trunk, then it does negotiate trunk automatically.
    2. Dynamic Desirable
      • Dynamic desirable mode prefers to become trunk port.
      • So it sends DTP messages inside in which it willingly says that  “lets become trunk”
    3. On
      • On mode of DTP is achieved when you forcefully make a port trunk port.
      • If a port has been made trunk port forcefully then it does not care if the other end becomes trunk port or not, but make itself trunk port.
  • Advantages of DTP:
    1. Administrative labour is reduced.
    2. Misconfiguration will also be reduced.
      • DA    –     DA      (not form trunk)
      • DA    –     DD      (forms trunk)
      • DD    –     DA      (forms trunk)
      • ON    –     DA      (forms trunk)
  • DTP not only negotiate trunk, DTP negotiate trunk encapsulation also.
  • Configuration – #switchport trunk encapsulation negotiate
  • To disable DTP –  #switchport mode nonegotiate

OSPF (Open Shortest Path First)

OSPF is a Link State Routing Protocol

Link state algorithm:

  • Detailed information about the topology is shared with in the updates.
  • When a router get this detailed information, then the Djikstra algorithm on that router uses that detailed information to make the map of the whole topology.
  • Once the map of the topology is ready, then the Djikstra computes the best paths to forward data to all networks which are within the topology.
  • Loops are avoided with link state algorithm as the whole view of the topology is there with each router.

Other features of OSPF

  • Maximum allowable hop counts are infinity.
  • OSPF is always classless
  • OSPF uses multicasting (224.0.0.5,224.0.0.6)
  • OSPF has authentication feature support.
    • 0   -Null Authentication
    • 1   -Plaintext Authentication
    • 2   -MD5 Authentication
  • OSPF has AD 110.
  • OSPF calculate distance on the basis of bandwidth.

               Cost = 10^8/Bandwidth    in Bit/sec

  • OSPF shares updates in a reliable manner
  • OSPF has Neighborship feature.
  • OSPF uses Djikstra algorithm to compute best paths for the network.
  • OSPF has area concept.
    • Within area OSPF acts like a link state routing protocol, and detailed information about the topology is shared.
    • Between different areas OSPF acts like a distant vector routing protocol, meaning only network information is shared between areas not link information.
    • These rules are there in the OSPF to improve the efficiency of OSPF.

Terms and terminologies

  1. Link:
    • OSPF sees a link as an interface which is holding a subnet with it.
    • Link information means that not only the link information is shared but also the network information is shared which is associated with the link.
  2. Router ID:
    • Router ID is a 32 bit value.
    • Router ID is used to identify a router within the OSPF domain.
    • So router ID is an identity given to each router within the OSPF domain.
    • Router ID is elected on the following basis.
      1. Configure the router ID manual.
      2. Highest IPV4 address on a non-shut loopback interface, if any.
      3. Highest IPV4 address on a non-shut non loopback interface.
  3. Neighborship:
    • OSPF routers dynamically discovers neighbour’s by multicasting.
    • OSPF hello message to 224.0.0.5 address (to all SPF routers)
    • An OSPF router forms Neighborship with all the other routers within the network which are enabled with OSPF.
    • Two routers cannot share link information until and unless they are neighbour’s.
  4. Adjacency:
    • Even if two routers are OSPF neighbours, it still does not mean that they can share link information with each other.
    • If two routers want to share link information in OSPF, then they not only have to be neighbours but also have to be adjacent.
      • Neighborship    —>    adjacent    —>     sharing of link information.
      • If only neighbour’s    —->     cannot share link information.
    • Within a network not all routers become adjacent with each other.
    • If all routers start sharing link information with each other then there will not be systematic distribution of link information and also there will be duplicacy while sharing link information.
  5. DR(Designated Router):
    • Designated router is elected within each network.
    • Each router within the network forms adjacency with the DR and shares link information with the DR.
    • In turn the DR shares that information with everyone in a systematic manner without duplicacy.
    • DR is elected on the basis of two parameters.
      1. Interface priority     (highest priority is preferred)
        • The moment we enable OSPF on an interface, the OSPF process assigns that interface an 8-bit priority which is by default set to 1.
        • Range:   0 to 255
        • Priority value is used by OSPF only for the DR election process and nothing else.
        • If you set the priority on an interface to be 0, then that interface does not participate in DR election process.
      2. Highest router ID
  6. BDR (Backup Designated Router):
    • Backup DR acts as a backup for the DR.
    • Within a network all the routers form adjacency not only with the DR but also with the BDR.
    • But BDR doesn’t help in distributing the link information systematically, that is DR’s job.
    • BDR sits silent and just wait for the DR to go down, so that it can take its role.
  7. Link State Database:
    • This database holds all the information on a router that is getting shared within the topology.
  8. Neighbour table:
    • Holds information about neighbours.

Neighborship Feature

  • Neighborship is formed using hello messages.
  • The moment we enable OSPF on an interface the router starts transmitting OSPF hello messages via that interface every 10 seconds by default.
  • Dead interval is 40 seconds.
  • OSPF hello messages are Multicasted (224.0.0.5)
  • Contents of hello messages.
    1. Area ID
    2. Router ID
    3. Priority
    4. Subnet mask
    5. Hello interval
    6. Dead interval
    7. DR
    8. BDR
    9. Active neighbours
    10. Options (capabilities)

Neighborship Conditions

  • Areas must match.
  • Router must be unique.
  • Subnet mask must match.
  • Hello interval and Dead interval must match.
  • Capabilities must match.

Neighbour states in OSPF

  • Down state
    • This is the first OSPF neighbour state. It means that no information (hellos) has been received from this neighbor, but hello packets can still be sent to the neighbor in this state.
  • Init state
    • This state specifies that the router has received a hello packet from its neighbor, but the receiving router’s ID was not included in the hello packet. When a router receives a hello packet from a neighbor, it should list the sender’s router ID in its hello packet as an acknowledgment that it received a valid hello packet.
  • 2-way state
    • This state designates that bi-directional communication has been established between two routers. Bi-directional means that each router has seen the other’s hello packet. This state is attained when the router receiving the hello packet sees its own Router ID within the received hello packet’s neighbor field.
  • Exstart state
    • Once the DR and BDR are elected, the actual process of exchanging link state information can start between the routers and their DR and BDR.
    • In this state, the routers and their DR and BDR establish a master-slave relationship and choose the initial sequence number for adjacency formation. The router with the higher router ID becomes the master and starts the exchange, and as such, is the only router that can increment the sequence number.
  • Exchange state
    • In the exchange state, OSPF routers exchange database descriptor (DBD) packets. Database descriptors contain link-state advertisement (LSA) headers only and describe the contents of the entire link-state database.
  • Loading state
    • In this state, the actual exchange of link state information occurs. Based on the information provided by the DBDs, routers send link-state request packets. The neighbor then provides the requested link-state information in link-state update packets. During the adjacency, if a router receives an outdated or missing LSA, it requests that LSA by sending a link-state request packet. All link-state update packets are acknowledged.
  • Full state
    • In this state, routers are fully adjacent with each other. All the router and network LSAs are exchanged and the routers’ databases are fully synchronized.

Configuration of OSPF

  • On configuration mode:
    • Router(config)#router ospf  <process ID>
  • Process ID is not must match, it is locally significant.
    • Router(config-router)#network <network ID> <wild card mask>
  • Network command is used to enable the OSPF process on that interface.

Area 0 (Backbone Area)

  • Area 0 is special area in OSPF.
  • Only Area 0 routers have the capability to share inter area network information.
  • So a very important rule in OSPF is that all non-zero areas must be directly connected to Area 0 (backbone area).

Types of Routers in OSPF

  • Internal router:
    • A router whose all interfaces belongs to same area.
  • Backbone router:
    • A router whose all interfaces belongs to area 0.
  • ABR (Area border router):
    • A router who’s at least one interface is connected to area 0, and at least one other interface is connected to any other non-zero area.
    • ABR is a router that shares inter area prefix (network) information between two or more areas.
  • ASBR (Autonomous System Boundary Router):
    • A router which is taking one routing domains information into another routing domain, that router is considered to be an ASBR.

LSA (Link State Advertisements)

  • LSA’s are those pieces of information which are used by Djikstra algorithm to make the map of the topology.
  • LSA’s maximum age is 1 hour.
  • LSA’s are refreshed every 30 minutes.
  • LSA’s are stored within the link state database.

LSA’s Types

  • Router LSA (Type 1 LSA)
    1. Each router originate a single router LSA for each area that it is connected to
    2. A router describes all of its links that belongs to a specific area inside the router LSA.
    3. Router LSA’s does not cross the area boundaries.
  • Network LSA (Type 2 LSA)
    1. Network LSA’s are originated by DR’s
    2. Where the DR shares information about its network
      • How many routers are there within the network and which are those.
      • Subnet mask of network.
    3. Network LSA’s are also doesn’t cross the area boundary
    4. Both router LSA and the network LSA are used by routers to make the map of their area.
  • Network summary LSA / summary network LSA (Type 3 LSA)
    1. ABR originate network summary LSA’s
    2. ABR has the responsibility to share inter area network information.
  • ASBR summary LSA / summary ASBR LSA  (Type 4 LSA)
    1. ABR create a type 4 summary ASBR LSA and flood it into area 0.
    2. This LSA will also be flooded in all other areas and is required so all OSPF routers know where to find the ASBR.
  • External LSA (Type 5 LSA)
    1. ASBR originate external LSA’s
    2. Inside these LSA’s the ASBR shares information about the external network which are being brought into OSPF domain because of redistribution.

EIGRP (ENHANCED INTERIOR GATEWAY ROUTING PROTOCOL)

EIGRP is an Interior Gateway Routing Protocol.

  • The Enhanced Interior Gateway Routing Protocol replaced the Interior Gateway Routing Protocol (IGRP) in 1993.
  • EIGRP is an advanced routing protocol that combines many of the features of both link-state and distance-vector routing protocols

How EIGRP Becomes Enhanced?

  1. No Periodic Updates in EIGRP.
    • Unlike other well-known routing protocols, such as RIP, EIGRP only sends incremental updates, reducing the workload on the router and the amount of data that needs to be transmitted.
  2. Updates are Multicasted (224.0.0.10) and protocol number 88.
  3. Updates are always triggered.
  4. Updates are Partial.
    • The only Exception is during Startup Process, When the Routers First Form Neighborship: They Share Entire Routing Table.
  5. Updates are Shared Reliably.
    • EIGRP neither use TCP or UDP, It uses its own Mechanism to Share its Messages Reliably.) RTP: Cisco’s Reliable Transport Protocol.
  6. EIGRP Maintains Backup Paths along with Best Paths.
    • Improves the Convergence Time
  7. Maximum Allowable Hop Counts in EIGRP is 100 by Default, and can be Increased Up to 255.
  8. Equal and Unequal cost Load Balancing is Supported.
  9. EIGRP uses DUAL Algorithm (Diffusion Update Algorithm)

Other Features of EIGRP:

  1. By Default EIGRP is Classful, but we can make it Classless (No Auto-summary)
  2. EIGRP has AD: 90
  3. EIGRP was once Cisco Proprietary but has been made Open Standard in 2013.
  4. Neighborship Feature.
  5. DUAL Feature.
  6. RTP (Reliable Transport Protocol)
  7. EIGRP has Autonomous System Number Concept.
    • Autonomous System:  Collection of Network Devices with in Single Administration. Collection of Networks with Common Routing Policies.
      • Autonomous System is 16 bit Value.
      • Range is 1 – 65535
      • All the Routers within the Same AS Share Network Information with Each Other.
      • If two Routers Belongs to Different AS, Then they will not Share Network Information with Each Other by Default.
  8. EIGRP Calculates Distance on the Basis of Some Realistic Parameters which must be used for Calculating Distance.

Composite Metric.

  1. Bandwidth
    • Minimum Bandwidth (in kilobits per second) along the path from router to destination network
  2. Load
    • Number in range 1 to 255; 255 being saturated
  3. Delay
    • Delay, in 10s of microseconds, along the path from router to destination network
  4. Reliability
    • Number in range 1 to 255; 255 being the most reliable

Neighborship Feature

  1. The Moment you enable EIGRP on an Interface, the Router Starts transmitting hello Messages via that Interface.
  2. These Hello Messages are sent Every 5 seconds By Default.
  3. Hold Timer:  15 Seconds.
  4. If a Neighbor Remains Silent for 15 Seconds and Does not send any EIGRP Message, then that Neighbor will be Declared Dead.
  5. Hello Messages are used to form Neighborship.
  6. Until or unless two Routers are Neighbors in EIGRP, they cannot Share Network Information with Each Other.

Q.  Why Neighborship is formed?

  • So that a Router can track of those Routers with it is sharing Network information.  And if a Particular router does not acknowledge for the message, then the particular Router is provided that same information again and again, because in EIGRP Network Information is shared reliably.

EIGRP has few Neighbor Conditions:

  • The Routers Must Belong to the Same Network.
  • AS Number Must Match.
  • If Authentication is Enable, then that also Must Match.
  • K Metric Values Must Match.             

K  Metric Values:

  • Composite Metric
BandwidthK1:1(Bandwidth Modifier)
LoadK2:0(Load Modifier)
DelayK3:1(Delay modifier)
ReliabilityK4 & K5:0(K4: Reliability Modifier, K5: Additional Reliability Modifier.)
  • These are Default Values.
  • K1 (Bandwidth) + K2 (Load) + K3 (Delay) + K4 & K5 (Reliability
  • The K Metric Values are 8 bits.
  • Range:  0 to 255
  • With the help of these K Metric Values we can Change the Distance Calculation Formulae that EIGRP Uses.

EIGRP Distance Calculation Formulae:

  • 256*[K1 [10^7/Least Bandwidth in kb/sec] + K3 [Cumulative Delay in use/ 10]      

                              K1 and K3 are 1 by default.

DUAL Feature (Diffusion Update Algorithm)

  • DUAL has Two Jobs:
    1. Best Path Computation.
      • Must be Loop Free.
      • Must have the Best Distance.
    2. Helping EIGRP to Stabilize after a Topology Change.

Terms and Terminologies:

  • Feasible Distance: It is the Best Metric from a Router to Reach a Network.
  • Reported Distance: This Distance is reported by the Neighbor, where the Neighbor tells that’s from it how far a Network is.
  • Successor: This is a Best Path from a Router to Forward data to a Network.
  • Feasible Successor: This is a Backup Path to reach a Network.
    1. This Helps in Improving the Convergence Time for EIGRP.                                                
    2. Not Every other Path can Become Backup Path.
    3. There is a Condition that has to be fulfilled. And this Condition Helps EIGRP to find whether the Path is a Looped Path or a Loop free Path.
    4. Condition is Called Feasibility Condition.
    5. This Condition says:

                                RD < FD                     

Reported Distance < Feasibility Distance

In addition to the routing table, EIGRP uses the following tables to store information:

Neighbor Table: 

  • The neighbor table keeps a record of the IP addresses of routers that have a direct physical connection with this router.

Topology Table: 

  • Inside the Topology Table, All the Information about the Best Path’s and the Backup Path’s is Stored. The Feasible Successor and the Successors.
  • Routes in the topology table are marked as “passive” or “active”.
  • Passive indicates that EIGRP has determined the path for the specific route and has finished processing.
  • Active indicates that EIGRP is still trying to calculate the best path for the specific route.
  • Routes in the topology table are not usable by the router until they are inserted into the routing table.
  • If the network changes, For example a physical link fails or is disconnected, the path will become unavailable. EIGRP is designed to detect these changes and will attempt to find a new path to the destination. The old path that is no longer available is removed from the routing table.
Design a site like this with WordPress.com
Get started