Cellular SIMcom modems 01
This article will contain example on how to configure SIMcom cellular modems in using PPP interface in RouterOS v6.xx
Article covers following models:
Note: LTE speeds for SIM7100 will be available only starting RouterOS v7 major release!
Configuration example / Comments
In this example we will assume that you already have basic router configuration in place (if not consult this: initial configuration using webfig)
This example will be covered in CLI (command line interface) configuration method. Some additional screenshots will be included so quick view for Winbox would also be there for reference.
1. Prepare modem for use in your Router
- If you are going to be using mini-PCIe version of SIMcom modem then these actions should be performed while router is powered off.
- Insert sim-card in modem usb interface or sim-card slot that is on your router. This part depends on which modem edition you have one as mini-pcie or usb dongle version.
- Add required antennas to modem (if required) and insert it in usb or mini-pcie slot.
- Power on the router.
- Ideally we always recommend to keep router fully updated: HOWTO upgrade RouterOS
2. Check if router sees the added device
Now let's check if router sees the device that you just added and can work with it.
- Check if ROS sees the modem with command: "/interface print"
[admin@MikroTik] > interface print Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE ACTUAL-MTU L2MTU 0 R ether1 ether 1500 1600 1 X wlan1 wlan 1500 1600 2 R ppp-out1 ppp-out 1500
We can see that interface #2 is ppp-out1, it will be the modem that you just added (presuming that it is not ppp interface from some other modem/configuration that you added previously).
Additional info to check (if required/needed).
- Ports, command: "/port print"
[admin@MikroTik] > port print Flags: I - inactive # DEVICE NAME CHANNELS USED-BY BAUD-RATE 0 1:2 usb1 5 PPP <ppp-out1> 9600
- If ROS sees modem as USB device, command: "/system resource usb print"
[admin@MikroTik] > /system resource usb print # DEVICE VENDOR NAME SPEED 0 1:1 Linux 3.3.5 ehci_hcd RB400 EHCI 480 Mbps 1 1:2 SimTech, Incorporated SimTech SIM5360 480 Mbps
3. Configure the modem
Modem configuration part.
- Check ppp-client menu for required interfaces, command: "/interface ppp-client print"
[admin@MikroTik] > /interface ppp-client print Flags: X - disabled, R - running 0 R name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb1 data-channel=2 info-channel=3 apn="internet.example.com" pin="" user="" password="" profile=default phone="" dial-command="ATDT" modem-init="" null-modem=no dial-on-demand=no add-default-route=yes default-route-distance=0 use-peer-dns=yes keepalive-timeout=30 allow=pap,chap,mschap1,mschap2
- Configure ppp interface, command example:
/interface ppp-client set 0 \ dial-on-demand=no \ use-peer-dns=yes \ add-default-route=yes \ data-channel=2 \ info-channel=3 \ apn=internet.example.com /
This part will depend on what you need to configure, first five options will be a requirement. Starting with APN other options like pin, etc configuration becomes dependent on what your cellular ISP requires. to get all available options in console while inputing press tab.
- After executing previous command to check if modem has connected you can run the same: "/interface ppp-client print" command and check if ppp interface have running flag "R". Or run monitor command: "/interface ppp-client monitor 0"
[admin@MikroTik] > /interface ppp-client monitor 0 status: connected uptime: 34m12s encoding: connect-speed: 115200 mtu: 1500 mru: 1500 local-address: x.x.x.x remote-address: 0.0.0.0
And gotten IP address from ISP.
[admin@MikroTik] > /ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK INTERFACE 0 ... 1 D x.x.x.x/32 x.x.x.x ppp-out1 <----
4. Additional configuration
One last configuration piece to allow access from LAN to WAN, command: "/ip firewall nat add chain=srcnat out-interface=ppp-out1 action=masquerade"
5. Now to confirm that every thing has been configured correctly I suggest to run ping to some web resource from both your router and PC that is connected to lan. As if there is some problems this step might indicate where you should look for the.
... How sample configuration would look if exported(not including other configuration router):
[admin@MikroTik] > export ... /port set 0 name=usb1 /interface ppp-client add apn=internet.example.com data-channel=2 dial-on-demand=no disabled=no \ info-channel=3 name=ppp-out1 port=usb1 /ip firewall nat add action=masquerade chain=srcnat out-interface=ppp-out1 ... [admin@MikroTik] >