Wireless Connect Logo
Hello Guest! - Login
Contact Wireless Connect
ISDN Interfaces
Credit Cards Accepted
Back to Table Of Contents >>

General Information

Summary

The MikroTik router can act as an ISDN client for dialing out, or as an ISDN server for accepting incoming calls. The dial-out connections may be set as dial-on-demand or as permanent connections (simulating a leased line). The remote IP address (provided by the ISP) can be used as the default gateway for the router.

Specifications

Packages required: isdn, ppp
License required: Level1
Submenu level: /interface isdn-server, /interface isdn-client
Standards and Technologies: PPP (RFC 1661)
Hardware usage: Not significant

Additional Resources

ISDN Hardware and Software Installation

Command name: /driver add

Description

Please install the ISDN adapter into the PC accordingly the instructions provided by the adapter manufacturer.

Appropriate packages have to be downloaded from MikroTik web page http://www.mikrotik.com. After all, the ISDN driver should be loaded using the /driver add command.

MikroTik RouterOS supports passive PCI adapters with Siemens chipset:

  • Eicon. Diehl Diva - diva
  • Sedlbauer Speed - sedlbauer
  • ELSA Quickstep 1000 - quickstep
  • NETjet - netjet
  • Teles - teles
  • Dr. Neuhaus Niccy - niccy
  • AVM - avm
  • Gazel - gazel
  • HFC 2BDS0 based adapters - hfc
  • W6692 based adapters - w6692

For example, for the HFC based PCI card, it is enough to use /driver add name=hfc command to get the driver loaded.

Note! ISDN ISA adapters are not supported!

Property Description

isdn-protocol (euro | german; default: euro) - data channel protocolname (name) - name of the driver

ISDN Channels

ISDN channels are added to the system automatically when the ISDN card driver is loaded. Each channel corresponds to one physical 64K ISDN data channel.

The list of available ISDN channels can be viewed using the /isdn-channels print command. The channels are named channel1, channel2, and so on. E.g., if you have two ISDN channels, and one of them currently used by an ISDN interface, but the other available, the output should look like this:

[admin@MikroTik] isdn-channels> print
Flags: X - disabled, E - exclusive
  #    NAME                     CHANNEL    DIR.. TYPE  PHONE
  0    channel1                 0
  1    channel2                 1
[admin@MikroTik] isdn-channels>

ISDN channels are very similar to PPP serial ports. Any number of ISDN interfaces can be configured on a single channel, but only one interface can be enabled for that channel at a time. It means that every ISDN channel is either available or used by an ISDN interface.

MSN and EAZ numbers

In Euro-ISDN a subscriber can assign more than one ISDN number to an ISDN line. For example, an ISDN line could have the numbers 1234067 and 1234068. Each of these numbers can be used to dial the ISDN line. These numbers are referred to as Multiple Subscriber Numbers (MSN).

A similar, but separate concept is EAZ numbering, which is used in German ISDN networking. EAZ number can be used in addition to dialed phone number to specify the required service.

For dial-out ISDN interfaces, MSN/EAZ number specifies the outgoing phone number (the calling end). For dial-in ISDN interfaces, MSN/EAZ number specifies the phone number that will be answered. If you are unsure about your MSN/EAZ numbers, leave them blank (it is the default).

For example, if your ISDN line has numbers 1234067 and 1234068, you could configure your dial-in server to answer only calls to 1234068 by specifying 1234068 as your MSN number. In a sense, MSN is just your phone number.

ISDN Client Interface Configuration

Submenu level: /interface isdn-client

Description

The ISDN client is used to connect to remote dial-in server (probably ISP) via ISDN. To set up an ISDN dial-out connection, use the ISDN dial-out configuration menu under the submenu.

Property Description

add-default-route (yes | no; default: no) - add default route to remote host on connectallow (multiple choice: mschap2, mschap1, chap, pap; default: mschap2, mschap1, chap, pap) - the protocol to allow the client to use for authenticationbundle-128K (yes | no; default: yes) - use both channels instead of just onedial-on-demand (yes | no; default: no) - use dialing on demandl2-protocol (hdlc | x75i | x75ui | x75bui; default: hdlc) - level 2 protocol to be usedmru (integer; default: 1500) - Maximum Receive Unitmsn (integer; default: "") - MSN/EAZ of ISDN line provided by the line operatormtu (integer; default: 1500) - Maximum Transmission Unitname (name; default: isdn-outN) - interface namepassword (text) - password that will be provided to the remote serverphone (integer; default: "") - phone number to dialprofile (name; default: default) - profile to use when connecting to the remote serveruse-peer-dns (yes | no; default: no) - use or not peer DNSuser (text) - user name that will be provided to the remote server

Example

ISDN client interfaces can be added using the add command:

[admin@MikroTik] interface isdn-client> add msn="142" user="test" \
\... password="test" phone="144" bundle-128K=no
[admin@MikroTik] interface isdn-client> print
Flags: X - disabled, R - running
  0 X  name="isdn-out1" mtu=1500 mru=1500 msn="142" user="test"
       password="test" profile=default phone="144" l2-protocol=hdlc
       bundle-128K=no dial-on-demand=no add-default-route=no use-peer-dns=no
[admin@MikroTik] interface isdn-client>

ISDN Server Interface Configuration

Submenu level: /interface isdn-client

Description

ISDN server is used to accept remote dial-in connections form ISDN clients.

Property Description

authentication (pap | chap | mschap1 | mschap2; default: mschap2, mschap1, chap, pap) - used authenticationbundle-128K (yes | no; default: yes) - use both channels instead of just onel2-protocol (hdlc | x75i | x75ui | x75bui; default: hdlc) - level 2 protocol to be usedmru (integer; default: 1500) - Maximum Receive Unitmsn (integer; default: "") - MSN/EAZ of ISDN line provided by the line operatormtu (integer; default: 1500) - Maximum Transmission Unitname (name; default: isdn-inN) - interface namephone (integer; default: "") - phone number to dialprofile (name; default: default) - profile to use when connecting to the remote server

Example

ISDN server interfaces can be added using the add command:

[admin@MikroTik] interface isdn-server> add msn="142" bundle-128K=no
[admin@MikroTik] interface isdn-server> print
Flags: X - disabled, R - running
  0 X  name="isdn-in1" mtu=1500 mru=1500 msn="142"
       authentication=mschap2,chap,pap profile=default l2-protocol=x75bui
       bundle-128K=no
[admin@MikroTik] interface isdn-server>

ISDN Examples

ISDN Dial-out

Dial-out ISDN connections allow a local router to connect to a remote dial-in server (ISP's) via ISDN.

Let's assume you would like to set up a router that connects your local LAN with your ISP via ISDN line. First you should load the corresponding ISDN card driver. Supposing you have an ISDN card with a W6692-based chip:

[admin@MikroTik]> /driver add name=w6692

Now additional channels should appear. Assuming you have only one ISDN card driver loaded, you should get following:

[admin@MikroTik] isdn-channels> print
Flags: X - disabled, E - exclusive
  #    NAME                       CHANNEL    DIR.. TYPE  PHONE
  0    channel1                   0
  1    channel2                   1
[admin@MikroTik] isdn-channels>

Suppose you would like to use dial-on-demand to dial your ISP and automatically add a default route to it. Also, you would like to disconnect when there is more than 30s of network inactivity. Your ISP's phone number is 12345678 and the user name for authentication is 'john'. Your ISP assigns IP addresses automatically. Add an outgoing ISDN interface and configure it in the following way:

[admin@mikrotik]> /interface isdn-client add name="isdn-isp" phone="12345678"
user="john" password="31337!)" add-default-route=yes dial-on-demand=yes
[admin@MikroTik] > /interface isdn-client print
Flags: X - disabled, R - running
  0 X  name="isdn-isp" mtu=1500 mru=1500 msn="" user="john" password="31337!)"
       profile=default phone="12345678" l2-protocol=hdlc bundle-128K=no
       dial-on-demand=yes add-default-route=yes use-peer-dns=no

Configure PPP profile.

[admin@MikroTik] ppp profile> print
Flags: * - default 
 0 * name="default" use-compression=default use-vj-compression=default 
     use-encryption=default only-one=default change-tcp-mss=yes 

 1 * name="default-encryption" use-compression=default 
     use-vj-compression=default use-encryption=yes only-one=default 
     change-tcp-mss=yes 
[admin@Mikrotik] ppp profile> set default idle-timeout=30s

If you would like to remain connected all the time, i.e., as a leased line, then set the idle-timeout to 0s.

All that remains is to enable the interface:

[admin@MikroTik] /interface set isdn-isp disabled=no

You can monitor the connection status with the following command:

[admin@MikroTik] /interface isdn-client monitor isdn-isp

ISDN Dial-in

Dial-in ISDN connections allow remote clients to connect to your router via ISDN.

Let us assume you would like to configure a router for accepting incoming ISDN calls from remote clients. You have an Ethernet card connected to the LAN, and an ISDN card connected to the ISDN line. First you should load the corresponding ISDN card driver. Supposing you have an ISDN card with an HFC chip:

[admin@MikroTik] /driver add name=hfc

Now additional channels should appear. Assuming you have only one ISDN card driver loaded, you should get the following:

[admin@MikroTik] isdn-channels> print
Flags: X - disabled, E - exclusive
  #    NAME                       CHANNEL    DIR.. TYPE  PHONE
  0    channel1                   0
  1    channel2                   1
[admin@MikroTik] isdn-channels>

Add an incoming ISDN interface and configure it in the following way:

[admin@MikroTik] interface isdn-server> add msn="7542159" \
\... authentication=chap,pap bundle-128K=no
[admin@MikroTik] interface isdn-server> print
Flags: X - disabled
  0 X  name="isdn-in1" mtu=1500 mru=1500 msn="7542159" authentication=chap,pap
       profile=default l2-protocol=hldc bundle-128K=no

Configure PPP settings and add users to router's database.

[admin@MikroTik] ppp profile> print
Flags: * - default 
 0 * name="default" use-compression=default use-vj-compression=default 
     use-encryption=default only-one=default change-tcp-mss=yes 

 1 * name="default-encryption" use-compression=default 
     use-vj-compression=default use-encryption=yes only-one=default 
     change-tcp-mss=yes 
[admin@Mikrotik] ppp profile> set default idle-timeout=5s local-address=10.99.8.1 \
\... remote-address=10.9.88.1

Add user 'john' to the router's user database. Assuming that the password is '31337!)':

[admin@MikroTik] ppp secret> add name=john password="31337!)" service=isdn
[admin@MikroTik] ppp secret> print
Flags: X - disabled
 #   NAME                   SERVICE CALLER-ID PASSWORD PROFILE REMOTE-ADDRESS
 0   john                   isdn              31337!)  default
[admin@MikroTik] ppp secret>

Check the status of the ISDN server interface and wait for the call:

[admin@MikroTik] interface isdn-server> monitor isdn-in1

    status: Waiting for call...

ISDN Backup

Backup systems are used in specific cases, when you need to maintain a connection, even if a fault occurs. For example, if someone cuts the wires, the router can automatically connect to a different interface to continue its work. Such a backup is based on an utility that monitors the status of the connection - netwatch, and a script, which runs the netwatch.

This is an example of how to make simple router backup system. In this example we'll use an ISDN connection for purpose to backup a standard Ethernet connection. You can, however, use instead of the ISDN connection anything you need - PPP, for example. When the Ethernet fail (the router nr.1 cannot ping the router nr.2 to 2.2.2.2 (see picture) the router nr.1 will establish an ISDN connection, so-called backup link, to continue communicating with the nr. 2.

You must keep in mind, that in our case there are just two routers, but this system can be extended to support more different networks.

The backup system example is shown in the following picture:

isdn Mikrotik  routeros images

In this case the backup interface is an ISDN connection, but in real applications it can be substituted by a particular connection. Follow the instructions below on how to set up the backup link:

  • At first, you need to set up ISDN connection. To use ISDN, the ISDN card driver must be loaded:

    [admin@MikroTik] driver> add name=hfc

    The PPP connection must have a new user added to the routers one and two:

    [admin@Mikrotik] ppp secret> add name=backup password=backup service=isdn

    An ISDN server and PPP profile must be set up on the second router:

    [admin@MikroTik] ppp profile> set default local-address=3.3.3.254 remote-address=3.3.3.1
    [admin@MikroTik] interface isdn-server> add name=backup msn=7801032

    An ISDN client must be added to the first router:

    [admin@MikroTik] interface isdn-client>
    add name=backup user="backup" password="backup" phone=7801032 msn=7542159
  • Then, you have to set up static routes

    Use the /ip route add command to add the required static routes and comments to them. Comments are required for references in scripts.

    The first router:

    [admin@Mikrotik] ip route> add gateway=2.2.2.2 comment="route1"

    The second router:

    [admin@Mikrotik] ip route> add gateway=2.2.2.1 comment="route1" dst-address=1.1.1.0/24
  • And finally, you have to add scripts.

    Add scripts in the submenu /system script using the following commands:

    The first router:

    [admin@Mikrotik] system script> add name=connection_down \
    \... source={/interface enable backup; /ip route set route1 gateway=3.3.3.254}
    [admin@Mikrotik] system script> add name=connection_up \
    \... source={/interface disable backup; /ip route set route1 gateway=2.2.2.2}

    The second router:

    [admin@Mikrotik] system script> add name=connection_down \
    \... source={/ip route set route1 gateway=3.3.3.1}
    [admin@Mikrotik] system script> add name=connection_up \
    \... source={/ip route set route1 gateway=2.2.2.1}
  • To get all above listed to work, set up Netwatch utility. To use netwatch, you need the advanced tools feature package installed. Please upload it to the router and reboot. When installed, the advanced-tools package should be listed under the /system package print list.

    Add the following settings to the first router:

    [admin@Mikrotik] tool netwatch> add host=2.2.2.1 interval=5s \
    \... up-script=connection_up down-script=connection_down

    Add the following settings to the second router:

    [admin@Mikrotik] tool netwatch> add host=2.2.2.2 interval=5s \
    \... up-script=connection_up down-script=connection_down
Back to Table Of Contents >>