Community discussions

MikroTik App
 
sloth
just joined
Topic Author
Posts: 20
Joined: Fri Nov 11, 2011 6:13 pm

3G usb config: gateway, NAT, DHCP

Tue Apr 30, 2013 9:29 pm

I'm trying to set up the following:

1 client connected on eth5 of a rb751 receives a dhcp lease, and is able to access WAN over a 3G USB dongle.

My configuration+ settings

1 PPP interface (name:mobile) connected via usb1.
[admin@RB751] > /interface ppp-client print 
Flags: X - disabled, R - running 
 0  R name="mobile" max-mtu=1500 max-mru=1500 mrru=disabled port=usb1 data-channel=0 info-channel=0 apn="***" pin="" user="***" password="***" 
      profile=mob phone="*99#" dial-command="ATDT" modem-init="ATZ" null-modem=no dial-on-demand=no add-default-route=yes use-peer-dns=yes keepalive-timeout=10 
      allow=pap,chap,mschap1,mschap2 
ip addresses:
1 D 10.44.47.X/32     213.186.33.X   mobile
WAN is working via the USB dongle:
[admin@RB751] > /ping interface=mobile address=8.8.8.8
HOST                                     SIZE TTL TIME  STATUS                                                                  
8.8.8.8                                    56  44 783ms
8.8.8.8                                    56  44 347ms
8.8.8.8                                    56  44 489ms
8.8.8.8                                    56  44 583ms
    sent=4 received=4 packet-loss=0% min-rtt=347ms avg-rtt=550ms max-rtt=783ms 
IP routes:
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 ADS  0.0.0.0/0                          213.186.33.X             1
 1 X S  0.0.0.0/0                          192.168.13.1              1
 2 ADC  192.168.0.0/24     192.168.0.1     ether5-slave-local        0
 3 ADC  192.168.13.0/24    192.168.13.*  bridge-local              0
 4 ADC  213.186.33.X/32   10.44.47.X     mobile               0
Now I try to enable a DHCP server on eth5 to give out a lease to a client, which then must use the 3G USB dongle (mobile) to access the internet.
This is where it gets confusing:

1. IP range: a different range than the dongle (10.44.47.*/32)? e.g. 192.168.0.0/24?
2. gateway that is pushed by the dhcp server?
3. IP routes?
4. NAT?

Thanks!