Логирование абонентских сессий EcoRouter Documentation / BRAS / Логирование абонентских сессий
Для отслеживания установления абонентской сессии служит команда режима администрирования debug subscriber.
Параметры команды описаны в таблице ниже.
Параметр | Описание |
---|---|
ip <IP ADDRESS> | IP-адрес абонента |
mac <MAC ADDRESS> | MAC-адрес абонета |
svlan <NUM> | сервисный VLAN, в случае модели Q-in-Q |
cvlan <NUM> | клиентский VLAN |
as <NAME> | префикс для сообщений отладки данного пользователя. Данный префикс добавляется в каждое сообщение |
Если включена отладка по MAC-адресу, svlan или cvlan, то в логах можно наблюдать DHCP и RADIUS-логи. Если включена отладка по IP-адресу - в логах будут только RADIUS-сообщения.
Пример отладки по MAC-адресу:
ecorouter#debug subscriber mac 0050.7966.6801 as PETROV
Логи:
[data-plane] [PETROV] DHCP-DISCOVER message recieved from client 00:50:79:66:68:01
[data-plane] [PETROV] dhcp, delete client: 00:50:79:66:68:01
[data-plane] [PETROV] DHCP-DISCOVER message recieved from client 00:50:79:66:68:01
[data-plane] [PETROV] dhcp, delete client: 00:50:79:66:68:01
[data-plane] [PETROV] DHCP-OFFER message recieved for client 00:50:79:66:68:01
[data-plane] [PETROV] DHCP-REQUEST message recieved from client 00:50:79:66:68:01
[data-plane] [PETROV] DHCP-ACKNOWLEDGE message recieved for client 00:50:79:66:68:01
[data-plane] [PETROV] Client IP: 10.1.1.3 sent request to radius client
[radius-client] [PETROV] radius_module.cpp:27(AuthRequest) Request created. State: NEW. Client ip: 10.1.1.3
[radius-client] [PETROV] radius_module.cpp:125(sendRequests) authenticating: client ip 10.1.1.3
[radius-client] [PETROV] radius_module.cpp:35(setState) State change: NEW -> PENDING. Client ip: 10.1.1.3
[radius-client] [PETROV] radius_module.cpp:35(setState) State change: PENDING -> READY. Client ip: 10.1.1.3
[radius-client] [PETROV] radius_module.cpp:35(setState) State change: READY -> RECEIVED_OK. Client ip: 10.1.1.3
[radius-client] [PETROV] radius_module.cpp:653(parsePair) rc_auth 10.1.1.3 success
[radius-client] [PETROV] radius_module.cpp:342(finishAuth) Authentication succeeded, client ip: 10.1.1.3
[data-plane] [PETROV] Update ipoe client session "SUBSCRIBER DYNAMIC AUTH_COMPLETED ACTIVE " on ip : 10.1.1.3 on iface 1, (socket 0)
Пример отладки по IP-адресу:
ecorouter#debug subscriber ip 10.1.1.4 as IVANOV
Логи:
[note] [data-plane] [IVANOV] Client IP: 10.1.1.4 sent request to radius client in first time
[debug] [radius-client] [IVANOV] radius_module.cpp:27(AuthRequest) Request created. State: NEW. Client ip: 10.1.1.4
[info] [radius-client] [IVANOV] radius_module.cpp:125(sendRequests) authenticating: client ip 10.1.1.4
[debug] [radius-client] [IVANOV] radius_module.cpp:35(setState) State change: NEW -> PENDING. Client ip: 10.1.1.4
[debug] [radius-client] [IVANOV] radius_module.cpp:35(setState) State change: PENDING -> READY. Client ip: 10.1.1.4
[debug] [radius-client] [IVANOV] radius_module.cpp:35(setState) State change: READY -> RECEIVED_REJECT. Client ip: 10.1.1.4
[info] [radius-client] [IVANOV] radius_module.cpp:684(parsePair) rc_auth 10.1.1.4 reject
[info] [radius-client] [IVANOV] radius_module.cpp:342(finishAuth) Authentication succeeded, client ip: 10.1.1.4
[debug] [data-plane] [IVANOV] Update ipoe client session "SUBSCRIBER DYNAMIC AUTH_COMPLETED NOT_ACTIVE " on ip : 10.1.1.4 on iface 1, (socket 0)
Пример отладки по клиентскому VLAN:
ecorouter#debug subscriber cvlan 10 as VLAN10
Логи:
[data-plane] [VLAN10] DHCP-DISCOVER message recieved from client 00:50:79:66:68:01
[data-plane] [VLAN10] dhcp, delete client: 00:50:79:66:68:01
[data-plane] [VLAN10] DHCP-OFFER message recieved for client 00:50:79:66:68:01
[data-plane] [VLAN10] DHCP-REQUEST message recieved from client 00:50:79:66:68:01
[data-plane] [VLAN10] DHCP-ACKNOWLEDGE message recieved for client 00:50:79:66:68:01
[data-plane] [VLAN10] DHCP-DISCOVER message recieved from client 00:50:79:66:68:02
[data-plane] [VLAN10] DHCP-OFFER message recieved for client 00:50:79:66:68:02
[data-plane] [VLAN10] DHCP-REQUEST message recieved from client 00:50:79:66:68:02
[data-plane] [VLAN10] DHCP-ACKNOWLEDGE message recieved for client 00:50:79:66:68:02
[data-plane] [VLAN10] Client IP: 10.1.1.4 sent request to radius client in first time
[radius-client] [VLAN10] radius_module.cpp:27(AuthRequest) Request created. State: NEW. Client ip: 10.1.1.4
[radius-client] [VLAN10] radius_module.cpp:125(sendRequests) authenticating: client ip 10.1.1.4
[radius-client] [VLAN10] radius_module.cpp:35(setState) State change: NEW -> PENDING. Client ip: 10.1.1.4
[radius-client] [VLAN10] radius_module.cpp:35(setState) State change: PENDING -> RETRY. Client ip: 10.1.1.4
[radius-client] [VLAN10] radius_module.cpp:166(sendRequests) No servers left to try. rc_auth_async returned code -1, client ip: 10.1.1.4
[radius-client] [VLAN10] radius_module.cpp:35(setState) State change: RETRY -> SEND_FAILED. Client ip: 10.1.1.4
[radius-client] [VLAN10] radius_module.cpp:338(finishAuth) Authentication failed, client ip: 10.1.1.4
Кроме того, удобно отслеживать установление сессии при помощи команды режима администрирования terminal monitor <LINE>. Где LINE - слово, по которому будет произведена выборка из логов. Данная команда отображает только интересующие пользователя сообщения.