OPENAIRINTERFACE / openair-epc-fed

Federation of all Open-Air-CN components
BSD 3-Clause "New" or "Revised" License
63 stars 67 forks source link

MNC tag in docker-compose does not modify the FQDN in spgw_u.conf #21

Open hygorjardim opened 3 years ago

hygorjardim commented 3 years ago

The MNC tag in docker-compose does not modify the FQDN in spgw_u.conf of the demo-oai-spgwu-tiny container

https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/afeb9d22770864fed00242544702e22258db637a/docker-compose/magma-mme-demo/docker-compose.yml#L157-L159

The following configuration

MCC: 208
MNC: 96
MNC03: '001'

Returns wrong FQDN value

SPGW-U =
{
    FQDN = "gw1.spgw.node.epc.mnc001.mcc208.openairinterface.org";
hygorjardim commented 3 years ago

The workaround is to create share the file with the correct settings via the volume tag.

        volumes:
            - ./spgw_u.conf:/openair-spgwu-tiny/etc/spgw_u.conf
saccaco commented 1 year ago

hello, can you show your file that you did the configuration?

hygorjardim commented 1 year ago

@saccaco I had to manually insert the FQDN into the spgw-u-tiny container configuration file.

I'll leave an example:

SPGW-U =
{
    FQDN = "gw1.spgw.node.epc.mnc92.mcc208.openairinterface.org";
    INSTANCE                       = 0;            # 0 is the default
    PID_DIRECTORY                  = "/var/run";     # /var/run is the default

    #ITTI_TASKS :
    #{
        #ITTI_TIMER_SCHED_PARAMS :
        #{
            #CPU_ID       = 1;
            #SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
            #SCHED_PRIORITY = 85;
        #};
        #S1U_SCHED_PARAMS :
        #{
            #CPU_ID       = 1;
            #SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
            #SCHED_PRIORITY = 84;
        #};
        #SX_SCHED_PARAMS :
        #{
            #CPU_ID       = 1;
            #SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
            #SCHED_PRIORITY = 84;
        #};
        #ASYNC_CMD_SCHED_PARAMS :
        #{
            #CPU_ID       = 1;
            #SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
            #SCHED_PRIORITY = 84;
        #};
    #};

    INTERFACES :
    {
        S1U_S12_S4_UP :
        {
            # S-GW binded interface for S1-U communication (GTPV1-U) can be ethernet interface, virtual ethernet interface, we don't advise wireless interfaces
            INTERFACE_NAME         = "eth0";  # STRING, interface name, YOUR NETWORK CONFIG HERE
            IPV4_ADDRESS           = "read";                                    # STRING, CIDR or "read to let app read interface configured IP address
            #PORT                   = 2152;                                     # Default is 2152
            SCHED_PARAMS :
            {
                #CPU_ID       = 2;
                SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
                SCHED_PRIORITY = 80;
                POOL_SIZE = 8; # NUM THREADS
            };
        };
        SX :
        {
            # S/P-GW binded interface for SX communication
            INTERFACE_NAME         = "eth0"; # STRING, interface name
            IPV4_ADDRESS           = "read";                        # STRING, CIDR or "read" to let app read interface configured IP address
            #PORT                   = 8805;                         # Default is 8805
            SCHED_PARAMS :
            {
                #CPU_ID       = 1;
                SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
                SCHED_PRIORITY = 81;
                POOL_SIZE = 1; # NUM THREADS
            };
        };
        SGI :
        {
           # No config to set, the software will set the SGi interface to the interface used for the default route.
            INTERFACE_NAME         = "eth0"; # STRING, interface name or "default_gateway"
            IPV4_ADDRESS           = "read";                         # STRING, CIDR or "read" to let app read interface configured IP address
            SCHED_PARAMS :
            {
                #CPU_ID       = 3;
                SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
                SCHED_PRIORITY = 80;
                POOL_SIZE = 8; # NUM THREADS
            };
        };
    };

    SNAT = "yes"; # SNAT Values in {yes, no}
    PDN_NETWORK_LIST  = (
                      {NETWORK_IPV4 = "12.1.1.0/24";} # 1 ITEM SUPPORTED ONLY
                    );

    SPGW-C_LIST = (
         {IPV4_ADDRESS="192.168.61.132" ;}
    );

    NON_STANDART_FEATURES :
    {
        BYPASS_UL_PFCP_RULES = "no"; # 'no' for standart features, yes for enhancing UL throughput
    };
};

The reason for this problem is that spgw-u-tiny's entrypoint script does not correctly create the FQDN passed by docker-compose.yaml in the container configuration file.

I recommend you look for more updated versions of these EPC components (unless you're looking for something specific from these versions), there are many unresolved bugs, it's been a few years since I've worked with this code anymore.

Best regards