Facebook   Twitter    e-mail newsletter    YouTube    RSS Feed    Android App    iPhone and iPad App     BlackBerry App    


Page 2 of 6 FirstFirst 12 3456 LastLast
Results 16 to 30 of 90

Thread: MikroTik RouterBoard and USB 3G Modems

  1. #16
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Dual wan NAT example:


    Port 80 NAT example:
    (Note that NAT has to be done for both wan in-interfaces)

    Code:
    /ip firewall nat
    add action=masquerade chain=srcnat out-interface=wan1
    add action=masquerade chain=srcnat out-interface=wan2
    add action=dst-nat chain=dstnat comment="Forward port 80 to DVR" dst-port=80 \
        in-interface=wan1 protocol=tcp to-addresses=192.168.1.63 to-ports=80
    add action=dst-nat chain=dstnat comment="Forward port 80 to DVR" dst-port=80 \
        in-interface=wan2 protocol=tcp to-addresses=192.168.1.63 to-ports=80

  2. #17
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Bit of an odd error from a Huawei E272, on a RB751U single wan gateway setup.

    Indicator flashing green twice, every 3 seconds or so.



    Problem went away after unplugging the modem and plugging it in again.

    Interesting to see the "tx and rx RF circuits disabl" message in the Functionality box of the left screen.
    Wonder what could have caused this?
    Last edited by Base122; 08-03-2012 at 11:12 PM.

  3. #18

    Default

    Misbehaving device disabled by tower?

  4. #19
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Quote Originally Posted by sajunky View Post
    Misbehaving device disabled by tower?
    Very strange...hasn't happened again.

  5. #20
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Dual 3G wan USB issue:

    For those who may try this type of setup, I have not been able to mix a USB2.0 (ZTE MF190) and USB1.1(Huawei E220) modem together on the RB751U (v5.12)

    The RB751U works ok with the USB2.0 modem, but will not communicate with the serial port of the USB1.1 modem, even from the terminal.



    It is quite happy with two USB2.0 modems:



    However, it also works ok with a single USB1.1 modem only, but then not with two USB1.1 modems together.

    I did try different modems and three different USB Hubs.

    I'd recommend sticking with two USB2.0 modems if you decide to try this setup.
    Will try newer RB751U firmware (v5.14) later to see if that makes any difference.

  6. #21
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Small example of how to direct NNTP traffic to wan2 in a dual wan setup:

    First, port 119 (nntp) traffic is marked accordingly:

    Code:
    /ip firewall mangle
    add action=mark-routing chain=prerouting comment="Mark nntp traffic" \
        dst-port=119 new-routing-mark="NNTP Traffic" passthrough=no protocol=tcp

    Then a route for this marked traffic is created to wan2:

    Code:
    /ip route
    add comment="NNTP traffic to wan2 only" gateway=wan2 routing-mark=\
        "NNTP Traffic" scope=255
    Check the MikroTik Wiki for more....

  7. #22
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    My dual 3G wan setup dns issue:

    You need to be aware, if you have each PPP connection "use Peer DNS" set, that the RB751 sets its dns servers to those of the last PPP session that was connected.



    This poses a problem, if the router default route (distance 1), happens to set to 8ta for example, but the Cell C PPP session was the last one to connect.
    The router would try to talk to the Cell C DNS servers via the 8ta PPP connection (default route), which will not work.
    This causes DNS to appear "broken" to your browser for example.
    You may be lucky if you try and resolve names that are already in the router DNS cache.

    My solution to this was to interleave the 8ta and Cell C DNS servers, with the Google DNS servers as backup "catch all":



    or to make it ISP independent, but relying solely on the Google DNS servers:



    Alternatively, you could fiddle around with scripting to set the router DNS servers according to the router's current default (distance 1) route.
    Last edited by Base122; 09-03-2012 at 11:15 AM.

  8. #23

    Default

    Quote Originally Posted by Base122 View Post
    The RB751U works ok with the USB2.0 modem, but will not communicate with the serial port of the USB1.1 modem, even from the terminal.
    [...]
    However, it also works ok with a single USB1.1 modem only, but then not with two USB1.1 modems together.

    I did try different modems and three different USB Hubs.
    This is understable. Some USB do not attempt to translate USB protocols at all. Some other attempt to translate, but the most popular hubs have limitation you have experienced. Finding translating hub without limitation will be difficult, most likely you find primitive (not translating) hub working in your case. But it would force USB 2.0 device to operate also in USB 1.1 mode, AFAIK.

    Edit: More precise about these hubs with limitation: They have single translator, it means (in my understanding) that only single device requiring translation can be used. It doesn't explain why 1.1 device do not work with 2.0 device together.
    Last edited by sajunky; 09-03-2012 at 01:04 PM.

  9. #24
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    My solution to this was to interleave the 8ta and Cell C DNS servers, with the Google DNS servers as backup "catch all"
    Small problem with this approach, as Cell C seems to have different DNS servers according to the IP address your PPP session is allocated.

    DNS
    For 41.48.x.x
    - 41.48.23.29
    - 41.48.23.61

    For 41.50.x.x
    - 41.50.20.29
    - 41.50.20.61

    ...and there may be more.

    If you are allocated a 41.50.x.x address, for some reason you cannot connect to the 41.48.23.29 and 41.48.23.61 DNS servers.

    Must be some strange Cell C internal configuration issue.
    I would have thought that all allocated PPP sessions addresses would have access to all their DNS servers.
    They must have some valid reason for not allowing this I guess. Probably some sort of load balancing.

    This definitely does not work well with my static DNS idea.

    To make life easier, I have decided to use the two Google DNS servers configuration as described in my previous post. Slightly slower than the local DNS servers to resolve names, but still acceptable.
    Last edited by Base122; 10-03-2012 at 12:16 AM.

  10. #25
    Super Grandmaster ginggs's Avatar
    Join Date
    Jun 2006
    Location
    Good-w00t! Cape Town
    Posts
    7,835

    Default

    Quote Originally Posted by Base122 View Post
    Interesting to see the "tx and rx RF circuits disabl" message in the Functionality box of the left screen.
    Wonder what could have caused this?
    Was the modem plugged into the RB when this happened, or had it been in a PC and then plugged into the RB?

    If this happens again, try checking the current state of the modem with:
    Code:
    AT+CFUN?
    If the current state is 4, your only choice is to reset the modem with:
    Code:
    AT+CFUN=6
    If it is any other state, try setting it to 1:
    Code:
    AT+CFUN=1
    And check whether it worked:
    Code:
    AT+CFUN?
    If the current state is still not equal to 1, try resetting the modem:
    Code:
    AT+CFUN=4
    AT+CFUN=6

  11. #26
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Quote Originally Posted by ginggs View Post
    Was the modem plugged into the RB when this happened, or had it been in a PC and then plugged into the RB?
    The E272 was plugged in to the RB751U, and had been running fine for a few days before this event.
    I just happened to notice it start flashing while working near it.

    It hasn't happened again since then, but if it does I'll give your suggestions a try, thanks.

  12. #27
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Quote Originally Posted by Base122 View Post
    The E272 was plugged in to the RB751U, and had been running fine for a few days before this event.
    I just happened to notice it start flashing while working near it.

    It hasn't happened again since then, but if it does I'll give your suggestions a try, thanks.
    Found this E272 (Vodacom unrestricted APN) in the same state again this morning.
    Indicator flashing green twice every three seconds.
    tx and rx RF circuits disabled.

    Maybe this is a result of something being done, like a reset or connection disable of sorts from the 3G network side? Not sure why it leaves the modem in this state, as the router cannot recover it automatically.

    Tried:
    AT+CFUN?
    +CFUN: 4

    AT+CFUN=1
    ERROR

    AT+CFUN=6
    ERROR

    Then: (strange that I had to first command the RF off, even though it was supposedly already in that state)
    AT+CFUN=4
    OK

    AT+CFUN=6
    OK

    Modem reset and was able to connect PPP session again.

    Now to somehow get a script to be able to send this AT command sequence!
    Last edited by Base122; 12-03-2012 at 08:52 AM.

  13. #28

    Default

    This is an essence what ginggs wrote above. if 4, then don't try 1; select 6 for reset. If something else, select 1.

  14. #29
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Now to somehow get a script to be able to send this AT command sequence!
    And I think I have found a way!
    Amazing what desperation can do!

    This is a bit of a dirty way of firing AT commands "blind" at the modem on the MikroTik RB751U's PPP wan connection.
    For some reason the ZTE MF190 needed a reset sequence different from the Huawei's

    Haven't tested this on any other modems as indicated, but I will be interested to see if it can help to automatically recover my original E272 tx and Rx RF circuits disabled problem.


    Code:
    ## Modem reset script for 3G PPP Wan links ##
    ## uses PPP Modem Init to send AT command to serial port ##
    ## Commands are simply fired "blind" at the modem ##
    ## sends the AT+CFUN=4, AT+CFUN=6 command sequence ##
    ## ZTE MF-190 requires AT+CFUN=4, AT+CFUN=1 sequence or AT+ZRST ##
    ## Huawei E367, E272 requires AT+CFUN=4, AT+CFUN=6 sequence ##
    ## Untested on other modems ##
    ## This script can be used with Netwatch ##
    ## You can adjust the delays and AT commands as needed ##
    ## Peter James 2012-03-12 ##
    
    # Set the wan name #
    :local WanName "wan2";
    
    :log info "Starting $WanName Modem Reset Sequence";
    
    # get its ID number #
    :local WanID [/interface ppp-client find name=$WanName];
    
    # Modify the dial command to force dial failure, else modem gets confused #
    /interface ppp-client set dial-command="AT" $WanID;
    
    /interface ppp-client disable $WanID;
    delay 1;
    /interface ppp-client enable $WanID;
    
    /interface ppp-client set modem-init="ATZ;AT+CFUN=4" $WanID;
    
    # Wait for tx and rx RF circuits to switch off #
    delay 5;
    
    /interface ppp-client set modem-init="ATZ;AT+CFUN=6" $WanID;
    
    # wait for modem to reset #
    delay 5;
    
    
    # Modify the dial command to restore dial capability #
    /interface ppp-client set dial-command="ATD" $WanID;
    
    /interface ppp-client set modem-init="" $WanID;
    
    # Modem should now redial  and connect #
    
    :log info "$WanName Modem Reset Sequence complete";
    Last edited by Base122; 13-03-2012 at 10:10 PM. Reason: updated for ZTE MF190 AT+ZRST and added additional ATZ commands

  15. #30
    Senior Member
    Join Date
    Aug 2011
    Location
    Orbiting a distant star
    Posts
    451
    Blog Entries
    1

    Default

    Quote Originally Posted by sajunky View Post
    This is an essence what ginggs wrote above. if 4, then don't try 1; select 6 for reset. If something else, select 1.
    The problem was, even though the modem reported state 4, it would not respond to AT+CFUN=6, but returned ERROR.

    I first had to send it a AT+CFUN=4 (even though it was supposedly in this state already) and only then did it respond to AT+CFUN=6 and reset.

Page 2 of 6 FirstFirst 12 3456 LastLast

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •