Mikrotik Router: Internet Access wth Static IP from ISP

For the WISP project we had to first obtain a static IP address from an ISP where we will be buying bandwidth from for the internet connectivity to the WISP clients. For this we needed to configure our Mikrotik cloud router with the provided IP address and gateway address. This was fairly easy to do. This is a record of how it was done.

 The ISP will usually give you IP address for your router, network address and the gateway IP address which refers to the connection at the ISP router/switch. Also the ISP will provide primary and secondary DNS address. Suppose your ISP gave you the following IP addresses:

Network ID: 50.50.50.92/30

IP Address: 50.50.50.94

Gateway: 50.50.50.93

Subnet Mask: 255.255.255.252

 

DNS Primary: 60.60.255.47

DNS Secondary: 60.60.255.3

 So we need to configure these IP on the Mikrotik router.

To configure the static IP address we open the IP>Addresses in the WinBox meu. There we can add new IP address using the '+' and assign to Ethernet port of the router such as ether1, ether2 etc. We can also add new IP and assign to bridge interface, SFP port internet and other interfaces. 

To configure static IP given by an ISP click on the '+' sign and then enter the IP address and the network addresses and assign to the Ethernet port where the Ethernet cable from the media converter is connected to. In this case, the Ethernet cable from the ISP is connected to the ether1 port of the Mikrotik CCR cloud router.

In the Address field type in 50.50.50.94/30 and in the Network field type in 50.50.50.92 as provided by your ISP and then select the internet which is ether1.

static IP configuration Mikrotik cloud router

To configure the gateway IP we go to IP>Routes. There we will add a new Route by clicking on the '+'. There for the Dst. Address field we enter 0.0.0.0/0 and in the Gateway field we enter 50.50.50.93 as provided by the ISP. This means that all traffic from our network goes to the gateway IP address given by the ISP.

gateway configuration mikrotik

Then we need to create a bridge. From the Bridge menu, click on the + sign to add a new bridge and give it a name like bridge1. Then click on the Ports tab and click on + sign to add ports to the bridge. Add the ether2, ether3, ether4, ether5 and ether6 to bridge1.


Then we will create a new DHCP server on the bridge1 interface. First we need to add a DHCP Pool and then set up the DHCP server.

 Create a dhcp pool by going to IP>Pool and then click on the + sign to add a new Pool. Enter in the Address field your desired DHCP IP range such as 192.168.1.2-192.168.1.254. 


Then to add new DHCP server, go to IP>DHCP Server. There click on the + sign to add a new DHCP server. Provide some name to the DHCP server like dhcp1 and assign it the bridge bridge1 interface. Select the dhcp_pool1 in the Address Pool field.

On the Network tab verify the settings:


If everything is ok, then we will get internet connection from the ISP on ether1 port and we can get internet access on ether2 to ether6. 

So in this if you are given an static IP you will configure your Mikrotik router or Mikrotik switch to access the internet.

Post a Comment

Previous Post Next Post