RouterOS Basics
1. IP Addressing and Subnetting
IP addressing is the foundation of network communication. In RouterOS, understanding how to configure IP addresses and subnets is crucial. An IP address is a unique identifier for a device on a network, and subnetting helps in dividing a network into smaller, manageable segments.
For instance, consider a network with the IP address 192.168.1.0/24. This means the network has 256 possible addresses, ranging from 192.168.1.0 to 192.168.1.255. By subnetting, you can create smaller networks within this larger one, such as 192.168.1.0/26, which would have 64 possible addresses.
Example: To configure an IP address on a MikroTik router, you would use the command:
/ip address add address=192.168.1.1/24 interface=ether1
This command assigns the IP address 192.168.1.1 with a subnet mask of 255.255.255.0 to the interface named "ether1".
2. Routing Basics
Routing is the process of selecting paths in a network along which to send network traffic. In RouterOS, routing involves setting up static routes, dynamic routing protocols, and understanding how packets are forwarded between different networks.
Imagine routing as a map navigator guiding traffic from one location to another. For example, if you want to send data from your local network (192.168.1.0/24) to a remote network (10.0.0.0/24), you need to configure a route that directs traffic through the appropriate gateway.
Example: To add a static route in RouterOS, you would use the command:
/ip route add dst-address=10.0.0.0/24 gateway=192.168.1.254
This command sets up a route that sends traffic destined for the 10.0.0.0/24 network through the gateway at 192.168.1.254.