4.1 MikroTik Routing Fundamentals

4.1 MikroTik Routing Fundamentals
Photo by Nastya Dulhiier / Unsplash


Routing

Routing is the process of determining the best path for data packets to travel from the source to the destination across different networks. Routers use routing tables and routing protocols to make these decisions. Key terms include:

  • Routing Table: A database maintained by the router that contains routes to various network destinations. It includes information about network prefixes, next-hop addresses, and interfaces.
  • Routing Decision: Routers use routing tables to determine the most efficient path for forwarding packets based on the destination IP address.

Static Routing is a method of routing where routes are manually configured by the network administrator. These routes do not change unless manually updated. Key terms include:

  • Static Route: A route manually added to the routing table. It specifies a destination network and the next-hop IP address to reach that network.
  • Next-Hop Address: The IP address of the next router or gateway on the path to the destination network. It is used in static routes to forward packets.
  • Distance: In static routing, this is a metric that indicates the preference of a route. Lower values indicate higher preference. This is not used in all routing protocols but can be manually set in static routing.

Dynamic Routing refers to the process of using routing protocols to automatically adjust and update routing tables in a network. Unlike static routing, where routes are manually configured and do not change unless explicitly updated by the network administrator, dynamic routing allows routers to automatically discover and adapt to network changes. Key terms include:

  • Automatic Route Discovery: Routers use dynamic routing protocols to automatically learn about new routes and network changes. This eliminates the need for manual updates and configuration.
  • Routing Protocols: Dynamic routing relies on specific protocols designed to facilitate the exchange of routing information between routers. These protocols help routers to share information about available routes, update their routing tables, and adapt to network topology changes.
  • Routing Tables: Dynamic routing protocols help routers maintain and update their routing tables based on the routing information received from other routers. The routing table contains the routes to different network destinations and the metrics used to determine the best path.
  • Metric: A metric is a value used by routing protocols to determine the cost of a route. The metric can be based on various factors such as hop count, bandwidth, delay, or administrative cost. Routers use these metrics to select the most efficient route.
  • Convergence: Convergence is the process by which all routers in a network update their routing tables and reach a state of consistency after a network change (e.g., a link failure or addition of a new route). Efficient convergence ensures minimal disruption and optimal routing.

Routing Protocols

In networking, routing protocols are categorized into two main types: Interior Gateway Protocols (IGPs) and Exterior Gateway Protocols (EGPs). These protocols play different roles in routing decisions based on whether they operate within a single autonomous system or between multiple autonomous systems.

Interior Gateway Protocols (IGPs)

Interior Gateway Protocols (IGPs) are used for routing within a single autonomous system (AS). They manage routing within a network and are typically used in an organization's internal network infrastructure. IGPs handle the dynamic exchange of routing information among routers within the same AS, helping to ensure that data packets find the most efficient path to their destination within the network.

Key Characteristics of IGPs:

  • Scope: Operate within a single AS or network.
  • Purpose: Manage routing within an organization or network to optimize internal traffic.
  • Example Protocols:
    • OSPF (Open Shortest Path First)
    • RIP (Routing Information Protocol)
    • EIGRP (Enhanced Interior Gateway Routing Protocol) (primarily used in Cisco networks, but worth mentioning)

Exterior Gateway Protocols (EGPs)

Exterior Gateway Protocols (EGPs) are used for routing between different autonomous systems. They are essential for determining how data packets should be routed between different networks or organizations on the internet. EGPs handle inter-domain routing and are crucial for establishing routing policies and maintaining routing information between different ASes.

Key Characteristics of EGPs:

  • Scope: Operate between different ASes or networks.
  • Purpose: Manage routing across the internet or between large networks to ensure data packets can travel between different administrative domains.
  • Example Protocols:
    • BGP (Border Gateway Protocol)

Routing Protocols Used in MikroTik Devices

MikroTik RouterOS supports both IGPs and EGPs, making it versatile for various network configurations. Here are the routing protocols supported by MikroTik devices:

Interior Gateway Protocols (IGPs):

  1. OSPF (Open Shortest Path First):
    • Description: OSPF is a link-state routing protocol that efficiently manages routing within large or complex networks. It divides networks into areas to optimize routing and reduce overhead.
    • Features: Uses LSAs (Link-State Advertisements) to share routing information and build a complete view of the network topology.
  2. RIP (Routing Information Protocol):
    • Description: RIP is a distance-vector routing protocol that uses hop count as its metric to determine the best path to a destination. It is simpler and used for smaller networks.
    • Features: RIP updates routing tables periodically and has a maximum hop count of 15.
  3. OSPFv3 (Open Shortest Path First for IPv6):
    • Description: This is the OSPF version designed for IPv6 networks. It operates similarly to OSPF but is adapted for IPv6 addressing.
    • Features: Supports IPv6-specific routing needs and uses similar mechanisms as OSPFv2.

Exterior Gateway Protocols (EGPs):

  1. BGP (Border Gateway Protocol):
    • Description: BGP is the primary EGP used for routing between different ASes on the internet. It uses path vector routing and is designed to handle large-scale internet routing.
    • Features: BGP exchanges routing information between ASes and supports various policies for route selection and path manipulation.

Summary of Differences:

  • IGPs operate within a single AS and are designed for internal network routing. They include OSPF, RIP, and OSPFv3.
  • EGPs operate between multiple ASes and are essential for inter-domain routing. The primary EGP used in MikroTik devices is BGP.

Understanding these routing protocols and their applications will help you configure and manage routing efficiently in various network environments using MikroTik devices.

OSPF (Open Shortest Path First)

OSPF is a link-state routing protocol used within an autonomous system. Key terms include:

  • Link-State Protocol: A type of routing protocol where each router maintains a map of the network topology, called the link-state database.
  • Areas: OSPF networks are divided into areas to optimize routing. The backbone area is central, and other areas connect to it.
  • LSA (Link-State Advertisement): Messages exchanged between OSPF routers that provide information about the state of their links. LSAs are used to build and update the link-state database.
  • DR/BDR (Designated Router/Backup Designated Router): In multi-access networks (like Ethernet), OSPF elects a DR to reduce the number of adjacencies needed. The BDR acts as a backup in case the DR fails.

BGP (Border Gateway Protocol)

BGP is a path-vector protocol used for routing between different autonomous systems (AS) on the internet. Key terms include:

  • Autonomous System (AS): A collection of IP networks and routers under the control of a single organization, which presents a common routing policy to the internet.
  • Path Vector Protocol: BGP maintains the path information that gets updated dynamically as the network topology changes. It uses a vector of AS numbers to prevent routing loops.
  • BGP Peers: Routers that exchange BGP routing information. Peers are typically established between different ASes.

RIP (Routing Information Protocol)

RIP is a distance-vector routing protocol suitable for smaller networks. Key terms include:

  • Distance Vector Protocol: A type of routing protocol where routers exchange information about the distance (in hops) to various network destinations.
  • Hop Count: The metric used by RIP, representing the number of routers a packet must pass through to reach the destination. The maximum hop count is 15, making RIP suitable for smaller networks.

Routing Tables

Routing Tables are crucial for managing how data packets are forwarded through a network. Key terms include:

  • Routing Table: A table stored in a router that contains routes to network destinations. Each entry typically includes:
    • Destination Network: The IP address range of the destination network.
    • Gateway: The IP address of the next-hop router to reach the destination.
    • Interface: The router interface used to forward the packet.
    • Metric: A value that indicates the cost of the route; lower values are preferred.

Summary of Key Terms

  1. Routing: Process of directing data packets through networks.
  2. Routing Table: Database of routes used to forward packets.
  3. Static Routing: Manual route configuration.
  4. Static Route: Manually defined route with a next-hop address.
  5. OSPF: Link-state protocol with areas and LSAs.
  6. BGP: Path-vector protocol for inter-AS routing.
  7. RIP: Distance-vector protocol with hop count as the metric.
  8. Routing Protocols: Automate route management.
  9. Routing Table Entries: Destination network, gateway, interface, and metric.

Understanding these terms and their applications will help you configure, manage, and troubleshoot routing in MikroTik RouterOS, preparing you for more advanced networking tasks and MTCNA certification.