Как изменить ttl микротик

Как изменить ttl микротик Support for Direct-IP mode type cards only. MBIM support is available in RouterOS v7 releases and MBIM driver is loaded automatically. If modem is not recognized in RouterOS v6 — Please test it in v7 releases before asking for support in RouterOS v6. To enable access via a PPP interface […]

Содержание

  1. Как изменить ttl микротик
  2. LTE Client
  3. Properties
  4. APN profiles
  5. Scanner
  6. User Info command
  7. Properties (Up to 6.40)
  8. User at-chat command
  9. Quick setup example
  10. Passthrough Example
  11. Как изменить ttl микротик
  12. Re: How to setup Mikrotik router and TTL
  13. Re: How to setup Mikrotik router and TTL
  14. Re: How to setup Mikrotik router and TTL
  15. Re: How to setup Mikrotik router and TTL
  16. Re: How to setup Mikrotik router and TTL
  17. Re: How to setup Mikrotik router and TTL
  18. Re: How to setup Mikrotik router and TTL
  19. Re: How to setup Mikrotik router and TTL
  20. Re: How to setup Mikrotik router and TTL
  21. Меняем IMEI для R11e-LTE, R11e-4G, R11e-LTE6 и EG12-EA (Chateau LTE12)
  22. MikroTik R11e-LTE
  23. MikroTik R11e-4G
  24. MikroTik R11e-LTE6
  25. EG12-EA он же (Chateau LTE12)
  26. Пресловутый TTL
  27. Законодательный аспект смены IMEI

Как изменить ttl микротик

Support for Direct-IP mode type cards only. MBIM support is available in RouterOS v7 releases and MBIM driver is loaded automatically. If modem is not recognized in RouterOS v6 — Please test it in v7 releases before asking for support in RouterOS v6.

To enable access via a PPP interface instead of a LTE Interface, change direct IP mode with /port firmware set ignore-directip-modem=yes command and a reboot. Note that using PPP emulation mode you may not get the same throughput speeds as using the LTE interface emulation type.

For RouterOS v7 ignore-direct-modem parameter renamed to «mode» and moved to /interface lte settings menu.

LTE Client

Properties

Property Description
allow-roaming (yes | no; Default: no) Enable data roaming for connecting to other countries data-providers. Not all LTE modems support this feature. Some modems, that do not fully support this feature, will connect to the network but will not establish an IP data connection with allow-roaming set to no.
apn-profiles (string; Default: default) Which APN profile to use for this interface
band (integer list; Default: «») LTE Frequency band used in communication LTE Bands and bandwidths
nr-band (integer list; Default: «») 5G NR Frequency band used in communication 5G NR Bands and bandwidths
comment (string; Default: «») Descriptive name of an item
disabled (yes | no; Default: yes) Whether interface is disabled or not. By default it is disabled.
modem-init (string; Default: «») Modem init string (AT command that will be executed at modem startup)
mtu (integer; Default: 1500) Maximum Transmission Unit. Max packet size that LTE interface will be able to send without packet fragmentation.
name (string; Default: «») Descriptive name of the interface.
network-mode (3g | gsm | lte | 5g) Select/force mode for LTE interface to operate with
operator (integer; Default: «») used to lock device to specific operator full PLMN number is used for lock consisting from MCC+MNC. PLMN codes
pin (integer; Default: «») SIM Card’s PIN code.

APN profiles

All network related settings are moved under profiles, starting from RouterOS 6.41

Property Description
add-default-route (yes | no) Whether to add default route to forward all traffic over the LTE interface.
apn (string) Service Provider’s Access Point Name
authentication (pap | chap | none; Default: none) Allowed protocol to use for authentication
default-route-distance (integer; Default: 2) Sets distance value applied to auto created default route, if add-default-route is also selected. LTE route by default is with distance 2 to prefer wired routes over LTE
ip-type (ipv4 | ipv4-ipv6 | ipv6; Default: ) Requested PDN type
ipv6-interface (; Default: ) Interface on which to advertise IPv6 prefix
name (string; Default: ) APN profile name
number (integer; Default: ) APN profile number
passthrough-interface (; Default: ) Interface to passthrough IP configuration (activates passthrough)
passthrough-mac (MAC; Default: auto) If set to auto, then will learn MAC from first packet
password (string; Default: ) Password used if any of the authentication protocols are active
use-network-apn (yes | no; Default: yes) Parameter is available starting from RouterOS v7 and used only for MBIM modems. If set to yes, uses network provided APN.
use-peer-dns (yes | no; Default: yes) If set to yes, uses DNS recieved from LTE interface
user (integer) Username used if any of the authentication protocols are active

Scanner

It is possible to scan LTE interfaces with /interface lte scan command

Available read only properties:

Property Description
duration (integer) Duration of scan in seconds
freeze-frame-interval (integer) time between data printout
number (integer) Interface number or name

User Info command

It is possible to send special «info» command to LTE interface with /interface lte info command. In RouterOS v7 this command is moved to /interface lte monitor menu.

Properties (Up to 6.40)

Property Description
user-command (string; Default: «») send a command to LTE card to extract useful information, e.g. with AT commands
user-command-only (yes | no; Default: )

User at-chat command

It is possible to send user defined «at-chat» command to LTE interface with /interface lte at-chat command.

You can also use «at-chat» function in scripts and assign command output to variable.

Quick setup example

Start with network settings —

Start with network settings — Add new connection parameters under LTE apn profile (provided by network provider):

Select newly created profile for LTE connection:

LTE interface should appear with running (R) flag:

From RouterOS=>6.41 DHCP client is added automatically. If it’s not added — add a DHCP Client to LTE Interface manually:

If required, add NAT Masquerade for LTE Interface to get internet to the local network:

After interface is added, you can use «info» command to see what parameters client acquired (parameters returned depends on LTE hardware device):

Passthrough Example

Starting from RouterOS v6.41 some LTE interfaces support LTE Passthrough feature where the IP configuration is applied directly to the client device. In this case modem firmware is responsible for the IP configuration and router is used only to configure modem settings — APN, Network Technologies and IP-Type. In this configuration the router will not get IP configuration from the modem. The LTE Passthrough modem can pass both IPv4 and IPv6 addresses if that is supported by modem. Some modems support multiple APN where you can pass the traffic from each APN to a specific router interface.

Passthrough will only work for one host. Router will automatically detect MAC address of the first received packet and use it for the Passthrough. If there are multiple hosts on the network it is possible to lock the Passthrough to a specific MAC. On the host on the network where the Passthrough is providing the IP a DHCP-Client should be enabled on that interface to. Note, that it will not be possible to connect to the LTE router via public lte ip address or from the host which is used by the passthrough. It is suggested to create additional connection from the LTE router to the host for configuration purposes. For example vlan interface between the LTE router and host.

To enable the Passthrough a new entry is required or the default entry should be changed in the ‘/interface lte apn’ menu

Источник

Как изменить ttl микротик

Tue Jan 12, 2021 12:14 am

I’ve been trying to get this set up on my new LHG LTE-US router

Im using verizon , and have tried a few options

Any help would be fantastic

Re: How to setup Mikrotik router and TTL

Tue Jan 12, 2021 5:15 pm

Anyone able to help? I work from home so going mobile with all this covid crap would be a great help for my family’s mental health

Re: How to setup Mikrotik router and TTL

Tue Jan 12, 2021 5:18 pm

RB4011iGS+, RB750Gr3, RB750r2, CRS326-24G-2S (in SwitchOS), CSS326-24G-2S, CSS106-5G-1S, RB260GS
Not sure if I beat them into submission, or they beat me into submission
Warning: I know enough to be dangerous.

Re: How to setup Mikrotik router and TTL

Tue Jan 12, 2021 5:19 pm

Re: How to setup Mikrotik router and TTL

Wed Jan 13, 2021 4:03 pm

I’ll get it setup today and fun that report @erlinden

So far I’ve been reading up but cZnt find a difinitive solution to change the TTL

So hopefully you experts can guide me in the right direction

Re: How to setup Mikrotik router and TTL

Wed Jan 13, 2021 5:46 pm

Re: How to setup Mikrotik router and TTL

Wed Jan 13, 2021 5:52 pm

Trying to adjust the TTL settings in the Mikrotik router to bypass the HOTSPOT data usage when my Verizon card is used on the dish

So I’m able to use unlimited data , as a phone does, and not use the hotspot data

Does that make sense??

Re: How to setup Mikrotik router and TTL

Wed Jan 13, 2021 6:02 pm

Re: How to setup Mikrotik router and TTL

Wed Jan 13, 2021 6:12 pm

Re: How to setup Mikrotik router and TTL

Wed Jan 13, 2021 6:23 pm

To manipulate TTL, you use an action=change-ttl rule in /ip firewall mangle.

The own traffic of the router should leave with TTL=255, but even that may not always be the case, so you need a mangle rule in chain postrouting which handles both the router’s own traffic (such as DNS) and the forwarded traffic from LAN.

/ip firewall mangle add chain=postrouting action=change-ttl new-ttl=set:255 ttl=greater-than:200 out-interface=your-lte-interface-name

In order that it worked, you must not use fasttracking (so disable the action=fasttrack-connection rule in /ip firewall filter if there is one) because one of the reasons why fasttracking speeds up packet processing is that it skips mangle rules.

If you happen to already have any other mangle rules in chain postrouting, first issue a command /ip firewall mangle print chain=postrouting where !dynamic, and only then issue the command above with additional parameters passthrough=yes place-before=0.

Whether this will help or not is a question, as the mobile operator may also check the IMEI of the equipment, not just the TTL, an even not accept connection to particular LTE bands for «wrong» IMEIs.

The additional condition (ttl=greater-than:200) is there to allow traceroute to work (using the hotspot data quota probably). If you’re never going to use traceroute, you may omit this condition.

Источник

Меняем IMEI для R11e-LTE, R11e-4G, R11e-LTE6 и EG12-EA (Chateau LTE12)

У компании MikroTik есть ряд продуктов (LtAP, wAP, SXT, Chateau и др.) основанных на собственных модемах и модемах партнеров, которые они официально интегрировали в свои решения. И соответственно эти девайсы используют разные модели модемов.
Бывают случаи, когда нам необходимо проверить оборудование, но под рукой есть только SIM карта оператора от своего же смартфона. Как правило тарифы на таких SIM определенным образом регламентированы под свой тип оборудования (Смартфоны, Планшеты и ПК). Что же делать в этом случае?

В таком случае у нас есть возможность изменить IMEI и внести некоторые правки в работу с TTL маршрутизатора. И как это делать для различных модемов, в устройствах компании MikroTik, далее в этой статье!

Важно понимать, что все действия, которые Вы совершаете, проводятся на ваш страх и риск!! Автор статьи не дает никаких гарантий на работоспособность изделия после внесения вами изменений, а так же не несет никакой ответственности по искам или за нанесенный ущерб.

MikroTik R11e-LTE

Модем LTE Cat.4, который обеспечивает скорость передачи данных до 150 Мбит/с на получение и до 50 Мбит/сек на отдачу.
Поддерживает большой набор различных частотных диапазонов.

По факту это модем MIFI на камне PXA1802 от компании Luat

Смена IMEI для R11e-LTE

Читаем текущий IMEI и сохраняем его, где-нибудь на всякий случай!

Удаляем текущий IMEI

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

MikroTik R11e-4G

Модем LTE Cat.4, который обеспечивает скорость передачи данных до 150 Мбит/с на получение и до 50 Мбит/сек на отдачу.
Поддерживает только диапазоны LTE FDD 3 (1800 МГц), 7 (2600 МГц), 20 (800 МГц) и 31 (450 МГц), а также диапазоны LTE TDD 41n (2500 МГц), 42 (3500 МГц) и 43 (3700 МГц).

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

MikroTik R11e-LTE6

Модем LTE-A Cat.6, который обеспечивает скорость передачи данных до 300 Мбит/с на получение и до 50 Мбит/сек на отдачу.
Такая скорость достигается за счет агрегации двух несущих частот, что позволяет устройству использовать несколько диапазонов одновременно. (Сеть оператора должна поддерживать данный тип соединения)

«AT*MRD_IMEI=DW» просто так на R11e-LTE6 не работают
Модем отвечает: «Output: +CME ERROR: Non-Production mode»
production mode (when power on, press SEND/END key will enter production mode)

Необходимо обязательно обновить до последней прошивки

Если видим, что есть новая прошивка

Ждем пару минут пока скачивается прошивка.

После скачивания выполняем проверку

Примерно через 5 минут модем сам перезагрузится

Заходим в Production Mode

Читаем текущий IMEI и сохраняем его, где-нибудь на всякий случай!

Удаляем текущий IMEI

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

Выходим из Production Mode

EG12-EA он же (Chateau LTE12)

Модем LTE-A Cat.12, который обеспечивает скорость передачи данных до 600 Мбит/с на получение и до 150 Мбит/сек на отдачу.
Такая скорость достигается за счет агрегации трех несущих частот, что позволяет устройству использовать несколько диапазонов одновременно. (Сеть оператора должна поддерживать данный тип соединения)

Внутри встроен модем LTE-A Cat.12 компании Quectel LTE-A EG12-EA (для регионов EMEA/APAC/Brazil)

Читаем текущий IMEI и сохраняем его, где-нибудь на всякий случай!

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

Проверяем сохранился ли новый IMEI

Пресловутый TTL

TTL — Time To Live
Предельный период времени или число итераций или переходов, за который набор данных (пакет) может существовать до своего исчезновения. Т.е. по простому TTL устанавливает время жизни пакета.

Для определения типа устройства и соответствия тарифу (смартфон, планшет, ПК) операторы отправляют в сторону клиента пакеты с различным TTL (МТС например отправляет TTL=1) для того, чтобы эти пакеты убивались на роутере при прохождении через него. В сторону оператора устройства отправляют свои стандартные пакеты.

Для того, чтобы симулировать устройство Linux, Mac, Android или iOS (TTL=64)

Для того, чтобы симулировать устройство Windows, WindowsPhone (TTL=128)

Не используйте правила FastTrack при смене TTL.

Законодательный аспект смены IMEI

В Российской Федерации, смена IMEI устройства не регулируется ни одним правовым актом!
Соответственно, если Вы из другой страны, то перед тем, как применять, что-то из данной статьи, лучше ознакомится с законодательным аспектом в отношении подобных манипуляций.

Источник


Summary

Support for Direct-IP mode type cards only. MBIM support is available in RouterOS v7 releases and MBIM driver is loaded automatically. If modem is not recognized in RouterOS v6 — Please test it in v7 releases before asking for support in RouterOS v6.

To enable access via a PPP interface instead of a LTE Interface, change direct IP mode with /port firmware set ignore-directip-modem=yes command and a reboot. Note that using PPP emulation mode you may not get the same throughput speeds as using the LTE interface emulation type. 

For RouterOS v7 ignore-direct-modem parameter renamed to «mode» and moved to /interface lte settings menu.

LTE Client

Properties

Property Description
allow-roaming (yes | no; Default: no) Enable data roaming for connecting to other countries data-providers. Not all LTE modems support this feature. Some modems, that do not fully support this feature, will connect to the network but will not establish an IP data connection with allow-roaming set to no.
apn-profiles (string; Default: default) Which APN profile to use for this interface
band (integer list; Default: «») LTE Frequency band used in communication LTE Bands and bandwidths
nr-band (integer list; Default: «») 5G NR Frequency band used in communication 5G NR Bands and bandwidths
comment (string; Default: «») Descriptive name of an item
disabled (yes | no; Default: yes) Whether interface is disabled or not. By default it is disabled.
modem-init (string; Default: «») Modem init string (AT command that will be executed at modem startup)
mtu (integer; Default: 1500) Maximum Transmission Unit. Max packet size that LTE interface will be able to send without packet fragmentation.
name (string; Default: «») Descriptive name of the interface.
network-mode (3g | gsm | lte | 5g) Select/force mode for LTE interface to operate with
operator (integer; Default: «») used to lock device to specific operator full PLMN number is used for lock consisting from MCC+MNC. PLMN codes
pin (integer; Default: «») SIM Card’s PIN code.

APN profiles

All network related settings are moved under profiles, starting from RouterOS 6.41

Sub-menu: /interface lte apn
Property Description
add-default-route (yes | no) Whether to add default route to forward all traffic over the LTE interface.
apn (string) Service Provider’s Access Point Name
authentication (pap | chap | none; Default: none) Allowed protocol to use for authentication
default-route-distance (integer; Default: 2) Sets distance value applied to auto created default route, if add-default-route is also selected. LTE route by default is with distance 2 to prefer wired routes over LTE
ip-type (ipv4 | ipv4-ipv6 | ipv6; Default: ) Requested PDN type
ipv6-interface (; Default: ) Interface on which to advertise IPv6 prefix
name (string; Default: ) APN profile name
number (integer; Default: ) APN profile number
passthrough-interface (; Default: ) Interface to passthrough IP configuration (activates passthrough)
passthrough-mac (MAC; Default: auto) If set to auto, then will learn MAC from first packet
password (string; Default: ) Password used if any of the authentication protocols are active
use-network-apn (yes | no; Default: yes) Parameter is available starting from RouterOS v7 and used only for MBIM modems. If set to yes, uses network provided APN.
use-peer-dns (yes | no; Default: yes) If set to yes, uses DNS recieved from LTE interface
user (integer) Username used if any of the authentication protocols are active

Scanner

It is possible to scan LTE interfaces with /interface lte scan command

Available read only properties:

Property Description
duration (integer) Duration of scan in seconds
freeze-frame-interval (integer) time between data printout
number (integer) Interface number or name

User Info command

It is possible to send special «info» command to LTE interface with /interface lte info command. In RouterOS v7 this command is moved to /interface lte monitor menu.

Properties (Up to 6.40)

Property Description
user-command (string; Default: «») send a command to LTE card to extract useful information, e.g. with AT commands
user-command-only (yes | no; Default: )

User at-chat command

It is possible to send user defined «at-chat» command to LTE interface with /interface lte at-chat command.

[admin@MikroTik] > /interface lte at-chat lte1 input="AT*mrd_imei?"                         
  output: *MRD_IMEI:356159060388208

OK

You can also use «at-chat» function in scripts and assign command output to variable.

[admin@MikroTik] > :global "lte_command" [/interface lte at-chat lte1 input="AT*mrd_imei?" as-value ] 
[admin@MikroTik] > :put $"lte_command"
output=*MRD_IMEI:356159060388208

OK

Quick setup example

Start with network settings —

This guide is for RouterOS versions starting from 6.41

Start with network settings — Add new connection parameters under LTE apn profile (provided by network provider):

/interface lte apn add name=profile1 apn=phoneprovider.net authentication=chap password=web user=web

Select newly created profile for LTE connection:

/interface lte set [find] apn-profiles=profile1 

LTE interface should appear with running (R) flag:

[admin@MikroTik] > /interface lte print
Flags: X - disabled, R - running 
0 R name="lte1" mtu=1500 mac-address=AA:AA:AA:AA:AA:AA 

From RouterOS=>6.41 DHCP client is added automatically. If it’s not added — add a DHCP Client to LTE Interface manually:

/ip dhcp-client add default-route-distance=1 disabled=no interface=lte1 

If required, add NAT Masquerade for LTE Interface to get internet to the local network:

/ip firewall nat add action=masquerade chain=srcnat out-interface=lte1

After interface is added, you can use «info» command to see what parameters client acquired (parameters returned depends on LTE hardware device):

[admin@MikroTik] > /interface lte info lte1 once 
status: call in progress
pin-status: no password required
functionality: full
manufacturer: Huawei Technologies Co., Ltd.
model: ME909u-521
revision: 12.631.07.01.00
current-operator: vodafone ES
current-cellid: 44436007
access-technology: Evolved 3G (LTE)
signal-strengh: -79 dBm
frame-error-rate: n/a
earfcn: n/a
imei: 860461024123456
imsi: 234012555034981
uicc: n/a
rssi: -79dBm
rsrp: -109dBm
rsrq: -13dB
sinr: -1dB

Passthrough Example

Starting from RouterOS v6.41 some LTE interfaces support LTE Passthrough feature where the IP configuration is applied directly to the client device. In this case modem firmware is responsible for the IP configuration and router is used only to configure modem settings — APN, Network Technologies and IP-Type. In this configuration the router will not get IP configuration from the modem. The LTE Passthrough modem can pass both IPv4 and IPv6 addresses if that is supported by modem. Some modems support multiple APN where you can pass the traffic from each APN to a specific router interface.

Passthrough will only work for one host. Router will automatically detect MAC address of the first received packet and use it for the Passthrough. If there are multiple hosts on the network it is possible to lock the Passthrough to a specific MAC. On the host on the network where the Passthrough is providing the IP a DHCP-Client should be enabled on that interface to. Note, that it will not be possible to connect to the LTE router via public lte ip address or from the host which is used by the passthrough. It is suggested to create additional connection from the LTE router to the host for configuration purposes. For example vlan interface between the LTE router and host.

To enable the Passthrough a new entry is required or the default entry should be changed in the ‘/interface lte apn’ menu

Passthrough is not supported by all chipsets.

Examples.

To configure the Passthrough on ether1:

[admin@MikroTik] > /interface lte apn add apn=apn1 passthrough-interface=ether1
[admin@MikroTik] > /interface lte set lte1 apn-profiles=apn1

To configure the Passthrough on ether1 host 00:0C:42:03:06:AB:

[admin@MikroTik] > /interface lte apn add apn=apn1 passthrough-interface=ether1 passthrough-mac=00:0C:42:03:06:AB
[admin@MikroTik] > /interface lte set lte1 apn-profiles=apn1

To configure multiple APNs on ether1 and ether2:

[admin@MikroTik] > /interface lte apn add apn=apn1 passthrough-interface=ether1
[admin@MikroTik] > /interface lte apn add apn=apn2 passthrough-interface=ether2
[admin@MikroTik] > /interface lte set lte1 apn-profiles=apn1,apn2

To configure multiple APNs with the same APN for different interfaces:

[admin@MikroTik] > /interface lte apn add name=interface1 apn=apn1
[admin@MikroTik] > /interface lte apn add name=interface2 apn=apn1 passthrough-interface=ether1
[admin@MikroTik] > /interface lte set lte1 apn-profiles=interface1
[admin@MikroTik] > /interface lte set lte2 apn-profiles=interface2

Dual SIM

Boards with switchable SIM slots

RouterBoard Modem slot SIM slots Switchable
LtAP lower 2 | 3 Y
upper 1 N
LtAP mini up | down Y
SXT R a |  b Y

SIM slots switching commands

  • RouterOS v7
/interface lte settings set sim-slot=down
  • RouterOS v6 after 6.45.1
/system routerboard modem set sim-slot=down
  • RouterOS v6 pre 6.45.1:
/system routerboard sim set sim-slot=down

For more reference please see board block diagram,  Quick Guide and User manual.

Usage Example

Follow this link — Dual SIM Application, to see examples of how to change SIM slot based on roaming status and in case the interface status is down with help of RouterOS scripts and scheduler.

Tips and Tricks

This paragraph contains information for additional features and usage cases.

Find device location using Cell information

On devices using R11e-LTE International version card (wAP LTE kit) some extra information is provided under info command (from 6.41rc61)

   current-operator: 24701
                lac: 40
     current-cellid: 2514442
Property Description
current-operator (integer; Default: ) Contains MCC and MNC. For example: current-operator: 24701 breaks to: MCC=247 MNC=01
lac (integer; Default: ) location area code (LAC)
current-cellid (integer; Default: ) Station identification number

Values can be used to find location in databases: Cell Id Finder

Using Cell lock

It is possible to lock R11e-LTE, R11e-LTE6 and R11e-4G modems and equipped devices to exact LTE tower. LTE info command provides currently used cellular tower information:

         phy-cellid: 384
             earfcn: 1300 (band 3, bandwidth 20Mhz)
Property Description
phy-cellid (integer; Default: ) Physical Cell Identification (PCI) of currently used cell tower.
earfcn (integer; Default: ) Absolute Radio Frequency Channel Number

Exact tower location as well as available bands and other information can be acquired from mobile carrier or by using online services:

CellMapper

By using those acquired variables it’s possible to send AT command to modem for locking to tower in current format:

for R11e-LTE and R11e-LTE6

AT*Cell=<mode>,<NetworkMode>,<band>,<EARFCN>,<PCI>

where

<mode> :
0 – Cell/Frequency disabled
1 – Frequency lock enabled
2 – Cell lock enabled

<NetworkMode>
0 – GSM
1 – UMTS_TD
2 – UMTS_WB
3 – LTE

<band>
Not in use, leave this blank

<EARFCN>
earfcn from lte info

<PCI>
phy-cellid from lte info

To lock modem at previously used tower at-chat can be used:

/interface lte at-chat lte1 input="AT*Cell=2,3,,1300,384"

For R11e-LTE all set on locks are lost after reboot or modem reset. Cell data can be also gathered from «cell-monitor».

For R11e-LTE6 cell lock works only for the primary band, this can be useful if you have multiple channels on the same band and you want to lock it to a specific earfcn. Note, that cell lock is not band-specific and for ca-band it can also use other frequency bands, unless you use band lock.

Use cell lock to set the primary band to the 1300 earfcn and use the second channel for the ca-band:

/interface lte at-chat lte1 input="AT*Cell=2,3,,1300,138"

Now it uses the earfcn: 1300 for the primary channel:

         primary-band: B3@20Mhz earfcn: 1300 phy-cellid: 138
              ca-band: B3@5Mhz earfcn: 1417 phy-cellid: 138

You can also set it the other way around:

/interface lte at-chat lte1 input="AT*Cell=2,3,,1417,138"

Now it uses the earfcn: 1417 for the primary channel:

         primary-band: B3@5Mhz earfcn: 1417 phy-cellid: 138
              ca-band: B3@20Mhz earfcn: 1300 phy-cellid: 138

For R11e-LTE6 modem cell lock information will not be lost after reboot or modem reset. To remove cell lock use at-chat command:

/interface lte at-chat lte1 input="AT*Cell=0"

for R11e-4G

AT%CLCMD=<mode>,<mode2>,<EARFCN>,<PCI>,<PLMN>
AT%CLCMD=1,1,3250,244,"24705"

where

<mode> :
0 – Cell/Frequency disabled
1 – Cell lock enabled

<mode2> :
0 - Save lock for first scan
1 - Always use lock 
(after each reset modem will clear out previous settings no matter what is used here)

<EARFCN>
earfcn from lte info

<PCI>
phy-cellid from lte info

<PLMN>
Mobile operator code

All PLMN codes available here this variable can be also left blank

To lock modem to the cell — modem needs to be in non operating state, easiest way for R11e-4G modem is to add CellLock line to «modem-init» string:

/interface lte set lte1 modem-init="AT%CLCMD=1,1,3250,244,"24705""

Multiple cells can also be added by providing list instead of one tower information in following format:

AT%CLCMD=<mode>,<mode2>,<EARFCN_1>,<PCI_1>,<PLMN_1>,<EARFCN_2>,<PCI_2>,<PLMN_2>

For example to lock to two different PCIs within same band and operator:

/interface lte set lte1 modem-init="AT%CLCMD=1,1,6300,384,"24701",6300,385,"24701""

for Chateau LTE12 and LHG LTE18

AT+QNWLOCK="common/4g",<num of cells>,[[<freq>,<pci>],...]
AT+QNWLOCK="common/4g",1,6300,384

where

<num of cells>
number of cells to cell lock

<freq>
earfcn from lte info

<pci>
phy-cellid from lte info

Single cell lock example:

/interface/lte/at-chat lte1 input="AT+QNWLOCK="common/4g",1,3050,448"

Multiple cells can also be added to cell lock. For example to lock to two different cells:

/interface/lte/at-chat lte1 input="AT+QNWLOCK="common/4g",2,3050,448,1574,474"

To remove the cell lock use this at-chat command:

/interface/lte/at-chat lte1 input="at+qnwlock="common/4g",0"

1. Cell lock information will not be saved after a reboot or modem reset. 2. AT+QNWLOCK command can lock the cell and frequency. Therefore, the module can be given priority to register to the locked cell, however, according to the 3gpp protocol, the module will be redirected or handover to a cell with better signal instructions, even if it is not within the lock of the command. This phenomenon is normal.

Cell Monitor

Cell monitor allows to scan available nearby mobile network cells:

[admin@MikroTik] > /interface lte cell-monitor lte1 
PHY-CELLID BAND         PSC EARFCN                 RSRP          RSRQ          RSSI         SINR
        49 B20              6300                -110dBm       -19.5dB
       272 B20              6300                -116dBm       -19.5dB
       374 B20              6300                -108dBm         -16dB
       384 B1               150                 -105dBm       -13.5dB
       384 B3               1300                -106dBm         -12dB
       384 B7               2850                -107dBm       -11.5dB
       432 B7               2850                -119dBm       -19.5dB

Gathered data can be used for more precise location detection or for Cell lock.

Not all modems support this feature

Troubleshooting

Enable LTE logging:

[admin@MikroTik] > /system logging add topics=lte

Check for errors in log:

[admin@MikroTik] > /log print

11:08:59 lte,async lte1: sent AT+CPIN? 
11:08:59 lte,async lte1: rcvd +CME ERROR: 10 

search for CME error description online,

in this case: CME error 10 — SIM not inserted

Locking band on Huawei and other modems

To lock band for Huawei modems /interface lte set lte1 band="" option can’t be used.

It is possible to use AT commands to lock to desired band manually.

To check all supported bands run at-chat command:

[admin@MikroTik] /interface lte at-chat lte1 input="AT^SYSCFGEX=?"

output: ^SYSCFGEX: ("00","03","02","01","99"),((2000004e80380,"GSM850/GSM900/GSM1800/GSM1900/WCDMA BCI/WCDMA BCII/WCDMA BCV/WCDMA BCVIII"),
(3fffffff,"All Bands")),(0-2),(0-4),((800d7,"LTE BC1/LTE BC2/LTE 
BC3/LTE BC5/LTE BC7/LTE BC8/LTE BC20"),(7fffffffffffffff,"All Bands")) 
OK


Example to lock to LTE band 7:

[admin@MikroTik] /interface lte set lte1 modem-init="AT^SYSCFGEX="03",3FFFFFFF,2,4,40,,"

Change last part 40 to desired band specified hexadecimal value where:

4 LTE BC3
40 LTE BC7
80000 LTE BC20
7FFFFFFFFFFFFFFF  All bands
etc

All band HEX values and AT commands can be found in Huawei AT Command Interface Specification guide

Check if band is locked:

[admin@MikroTik] /interface lte at-chat lte1 input="AT^SYSCFGEX?"

output: ^SYSCFGEX: "03",3FFFFFFF,0,2,40
OK

For more information check modem manufacturers AT command reference manuals.

mPCIe modems with RB9xx series devices

In case your modem is not being recognized after a soft reboot, then you might need to add a delay before the USB port is being initialized. This can be done using the following command:

/system routerboard settings set init-delay=5s

Boards with USB-A port and mPCIe

Some devices such as specific RB9xx’s and the RBLtAP-2HnD share the same USB lines between a single mPCIe slot and a USB-A port. If auto switch is not taking place and a modem is not getting detected, you might need to switch manually to either use the USB-A or mini-PCIe:

/system routerboard usb set type=mini-PCIe

Modem firmware upgrade

Starting from RouterOS version 6.44beta20 it is possible to upgrade modems firmware. The firmware upgrade is also possible for the Chateau series products starting from 7.1beta1 version.

Firmware update is available only as FOTA Firmware Over The Air — firmware upgrade can only be done through working mobile connection for:

  • )R11e-LTE
  • )R11e-LTE-US

Firmware update available as FOTA and as well as upgrade from file for:

  • )R11e-4G
  • )R11e-LTE6

Firmware update available as FOTA with access to the internet over any interface:

  • )EG12-EA (Chateau LTE12)
  • )RG502Q-EA (Chateau 5G)
  • )EG18-EA (LHG LTE18)

Firmware updates usually includes small improvements in stability or small bug fixes that can’t be included into RouterOS.

Check currently used firmware version by running:

[admin@MikroTik] > /interface lte info lte1 once

-----
revision: "MikroTik_CP_2.160.000_v008"
-----

Check if new firmware is available:

[admin@MikroTik] > /interface lte firmware-upgrade lte1 
  installed: MikroTik_CP_2.160.000_v008
     latest: MikroTik_CP_2.160.000_v010

Upgrade firmware:

[admin@MikroTik] > interface lte firmware-upgrade lte1 upgrade=yes
  status: downloading via LTE connection (>2min)

Whole upgrade process may take up to 10 minutes, depending on mobile connection speed.

After successful upgrade issue USB power-reset, reboot device or run AT+reset command, to update modem version readout under info command:

[admin@MikroTik] > /interface lte at-chat lte1 input="AT+reset"

if modem has issues connecting to cells after update, or there are any other unrelated issues — wipe old configuration with:

/interface lte at-chat lte1 input="AT+RSTSET"

Avoiding tethering speed throttling

Some operators (TMobile, YOTA etc.) allows unlimited data only for device SIM card is used on, all other data coming from mobile hotspots or tethering is highly limited by volume or by throughput speed. Some sources have found out that this limitation is done by monitoring TTL (Time To Live) values from packets to determinate if limitations need to be applied (TTL is decreased by 1 for each «hop» made). RouterOS allows changing the TTL parameter for packets going from the router to allow hiding sub networks. Keep in mind that this may conflict with fair use policy.

IPv4 mangle rule:
/ip firewall mangle
add action=change-ttl chain=postrouting new-ttl=set:65 out-interface=lte1 passthrough=yes
IPv6 mangle rule:
/ipv6 firewall mangle 
add action=change-hop-limit chain=postrouting new-hop-limit=set:65 passthrough=yes

More information: YOTA, TMobile

Unlocking SIM card after multiple wrong PIN code attempts

After locking SIM card, unlock can be done through «at-chat»

Check current PIN code status:

/interface lte at-chat lte1 input="at+cpin?"

If card is locked — unlock it by providing:

/interface lte at-chat lte1 input="AT+CPIN="PUK_code","NEW_PIN""

Replace PUK_code and NEW_PIN with matching values.

The command for sim slot selection changes in v6.45.1 and again in v7. Some device models like SXT, have SIM slots named «a» and «b» instead of «up» and down»

На чтение 5 мин Просмотров 8.3к. Опубликовано 18.11.2021
Обновлено 22.01.2023

У компании MikroTik есть ряд продуктов (LtAP, wAP, SXT, Chateau и др.) основанных на собственных модемах и модемах партнеров, которые они официально интегрировали в свои решения. И соответственно эти девайсы используют разные модели модемов.
Бывают случаи, когда нам необходимо проверить оборудование, но под рукой есть только SIM карта оператора от своего же смартфона. Как правило тарифы на таких SIM определенным образом регламентированы под свой тип оборудования (Смартфоны, Планшеты и ПК). Что же делать в этом случае?

В таком случае у нас есть возможность изменить IMEI и внести некоторые правки в работу с TTL маршрутизатора. И как это делать для различных модемов, в устройствах компании MikroTik, далее в этой статье!

Важно понимать, что все действия, которые Вы совершаете, проводятся на ваш страх и риск!! Автор статьи не дает никаких гарантий на работоспособность изделия после внесения вами изменений, а так же не несет никакой ответственности по искам или за нанесенный ущерб.

Содержание

  1. MikroTik R11e-LTE
  2. MikroTik R11e-4G
  3. MikroTik R11e-LTE6
  4. EG12-EA он же (Chateau LTE12)
  5. Пресловутый TTL
  6. Законодательный аспект смены IMEI

MikroTik R11e-LTE

R11E-LTE

Модем LTE Cat.4, который обеспечивает скорость передачи данных до 150 Мбит/с на получение и до 50 Мбит/сек на отдачу.
Поддерживает большой набор различных частотных диапазонов.

По факту это модем MIFI на камне PXA1802 от компании Luat

Смена IMEI для R11e-LTE

/interface lte at-chat lte1 input="AT*MRD_IMEI=R"

Читаем текущий IMEI и сохраняем его, где-нибудь на всякий случай!

/interface lte at-chat lte1 input="AT*MRD_IMEI=D"

Удаляем текущий IMEI

/interface lte at-chat lte1 input="AT*MRD_IMEI=W,0101,11JAN1970,000000000000000"

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

/interface lte at-chat lte1 input="AT+RESET"

Перезапускаем модем

AT команды для R11e-LTE
Luat LTE Module AT Command User Manual V1.0

MikroTik R11e-4G

R11e-4G

Модем LTE Cat.4, который обеспечивает скорость передачи данных до 150 Мбит/с на получение и до 50 Мбит/сек на отдачу.
Поддерживает только диапазоны LTE FDD 3 (1800 МГц), 7 (2600 МГц), 20 (800 МГц) и 31 (450 МГц), а также диапазоны LTE TDD 41n (2500 МГц), 42 (3500 МГц) и 43 (3700 МГц).

/interface lte at-chat lte1 input="AT%SETCFG="DEBUG_IMEI","000000000000000""

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

MikroTik R11e-LTE6

R11e-LTE6

Модем LTE-A Cat.6, который обеспечивает скорость передачи данных до 300 Мбит/с на получение и до 50 Мбит/сек на отдачу.
Такая скорость достигается за счет агрегации двух несущих частот, что позволяет устройству использовать несколько диапазонов одновременно. (Сеть оператора должна поддерживать данный тип соединения)

«AT*MRD_IMEI=DW» просто так на R11e-LTE6 не работают
Модем отвечает: «Output: +CME ERROR: Non-Production mode»
production mode (when power on, press SEND/END key will enter production mode)

Необходимо обязательно обновить до последней прошивки

/interface lte firmware-upgrade lte1
installed: R11e-LTE6_V020
latest: R11e-LTE6_V027

Если видим, что есть новая прошивка

/interface lte firmware-upgrade lte1 upgrade=yes

Обновляем

Ждем пару минут пока скачивается прошивка.

/interface lte at-chat lte1 input="AT+CHECKATUPGRADE"

После скачивания выполняем проверку

Примерно через 5 минут модем сам перезагрузится

Для смены IMEI

/interface lte at-chat lte1 input="AT*PROD=2"

Заходим в Production Mode

/interface lte at-chat lte1 input="AT*MRD_IMEI=R"

Читаем текущий IMEI и сохраняем его, где-нибудь на всякий случай!

/interface lte at-chat lte1 input="AT*MRD_IMEI=D"

Удаляем текущий IMEI

/interface lte at-chat lte1 input="AT*MRD_IMEI=W,0,01JAN1970,000000000000000"

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

/interface lte at-chat lte1 input="AT*PROD=0"

Выходим из Production Mode

/interface lte at-chat lte1 input="AT+RESET"

Перезапускаем модем

EG12-EA он же (Chateau LTE12)

Chateau LTE12

Модем LTE-A Cat.12, который обеспечивает скорость передачи данных до 600 Мбит/с на получение и до 150 Мбит/сек на отдачу.
Такая скорость достигается за счет агрегации трех несущих частот, что позволяет устройству использовать несколько диапазонов одновременно. (Сеть оператора должна поддерживать данный тип соединения)

Внутри встроен модем LTE-A Cat.12 компании Quectel LTE-A EG12-EA (для регионов EMEA/APAC/Brazil)

Для смены IMEI

/interface lte at-chat lte1 input="AT+GSN"

Читаем текущий IMEI и сохраняем его, где-нибудь на всякий случай!

/interface lte at-chat lte1 input="AT+EGMR=1,7,"000000000000000""

Записываем новый, где вместо 000000000000000 указываем IMEI отличный от текущего

/interface lte at-chat lte1 input="AT+GSN"

Проверяем сохранился ли новый IMEI

Пресловутый TTL

TTL — Time To Live
Предельный период времени или число итераций или переходов, за который набор данных (пакет) может существовать до своего исчезновения. Т.е. по простому TTL устанавливает время жизни пакета.

Для определения типа устройства и соответствия тарифу (смартфон, планшет, ПК) операторы отправляют в сторону клиента пакеты с различным TTL (МТС например отправляет TTL=1) для того, чтобы эти пакеты убивались на роутере при прохождении через него. В сторону оператора устройства отправляют свои стандартные пакеты.

Для того, чтобы симулировать устройство Linux, Mac, Android или iOS (TTL=64)

/ip firewall mangle
add action=change-ttl chain=prerouting in-interface-list=WAN new-ttl=increment:5 passthrough=yes ttl=equal:1
add action=change-ttl chain=postrouting new-ttl=set:64 out-interface-list=WAN passthrough=yes

Для того, чтобы симулировать устройство Windows, WindowsPhone (TTL=128)

/ip firewall mangle
add action=change-ttl chain=prerouting in-interface-list=WAN new-ttl=increment:5 passthrough=yes ttl=equal:1
add action=change-ttl chain=postrouting new-ttl=set:128 out-interface-list=WAN passthrough=yes

Не используйте правила FastTrack при смене TTL!!!

Законодательный аспект смены IMEI

В Российской Федерации, смена IMEI устройства не регулируется ни одним правовым актом!
Соответственно, если Вы из другой страны, то перед тем, как применять, что-то из данной статьи, лучше ознакомится с законодательным аспектом в отношении подобных манипуляций.

Если Вам не безразлична судьба блога или Вы просто хотите отблагодарить Автора за его труд, смело переходите на страницу Поддержки, там описана вся информация, по тому, как это сделать. Заранее благодарен вам за данную инициативу!

Ограничение Йота

Ca6ko

Сообщения: 1484
Зарегистрирован: 23 ноя 2018, 11:08
Откуда: Харкiв

1-е Правило WiFi — Везде где только можно откажитесь от WiFi!
2-е Правило WiFi -Устройство, которое пользователь не носит с собой постоянно, должно подключаться кабелем!!

Микротики есть разные: черные, белые, красные. Но все равно хочется над чем нибудь заморочится.

alex.zorro

Сообщения: 10
Зарегистрирован: 06 янв 2019, 11:30

09 янв 2019, 23:23

Dragon_Knight писал(а): ↑

08 янв 2019, 19:35


Какой и как Вы присваиваете новый TTL?

Новый ТТЛ присваиваю из вебинтерфейса самого модема. Вебинтерфейс соответственно доработанный энтузиастами и умельцами — пользователями этого модема. ТТЛ выставляю 63, родной йотовский 64. Там на 4пда большая ветка форума по этому поводу. А вот почему на микротик так не получается, ведь выставляю в правиле мангл смену ТТЛ на 63, в нат раздачу интернета, но скорость низкая. То есть условия работы у модема и микротик одинаковые, а вот скорости слишком разные? Вот и есть предложение что где то ещё надо что то настроить?

Аватара пользователя

Kato

Сообщения: 271
Зарегистрирован: 17 май 2016, 04:23
Откуда: Primorye

10 янв 2019, 02:25

alex.zorro писал(а): ↑

09 янв 2019, 23:23

То есть условия работы у модема и микротик одинаковые

это не так. модем и микротик отдают разную информацию в сеть ёты, а значит и оборудование определяет устройства по разному, отсюда — бросьте затею, либо верните модем

seregaelcin

Сообщения: 164
Зарегистрирован: 27 фев 2016, 17:12

15 янв 2019, 19:32

1. смотрят с использованием DPI, но т.к. через модем все ок то наверно отбросим этот вариант.
2. попробуйте так add action=change-ttl chain=prerouting new-ttl=set:65 passthrough=no т.е. если ip пакет придет с ttl например 200 микрот сменит его на 65, а на выходе отнимется 1, итого 64
Ну еще остаются варианты с mac адресом или imei

Обладатель Mikrotik RB2011UAS-2HnD-IN

Аватара пользователя

podarok66

Модератор
Сообщения: 4225
Зарегистрирован: 11 фев 2012, 18:49
Откуда: МО

15 янв 2019, 22:03

seregaelcin писал(а): ↑

15 янв 2019, 19:32


2. попробуйте так add action=change-ttl chain=prerouting new-ttl=set:65 passthrough=no т.е. если ip пакет придет с ttl например 200 микрот сменит его на 65, а на выходе отнимется 1, итого 64

А зачем на прероутинге это делать? Проще на выходе присвоить нужный ttl:

Код: Выделить всё

/ip firewall mangle
add action=change-ttl chain=postrouting new-ttl=set:64 passthrough=yes

Или я опять тороплюсь с выводами? Поправьте…

Мануалы изучил и нигде не ошибся? Фаервол отключил? Очереди погасил? Витая пара проверена? … Тогда Netinstal’ом железку прошей и настрой ее заново. Что, все равно не фурычит? Тогда к нам. Если не подскажем, хоть посочувствуем…

seregaelcin

Сообщения: 164
Зарегистрирован: 27 фев 2016, 17:12

16 янв 2019, 18:53

ttl идет после routing decision. А до routing decision идет prerouting

prerouting -> routing decision-> действия с ttl (forward)

Обладатель Mikrotik RB2011UAS-2HnD-IN

Аватара пользователя

podarok66

Модератор
Сообщения: 4225
Зарегистрирован: 11 фев 2012, 18:49
Откуда: МО

16 янв 2019, 19:38

seregaelcin писал(а): ↑

16 янв 2019, 18:53


ttl идет после routing decision. А до routing decision идет prerouting

prerouting -> routing decision-> действия с ttl (forward)

Ну, так я и не беру прероутинг, я в построутинг всё делаю. Я просто не очень хорошо помню, где там ttl меняется, то не после же postrouting?

Мануалы изучил и нигде не ошибся? Фаервол отключил? Очереди погасил? Витая пара проверена? … Тогда Netinstal’ом железку прошей и настрой ее заново. Что, все равно не фурычит? Тогда к нам. Если не подскажем, хоть посочувствуем…

Аватара пользователя

Vlad-2

Модератор
Сообщения: 2531
Зарегистрирован: 08 апр 2016, 19:19
Откуда: Петропавловск-Камчатский (п-ов Камчатка)
Контактная информация:

16 янв 2019, 23:29

Для seregaelcin
А можете пример явный показать правил?

=====================================
Для всех (картинка):

 Логика прохождения пакетов в системе Микротик


На работе(ах): 2xCCR1016-12G, RB3011UiAS и hAP lite (RB941)
Дома: CCR1016-12G, RBcAP2n (standalone), RB wAP LTE kit
Для тестов(под рукой): RB3011UiAS, hAP mini (RB931) и что-то ещё по мелочи
MTCNA
MTCRE

seregaelcin

Сообщения: 164
Зарегистрирован: 27 фев 2016, 17:12

17 янв 2019, 12:27

Если надо сделать на выходе ttl 64, то вот так
add action=change-ttl chain=prerouting new-ttl=set:65 passthrough=no

Обладатель Mikrotik RB2011UAS-2HnD-IN

Аватара пользователя

Dragon_Knight

Сообщения: 1724
Зарегистрирован: 26 мар 2012, 18:21
Откуда: МО, Мытищи
Контактная информация:

17 янв 2019, 18:44

Я вот кстати тоже не понял чем замена TTL в postrouting не устраивают?
А вот prerouting как раз наоборот даёт повод заблокировать нас. С каким TTL отвечают сервисы роутера?

Небольшой свод правил логики и ссылок:

  1. Если устройство имеет Ethernet порт, то оно обязано быть подключено через него. Компьютер, Ноутбук, Телевизор, Принтер, Камера видеонаблюдения, и т.д.
  2. Если нет возможности протянуть кабель, то найдите её, или страдайте со своими проблемами Wi-Fi дальше.
  3. Wi-Fi это сеть для мобильных устройств. Если Вы подключили свой шикарный 50″ телевизор не кабелем, то без фотоотчёта, когда он лежит у Вас в кармане дальнейшего разговора не получиться. Это относится и ко всем остальным устройствам.
  4. Если Ваше устройство вызывает вопросы в работе, первое что необходимо делать: NetInstall + дальнейшая настройка вручную.
  5. Не используйте WebFig или QuickSet — это пути к глюкам и ошибкам. Только SSH или WinBox, и да, — WinBox есть под Android.
  6. name.rsc — это текстовый файл, и Вы можете его открыть блокнотом.
  7. Если Вы хотите связаться со мной для ремонта или настройки, то: Telegram
  8. Мой сайт по Mikrotik: Global Zone >> MikroTik

Понравилась статья? Поделить с друзьями:
  • Как изменить txt на json
  • Как изменить ttl win 10
  • Как изменить txt на exe windows 10
  • Как изменить ttl ubuntu навсегда
  • Как изменить ttl linux debian