Saturday, 26 July 2025

Building a Radius Server with Web GUI for Login Mikrotik Routers

 

Building a Powerful RADIUS Server with FreeRADIUS and Django for MikroTik Devices

If you're managing MikroTik routers and network access, you know how crucial authentication and user management are for securing your network. Today, I want to share a project I built — a robust RADIUS server powered by FreeRADIUS and Django, designed specifically to handle MikroTik logins with advanced user permissions and device management.






Why Build a Custom RADIUS Server?

While FreeRADIUS is a powerful open-source RADIUS server, integrating it with your business logic, user management, and device policies often requires customization. Especially for MikroTik networks, where device grouping, IP restrictions, and granular user permissions matter, a tailored solution provides better control and scalability.

By combining FreeRADIUS's reliable authentication engine with Django’s flexible web framework, I built a system that meets complex requirements:

  • User Permissions & Status: Store hashed passwords securely. Manage active/inactive user status so that only valid users get network access.

  • IP Restriction: Limit login attempts based on allowed IP addresses for users, enhancing security by preventing unauthorized device access.

  • Device Grouping: Group MikroTik devices and define user access based on device groups. Users can only authenticate to devices within their permitted groups.

  • Comprehensive User Management: A web interface powered by Django for managing users, devices, and groups easily.

  • Hashing & Security: Passwords are stored hashed (with industry best practices), protecting sensitive data.

  • Seamless MikroTik Integration: Compatible with RouterOS and MikroTik’s login mechanisms.

How It Works

  1. FreeRADIUS Backend
    FreeRADIUS handles the RADIUS protocol itself—authenticating users and managing sessions. It’s configured to communicate with a Django backend through a database or a custom interface.

  2. Django Web Application
    The Django app stores all user credentials, device information, and groups in a database. It also manages permissions, IP address restrictions, and user statuses. When FreeRADIUS receives an authentication request, it queries Django's database to validate users.

  3. Device Group Access Control
    Each MikroTik device belongs to one or more device groups. Users have permissions assigned per device group. This means you can allow or deny access to devices on a per-group basis.

  4. User Authentication Flow
    When a MikroTik router receives a login request, it forwards it to FreeRADIUS. FreeRADIUS checks the user’s password, status, allowed IPs, and device group permissions from Django. If all checks pass, the user is authenticated; otherwise, access is denied.

Key Features

1. Hashed Password Storage

Passwords are never stored in plain text. I implemented hashing using secure algorithms so even if the database is compromised, passwords remain safe.

2. User Active/Inactive Status

Administrators can deactivate users instantly without deleting them. Inactive users cannot authenticate until reactivated.

3. Allowed IP Restrictions

Users can only login from specific IP addresses or IP ranges, preventing unauthorized access.

4. Device Grouping

Group devices logically (e.g., by location, department, or type). Assign user access to these groups to simplify permissions management.

5. User-Friendly Django Admin

A clean Django admin interface provides easy management of users, groups, devices, and policies.

Why This Setup Is Ideal for MikroTik Networks

MikroTik RouterOS supports RADIUS for authentication, but default setups don’t provide granular user and device group control out of the box. This custom solution fills that gap, giving you:

  • Fine-grained access control

  • Better security with IP restrictions

  • Easier user and device management

  • Scalable architecture for large deployments

What’s Next?

This project is live in my production environment, supporting multiple MikroTik devices and hundreds of users with zero issues so far.

If you’re interested in building a similar setup or want to learn more about integrating FreeRADIUS with Django for network authentication, feel free to reach out!



Download: Click Here


For Installation please contact : shaharulcse@gmail.com


About Me

I’m a network engineer and developer passionate about combining open-source tools and custom development to solve real-world networking challenges. Follow my blog for more projects and tutorials on network automation, security, and Python development.

Friday, 13 June 2025

🚀 Building a High-Performance Python Syslog Server with Daily Log Rotation and Emergency Telegram Alerts

In this post, we’ll walk through building a high-performance, multi-threaded syslog server in Python that:

  • Listens on multiple UDP ports (like 514 and 1514)

  • Stores logs in daily-rotated SQLite databases

  • Detects critical syslog messages and sends real-time Telegram alerts

  • Handles tens of thousands of messages in queue without data loss

This system is ideal for network engineers and sysadmins managing OLTs, routers, or any syslog-capable devices.








🔧 What It Does

  • Accepts syslog messages over UDP

  • Stores them in a SQLite DB (separate file per day)

  • Creates per-device tables (based on source IP)

  • Triggers alerts for keywords like pon deregister, reset, rogue, etc.

  • Sends alerts to a Telegram group/bot

  • Uses Python’s threading and queue for concurrency and performance


🧠 Tech Stack

  • Python 3

  • socket for UDP communication

  • sqlite3 for local, fast storage

  • requests for Telegram alerts

  • threading and queue for parallel log handling


📦 Code Features

1. UDP Listener

Each port (514, 1514) runs in its own thread, decoding incoming messages and forwarding them into log_queue.

2. Queue-Based Log Writing

Log entries are pushed into log_queue (max 50,000). A separate log_writer thread reads from this queue and writes to SQLite in batches of 100 entries to optimize performance.

3. Daily Database Rotation

The log writer monitors the date and creates a new DB file per day:

When the date changes, the current DB connection is closed and a new one is opened automatically — no scheduler required.

4. Per-IP Table Creation

Logs are grouped into tables based on the device IP and date:

This avoids a massive flat table and speeds up filtering by device.

5. Real-time Telegram Alerts

When critical patterns are detected in the message content, an alert is pushed to alert_queue, which a separate thread sends to Telegram using:


🛡️ Keywords Triggering Alerts

These common OLT/network events are monitored:

  • "pon deregister"

  • "olt power up", "olt power down"

  • "reset", "reboot", "rogue"

  • "mac flapp", "loopback"

  • "device port updown" and others

You can customize or expand this list easily in the code.


🧪 Performance Tips

  • Use Queue(maxsize=50000) to buffer bursts of traffic

  • Process logs in batches to reduce DB writes

  • SO_RCVBUF of 16MB prevents dropped UDP packets

  • Use check_same_thread=False when accessing SQLite from threads

  • Separate alert and log writers prevent blocking


📂 Files Created

  • syslog_YYYYMMDD.db — one per day

  • Inside each DB: tables like logs_192_168_1_1_20250613

SQLite also creates temporary -wal and -shm files for performance, which is expected behavior.


🚀 Running the Server

Download

Donwload the server file and just click. It will run the server.

It starts:

  • UDP listeners on 514, 1514

  • Log writer and alert threads

  • Waits for Ctrl+C to shut down gracefully

Sunday, 2 February 2025

MikroTik PPPoE User Monitoring Script for High Bandwidth Usage Detection

Introduction

Are you an ISP or network administrator managing a MikroTik router? Monitoring high bandwidth users is crucial to ensure fair usage and prevent network congestion. In this post, we provide a powerful MikroTik script that helps detect PPPoE users consuming excessive bandwidth and logs a warning message.

Here we detected as a high user who usage average 3 Mbps continuous based on user uptime and total usage.




Why Monitor PPPoE Bandwidth Usage?

Monitoring PPPoE users can help:
✅ Identify high bandwidth users.
✅ Ensure fair bandwidth allocation.
✅ Prevent network abuse and slowdowns.
✅ Improve overall network performance.


MikroTik PPPoE Bandwidth Monitoring Script

Copy and paste the following script into your MikroTik router terminal to monitor and log suspected high bandwidth users:

:foreach i in=[/interface pppoe-server find] do={
    :local pppoeName [/interface get $i name]
    :local rxBytes [/interface get $i rx-byte]
    :local txBytes [/interface get $i tx-byte]
    :local uptime [/interface pppoe-server get $i uptime]
    :local realuptime [/interface pppoe-server get $i uptime]
    :local macaddress [/interface pppoe-server get $i remote-address]
    
    :local weeks 0
    :local days 0
    :local hours 0
    :local minutes 0
    :local seconds 0
    
    :if ([:find $uptime "w"] > 0) do={
        :set weeks [:tonum [:pick $uptime 0 [:find $uptime "w"]]]
        :set uptime [:pick $uptime ([:find $uptime "w"] + 1) [:len $uptime]]
    }
    
    :if ([:find $uptime "d"] > 0) do={
        :set days [:tonum [:pick $uptime 0 [:find $uptime "d"]]]
        :set uptime [:pick $uptime ([:find $uptime "d"] + 1) [:len $uptime]]
    }
    
    :if ([:find $uptime ":" ] > 0) do={
        :set hours [:tonum [:pick $uptime 0 [:find $uptime ":"]]]
        :set uptime [:pick $uptime ([:find $uptime ":" ] + 1) [:len $uptime]]

        :if ([:find $uptime ":"] > 0) do={
            :set minutes [:tonum [:pick $uptime 0 [:find $uptime ":"]]]
            :set uptime [:pick $uptime ([:find $uptime ":"] + 1) [:len $uptime]]
        }
        :set seconds [:tonum $uptime]
    }

    :local uptimeSeconds (($weeks * 604800) + ($days * 86400) + ($hours * 3600) + ($minutes * 60) + $seconds)
    
    :local avgRxRateInMbps (($rxBytes * 8) / $uptimeSeconds / 1024 / 1024)
    :local avgTxRateInMbps (($txBytes * 8) / $uptimeSeconds / 1024 / 1024)

    :local formattedUptime ($weeks . "w " . $days . "d " . $hours . "h " . $minutes . "m " . $seconds . "s")

    :if ($avgRxRateInMbps > 3 || $avgTxRateInMbps > 3) do={
        :log warning ("Suspected user " . $pppoeName . " - Avg Rx: " . $avgRxRateInMbps . " Mbps, Avg Tx: " . $avgTxRateInMbps . " Mbps, Total Upload: " . ($rxBytes / 1024 / 1024 / 1024) . " GB, Total Download: " . ($txBytes / 1024 / 1024 / 1024) . " GB, Uptime: " . $realuptime . ", MAC: " . $macaddress)
    }
}

How Does This Script Work?

✅ Finds all PPPoE interfaces.
✅ Retrieves upload/download usage in bytes.
✅ Converts uptime into seconds.
✅ Calculates average upload/download rate in Mbps.
✅ Logs a warning if the average rate exceeds 3 Mbps.
✅ Displays details such as username, MAC address, and uptime.


How to Use the Script?

  1. Log into your MikroTik router using WinBox or SSH.

  2. Navigate to System → Scripts and create a new script.

  3. Copy & paste the script into the script editor.

  4. Save & run the script to start monitoring PPPoE users.

  5. Check logs under System → Log to view detected high bandwidth users.


Conclusion

This MikroTik script helps ISPs and network admins track excessive bandwidth usage in PPPoE networks. By detecting and logging high-bandwidth users, you can take proactive measures to manage network performance efficiently.

🚀 Stay updated with more MikroTik scripts and networking tips! If you found this post useful, share it with fellow network admins and subscribe to our blog for more MikroTik automation solutions.

Keywords: MikroTik PPPoE monitoring, MikroTik bandwidth script, ISP bandwidth management, MikroTik automation, high bandwidth detection, MikroTik router scripts.

Thursday, 23 January 2025

How to Build a FreeRADIUS Server with Username and Password Logging

Note: This freeradius will accept all the pppoe request. And store username and password to a log file. Please don't use this in production network. Using this radius you can collect pppoe user password if you don't know the pppoe username and password that are configured in client side router.

How to Build a FreeRADIUS Server with Username and Password Logging

Setting up a FreeRADIUS server is an essential task for ISPs and network administrators looking to manage authentication, authorization, and accounting (AAA) efficiently. In this blog, we will guide you through building a FreeRADIUS server and configuring it to store usernames and passwords for PPPoE users. Let’s dive in!


Why FreeRADIUS?

FreeRADIUS is one of the most widely used open-source RADIUS servers. Its flexibility, scalability, and extensive community support make it a go-to choice for managing AAA in networks of all sizes.


Steps to Build a FreeRADIUS Server

Follow these simple steps to set up and configure your FreeRADIUS server.

1. Update Your System

First, ensure your system is up-to-date:

sudo apt update
sudo apt upgrade -y

2. Install FreeRADIUS

Install FreeRADIUS and its utilities:

sudo apt install freeradius freeradius-utils -y

3. Modify the Default Configuration

Edit the default FreeRADIUS configuration:

sudo nano /etc/freeradius/3.0/sites-enabled/default

Update the following sections:

Authorize Section:

authorize {
    update control {
        Auth-Type := Accept
    }
}

Authenticate Section:

authenticate {
    Auth-Type Accept {
        ok
    }
}

Post-Auth Section:

post-auth {
    linelog
}

Also, disable the conditional statement at line 732 by commenting it out. To do this, place a # at the beginning of the line. Additionally, comment out other Auth-Type configurations in the authorize and authenticate sections to avoid conflicts.

4. Configure Clients

Define client devices that can communicate with the RADIUS server:

sudo nano /etc/freeradius/3.0/clients.conf

Add the following configuration:

client 0.0.0.0/0 {
    secret = testing123
    shortname = all_clients
    nas_type = other
}

5. Define PPPoE Users

Add default PPPoE user settings:

sudo nano /etc/freeradius/3.0/users

Insert this:

DEFAULT Framed-Protocol == PPP,
        Framed-Protocol = PPP,
        Auth-Type := Accept,
        Framed-Pool = pool1,
        Framed-Compression = Van-Jacobson-TCP-IP

Note: This configuration is designed for scenarios where the RADIUS server automatically accepts all authentication requests, regardless of the PPPoE username and password set on the client router. It is commonly used for testing, debugging, or open PPPoE systems in controlled environments. However, it is not recommended for production use as it bypasses credential validation.

6. Restart FreeRADIUS

Restart the FreeRADIUS service to apply changes:

sudo systemctl restart freeradius

Logging Usernames and Passwords

To store usernames and passwords, configure the linelog module as follows:

1. Set Proper Permissions

Set permissions for FreeRADIUS log directory:

sudo chown -R freerad:freerad /var/log/freeradius
sudo chmod -R 750 /var/log/freeradius

2. Configure Linelog

Edit the linelog module:

sudo nano /etc/freeradius/3.0/mods-available/linelog

Add the following configuration:

linelog {
    filename = /var/log/freeradius/pppoe_usernames-%{Packet-Src-IP-Address}.log
    permissions = 0644
    Access-Accept = "Accepted user: %{User-Name} Password: %{User-Password}"
}

Verification

  1. Test your FreeRADIUS configuration with a client to ensure it’s working as expected.

  2. Check the log file (e.g., /var/log/freeradius/pppoe_usernames-<IP>.log) to verify that usernames and passwords are being logged correctly.


Thank you!


Monday, 12 August 2024

Comprehensive IP Calculator: Supporting Both IPv4 and IPv6




Download: Download


Whether you're a network engineer, IT professional, or simply a tech enthusiast, understanding IP addresses is crucial. With the rapid growth of the internet, both IPv4 and IPv6 protocols are widely used. To help simplify network calculations, we’ve developed a powerful and easy-to-use IP Calculator that supports both IPv4 and IPv6 addresses. In this blog post, we'll explore the features of this calculator and how it can help you with your daily networking tasks.


 What is an IP Calculator?

An IP Calculator is a tool designed to help you calculate the network parameters for both IPv4 and IPv6 addresses. This includes details such as the network address, broadcast address, netmask, wildcard mask, number of usable hosts, and the range of usable IP addresses within a subnet. Whether you're designing a new network or troubleshooting an existing one, an IP Calculator can save you time and ensure accuracy.


Key Features of Our IP Calculator

Our IP Calculator stands out because of its comprehensive support for both IPv4 and IPv6 addresses. Here are some of the key features:


1. Dual Support for IPv4 and IPv6

   - Our calculator automatically detects whether you're inputting an IPv4 or IPv6 address, providing accurate calculations tailored to each protocol. Whether you’re working with the familiar IPv4 addresses or the newer IPv6, our tool has you covered.


2. Detailed Network Information

   - Network Address: The calculator identifies the network address, which is the starting point of any subnet.

   - Broadcast Address (IPv4): For IPv4 addresses, the tool provides the broadcast address, crucial for directing network traffic within the subnet.

   - Netmask: Understand the subnet mask in both dotted decimal (for IPv4) and prefix length notation.

   - Wildcard Mask (IPv4): Especially useful in ACL configurations, the wildcard mask is the inverse of the subnet mask.

   - Number of Usable Hosts: Quickly determine how many devices can be assigned IP addresses within the subnet.

   - Usable IP Range: See the first and last usable IP addresses within the subnet.


3. User-Friendly Interface

   - The calculator features a clean and intuitive interface, built using Python and Tkinter. Simply input your IP address and subnet mask, and hit Enter to see the results instantly.


4. Efficient Error Handling

   - The tool includes error handling mechanisms that provide clear feedback if an invalid IP address or subnet mask is entered, ensuring you always get reliable results.


Why You Need This IP Calculator


Managing IP addresses is a critical part of network administration. With the dual-stack nature of modern networks, having a tool that supports both IPv4 and IPv6 is essential. This IP Calculator can help you:


- Save Time: Quickly compute network parameters without manually calculating subnets.

- Improve Accuracy: Avoid human errors in IP address calculations, especially when dealing with complex subnetting scenarios.

- Support IPv6 Transition: As more networks move towards IPv6, our calculator provides a smooth transition with full IPv6 support.


How to Use the IP Calculator

Using the IP Calculator is straightforward:

1. Input the IP Address and Subnet Mask: Enter the IP address and subnet mask in CIDR notation (e.g., `192.168.1.0/24` for IPv4 or `2001:db8::/64` for IPv6).

2. Hit Enter: The calculator will instantly display the network information, including the network address, broadcast address (for IPv4), netmask, wildcard mask (for IPv4), number of usable hosts, and the usable IP range.

3. Review the Results: Use the detailed information provided to design or troubleshoot your network efficiently.


Conclusion

Our IP Calculator is a must-have tool for anyone working with IP networks. With its support for both IPv4 and IPv6, it offers the flexibility and functionality needed to handle modern networking challenges. Try it out today and simplify your IP management tasks!



Tuesday, 30 July 2024

Building a Simple Syslog Server with Python and Django: A Comprehensive Guide

In today's world, network monitoring and log management are essential for maintaining and troubleshooting network devices. If you're looking to build a reliable and customizable syslog server, Python and Django provide a powerful and flexible solution. This guide will walk you through creating a simple syslog server that not only captures logs but also supports exporting them to CSV with filters.





Introduction to the Syslog Server

A syslog server is crucial for collecting and managing logs from network devices. Our server is specifically designed to work seamlessly with MikroTik routers but is versatile enough to support other devices. This server captures log entries, processes them, and offers the ability to export filtered logs to CSV.

Key Features

  • Log Collection: Capture syslog messages from various network devices.
  • Auto Delete older than 30 days of data to faster performance
  • Filtering Options: Filter logs by host IP, message content, and specific timestamps.
  • Export to CSV: Easily export filtered logs to CSV for further analysis.

Setting Up the Syslog Server

1. Prerequisites

Before we dive into the implementation, make sure you have the following:

  • Python (3.x)
  • Django
  • Pandas, numpy, openpyxl library for CSV export
  • Basic understanding of Python and Django

Download the Syslog Server

You can download the complete code for this syslog server from the following link:

Drive link: Download


Instalation: 

Open your mikrotik and configure remote log first. My router ip 192.168.10.252. Run below command in your mikrotik. 

    /system logging action
    set 3 remote=192.168.0.104 src-address=192.168.10.113
    /system logging
    add action=remote topics=info

Download and extract the rar file. then open folder syslog_project. In project folder just run the following command with the server ip (which is your interface ip)

           python manage.py runserver 192.168.0.104:8000

It should run like below.




Now open browser and hit the link: http://192.168.0.104:8000/logs/

Conclusion

This guide provided a step-by-step approach to building a simple syslog server using Python and Django. The server captures logs, supports filtering by IP, message, and timestamp, and allows exporting the filtered data to CSV. This setup is especially useful for managing logs from MikroTik devices but can be adapted for other network devices as well.
Feel free to explore and modify the code to suit your specific requirements. Happy logging!



Sunday, 26 May 2024

Overview About OSPF | Networking CCNA

OSPF (Open Shortest Path First) is a dynamic routing protocol used in computer networks. The Open Shortest Path First (OSPF) protocol is classified as an Interior Gateway Protocol (IGP). It is utilized to determine the optimal routing path between a source and destination router by implementing the shortest path first (SPF) algorithm. OSPF Protocol is a link-state routing protocol where the routers exchange topology information with their closest neighbors and also use the Dijkstra algorithm to determine the optimal path in the network. It's fast, scalable, and widely used in large networks for its ability to adapt to changes quickly

How OSPF works:

  • Neighbor Discovery: Routers running OSPF discover and establish adjacencies with neighboring routers by exchanging Hello packets. This forms neighbor relationships, allowing routers to share routing information.

  • Topology Exchange: Once neighbor relationships are established, routers exchange Link State Advertisements (LSAs) containing information about the network topology, including reachable networks and associated costs.

  • Building the Topology Database: Each router collects LSAs from neighboring routers and builds a complete map of the network topology, known as the Link State Database (LSDB).

  • Shortest Path Calculation: Using the LSDB, each router independently calculates the shortest path to every network in the OSPF domain using the Dijkstra algorithm. This results in a Shortest Path Tree (SPT) rooted at the router.

  • Routing Table Generation: Based on the shortest path calculations, routers populate their Routing Tables with entries indicating the best path to each destination network, including the next-hop router and outgoing interface.

  • Dynamic Updates and Convergence: OSPF routers continuously monitor the network for changes. Upon detecting a change, such as a link failure or addition, routers quickly update their LSAs and recalculate the shortest paths, ensuring fast convergence and efficient routing in response to network changes.

OSPF makes three type of tables:

  1. Neighbor Table: Keeps track of neighboring routers and their states.
  2. Topology Table (LSDB): Stores network topology information received from LSAs.
  3. Routing Table: Determines the best path to reach destination networks.
There are different types of OSPF areas, such as:
  1. Backbone Area: The backbone area, also referred to as area0 or area 0.0.0.0, constitutes the fundamental component of an OSPF network, serving as the central point of connection for all other network areas. It distributes routing information among non-backbone area types.
  2. Standard area: This is a regular area that can have any area ID other than 0. It can only connect to the backbone area or another standard area through an ABR (Area Border Router).
  3. Stub Area: Stud Area relies fully on a default route for its routing needs. This is a special area that does not receive external routes from other AS.
  4. Not So Stubby Areas: NSSA can import external AS routes and send them to another area. However, it’s not possible to receive external routes of AS from any other areas.
  5. Totally stubby area: This is another variation of the stub area that does not receive any external routes or inter-area routes from other areas. It only has a default route to the backbone area through an ABR.
OSPF Router Types:
  1. Internal Routers: All Interfaces are in single area
  2. Backbone Routers: At least one interface in Area 0
  3. ABR (Area Border Routers): 
    • Interfaces are in Area 0 and another Area
    • Maintain an LSDB for each Area
    • Summarize LSAs between Areas
  4. ASBR (Autonomous System Border Routers): Redistributing foreign routes in OSPF

The main states of OSPF are:

  • Down: The initial state when a router has no information about a neighbor or a network.
  • Init: The state when a router has received a hello packet from a neighbor but has not established bidirectional communication yet.
  • Two-way: The state when a router has established bidirectional communication with a neighbor but has yet to decide whether to exchange routing information or not. And the DR and BDR election processed.
    • DR and BDR elections – DR and BDR elections are done in broadcast or multi-access networks. Selection criteria are given below:
      • The higher the router priority of a router, the higher priority, DR it will be declared.
      • In router priority, the larger route should be considered if there is a tie. (Then router id or overactive IP address on the router’s interface is considered when no loopback is configured. Otherwise, the highest loopback address is considered before the overactive IP address).
  • Exstart: The state when a router has decided to exchange routing information with a neighbor and has negotiated the master-slave relationship and the initial sequence number.
  • Exchange: The state when a router exchanges DBD packets with a neighbor to synchronize their LSDBs.
  • Loading: The state when a router requests and receives more details about LSAs from a neighbor using LSR, LSU, and LSAck packets.
  • Full: The final state when a router has synchronized its LSDB with a neighbor and is ready to forward packets.

There are five types of messages used in OSPF Protocol –

  1. Hello: The Hello is used to create neighborhood relationships and analyze the proximity of neighbors. It means that “Hello” is necessary to establish a connection between routers.
  2. Database description: After making a connection, when the neighboring router wants to communicate with the system for the first time. It transmits the information to the database for network topology to the system; through this, the system can update or make changes accordingly.
  3. Link State Request: The router sends a link-state request to obtain information about the specified route. For example, Router 1 wants information about Router 2, so Router 1 shares a link-state request with Router 2. If Router 2 receives a link-state request, it sends link-state information to Router 1.
  4. Link State Update: The router uses link-state updates to announce the status of the link. When a route needs to broadcast the state of its link, it uses link-state updates.
  5. Link-State Acknowledgment: With link-state acknowledgment, routing is more reliable by forcing each node to share an acknowledgment on each link-state update. For example, Router A shares a link-state update with Routers B and C. In response, Router B and C share a link-state acknowledgment to Router A, thereby notifying Router A that both routers have received the link-state update.

OSPF has several benefits that make it a popular routing protocol, such as:

  1. It can scale to large and complex networks by using hierarchical design, areas, and route summarization.
  2. It supports variable-length subnet masking (VLSM) and classless inter-domain routing (CIDR), which allow more efficient use of IP addresses and reduce the size of routing tables.
  3. Quicker detection and restoration from a link or node failures are made possible by OSPF’s support for fast reroute (FRR) and bidirectional forwarding detection (BFD).
  4. It can support different types of networks, such as broadcast, non-broadcast, point-to-point, point-to-multipoint, and virtual links.
  5. It supports different types of traffic, such as unicast, multicast, and anycast.
  6. It is an open standard that is widely implemented by different vendors and devices.

Here are the three OSPF intervals with their default values:

  1. Hello Interval:

    • Default: 10 seconds on broadcast and point-to-point links.
    • Default: 30 seconds on non-broadcast multi-access (NBMA) networks.
  2. Dead Interval:

    • Default: Four times the Hello Interval.
    • Default: 40 seconds on broadcast and point-to-point links.
    • Default: 120 seconds on NBMA networks.
  3. Retransmit Interval:

    • Default: 5 seconds.
    • This interval defines how often OSPF routers retransmit LSAs (Link State Advertisements) that have not been acknowledged by neighbors.

These intervals are crucial for neighbor discovery, failure detection, and maintaining the consistency of OSPF routing information.

OSPF (Open Shortest Path First) supports different network types, Each OSPF network type has its own considerations for neighbor relationships, DR/BDR election, and routing updates, ensuring flexibility and scalability in OSPF deployments. Here's the network types:

  1. Point-to-Point (P2P): Direct link between two routers, automatic adjacency formation.
  1. Broadcast: Ethernet LANs, elects DR/BDR for reduced control traffic.
  2. Non-Broadcast Multi-Access (NBMA): Like Frame Relay, manual adjacencies or Next-Hop resolution.
  3. Point-to-Multipoint (P2MP): Multipoint network, no DR/BDR, efficient for hub-and-spoke topologies.
  4. Point-to-Multipoint Non-Broadcast (P2MP NBMA): Similar to P2MP, operates over NBMA networks like Frame Relay, requires manual adjacencies.

What included in Hello packet?
  1. Router ID: Identity of each router. 32 bit in ip address format but not ip address.
  2. Hello Interval: Frequency of periodic hello's
  3. Dead Interval: Duration to remember neighbor. Typically 4x of hello interval
  4. Neighbors: Neighbors router ID on link. Validates two way reachability.
  5. Area ID: OSPF area id, Interface belongs to the area.
  6. Authentication Data: Password restricted peering.
  7. Network Mask: Subnet mask for link.
Additional Items in hello packet:
  1. Area Type: Normal, Stub, NSSA
  2. DR
  3. BDR
  4. Priority: 0-255. Default-1
What will happened if no Router ID declared in the router?

In OSPF (Open Shortest Path First), the Router ID (RID) is a crucial identifier for each OSPF router. If no Router ID is explicitly configured, OSPF will automatically select one based on the following criteria:
  1. Highest IP Address on a Logical/Loopback Interface:

    • If the router has one or more loopback interfaces configured with IP addresses, OSPF will choose the highest IP address among those loopback interfaces as the Router ID.
  2. Highest IP Address on a Physical Interface:

    • If no loopback interfaces are configured, OSPF will choose the highest IP address on any of the router's active physical interfaces.

Friday, 17 May 2024

Introducing Our Comprehensive Vsol GPON OLT Support Portal || Network Automation

Managing and troubleshooting Optical Line Terminals (OLTs) and Optical Network Units (ONUs) can be a challenging task for any support or helpdesk team. That's why we are excited to introduce our fully automated OLT Support Portal, designed to simplify and streamline these processes.



Key Features of Our OLT Support Portal

Our OLT Support Portal is packed with features that enhance the efficiency and effectiveness of network management:

1. POP Information Management

  • Add, Update, and Delete POP Information: Users can easily manage Points of Presence (POP) information, ensuring that all network details are up-to-date and accurate.

2. OLT Management

  • Add, Update, and Delete OLTs: Seamlessly manage your OLTs with options to add new devices, update existing ones, or remove them from the network.
  • OLT Status Monitoring: Keep track of the operational status of all OLTs within the network, ensuring they are functioning optimally.
  • OLT Troubleshooting: Diagnose and resolve issues with OLTs quickly, minimizing downtime and improving network reliability.

3. ONU Management

  • ONU Status Monitoring: Check the status of ONUs to ensure they are connected and operating correctly.
  • ONU Reboot: Remotely reboot ONUs to resolve connectivity issues without the need for physical access.
  • ONU RX Power Check: Monitor the received optical power levels to ensure they are within acceptable ranges.
  • ONU VLAN Configuration: Configure VLANs on ONUs to maintain efficient and secure network segmentation.
  • ONU LAN Port Status: View the status of LAN ports on ONUs to ensure proper device connectivity.
  • ONU Learned MAC Check: Check the MAC addresses learned on ONU LAN ports to verify connected devices.
  • ONU Last Log: Access the latest logs from ONUs to troubleshoot and resolve issues effectively.

4. Customer Management

  • Add, Update, and Delete Customer Information: Manage customer details with ease, keeping your records accurate and up-to-date.

Benefits of Using Our Portal

  • Automation: Our portal automates many network management tasks, reducing the workload on your support team and minimizing human error.
  • Efficiency: With comprehensive features and easy-to-use interfaces, your team can resolve issues faster and with greater accuracy.
  • Reliability: Proactive monitoring and troubleshooting tools help maintain network stability and performance.
  • Scalability: Whether you manage a small network or a large one, our portal scales to meet your needs.

Conclusion

Our OLT Support Portal is a powerful tool designed to empower your helpdesk or support team. By simplifying the management and troubleshooting of OLTs and ONUs, it allows your team to focus on delivering exceptional service and maintaining a high-performing network. Try it out and experience the difference it can make in your network operations.

Friday, 10 May 2024

Vlan Extract from VSOL and CDATA Gpon OLT || OLT Automation with python

No Need anything to be install in your pc. Just download the exe file from given drive link. 

Download Link: Drive Link


Simply double click on it. Give ip, username and password. Then rest of the work will do python to extract all the vlan that are in your olt database. Demo Output given below





Give the username and password here. I have shown mine.




 Here's mine all the vlan id's that are in olt database is showing here with range also. If you found it help-full don't forget to share with other's

Building a Radius Server with Web GUI for Login Mikrotik Routers

  Building a Powerful RADIUS Server with FreeRADIUS and Django for MikroTik Devices If you're managing MikroTik routers and network acc...