How to configure Mikrotik routers to work with WiMAX modem
This demonstration is going to be simple and straight to the point. Let us assume that you have a local area network on which your network printer, file server and other network resources have been configured and are working properly with no internet access. Now you have a WiMAX modem through which you want your LAN users to have access to the internet. How do you integrate your WiMAX into your already configured Mikrotik setup. In this post, I will share with us on how to configure a mikrotik router to work with Wimax.
Your WiMAX, which comes with one or two ethernet ports, has been pre-configured with DHCP, default gateway and DNS. To get the Mikrotik to work with it, you need to provision a port on the Mikrotik as a dhcp client. This port will connect to the WiMAX and obtain IP address, subnetmask, default gateway and DNS server address from the. Assuming we want to use ether1 on the Mikrotik for this, the below commands will accomplish it.
[admin@MikroTik] > ip dhcp-client add interface=ether1
Next, you need to bridge the remaining ports on the Mikrotik (assuming you have no switch and the LAN users are few).
[admin@MikroTik] > interface bridge add name=bridge1
Then, add ports to the bridge
[admin@MikroTik] > interface bridge port add interface=ether5 bridge=bridge1
[admin@MikroTik] > interface bridge port add interface=ether4 bridge=bridge1
[admin@MikroTik] > interface bridge port add interface=ether3 bridge=bridge1
[admin@MikroTik] > interface bridge port add interface=ether2 bridge=bridge1
Configure a network for the bridge.
[admin@MikroTik] > ip add add address=192.168.1.1/24 interface=bridge1
Configure dhcp server for the bridge:
[admin@MikroTik] ip dhcp-server> setup.
Select interface to run DHCP server on: dhcp server interface: bridge1
Select network for DHCP addresses: dhcp address space: 192.168.1.0/24
Select gateway for given network: gateway for dhcp network: 192.168.1.1
Select pool of ip addresses to be given out by DHCP server: addresses to give out: 192.168.1.2-192.168.1.254
Select DNS servers: dns servers: 192.168.1.1
Select lease time: lease time: 3d
Next, configure NAT for your LAN users, else your local IP wont be “routable” through the WiMAX network.
/ip firewall nat
add chain=srcnat src-address=192.168.1.0/24 action=masquerade
Configure default route on the Mikrotik to forward unknown-destination traffics to the WiMAX modem
[admin@MikroTik] > ip route add dst-address=0.0.0.0/0 gateway=ether1