MAS mode

https//www.racom.eu/eng/support/morse-m3/eth-mas.html

Print version

4. MAS mode

4.1. MAS example 1

Connection of a sole application over MAS

Communication unit CU1 with Morse Application Server is connected via this Ethernet channel to IP LAN, in which the PC operates with application Setr. This application communicates over MAS with CU2, or with other CU in the MORSE network.

MAS example 1

Fig. 4.1: MAS example 1

Program Setr here replaces a general IP application. It can be started using command :

setr -pIP192.168.100.7 -pw690f5600 -pm8000
  • -pIP192.168.100.7 = IP address of MAS

  • -pw690f5600 = MORSE address with which the IP application will appear in the MORSE network

  • -pm8000 = port number of IP application

On starting Setr table Art related to MAS is automatically filled:

ART No 1: 
items: 1
default gw: 00000000 (0.0.0.0        )
dest:    gw:
690F5600 1F402401 (105.15.86.0     31.64.36.1     )
  • 690F5600 = MORSE address related to the IP application

  • 1F40 = port number of IP application

  • 2401 = lower 14 bits of IP address of application, upper 18 bits are added from the IP address of MAS

We send a test packet from IP application of Setr to CU2 690F5605. Firstly we prepare a destination address:

!h690F5605 Enter

Then using command mtU we send data 0xAAAA and observe in monitoring the transformation from IP format to MORSE format:

     ...MON1...
10:19:11.121 rsi:60 tx|FFFFFFFFFFFF |0002A949B897 | ARP/REQ
FFFF FFFF FFFF 0002 A949 B897 0806 0001 0800 0604 0001 0002 A949 B897
C0A8 6407 0000 0000 0000 C0A8 6401 0000 8F01 690F 5600 C07E 800E 43D0
AB0C 1A49
10:19:11.121 rsi:64 rx|0002A949B897 |00C09F63CFAB | ARP/REP
0002 A949 B897 00C0 9F63 CFAB 0806 0001 0800 0604 0002 00C0 9F63 CFAB
C0A8 6401 0002 A949 B897 C0A8 6407 0000 0000 0000 0000 0000 0000 0000
0000 0000 2592 FBA6
     ...MON2...
10:19:11.404 rsi:52 rx|0002A949B897 |00C09F63CFAB | IP/UDP/MOR/USR/DATA
0002 A949 B897 00C0 9F63 CFAB 0800 4500 0026 1295 0000 8011 DED8 
C0A8 6401 C0A8 6407 1F40 22B8 0012 8137 0000 8981 690F 5605 AAAA
     ...MON3...
10:19:11.404|                 |690F5605 690F5600|E00I   OUT    2||89 1user
AAAA

Source and destination IP addresses C0A86401 and C0A86407, source and destination IP ports 1F40 and 22B8, address MORSE destination 690F5605 and data AAAA are contained in monitoring MON2.

In monitoring MON3 the source MORSE address is assigned to the IP application 690F5600, destination MORSE address 690F5605 and data AAAA.

A test of transmission from MORSE to IP is carried out by sending data 0xBBBB from CU2 690F5605 to address 690F5600, where the IP application is located:

08:35:53.893|                 |690F5600 690F5605|E00I    IN    2|*89 5user
BBBB
08:35:53.893 rsi:52 tx|00C09F63CFAB |0002A949B897 | IP/UDP/MOR/USR/DATA
00C0 9F63 CFAB 0002 A949 B897 0800 4500 0026 0161 4000 4011 F00C 
C0A8 6407 C0A8 6401 22B8 1F40 0012 70A2 0000 8905 690F 5605 BBBB

Notes on configuration:

  1. In menu EPe0t it is defined by means of parameters

    MAS:
      (s)Art:1; write (e)nable:ON
      (B)ase:690F5600  (M)ask:00000000

    that MAS works only with application 690F5600.

  2. Table Art contains the conversion between the MORSE address of the application in column dest and the pair IP port/IP address of the application. From the IP address only the 14 lower bits are contained here, the others are taken from the actual IP address of MAS.

  3. Art table can be filled automatically as in the given example or manually.

  4. The Art Tables extent is limited. The tables Art1 to Art4 together can contain at the most 252 items. It is recommended use less then a 100 items in one table.

4.2. MAS example 2

Connection of more applications over MAS

By using parameters (B)ase, (M)ask and the Multiaddressing function MAS can work with more IP applications which communicate with various CUs in the MORSE network.

MAS example 2

Fig. 4.2: MAS example 2

Two applications in the example are located in a common PC. They differ by the number of the IP port and the MORSE address:

setr -pIP192.168.100.7 -pw690f5701 -pm8001
setr -pIP192.168.100.7 -pw690f5702 -pm8002

Art table contains a translation for each application:

ART No 1: 
items: 2
default gw: 00000000 (0.0.0.0        )
dest:    gw:
690F5702 1F422401 (105.15.87.2     31.66.36.1     )
690F5701 1F412401 (105.15.87.1     31.65.36.1     )

A test packet with data 0xAAAA is sent from the application 690F5701 to CU2 690F5605 using command mtU :

12:57:15.026 rsi:52 rx|0002A949B897 |00C09F63CFAB | IP/UDP/MOR/USR/DATA
0002 A949 B897 00C0 9F63 CFAB 0800 4500 0026 0130 0000 8011 F03D 
C0A8 6401 C0A8 6407 1F41 22B8 0012 8134 0000 8983 690F 5605 AAAA
12:57:15.026|                 |690F5605 690F5701|E00I   OUT    2||89 3user
AAAA

A packet with data ASCII aaaa, i.e. 0x61616161 is sent from application 690F5701 to CU3 690F5606 using command mtu :

13:06:57.921 rsi:54 rx|0002A949B897 |00C09F63CFAB | IP/UDP/MOR/USR/DATA
0002 A949 B897 00C0 9F63 CFAB 0800 4500 0028 0134 0000 8011 F037 
C0A8 6401 C0A8 6407 1F41 22B8 0014 6916 0000 8984 690F 5606 6161 6161
13:06:57.921|                 |690F5606 690F5701|E00I   OUT    4||89 4user
6161 6161

Data 0xBBBB is sent from CU2 690F5605 to address 690F5701:

13:02:09.439|                 |690F5701 690F5605|E00I    IN    2|*89 4user
BBBB
13:02:09.439 rsi:52 tx|00C09F63CFAB |0002A949B897 | IP/UDP/MOR/USR/DATA
00C0 9F63 CFAB 0002 A949 B897 0800 4500 0026 0022 4000 4011 F14B 
C0A8 6407 C0A8 6401 22B8 1F41 0012 70A2 0000 8904 690F 5605 BBBB

Data 0xCCCC is sent from CU3 690F5606 to address 690F5702:

13:03:56.078|                 |690F5702 690F5606|E00I    IN    2|*89 5user
CCCC
13:03:56.078 rsi:52 tx|00C09F63CFAB |0002A949B897 | IP/UDP/MOR/USR/DATA
00C0 9F63 CFAB 0002 A949 B897 0800 4500 0026 0024 4000 4011 F149 
C0A8 6407 C0A8 6401 22B8 1F42 0012 5F8E 0000 8905 690F 5606 CCCC

Notes on configuration:

  1. In menu EPe0t by means of parameters

    MAS:
      (s)Art:1; write (e)nable:ON
      (B)ase:690F5700  (M)ask:000000FF

    a group of MORSE addresses is defined for which MAS carries out a conversion of addresses between MORSE and IP. These are addresses 690F5700 to 690F57FF.

  2. Each of these addresses has a respective item in the conversion table Art.

  3. Packets with these destination addresses arrive from the MORSE network via the standard method of routing to CU1 690F5600. Here, via item,

    Wide retab. No 1
    57to:5600

    they are directed to the Link node output.

  4. Command Ne1MLn is used for switching on the Multiaddressing function which directs all packets from the Link output to the user output. In this way packets for all serviced IP applications get to the Ethernet channel where MAS converts them to IP format.

  5. The service output from node 690F5600 must also be directed to E00. If it remains in S00 then service responses are not sent to MAS.

    Nid|address |M | u   s | L   N |l w n g H|sTO Err  Cent vTO hTO
    (0) 0049B897     -  S00| -  R00|0 0 0 0 -| 15 SERV  OFF 304  30
    (1) 690F5600 L  E00 E00| -  R01|0 1 0 0 -| 15 SERV  OFF 304  30
    (2) 00000000    S01 S00| -  R02|0 0 0 0 -| 15 SERV  OFF 304  30
    (3) 00000000    S02 S00| -  R03|0 0 0 0 -| 15 SERV  OFF 304  30
    (4) 690F0000    S03 S00| -  R04|0 0 0 0 -| 15 SERV  OFF 304  30

4.3. MAS example 3

Applications and MAS lie in different IP networks

If the IP address of the application and MAS differ in their upper 18 bits we use default gw in table Art:

MAS example 3

Fig. 4.3: MAS example 3

setr -pIP192.168.100.7 -pw690f5701 -pm8000
ART No 1: 
items: 1
default gw: C0B96609 (192.185.102.9 )
dest:    gw:
690F5701 1F402609 (105.15.87.1     31.64.38.9    )
10:54:38.630 rsi:54 rx|0002A949B897 |00C09F63CFAB | IP/UDP/MOR/USR/DATA
0002 A949 B897 00C0 9F63 CFAB 0800 4500 0028 023E 0000 8011 ED14 
C0B9 6609 C0A8 6407 1F40 22B8 0014 6702 0000 8981 690F 5605 6161 6161
10:54:38.630|                 |690F5605 690F5701|E00I   OUT    4||89 1user
6161 6161

Notes:

  1. IP addresses agree only in the upper 8 bits and for that reason larger masks FF000000 are used.

  2. If default gw in table Art is not zero then it is used instead of the MAS IP address for generation of the IP address of the application. Default gw must agree with the IP address of connected applications in the upper 18 bits. Lower bits are of no significance. It is thus possible to insert the whole IP address of certain application into default gw.

Default address for the direction from IP to MORSE

A packet sent from an application via MAS to the MORSE network doesn´t have a pre-defined port in certain cases. Therefore it is possible to define a default MORSE address for an application, which is searched for in the Art table in three steps:

  1. After unsuccessful searching in column “gw” of table Art

  2. Address “00000000”, which corresponds to item “gw”, is searched for in column “dest”, e.g. 1F492401, where 1F49 is the selected standard number of the port and 2401 is the lower part of the IP address of the application. This pair

    00000000 1F492401

    must be located at the end of Art so that the pair according to point 3. e.g.:

    690F5709 1F492401

    lies above it.

  3. This item 1F492401is then searched for in column “gw” and its respective item in column “dest” 690F5709 then becomes the MORSE address of the source in the sent packet.

  4. Example of a filled in Art table:

    ART No 1: 
    items: 4
    default gw: 00000000 (0.0.0.0        )
    dest:    gw:
    690F5707 1F472401 (105.15.87.7     31.71.36.1     )
    690F5701 1F412401 (105.15.87.1     31.65.36.1     )
    690F5709 1F492401 (105.15.87.9    31.73.36.1     )
    00000000 1F492401 (0.0.0.0         31.73.36.1     )
  5. If the Art table is filled in we can forbid further automatic entries to the table in menu EPe0t using parameter (e)nable:OFF :

    MAS:
      (s)Art:1; write (e)nable:OFF
      (B)ase:690F5700  (M)ask:000000FF

©  2024 RACOM s.r.o. All Rights Reserved.