tik4net 3.6.0
See the version list below for details.
dotnet add package tik4net --version 3.6.0
NuGet\Install-Package tik4net -Version 3.6.0
<PackageReference Include="tik4net" Version="3.6.0" />
<PackageVersion Include="tik4net" Version="3.6.0" />
<PackageReference Include="tik4net" />
paket add tik4net --version 3.6.0
#r "nuget: tik4net, 3.6.0"
#:package tik4net@3.6.0
#addin nuget:?package=tik4net&version=3.6.0
#tool nuget:?package=tik4net&version=3.6.0
tik4net
📢 A note from the maintainer
Version 3.6.0 is out! Thanks to AI tooling I finally had the bandwidth to work through all open PRs and critical bugs. Special thanks to Deantwo and all contributors who helped others while I was away.
I am looking for collaborators. If you are interested in helping maintain this project, please reach out — open an issue or contact me directly.
Current release targets
netstandard2.0only. This covers .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5/6/7/8/9, Xamarin, and Unity.Tested and debugged against RouterOS 7.21.4 (latest stable).
tik4net is a .NET library for communicating with MikroTik routers via the MikroTik API protocol. It offers a clean, easy-to-use interface that scales from low-level raw API access all the way up to a fully typed O/R mapper.
| Package | NuGet | Description |
|---|---|---|
| tik4net | Low-level ADO.NET-like API — synchronous and async R/W access | |
| tik4net.objects | High-level O/R mapper — strongly typed entities, full CRUD. Pulls in tik4net automatically. |
|
| tik4net.testing | Unit-testing support — TikFakeConnection lets you write tests without a live router |
Tools — semi-automatic C# code generators for custom entities (used with tik4net.objects).
Features
- Easy to use with O/R mapper like highlevel API
- Low level access supported by low level API
- Stable interface and backward compatibility
- Broad range of .NET runtimes supported (including .NET core 2 and Xamarin)
- New mikrotik v.6.43 login process supported
- Includes MNDP discovery helper
- Easy to understand and well documented code
Binaries
Install via NuGet — see the package table above, or:
dotnet add package tik4net.objects # high-level API (pulls in tik4net)
dotnet add package tik4net # low-level API only
dotnet add package tik4net.testing # unit-testing support
See release notes / version history for what's new.
Getting started and documentation
Mikrotik API wiki:
Project wiki:
Examples:
- example project
- support forum
- For VisualBasic trivial example see VB example
using (ITikConnection connection = ConnectionFactory.CreateConnection(TikConnectionType.Api_v2)) // Use TikConnectionType.Api for mikrotikversion prior v6.45
{
connection.Open(HOST, USER, PASS);
ITikCommand cmd = connection.CreateCommand("/system/identity/print");
var identity = cmd.ExecuteScalar();
Console.WriteLine("Identity: {0}", identity);
var logs = connection.LoadList<Log>();
foreach (Log log in logs)
{
Console.WriteLine("{0}[{1}]: {2}", log.Time, log.Topics, log.Message);
}
var firewallFilter = new FirewallFilter()
{
Chain = FirewallFilter.ChainType.Forward,
Action = FirewallFilter.ActionType.Accept,
};
connection.Save(firewallFilter);
ITikCommand torchCmd = connection.CreateCommand("/tool/torch",
connection.CreateParameter("interface", "ether1"),
connection.CreateParameter("port", "any"),
connection.CreateParameter("src-address", "0.0.0.0/0"),
connection.CreateParameter("dst-address", "0.0.0.0/0"));
torchCmd.ExecuteAsync(response =>
{
Console.WriteLine("Row: " + response.GetResponseField("tx"));
});
Console.WriteLine("Press ENTER");
Console.ReadLine();
torchCmd.Cancel();
Looking for help
- Importing other classes
- Looking for betatesters
Roadmap & future
- create highlevel classes for all mikrotik entities (you can still generate your own classes)
- create tiklink project - easy use-to wrapper over mikrotik router with fluent API
- convert examples to separate unittests (in progress)
- tiktop — a MikroTik traffic monitor inspired by Linux
iftop(currently in alpha, publication coming soon)
REMARKS: This project is rewritten version of deprecated tik4net at googlecode (last version was 0.9.7.)
Licenses
- Apache 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on tik4net:
| Package | Downloads |
|---|---|
|
tik4net.testing
Unit-testing support for tik4net: write tests against RouterOS logic with no router involved. TikFakeConnection implements the same ITikConnection contract as a real transport, answers scripted rows through TikFakeReSentence / TikFakeDoneSentence / TikFakeTrapSentence, and records what was sent so a test can assert on it. Works at all three API levels, including the O/R mapper. |
|
|
tik4net.entities
O/R mapper high-level API for MikroTik routers built on top of tik4net. Provides entity classes, CRUD operations and attribute-driven serialization. Previously distributed as tik4net.objects. |
|
|
tik4net.ssh
SSH (TCP 22) connection transport for tik4net — the eleventh connection variant, kept in its own package because of its SSH.NET dependency. Drives the MikroTik RouterOS CLI over an SSH PTY shell with the same connection contract and the same three API levels as every other transport: full CRUD, Listen and Safe Mode. Requires the tik4net package. |
|
|
tik4net.objects
Mikrotik API library - O/R mapper API |
|
|
FluentDevelopment.Tik4net
A high-level .NET 10 wrapper for Tik4net, providing fluent MikroTik API integration with professional connection pooling, background tasks, and enhanced error mapping. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0-beta | 35 | 9/3/2026 |
| 4.0.0-alpha6 | 126 | 8/30/2026 |
| 4.0.0-alpha5 | 134 | 8/25/2026 |
| 4.0.0-alpha4 | 163 | 8/19/2026 |
| 4.0.0-alpha3 | 128 | 8/18/2026 |
| 4.0.0-alpha2 | 169 | 7/20/2026 |
| 4.0.0-alpha | 230 | 6/16/2026 |
| 3.6.0 | 2,466 | 5/21/2026 |
| 3.5.0 | 86,255 | 1/1/2020 |
| 3.4.0 | 5,069 | 9/26/2018 |
| 3.3.0 | 1,331 | 9/3/2018 |
| 3.2.0 | 1,791 | 7/5/2018 |
| 3.1.0 | 3,316 | 4/1/2018 |
| 3.0.1 | 2,011 | 1/2/2018 |
| 3.0.0 | 1,732 | 12/30/2017 |
| 2.2.0 | 2,180 | 4/1/2017 |
| 2.1.0 | 2,020 | 7/8/2016 |
| 2.0.0 | 1,576 | 5/28/2016 |
| 1.8.0 | 1,615 | 2/18/2016 |