Jun 1, 2013

How to Setup Mikrotik Router OS

After i wrote article about how to install Router OS on a Pc's, Now i will show you how to configure the Mikrotik Router OS as a Internet Gateways. For your information, to setup the Mikrotik Router OS you can use some metode. First, We can configure directly from the pc's . Just turn on the pc and you will show the login screen after the boot process finished.

Second : We can use the small tools from mikrotik with Grapic user Interface,The tools is a magic tools, Mikrotik give the name as Winbox . But on this article i will guide you to setting up the router Os with the first methode. Unfortunetly with this methode you will setup the router with command line interface. But don't worry, you can copy paste my configuration for the first time before you understand the command line function.

If you copy-paste my configuration, Make sure the Network topology on your home is same as with this tutorials.

For the first : Setting up your DSL Modems or your internet connection with this parametre :

Modem Ip/ Internet Ip : 192.168.1.1
Your Laptop/workstation IP : 192.168.0.10

We will start the configuration :


system identity set name=MyNet
ip address add address 192.168.1.2/27 interface=ether1
ip address add address 192.168.0.1/24 interface=ether2

Explanation :

-System identity is a identity of aour routers, you can change with what ever you want
- Ip address 192.168.1.2 is an Ip address which will comunicated with the Modems Ip to the internet
- Ip address 192.168.0.1 is a default gateway for the client/your computers
- Ether1 is an interface, you must connetcting the Modems with the UTP cable to ether1 port
- Ether2 is an interface which connecting your laptops or your PC client/switch. Remember, you must be connecting with this port if you wanna conect to the internet with your pc.

Next step : Add the internet gateway
add comment="" disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.1.1 scope=30 target-scope=10

192.168.1.1 is your Modems Ip

Next : DNS Setup

/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4

8.8.8.8 and 8.8.4.4 is a google free DNS service. You can use your own parametre from ISP's

Before i show you the next steps, you must test your connection with ping command to the DNS servers :

ping 8.8.8.8
8.8.8.8 64 byte ping: ttl=242 time=255 ms
8.8.8.8 64 byte ping: ttl=242 time=243 ms
8.8.8.8 64 byte ping: ttl=242 time=247 ms
8.8.8.8 64 byte ping: ttl=242 time=243 ms
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 243/247.0/255 ms

If the DNS replayed , you have been succed to configure the router to cominicate with the DNS servers and Internet

As long as, your router have been succes to comincating with the internet, But your computer Can;t do it. We must create the rules to NAT the Internet to your computers.

add action=masquerade chain=srcnat comment="" disabled=no out-interface=\
ether1

You should to change your ip address configuration on your laptops to the static IP.

for the exmaple :

Ip address : 192.168.0.20
netmask : 255.255.255.0
Default gateway : 192.168.0.1
Primary DNS : 8.8.8.8
Secondary DNS : 8.8.4.4

This is it, you have been succed to configure the Mikrotik router os as a Internet Gateway. In the next article i will show you how to configure mikrotik with Grapic user interface using a tools called Winbox. I hope this article can help you. Thanks

4 comments:

Unknown said...

Hi there, awesome site. I thought the topics you posted on were very interesting,tested and beautiful blog..great tips as well...Good going!!

To get How to reset Linksys E1200 Wi-fi N-Router,Please visit the link.

Thankyou
Lacy Brown

alex walker said...

Your content is very good...
I wanted to say a big thanks. This has helped many a times...
I like you post dear. It's contain nice information...
More info:- Netgear Router Technical Support

Md. AL-AMIN said...

very good. thank u for share. keep it up go to advance topic of mikrotik if possible. like vpn, routing, tunneling, bandwidth management etc

Knife Hubs said...

Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee
Monitor Bee

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Computer Tricks and Tips