Universal Client Interface
Document revision 1.2 (01-Jun-2003)
This document applies to MikroTik RouterOS v2.7
Universal Client Interface allows to work with clients regardless of their IP
addresses translating these addresses to the ones you are able to work with. It
gives a possibility to provide network access (for example, Internet access) to
mobile clients that are not willing to change their networking settings. The
feature is intended to use with HotSpot, but may be useful even without HotSpot.
Packages required : hotspot
License required : Any
Home menu level : /ip hotspot universal
Protocols utilized : None
Hardware usage: not significant
Software
Package Installation and Upgrading
IP Addresses
and Address Resolution Protocol (ARP)
IP Pools
DHCP Client and DHCP Server
HotSpot Gateway
Firewall
Filters and Network Address Translation (NAT)
Universal client accepts any incoming address from a connected network interface
and does one to one translation so that data may be routed through standard IP
networks. Clients may use any preconfigured address. If the Universal client
feature is set to translate the client to a real IP address, then the client may
even run a server or any other connection that requires a real IP address. It is
possible to add static entry, so that some clients will get the specified addresses.
Universal client is changing source address of each packet just after it is
received by the router (even mangle 'sees' the translated address).
Note also that arp mode should be enabled on the interface
you set Universal Client Interface on.
Submenu level : /ip hotspot universal
interface (name) - interface to run universal client on
address-pool (name) - IP address pool name
arp (all-arp | no-arp; default: all-arp) - ARP hadling mode:
all-arp - respond to all ARP requests
no-arp - respond to ARP requests normally
use-dhcp (yes | no; default: yes) - do not translate the addresses
assigned by DHCP server
idle-timeout (time; default: 5m) - idle timeout (maximal
period of inactivity) for client added dynacally
Notes
Settig arp in all-arp is generally a good idea because in most
cases you cannot know what is the gateway's IP address configured on the clients.
To enable Universal Client Interface on ether1 interface that will take
the addresses to translate to from the exp pool:
[admin@MikroTik] ip hotspot universal> add address-pool=exp interface=ether1
[admin@MikroTik] ip hotspot universal> print
Flags: X - disabled, I - invalid
# INTERFACE ADDRESS-POOL ARP USE-DHCP IDLE-TIMEOUT
0 X ether1 exp all-arp yes 5m
[admin@MikroTik] ip hotspot universal> enable 0
[admin@MikroTik] ip hotspot universal> print
Flags: X - disabled, I - invalid
# INTERFACE ADDRESS-POOL ARP USE-DHCP IDLE-TIMEOUT
0 ether1 exp all-arp yes 5m
[admin@MikroTik] ip hotspot universal>
Submenu level : /ip hotspot universal client
The list shows the current translation table. There are three ways a client may
be added to the table:
Each time router receives a packet from an unknown client (determined by
three properties: mac-address, address and interface), it
adds the client to the list
Client may be added by DHCP server
Client may be added administratively specifying three properties:
mac-address, address and interface
mac-address (MAC address) - client's MAC address
address (IP address) - client's IP address
to-address (IP address) - IP address to translate address to
interface (name) - interface name the client is connected to
Statistics:
idle-time (time) - inactivity time
uptime (time) - how long the client is active
bytes-in (integer) - the amount of bytes received from the client
bytes-out (integer) - the amount of bytes sent to the client
packets-in (integer) - the amount of packets received from the client
packets-out (integer) - the amount of packets sent to the client
To add an entry specifying that IP address 10.20.30.40 should be
translated to 10.0.0.20 for packets coming from client with MAC
address 01:23:45:67:89:AB on ether1 interface:
[admin@MikroTik] ip hotspot universal client> add mac-address=01:23:45:67:89:AB
address=10.20.30.40 interface=ether1 to-address=10.0.0.20
[admin@MikroTik] ip hotspot universal client> print
Flags: X - disabled, I - invalid, H - DHCP, D - dynamic
# MAC-ADDRESS ADDRESS TO-ADDRESS INTERFACE IDLE-TIME
0 01:23:45:67:89:AB 10.20.30.40 10.0.0.20 ether1 1s
Submenu level : /ip hotspot universal service-port
Just like for classic NAT, the Universal Client Interface 'breaks' some protocols
that are incompatible with address translation. To leave these protocols consistent,
helper modules must be used. For the Universal Client Iterface the only such a
module is for FTP protocol
name (name) - protocol name
ports (list: integer) - list of the ports on which the
protocol is working
To set the FTP protocol uses bot 20 and 21 TCP port:
[admin@MikroTik] ip hotspot universal service-port> print
Flags: X - disabled
# NAME PORTS
0 ftp 21
[admin@MikroTik] ip hotspot universal service-port> set ftp ports=20,21
[admin@MikroTik] ip hotspot universal service-port> print
Flags: X - disabled
# NAME PORTS
0 ftp 20
21
[admin@MikroTik] ip hotspot universal service-port>
© Copyright 1999-2003, MikroTik