WO2012024967A1 - 一种支持多串口终端登录的方法和装置 - Google Patents
一种支持多串口终端登录的方法和装置 Download PDFInfo
- Publication number
- WO2012024967A1 WO2012024967A1 PCT/CN2011/075901 CN2011075901W WO2012024967A1 WO 2012024967 A1 WO2012024967 A1 WO 2012024967A1 CN 2011075901 W CN2011075901 W CN 2011075901W WO 2012024967 A1 WO2012024967 A1 WO 2012024967A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- login
- terminal
- serial
- login request
- serial terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
Definitions
- the present invention relates to a terminal login technology, and in particular, to a method and apparatus for supporting multi-serial terminal login. Background technique
- the network has higher and higher requirements on the interface capacity and switching capacity of the chassis-connected devices. Therefore, the single-chassis-connected device has been difficult to meet the increasing user network data in terms of interface capacity and switching capacity. Demand.
- the clustering technology is used to interconnect the original single-chassis devices to form a new multi-chassis device to expand the capacity and interface capacity to meet user requirements.
- a router As a widely used connection device in a network system, a router not only requires high-reliability data transmission, but also requires scalability. It introduces cluster technology into the router field, with the purpose of using two or more ordinary routers. ⁇ Connected with cluster technology to form router cluster devices, enabling these common routers to work together and parallelize devices to achieve smooth expansion of system capacity, thus meeting the user's need for higher capacity.
- a router cluster device includes two types of chassis: one is a Central Fabric Chassis (CFC), and the other is a Line Card Chassis (LCC), where each frame has Main Control Board (MPUF) and some Switch Boards (SFU).
- CFC Central Fabric Chassis
- LCC Line Card Chassis
- MPUF Main Control Board
- SFU Switch Boards
- SC system controller
- SC system controller
- the SC can be run on any one of the chassis.
- the SC also has a backup SC and a standby SC, and the standby SC runs on another chassis.
- the chassis where the primary SC is located and the chassis where the standby SC is located exist.
- the present invention provides a method and device for supporting multi-serial terminal login, so that any serial terminal can implement the request login and operation, realize flexible login of the serial terminal, and facilitate device maintenance.
- the present invention provides a method for supporting multi-serial terminal login.
- the method includes: when a serial terminal initiates a login request, the login request is sent to the main control board of the chassis where the main SC is located; The control board determines whether the serial terminal that initiates the login request is allowed to log in, and returns the login result to the serial terminal.
- the condition for the serial terminal to log in to the login request is: when no other serial terminal is in the login state, and/or the serial terminal that initiates the login request belongs to the chassis where the primary SC is located, the serial terminal login that allows the login request is allowed. .
- the determining whether to allow the serial terminal to initiate the login request includes: determining whether the serial terminal that initiates the login request belongs to the chassis where the primary SC is located, and if it belongs to the chassis where the primary SC is located, determining whether the serial terminal is currently in the chassis The login status, if not, allows the serial terminal to initiate the login request to log in. If the serial terminal is in the login state, the current serial terminal is forced to go offline, and the serial terminal that initiates the login request is allowed to log in.
- serial terminal If it is not in the chassis of the primary SC, it is determined whether the serial terminal is currently in the login state. If not, the serial terminal that initiates the login request is allowed to log in. If the serial terminal is in the login state, the serial port that refuses to initiate the login request is rejected. Terminal login.
- the determining whether to allow the serial terminal to log in to initiate the login request includes: determining whether the serial terminal is currently in the login state, and if not, allowing the serial terminal to initiate the login request to log in; if the serial terminal is already in the login state Then, it is further determined whether the serial terminal that initiates the login request belongs to the chassis where the primary SC is located, and if it belongs to the chassis where the primary SC is located, the current serial terminal that has logged in is forced to go offline, and the serial terminal that initiates the login request is allowed to log in; If the primary SC is in the chassis, the serial terminal login that initiated the login request is denied.
- the main control board that sends the login request to the chassis of the main SC includes: The serial port daemon of the main control board of the chassis where the serial terminal that initiates the login request sends the login request to the chassis of the main SC.
- the telnet process of returning the login result to the serial port is:
- the telnet process of the main control board of the chassis where the primary SC is located returns the login result to the serial port daemon of the main control board of the chassis where the serial terminal that initiated the login request is located.
- the login request is sent to the main control board of the chassis where the main SC is located by using an inter-CPU message or a message in the CPU; wherein the inter-CPU message or the intra-CPU message carries the serial port terminal where the login request is initiated.
- the determining whether the serial terminal that initiates the login request belongs to the chassis where the primary SC is located includes: determining the attribute information in the inter-CPU message or the message in the CPU, and determining whether to belong to the primary SC or the non-primary sc according to the attribute information.
- the determining whether the serial port terminal is currently in the login state comprises: determining whether the preset login flag bit is set, if the bit is set, the existing serial port terminal is in the login state; otherwise, the serial port terminal is not in the login state. Login status.
- the method of the present invention further includes: after any one of the serial terminals is logged in, if there is no operation for a specified continuous time, the serial port terminal currently in the login state is forced to go offline.
- the invention also provides a device for supporting multi-serial terminal login, the device comprises: transmitting and receiving Module, login request processing module;
- the transceiver module is configured to receive a login request initiated by the serial terminal, and forward the login request to the login request processing module;
- the login request processing module is configured to determine whether the serial terminal that initiates the login request is allowed to log in, and notify the serial terminal that initiates the login request to the login result.
- the login request processing module further includes: a login request determination module, a login module;
- the login request judging module is configured to determine whether the serial port terminal is currently in the login state, and determine that the serial port terminal is in the login state, and notify the login module;
- the login module is configured to allow and complete the login of the serial terminal that initiates the login request when the serial terminal is not in the login state.
- the login request judging module is further configured to: determine whether the serial port terminal that currently initiates the login request belongs to the chassis where the main SC is located.
- the login module is further configured to reject the serial terminal login that initiates the login request, and reject the reason.
- the serial port terminal that initiates the login request is notified.
- the login request determination module determines that the serial port terminal is in the login state and the serial port terminal that initiates the login request belongs to the primary SC
- the login module is also used to force the serial terminal terminal currently in the login state.
- the offline terminal is allowed to log in to the serial terminal that initiates the login request, and the login result is notified to the serial terminal that initiated the login request.
- the present invention has the following advantages:
- the method and the device for supporting the multi-serial terminal login allow the serial terminal to initiate the request to log in when a serial terminal initiates a login request and determines that no other serial terminal is in the login state in the router cluster device.
- the serial terminal of the main control board on any one of the router cluster devices can request login and perform operations such as OAM operation, and The operation effect is the same as that of the serial terminal of the main control board of the main SC.
- the router can be configured to manage the device. This solves the problem that the router cluster device can only support the serial terminal on the main control board of the main SC. Login question.
- serial terminal of the main control board of the main SC is initiating a login request
- the serial terminal that is currently in the login state can be forced to go offline, and the main request for the login request is allowed.
- the serial terminal of the main control board of the chassis of the SC is logged in, so that the serial terminal of the main control board of the main SC is preferentially logged in.
- serial port terminal of the main control board of the main SC when the serial port terminal of the main control board of the main SC is damaged or unavailable due to other reasons, the main SC and the standby SC need not be switched, and the host SC can be used.
- the serial port of the main control board of any chassis other than the chassis completes the login and OAM operations, which not only avoids device wear caused by device switching, but also facilitates device maintenance.
- FIG. 1 is a schematic flowchart of an implementation of a method for supporting a multi-serial terminal login method according to the first embodiment of the present invention
- FIG. 2 is a schematic flowchart of a second embodiment of the present invention
- the basic idea of the present invention is: In a router cluster device, when a serial terminal initiates a login request, it is determined that no other serial terminal is currently in the login state of the router cluster device, regardless of whether the serial terminal that initiates the login request belongs to the host SC. In the box, the serial terminal that initiates the login request is allowed to log in, so that any serial terminal can request login.
- FIG. 1 is a schematic flowchart showing the implementation of the first embodiment of the multi-serial terminal login method according to the present invention. As shown in FIG. 1 , the method for supporting multi-serial terminal login in this embodiment includes the following steps:
- the login request is sent to the main control board of the chassis where the main SC is located;
- the serial terminal that initiates the login request may be the serial terminal of the main control board of the main SC, or the serial terminal of the main control board of the chassis where the main SC is located; whether the serial terminal that initiates the login request belongs to the primary SC,
- the login request is sent to the main control board of the chassis where the main SC is located.
- the login request is sent by the serial port of the main control board of the chassis where the serial terminal that initiated the login request is located.
- the process receives the packet and sends it to the telnet process on the main control board of the main SC.
- the main control board of the chassis where the main SC is located determines whether the serial terminal is allowed to log in, and returns the login result to the serial terminal.
- the determining, according to the preset login rule, the preset login rule may be determining whether the serial terminal is currently in the login state, and whether the serial terminal that initiates the login request belongs to the chassis where the primary SC is located, if not If the serial terminal is in the login state and/or the serial terminal that initiates the login request belongs to the chassis where the primary SC is located, the serial terminal that initiates the login request is allowed to log in. If the serial terminal that belongs to the main control board of the main SC is in the login state, The serial terminal login that refuses to initiate the login request is rejected. The login result is that the serial terminal is allowed to log in or the serial terminal is logged in. When the serial terminal is allowed to log in, the login result is allowed to log in to the serial terminal. In contrast, when the serial terminal is denied to log in, the login result is rejected. Serial terminal login.
- the operation of the serial port terminal of the main control board of the chassis of the non-primary SC is sent to the telnet process on the main control board of the chassis of the main SC through the serial port daemon process.
- the telnet process of the main control board of the main SC is used to monitor the status of all other non-primary SC serial terminals.
- FIG. 2 is a schematic flowchart of the second embodiment of the present invention.
- the method for supporting multi-serial terminal login in this embodiment includes the following steps: 201: Any serial terminal initiates login request;
- the serial port daemon on the main control board of the chassis where the serial port terminal that initiates the login request receives the login request, and sends the login request to the main control board of the main SC where the main SC is located.
- the telnet process on the main control board of the main SC is configured to receive the inter-CPU message or the intra-CPU message, if the information about the chassis included in the message between the CPU or the message in the CPU is the host SC.
- the login request is initiated by the serial terminal of the chassis where the primary SC is located, and then 203 is performed; if the information about the chassis included in the message between the CPU or the message in the CPU is the chassis of the non-primary SC, Indicates that the login request is initiated by the serial terminal of the chassis where the non-primary SC is located, and then executes 206;
- the telnet process on the main control board of the main SC is set to a preset login identifier, such as: set to 1 or true;
- the telnet process on the main control board of the main SC is reset, such as: Is 0 or false.
- the telnet process on the main control board of the main SC is determined according to the login identifier, and whether the serial terminal is in the login state. If the identifier is set, the value of the identifier is equal to 1 or set to true, it means that the serial terminal in the current device is in the login state, execute 204; if the flag is reset, if the value of the flag is equal to 0 or is set to false, it means that no serial terminal is in the login state. , executing 205;
- the forced offline operation is: executing a forced user offline code program by the telnet process on the main control board of the main SC, forcing the serial terminal to go offline.
- the serial terminal of the main control board of the main SC is logged in, and the login is completed, and 209 is performed.
- the login result is asynchronous. Send to the serial port daemon on the main control board of the chassis where the serial terminal that initiated the login request is located, and then execute 209;
- the telnet process on the main control board of the main chassis of the main SC determines whether a serial terminal is in the login state according to the login identifier. If the identifier is set, the value of the identifier is equal to 1 or If it is true, it means that the serial terminal is currently logged in, and 207 is executed; if the flag is reset, if the value of the flag is equal to 0 or is set to false, it means that there is no serial terminal login, and 208 is performed;
- telnet process on the main control board of the main SC is sent to the telnet process by the asynchronous message.
- the serial terminal that initiates the login request enters the login authentication process.
- the telnet process on the main control board of the main SC is sent to the chassis of the serial terminal where the login request is initiated.
- the serial port daemon on the control board executes 209.
- the telnet process determines that the serial terminal that initiated the login request can log in, the telnet process directly monitors the login result, and then sends the login result back to the serial port daemon.
- the serial port daemon on the main control board of the chassis where the serial terminal that initiates the login request returns the received serial login result or the rejected reason to the serial terminal user, and displays it on the interface of the user terminal, prompting the user.
- the serial port has been successfully logged in, or the serial terminal has been denied login.
- step 202 and step 203 can also be reversed, that is, it is first determined whether the serial port terminal is currently in the login state, and if not, the login of the serial terminal that initiated the login request is completed; If the terminal is in the login state, it is determined whether the serial terminal that initiated the login request belongs to the chassis where the primary SC is located. If it belongs to the chassis where the primary SC is located, the currently logged-in serial terminal is forced to go offline, and the serial terminal that initiates the login request is completed. If the login does not belong to the chassis where the primary SC is located, the serial terminal login that initiated the login request is rejected.
- the present invention also adds a protection mechanism to the router cluster device: After any serial port terminal logs in, if there is no operation for a specified continuous time, the telnet on the main control board of the main SC is located. The process will execute the code program for forcing the user to go offline, forcing the serial terminal that is currently in the login state to go offline, thus preventing a serial port terminal from being occupied for a long time without operating, causing other serial terminal terminals to fail to log in.
- the specified continuous time may be set according to actual needs in a timer program in the telnet process.
- the present invention further provides an apparatus for supporting multi-serial terminal login.
- the apparatus embodiment includes: a transceiver module 301, and a login request processing module 302;
- the transceiver module 301 is located on the main control board of the main SC.
- the transceiver module 301 is configured to receive the login request, and send the login request to the chassis of the main SC.
- Login request processing module 302 on the main control board;
- the login request processing module 302 is configured to determine whether to allow the serial terminal terminal to initiate the login request to log in, and return the login result to the serial terminal that initiates the login request.
- the serial port daemon of the main control board of the chassis where the serial terminal is initiating the login request sends a login request to the telnet process of the main control board of the main SC.
- the telnet process of the main control board of the main SC is to initiate the login.
- the serial port daemon of the main control board of the chassis where the serial port terminal is located returns the login result.
- the login result is the login success, login failure/rejection reason.
- the login request processing module 302 further includes: a login request determination module 3021 and a login module 3022;
- the login request judging module 3021 is configured to determine whether the serial port terminal is in the login state in the router cluster device, and determine that the serial port terminal is in the login state, notify the login module 3022;
- the login module 3022 is configured to allow and complete the login of the serial terminal that initiates the login request when the serial port terminal is not in the login state in the router cluster device.
- the login request determining module determines that when the serial port terminal in the router cluster device is in the login state and the serial port terminal that initiates the login request belongs to the non-primary SC, the login module 3022 is further configured to reject the chassis where the non-primary SC is located.
- the serial terminal of the main control board logs in, and notifies the serial terminal that initiated the login request.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开一种支持多串口终端登录的方法和装置,该方法包括:有串口终端发起登录请求时,将所述登录请求发送给主系统控制点SC所在机框的主控板;主SC所在机框的主控板确定是否允许发起登录请求的串口终端登录,并将登录结果通知给发起登录请求的串口终端。因此,本发明在没有串口终端处于登录状态和/或发起登录请求的串口终端属于主SC所在机框情况下,均允许发起登录请求的串口终端登录,使任意一个串口终端都能请求登录,实现串口终端的灵活登录,且有利于设备维护。
Description
一种支持多串口终端登录的方法和装置 技术领域
本发明涉及终端登录技术, 尤其涉及一种支持多串口终端登录的方法 和装置。 背景技术
随着网络的高速发展, 网络对机框连接设备的接口容量和交换容量提 出了越来越高的要求, 因此, 单机框连接设备在接口容量和交换容量上已 经难以满足用户对网络数据日益增长的需求。 目前, 通常会釆用集群技术 将原有的单机框连接设备互联, 组成一个新的多机框连接设备, 从而在交 换容量和接口容量上进行扩展, 以满足用户需求。
路由器作为网络系统中广泛使用的连接设备, 不仅要求其具有高可靠 性的数据传输功能, 同时还要求其具有可扩展性, 将集群技术引入路由器 领域, 目的是将两台或两台以上普通路由器釆用集群技术进行连接, 形成 路由器集群设备, 使得这些普通路由器能够进行设备间协同工作和并行处 理, 实现系统容量的平滑扩展, 从而满足用户对设备具有更高容量的需求。
通常,路由器集群设备包括两类机框: 一类是集群中心交换框(Central Fabric Chassis, CFC ), 另一类是集群线卡框( Line Card Chassis, LCC ), 其中, 每个框上都有主控板(MPUF ) 和一些交换板(SFU )。 一般, 路由 器集群设备中设有系统控制点(System Controller, SC ), SC可以运行在任 意一个机框上。 另外, SC还具有备份的 SC即备 SC, 备 SC运行在另一个 机框上, 这样, 就存在主 SC所在的机框和备 SC所在的机框。
在传统的路由器集群设备中,只有主 SC所在的机框的主控板串口终端 才允许登录并进行操作, 如操作管理维护 ( Operation Administration
Maintenance , OAM )操作 , 其它非系统控制点所在机框的主控板串口终端 不允许登录并进行操作, 缺乏灵活性。 并且, 如果主 SC所在机框主控板的 串口终端损坏或因其它原因导致不可用时,只能先将主 SC所在的机框和备 SC所在的机框进行主备倒换, 倒换成功后才能有新的允许登录的串口终端 可用, 但是, 这种主备倒换操作, 会造成设备磨损, 且不利于设备维护。 发明内容
有鉴于此, 本发明通过提供一种支持多串口终端登录的方法和装置, 使任意一个串口终端都能实现请求登录并进行操作, 实现串口终端的灵活 登录, 且有利于设备维护。
为达到上述目的, 本发明的技术方案是这样实现的:
本发明提供了一种支持多串口终端登录的方法, 该方法包括: 有串口终端发起登录请求时,将所述登录请求发送给主 SC所在机框的 主控板;主 SC所在机框的主控板确定是否允许发起登录请求的串口终端登 录, 并将登录结果返回串口终端。
其中, 所述允许发起登录请求的串口终端登录的条件为: 当没有其他 串口终端处于登录状态、 和 /或发起登录请求的串口终端属于主 SC所在机 框时, 允许发起登录请求的串口终端登录。
上述方案中, 所述确定是否允许发起登录请求的串口终端登录包括: 判断发起登录请求的串口终端是否属于主 SC所在机框, 如果属于主 SC所 在机框, 则判断当前是否已有串口终端处于登录状态, 如果没有, 则允许 发起登录请求的串口终端登录; 如果已有串口终端处于登录状态, 则强制 当前已登录的串口终端下线, 并允许发起登录请求的串口终端登录;
如果不属于主 SC所在机框,则判断当前是否已有串口终端处于登录状 态, 如果没有, 则允许发起登录请求的串口终端登录; 如果已有串口终端 处于登录状态, 则拒绝发起登录请求的串口终端登录。
上述方案中, 所述确定是否允许发起登录请求的串口终端登录包括: 判断当前是否已有串口终端处于登录状态, 如果没有, 则允许发起登录请 求的串口终端登录; 如果已有串口终端处于登录状态, 则进一步判断发起 登录请求的串口终端是否属于主 SC所在机框, 如果属于主 SC所在机框, 则强制当前已登录的串口终端下线, 并允许发起登录请求的串口终端登录; 如果不属于主 SC所在机框, 则拒绝发起登录请求的串口终端登录。
上述方案中, 所述将所述登录请求发送给主 SC 所在机框的主控板包 括: 发起登录请求的串口终端所在机框主控板的串口守护进程将登录请求 发送给主 SC所在机框主控板的远程登录(telnet )进程;
所述将登录结果返回串口终端为: 主 SC所在机框主控板的 telnet进程 将登录结果返回给发起登录请求的串口终端所在机框主控板的串口守护进 程。
上述方案中, 所述登录请求通过 CPU间消息或 CPU内消息发送给主 SC所在机框的主控板; 其中, 所述 CPU间消息或 CPU内消息中携带有发 起登录请求的串口终端所在机框的属性信息;
所述判断发起登录请求的串口终端是否属于主 SC所在机框包括:判断 所述 CPU间消息或 CPU内消息中的属性信息,才艮据所述属性信息确定属于 主 SC还是非主 sc。
上述方案中, 所述判断当前是否已有串口终端处于登录状态包括: 判 断预先设置的登录标识位是否被置位, 如果被置位, 则已有串口终端处于 登录状态; 否则, 没有串口终端处于登录状态。
上述方案中, 本发明所述的方法进一步包括: 任意一个串口终端登录 后, 如果在指定的连续时间内无任何操作, 则强制当前处于登录状态的串 口终端下线。
本发明还提供了一种支持多串口终端登录的装置, 该装置包括: 收发
模块、 登录请求处理模块; 其中,
所述收发模块, 用于接收串口终端发起的登录请求, 并将所述登录请 求转发给登录请求处理模块;
所述登录请求处理模块, 用于确定是否允许发起登录请求的串口终端 登录, 并将登录结果通知给发起登录请求的串口终端。
上述方案中, 所述登录请求处理模块进一步包括: 登录请求判断模块、 登录模块; 其中,
所述登录请求判断模块, 用于判断当前是否已有串口终端处于登录状 态, 确定没有串口终端处于登录状态时, 通知登录模块;
所述登录模块, 用于在没有串口终端处于登录状态时, 允许并完成发 起登录请求的串口终端的登录。
上述方案中, 所述登录请求判断模块还用于: 判断当前发起登录请求 的串口终端是否属于主 SC所在机框。
进一步地, 所述登录请求判断模块确定已有串口终端处于登录状态且 发起登录请求的串口终端属于非主 SC时,所述登录模块还用于拒绝发起登 录请求的串口终端登录, 并将拒绝原因通知发起登录请求的串口终端; 所述登录请求判断模块确定已有串口终端处于登录状态且发起登录请 求的串口终端属于主 SC时,所述登录模块还用于将当前处于登录状态的串 口终端强制下线, 并允许发起登录请求的串口终端登录, 将登录结果通知 给发起登录请求的串口终端。
相较于现有技术, 本发明具有如下优势:
本发明所提供的支持多串口终端登录的方法和装置, 当有串口终端发 起登录请求, 且确定路由器集群设备中当前没有其它串口终端处于登录状 态时, 就允许发起请求的串口终端登录。 如此, 可使路由器集群设备中任 意一个机框上主控板的串口终端都能请求登录并进行操作如 OAM操作,且
操作效果和主 SC所在机框主控板的串口终端一样, 能进入 OAM界面进行 设备配置管理操作,从而解决了现有技术中路由器集群设备只支持主 SC所 在机框主控板上串口终端才能登录的问题。
此外, 即便当前有其它串口终端处于登录状态时, 如果是主 SC所在机 框主控板的串口终端发起登录请求, 则可强制当前处于登录状态的串口终 端下线, 并允许发起登录请求的主 SC所在机框主控板的串口终端登录, 从 而使主 SC所在机框主控板的串口终端实现优先登录。
并且, 在本发明的实际应用中, 当主 SC所在机框主控板的串口终端损 坏或由于其它原因导致不可用时, 无需将主 SC与备 SC进行主备倒换, 即 可釆用主 SC 所在机框以外的任意一个机框主控板的串口终端完成登录及 OAM操作, 从而不仅避免进行设备倒换而造成的设备磨损, 而且更加便于 设备维护。 附图说明
图 1为本发明支持多串口终端登录方法实施例一的实现流程示意图; 图 2为本发明支持多串口终端登录方法实施例二的实现流程示意图; 图 3为本发明支持多串口终端登录装置实施例的组成结构示意图。 具体实施方式
本发明的基本思想是: 在路由器集群设备中, 有串口终端发起登录请 求时, 只要确定该路由器集群设备中当前没有其它串口终端处于登录状态, 无论发起登录请求的串口终端是否属于主 SC所在机框,都允许该发起登录 请求的串口终端登录, 从而实现任意一个串口终端都能请求登录的目的。
下面结合附图对本发明的具体实施进行详细描述。
方法实施例一
图 1 所示为本发明支持多串口终端登录方法实施例一的实现流程示意
图, 如图 1所示, 本实施例支持多串口终端登录的方法包括如下步骤:
101 : 串口终端发起登录请求时, 将该登录请求发送给主 SC所在机框 的主控板;
这里,发起登录请求的串口终端可以是主 SC所在机框主控板的串口终 端, 也可以是非主 SC所在机框主控板的串口终端; 无论发起登录请求的串 口终端是否属于主 SC, 所述登录请求均经由发起登录请求的串口终端所在 机框的主控板发送到主 SC所在机框的主控板;所述登录请求由发起登录请 求的串口终端所在机框主控板的串口守护进程接收,并发送给主 SC所在机 框主控板的 telnet进程。
102: 主 SC所在机框的主控板确定是否允许该串口终端登录, 并将登 录结果返回串口终端。
这里, 所述确定根据预设的登录规则确定, 所述预设的登录规则可以 是判断当前是否已有串口终端处于登录状态、 以及发起登录请求的串口终 端是否属于主 SC所在机框, 如果没有串口终端处于登录状态和 /或发起登 录请求的串口终端属于主 SC所在机框,则允许发起登录请求的串口终端登 录; 如果已有属于主 SC所在机框主控板的串口终端处于登录状态, 则拒绝 发起登录请求的串口终端登录。 其中, 所述登录结果为允许串口终端登录 或拒绝串口终端登录, 在允许串口终端登录时, 发送的登录结果为允许串 口终端登录, 相对地, 在拒绝串口终端登录时, 发送的登录结果为拒绝串 口终端登录。
需要说明的是,任意一个非主 SC所在机框主控板的串口终端的操作都 会经由其串口守护进程,并通过消息模式发送给主 SC所在机框主控板上的 telnet进程, 从而实现由主 SC所在机框主控板的 telnet进程监测其它所有 非主 SC串口终端所处状态的目的。
方法实施例二
图 2所示为本发明支持多串口终端登录方法实施例二的实现流程示意 图, 如图 2所示, 本实施例中支持多串口终端登录的方法包括如下步骤: 201 : 任意一个串口终端发起登录请求;
本步骤中, 发起登录请求的串口终端所在机框主控板上的串口守护进 程接收该登录请求,并将该登录请求通过 CPU间消息、或 CPU内消息发送 给主 SC所在机框主控板上的 telnet进程; 其中 , 所述 CPU间消息或 CPU 内消息中包含发起登录请求的串口终端所在机框的属性信息, 所述属性信 息是指: 发起登录请求的串口终端所在机框是主 SC 所在的机框还是非主 SC所在的机框; 如果发起登录请求的串口终端所在机框是主 SC所在的机 框, 釆用的是 CPU内消息, 如果发起登录请求的串口终端所在机框是非主 SC所在的机框, 釆用的是 CPU间消息。
202: 判断发起登录请求的串口终端所在机框是否为主 SC所在机框, 如果是, 则执行 203 , 如果不是, 则执行 206;
具体的,所述主 SC所在机框主控板上的 telnet进程接收所述 CPU间消 息或 CPU内消息, 如果所述 CPU间消息或 CPU内消息中包含的机框属性 信息为主 SC所在机框, 则表明该登录请求是由主 SC所在机框的串口终端 发起的, 然后执行 203; 如果所述 CPU间消息或 CPU内消息中包含的机框 属性信息为非主 SC所在机框, 则表明该登录请求是由非主 SC所在机框的 串口终端发起, 然后执行 206;
203: 判断当前路由器集群设备是否已有串口终端登录, 如果有, 则执 行 204; 否则, 执行 205;
这里, 需要说明的是: 当路由器集群设备中任意一个串口终端登录成 功后, 主 SC所在机框主控板上的 telnet进程会将预先设置的登录标识位置 位, 如: 设置为 1或 true; 当路由器集群设备中已登录的串口终端退出登录 时, 主 SC所在机框主控板上的 telnet进程会将登录标识位复位, 如: 设置
为 0或 false。
本步骤中,主 SC所在机框主控板上的 telnet进程根据所述登录标识位, 判断当前路由器集群设备中是否有串口终端处于登录状态, 如果标识位为 置位,如标识位的值等于 1或设为 true, 则表示当前设备中有串口终端处于 登录状态,执行 204;如果标识位为复位,如标识位的值等于 0或设为 false, 则表示当前设备中没有串口终端处于登录状态, 执行 205;
204: 将当前登录的串口终端用户强制下线;
这里, 所述强制下线的操作是: 由主 SC所在机框主控板上的 telnet进 程执行强制用户下线代码程序, 迫使串口终端下线。
205:主 SC所在机框主控板的串口终端进行登录,登录完毕,执行 209; 这里, 所述主 SC所在机框主控板上的 telnet进程在登录完毕后, 会将 登录结果通过异步消息发送给发起登录请求的串口终端所在机框主控板上 的串口守护进程, 然后执行 209;
206: 判断当前路由器集群设备中是否已有串口终端登录, 如果有, 则 执行 207; 否则, 执行 208;
其中, 主 SC所在机框主控板上的 telnet进程根据所述登录标识位判断 当前路由器集群设备中是否有串口终端处于登录状态, 如果标识位为置位, 如标识位的值等于 1或设为 true,则表示当前已有串口终端登录,执行 207; 如果标识位为复位, 如标识位的值等于 0或设为 false, 则表示当前没有串 口终端登录, 执行 208;
207: 提示已有串口终端登录, 所述登录请求不被允许, 执行 209; 这里, 主 SC所在机框主控板上的 telnet进程会将该登录请求不被允许 的结果, 通过异步消息发送给发起登录请求的串口终端所在机框主控板上 的串口守护进程, 执行 209;
208: 发起登录请求的串口终端进行登录;
具体的, 发起登录请求的串口终端进入登录认证流程, 登录完毕后, 主 SC所在机框主控板上的 telnet进程会将登录结果, 通过异步消息发送给 发起登录请求的串口终端所在机框主控板上的串口守护进程,执行 209; 这 里, 由于 telnet进程确定发起登录请求的串口终端可以登录后, telnet进程 会直接监控登录结果, 之后将登录结果发回给串口守护进程。
209: 将登录结果返回给发起登录请求的串口终端用户;
这里, 发起登录请求的串口终端所在机框主控板上的串口守护进程会 将收到的串口登录结果或被拒绝原因返回给该串口终端用户, 并显示在该 用户终端的界面上, 提示用户该串口已登录成功、 或该串口终端已被拒绝 登录。
图 2的处理过程中, 步骤 202和步骤 203的顺序也可以调换, 即: 先 判断当前是否已有串口终端处于登录状态, 如果没有, 则完成发起登录请 求的串口终端的登录; 如果已有串口终端处于登录状态, 则再判断当前发 起登录请求的串口终端是否属于主 SC所在机框,如果属于主 SC所在机框, 则将当前已登录的串口终端强制下线, 完成发起登录请求的串口终端的登 录,如果不属于主 SC所在机框,则拒绝当前发起登录请求的串口终端登录。
在具体实现时, 本发明还在路由器集群设备中增加了一种保护机制: 当任意一个串口终端登录后, 如果在指定的连续时间内无任何操作, 主 SC 所在机框主控板上的 telnet进程将会执行强制用户下线的代码程序,强制当 前处于登录状态的串口终端下线, 从而防止某一串口终端被长期占用而不 进行操作, 致使其它串口终端无法登录的情况出现。 其中, 所述指定的连 续时间可以在 telnet进程中的定时器程序中根据实际需要进行设置。
为实现上述方法, 本发明还提供了一种支持多串口终端登录的装置实 施例, 如图 3所示, 该装置实施例包括: 收发模块 301、 登录请求处理模块 302; 其中,
所述收发模块 301位于主 SC所在机框主控板, 当串口终端发起登录请 求时, 所述收发模块 301 用于接收所述登录请求, 并将所述登录请求发送 给主 SC所在机框的主控板上的登录请求处理模块 302;
所述登录请求处理模块 302用于确定是否允许发起登录请求的串口终 端登录, 并将登录结果返回给发起登录请求的串口终端。
这里, 发起登录请求的串口终端所在机框主控板的串口守护进程是向 主 SC所在机框主控板的 telnet进程发送登录请求; 主 SC所在机框主控板 的 telnet 进程是向发起登录请求的串口终端所在机框主控板的串口守护进 程返回登录结果; 所述登录结果为登录成功、 登录失败 /拒绝原因。
所述登录请求处理模块 302进一步包括: 登录请求判断模块 3021和登 录模块 3022; 其中,
所述登录请求判断模块 3021 , 用于判断路由器集群设备中当前是否已 有串口终端处于登录状态, 确定没有串口终端处于登录状态时, 通知登录 模块 3022;
进一步地, 所述登录模块 3022 , 用于在路由器集群设备中没有串口终 端处于登录状态时, 允许并完成发起登录请求的串口终端的登录。
上述装置中, 所述登录请求判断模块 302还用于: 判断当前发起登录 请求的串口终端是否属于主 SC所在机框;
进一步地, 所述登录请求判断模块确定在路由器集群设备中已有串口 终端处于登录状态且发起登录请求的串口终端属于非主 SC时,所述登录模 块 3022还用于拒绝非主 SC所在机框主控板的串口终端登录, 并将拒绝原 因通知发起登录请求的串口终端;
所述登录请求判断模块确定在路由器集群设备中已有串口终端处于登 录状态, 且发起登录请求的串口终端属于主 SC时, 所述登录模块 3022还 用于将当前处于登录状态的串口终端强制下线, 并允许发起登录请求的主
SC所在机框主控板的串口终端登录, 将登录结果通知给发起登录请求的串 口终端。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保护 范围。
Claims
1、 一种支持多串口终端登录的方法, 其特征在于, 该方法包括: 有串口终端发起登录请求时, 将所述登录请求发送给主系统控制点 SC 所在机框的主控板;主 SC所在机框的主控板确定是否允许发起登录请求的 串口终端登录, 并将登录结果通知给发起登录请求的串口终端。
2、 根据权利要求 1所述的方法, 其特征在于, 所述允许发起登录请求 的串口终端登录的条件为:
当没有其他串口终端处于登录状态、 和 /或发起登录请求的串口终端属 于主 SC所在机框时, 允许发起登录请求的串口终端登录。
3、 根据权利要求 1所述的方法, 其特征在于, 所述确定是否允许发起 登录请求的串口终端登录包括:
判断发起登录请求的串口终端是否属于主 SC 所在机框, 如果属于主 SC所在机框, 则判断当前是否已有串口终端处于登录状态, 如果没有, 则 允许发起登录请求的串口终端登录; 如果已有串口终端处于登录状态, 则 强制当前已登录的串口终端下线, 并允许发起登录请求的串口终端登录; 如果不属于主 SC所在机框,则判断当前是否已有串口终端处于登录状 态, 如果没有, 则允许发起登录请求的串口终端登录; 如果已有串口终端 处于登录状态, 则拒绝发起登录请求的串口终端登录。
4、 根据权利要求 1所述的方法, 其特征在于, 所述确定是否允许发起 登录请求的串口终端登录包括:
判断当前是否已有串口终端处于登录状态, 如果没有, 则允许发起登 录请求的串口终端登录; 如果已有串口终端处于登录状态, 则进一步判断 发起登录请求的串口终端是否属于主 SC所在机框, 如果属于主 SC所在机 框, 则强制当前已登录的串口终端下线, 并允许发起登录请求的串口终端 登录; 如果不属于主 SC所在机框, 则拒绝发起登录请求的串口终端登录。
5、 根据权利要求 1至 4任一项所述的方法, 其特征在于, 所述将所述 登录请求发送给主 SC所在机框的主控板包括:
发起登录请求的串口终端所在机框主控板的串口守护进程将登录请求 发送给主 SC所在机框主控板的远程登录 telnet进程;
所述将登录结果返回串口终端包括: 主 SC所在机框主控板的 telnet进 程将登录结果返回给发起登录请求的串口终端所在机框主控板的串口守护 进程。
6、 根据权利要求 3或 4所述的方法, 其特征在于, 所述登录请求通过 CPU间消息或 CPU内消息发送给主 SC所在机框的主控板;其中,所述 CPU 间消息或 CPU内消息中携带有发起登录请求的串口终端所在机框的属性信 息;
所述判断发起登录请求的串口终端是否属于主 SC所在机框包括:判断 所述 CPU间消息或 CPU内消息中的属性信息,才艮据所述属性信息确定属于 主 SC还是非主 sc。
7、 根据权利要求 3或 4所述的方法, 其特征在于, 所述判断当前是否 已有串口终端处于登录状态包括: 判断预先设置的登录标识位是否被置位, 如果被置位, 则已有串口终端处于登录状态; 否则, 没有串口终端处于登 录状态。
8、 根据权利要求 1至 4任一项所述的方法, 其特征在于, 该方法进一 步包括: 任意一个串口终端登录后, 如果在指定的连续时间内无任何操作, 则强制当前处于登录状态的串口终端下线。
9、 一种支持多串口终端登录的装置, 其特征在于, 该装置包括: 收发 模块、 登录请求处理模块; 其中,
所述收发模块, 用于接收串口终端发起的登录请求, 并将所述登录请 求转发给登录请求处理模块;
所述登录请求处理模块, 用于确定是否允许发起登录请求的串口终端 登录, 并将登录结果通知给发起登录请求的串口终端。
10、 根据权利要求 9所述的装置, 其特征在于, 所述登录请求处理模 块进一步包括: 登录请求判断模块、 登录模块; 其中,
所述登录请求判断模块, 用于判断当前是否已有串口终端处于登录状 态, 确定没有串口终端处于登录状态时, 通知登录模块;
所述登录模块, 用于在没有串口终端处于登录状态时, 允许并完成发 起登录请求的串口终端的登录。
11、 根据权利要求 10所述的装置, 其特征在于, 所述登录请求判断模 块还用于: 判断当前发起登录请求的串口终端是否属于主 SC所在机框。
12、 根据权利要求 11所述的装置, 其特征在于,
所述登录请求判断模块确定已有串口终端处于登录状态且发起登录请 求的串口终端属于非主 SC时,所述登录模块还用于拒绝发起登录请求的串 口终端登录, 并将拒绝原因通知发起登录请求的串口终端;
所述登录请求判断模块确定已有串口终端处于登录状态且发起登录请 求的串口终端属于主 SC时, 所述登录模块还用于将当前处于登录状态的串 口终端强制下线, 并允许发起登录请求的串口终端登录, 将登录结果通知 给发起登录请求的串口终端。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010262034.XA CN101924655B (zh) | 2010-08-23 | 2010-08-23 | 一种支持多串口终端登录的方法和装置 |
| CN201010262034.X | 2010-08-23 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2012024967A1 true WO2012024967A1 (zh) | 2012-03-01 |
Family
ID=43339318
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2011/075901 Ceased WO2012024967A1 (zh) | 2010-08-23 | 2011-06-17 | 一种支持多串口终端登录的方法和装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN101924655B (zh) |
| WO (1) | WO2012024967A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101924655B (zh) * | 2010-08-23 | 2015-06-03 | 中兴通讯股份有限公司 | 一种支持多串口终端登录的方法和装置 |
| CN102195821B (zh) * | 2011-06-27 | 2014-07-02 | 吉林中软吉大信息技术有限公司 | 一种网络设备配置方法 |
| CN108632151B (zh) * | 2017-03-24 | 2022-03-11 | 中兴通讯股份有限公司 | 集群路由器板卡访问方法、装置及集群路由器 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1852502A (zh) * | 2006-05-29 | 2006-10-25 | 杭州华为三康技术有限公司 | 一种集群系统中实现负载均衡的方法、系统和存储控制器 |
| CN2917100Y (zh) * | 2006-04-14 | 2007-06-27 | 上海未来宽带技术及应用工程研究中心有限公司 | 一种atca系统 |
| CN101730094A (zh) * | 2009-11-30 | 2010-06-09 | 广州市聚晖电子科技有限公司 | 一种终端设备接入安防系统业务平台及信息传送方法 |
| CN101924655A (zh) * | 2010-08-23 | 2010-12-22 | 中兴通讯股份有限公司 | 一种支持多串口终端登录的方法和装置 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217541B (zh) * | 2008-01-15 | 2011-05-11 | 中兴通讯股份有限公司 | 一种会话初始协议终端向服务器联动注册的方法 |
-
2010
- 2010-08-23 CN CN201010262034.XA patent/CN101924655B/zh not_active Expired - Fee Related
-
2011
- 2011-06-17 WO PCT/CN2011/075901 patent/WO2012024967A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN2917100Y (zh) * | 2006-04-14 | 2007-06-27 | 上海未来宽带技术及应用工程研究中心有限公司 | 一种atca系统 |
| CN1852502A (zh) * | 2006-05-29 | 2006-10-25 | 杭州华为三康技术有限公司 | 一种集群系统中实现负载均衡的方法、系统和存储控制器 |
| CN101730094A (zh) * | 2009-11-30 | 2010-06-09 | 广州市聚晖电子科技有限公司 | 一种终端设备接入安防系统业务平台及信息传送方法 |
| CN101924655A (zh) * | 2010-08-23 | 2010-12-22 | 中兴通讯股份有限公司 | 一种支持多串口终端登录的方法和装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101924655B (zh) | 2015-06-03 |
| CN101924655A (zh) | 2010-12-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100553322C (zh) | 视讯会议的备份方法及装置 | |
| CN102916825A (zh) | 一种双机热备系统的管理设备、管理方法及双机热备系统 | |
| CN113315665B (zh) | 一种双网卡终端设备的报文发送方法、装置、设备及介质 | |
| CN101547082A (zh) | 一种主备链路倒换方法及网络设备 | |
| CN106060088A (zh) | 一种服务管理方法及装置 | |
| CN101237315A (zh) | 一种用于双控高可用系统的同步检测和故障隔离方法 | |
| CN102142978B (zh) | 数据备份传输处理方法、装置及系统 | |
| WO2021073367A1 (zh) | 一种数据处理方法、设备及系统 | |
| WO2010048875A1 (zh) | 一种集群系统扩容方法、装置及集群系统 | |
| CN116074187B (zh) | 主备链路切换方法及装置、电子设备、存储介质 | |
| CN112019460A (zh) | 一种双bmc系统的网络切换装置及其网络切换方法 | |
| WO2013189069A1 (zh) | 负荷分担方法及装置、单板 | |
| WO2012024967A1 (zh) | 一种支持多串口终端登录的方法和装置 | |
| CN103001787B (zh) | 用于数据处理中心容灾备份的系统及方法 | |
| CN106464541B (zh) | 基于网络功能虚拟化的故障处理方法及设备 | |
| CN105763442A (zh) | 主备倒换lacp聚合链路不中断的pon系统及方法 | |
| CN104536853B (zh) | 一种保障双控制器存储设备资源连续可用性的装置 | |
| KR101587332B1 (ko) | 컨트롤러와 네트워크 장치 간 연결 상태 확인 방법 | |
| CN103501239B (zh) | 一种端口状态同步方法、相关设备及系统 | |
| CN100496030C (zh) | 基于高可用性系统的综合接入媒体网关设备 | |
| CN103179102B (zh) | 一种桌面虚拟化方法、设备及系统 | |
| WO2012159339A1 (zh) | 网络设备加入集群系统的接口注册方法和设备 | |
| WO2015158058A1 (zh) | 一种实现呼叫保存和恢复的方法及系统 | |
| CN101707555B (zh) | 一种堆叠系统中的数据交互方法及装置 | |
| CN100563263C (zh) | 在网络存储业务中实现系统高可用性的方法和系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11819342 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 11819342 Country of ref document: EP Kind code of ref document: A1 |