YANG state

MAG-c supports YANG state data for various control plane states, including session and subscriber states. To retrieve session or subscriber states, first configure one or multiple queries using the commands in the following context:
configure mobile-gateway system bng queries
A query specifies a set of filters for sessions or subscribers, such as a filter on the MAC address, the Layer 2 access ID, and so on.

The states for the sessions or subscribers that match the filters of a query can be retrieved via NETCONF or CLI. See the 7450 ESS, 7750 SR, 7950 XRS, and VSR System Management Guide for more information about the configuration of NETCONF.

To access the state via CLI, you must switch to the MD-CLI engine. Use the following commands to switch to MD-CLI and to access the state:
configure system management-interface cli cli-engine md-cli
//
state mobile-gateway bng queries

The first command configures the MD-CLI engine, the second command makes the actual switch to MD-CLI, and the third command accesses the state (in this example BNG query states, but there are other states available in the state context).

Note:
  • The state command is the only supported MD-CLI command.
  • Model driven configuration via MD-CLI or NETCONF is not supported.
  • See the distributed YANG files for more information about the supported YANG states.

Get the number of sessions for the UP IP 5.5.5.5

config>mobile>system>bng>queries# info
----------------------------------------------
                    session "sessionNumOnUPF1"
                        up-ip 5.5.5.5
                        output-options
                            count
                        exit
                    exit

[state mobile-gateway bng queries]
A:admin@BNG-SMF# info
    sessions {
        session "sessionNumOnUPF1" {
            number-of-sessions 1000
        }
    }

Get detailed session state information for the MAC address 02:de:14:00:01:94 on the UP IP 5.5.5.5

config>mobile>system>bng>queries# info
----------------------------------------------
                    session "session1"
                        mac-address 02:de:14:00:01:94
                        up-ip 5.5.5.5
                    exit

[state mobile-gateway bng queries]
A:admin@BNG-SMF# info
    sessions {
        session "session1" {
            result 1 {
                user-access-type ipoe
                mac-address 02:de:14:00:01:94
                selected-apn "mybngvrf"
                network-realm "mybngvrf"
                ue-id 65856
                pdn-session-id 65856
                up-time 15078
                subscriber-name "auto_sub_5"
                acct-session-id "X0001014024F9491600000005"
                acct-multi-session-id "Y0000000524F9491600000004"
                sub-profile "base"
                sla-profile "base"
                sap-template "defaultsap"
                group-interface-template "defaultgrp"
                call-insight false
                ipv4 {
                    prefix-length 24
                    default-router 20.20.0.254
                    ip-address {
                        address 20.20.0.3
                        pool "p1"
                        origin local-pool
                    }
                    dhcp-lease {
                        server-address 20.20.0.254
                        lease-time 604800
                        expiration-time 2023-01-30T16:32:56.0+00:00
                        up-time 15078
                        last-renew-time 2023-01-23T16:32:56.0+00:00
                        renew-time 302400
                        rebind-time 529200
                        remaining-lease-time 589722
                    }
                }
                up {
                    active {
                        state created
                        l2-access-id "1/1/2"
                        s-vlan 334
                        c-vlan 0
                        pfcp {
                            remote-ip-address 5.5.5.5
                            local-seid 0x0000000000010140
                            remote-seid 0x3000000000000001
                        }
                        ibcp {
                            remote-ip-address 5.5.5.5
                            remote-teid 0x80020000
                        }
                    }
                }
                system-resources {
                    group 1
                    vm 1
                }
                ibcp {
                    mac-address ea:ac:33:01:02:44
                    ip-address 1.1.1.1
                    teid 0x40010141
                }
                ipoe {
                    ipv4 {
                        ip-address 20.20.0.3
                    }
                }
            }