Today we are going to look at how to assign IP addresses to interfaces in Mikrotik’s RouterOS CLI. For this example we are going to assign an outside IP address of 210.50.10.1/28 to interface ether1 and an inside IP address 10.100.20.1/24 to interface ether2.
Once you have logged into the RouterOS CLI we first need to navigate to the “IP address” sub-menu by issuing the following command:
/ip address
Now we are going to add your outside address with this command:
add address=210.50.10.1/28 interface=ether1
Now add the inside address:
add address=10.100.20.1/24 interface=ether2
We can then verify that our settings were added correctly by typing:
print
You should now see something similar to the following:
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 210.50.10.1/28 210.50.10.0 210.50.10.15 ether1
1 10.100.20.1/24 10.100.20.0 10.100.20.255 ether2
And that’s it. RouterOS is pretty straight forward and easy to navigate. I will be covering more in future posts on advanced routing, dhcp, dns, etc so stay tuned.
There are times when you don’t want to use the routers built in DHCP server and want to use say a Windows Server to hand out your networks DHCP scopes. This guide is for basic DHCP relay configuration in Cisco IOS.
In this example we are going to be configuring the “ip helper” command on interface FastEthernet0/1. Our IP for the interface will be 10.10.20.1/24 and the IP of our DHCP server will be 10.10.10.5/24.
After you have accessed the command line of the router the first thing you will need to do is get into configuration mode by issuing the following command:
conf t
The DHCP server and relay agent should be enabled by default, however if for some reason they are not already enabled they can be enabled by issuing the following command:
service dhcp
Next we will want to enable the DHCP relay agent information option:
ip dhcp relay information option
Now we need to configure the actual interface via the following commands:
interface fastethernet0/1
ip address 10.10.20.1 255.255.255.0
ip helper-address 10.10.10.5
no shut
We now have a working DHCP relay pointing to our Windows DHCP Server for clients that connect to interface FastEthernet0/1. There are tons more ways to utilize and configure this functionality. For example you could assign “ip helper” to sub-interfaces for vlans. We will dive into the more advanced functionality in later articles, but for now this gives you the basic principal of the commands for configuring DHCP relay.
I have received a lot of questions lately about resetting the TCP/IP stack in Windows 7. The command is actually the same as it was in Windows XP. Just open a command line window and type the following:
netsh int ip reset resetlog.txt
You will then need to reboot to make sure the changes take effect.