CN101388816A - Network interface mode switching method and device - Google Patents

Network interface mode switching method and device Download PDF

Info

Publication number
CN101388816A
CN101388816A CNA2008101747971A CN200810174797A CN101388816A CN 101388816 A CN101388816 A CN 101388816A CN A2008101747971 A CNA2008101747971 A CN A2008101747971A CN 200810174797 A CN200810174797 A CN 200810174797A CN 101388816 A CN101388816 A CN 101388816A
Authority
CN
China
Prior art keywords
network
type
port
mode
module
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.)
Pending
Application number
CNA2008101747971A
Other languages
Chinese (zh)
Inventor
许天亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Device Shenzhen Co Ltd
Original Assignee
Shenzhen Huawei Communication Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Huawei Communication Technologies Co Ltd filed Critical Shenzhen Huawei Communication Technologies Co Ltd
Priority to CNA2008101747971A priority Critical patent/CN101388816A/en
Publication of CN101388816A publication Critical patent/CN101388816A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method for switching the mode of network ports, which comprises the following steps: detecting the type of a network which is connected with the port, judging whether the current mode of the port is matched with the type of the network, and if the mode is not matched with the type, switching the mode of the port to the mode which is matched with the type of the network. The invention simultaneously discloses a device for switching the mode of the network port, which comprises a detecting module for detecting the type of the network which is connected with the port, a first judging module for judging whether the current mode of the port is matched with the type of the network which is detected by the detecting module, and a switching module for switching the mode of the port to the mode which is matched with the type of the network when the result of the first judging module is that the mode is not matched with the type. The invention has the beneficial effects that a physical port of the network device can automatically switch the mode according to the type of the connected networks, thereby the network device can be accessed into wide area networks and local area networks only through one of the physical port, and the resources and troubles of manual switching are saved.

Description

A kind of network interface mode switching method and device
Technical field
The present invention relates to the communications field, particularly a kind of network interface mode switching method and device.
Background technology
The network equipment is realized mainly passing through LAN (Local AreaNetwork, local area network (LAN)) mouthful and WAN (Wild Area Network, wide area network) mouthful with the exchanges data of network.Wherein, the transfer of data of carrying out between the mainly responsible network equipment of LAN mouth and the local area network (LAN), the transfer of data of carrying out between the mainly responsible network equipment of WAN mouth and the wide area network, the LAN mouth is respectively applied for the WAN mouth and sends and receive different data messages.The LAN mouth uses different physical interfaces to realize with the WAN mouth in traditional router, and the LAN mouth can only be used for the LAN data transmission, and the WAN mouth can only be used for the wide area network data transmission, can not switch use mutually.LAN mouth and WAN mouth are fixed up in the process of producing.LAN mouth and WAN mouth are in a single day fixing just can not to switch use, and the LAN mouth can only be used for transfer of data in the local area network (LAN), can not use as the WAN mouth, and same WAN mouth can only be used for the interior transfer of data of wide area network, can not use as the LAN mouth.
The inventor is in realizing process of the present invention, and find to exist at least in the existing technology following shortcoming: LAN mouth and WAN mouth can not switch use mutually.In the process of producing, LAN mouth and WAN mouth are in a single day fixing just can not to switch use, and the LAN mouth can only be used for transfer of data in the local area network (LAN), can not use as the WAN mouth, same WAN mouth can only be used for transfer of data in the wide area network, can not use as the LAN mouth, causes and uses inconvenience.
Summary of the invention
The purpose of the embodiment of the invention is, a kind of network interface mode switching method and device are provided, the pattern of the port that makes the network equipment to automatically switch to be connected with network.
For this reason, the embodiment of the invention proposes a kind of network interface mode switching method, comprising: the type that detects the network that is connected with described port; Judge whether the present mode of described port and the type of described network mate; If the present mode of described port does not match with the type of described network, then the mode switch of described port is become and pattern that the type of described network is complementary.
The embodiment of the invention proposes a kind of network interface mode switching device shifter simultaneously, comprising: detection module is used to detect the type of the network that is connected with described port; First judge module is used to judge whether the present mode of described port and the type that described detection module detects the described network that obtains mate; Handover module, when the type that is used for judged result at described first judge module and is the present mode of described port and described network does not match, the pattern that becomes the type with described network to be complementary the mode switch of described port.
The beneficial effect of the embodiment of the invention is, the physical port of the network equipment can be according to the difference of connection network type, automatically switch to LAN mouth or WAN mouth pattern, thereby the network equipment only needs a physical port just can realize inserting the purpose that wide area network again can access to LAN, save resource, also saved the trouble of user's manual switchover.
Description of drawings
Fig. 1 is the schematic flow sheet of an embodiment of network interface mode switching method of the present invention;
Fig. 2 is the schematic flow sheet of another embodiment of network interface mode switching method of the present invention;
Fig. 3 is the structural representation of an embodiment of network interface mode switching device shifter of the present invention;
Fig. 4 is the structural representation of another embodiment of network interface mode switching device shifter of the present invention.
Embodiment
Below in conjunction with accompanying drawing embodiments of the invention are elaborated.
Fig. 1 is the schematic flow sheet of an embodiment of network interface mode switching method of the present invention, and as shown in the figure, this flow process comprises:
Step S01, the type of the network that detection is connected with described port;
Step S02 judges whether the present mode of described port and the type of described network mate;
Step S03 if the present mode of described port does not match with the type of described network, then becomes the mode switch of described port and pattern that the type of described network is complementary.
In the present embodiment, at first detecting the network that is connected with network equipment port is any type, for example be Local Area Network or wide area network (WAN), whether the present mode of judging network equipment port then mates with the type of the above-mentioned network that is connected with this port, the network that for example detects port and connected is a local area network (LAN), and the present mode of port is the wide area network pattern, the present mode and the network type that then are judged as port do not match, and at this moment automatically current network interface mode are switched to and the local area network (LAN) pattern that network mated that is connected.If current network interface mode is exactly the local area network (LAN) pattern, then only need the network interface mode that keeps current.
In the present embodiment, the port of the network equipment can be according to the difference of connection network type, automatically switch to LAN mouth or WAN mouth pattern, thereby the network equipment only need be equipped with the purpose that a physical port just can realize inserting wide area network or access to LAN automatically, save resource, also saved the trouble of user's manual switchover port mode.
Fig. 2 is the schematic flow sheet of another embodiment of network interface mode switching method of the present invention, and as shown in the figure, the flow process of present embodiment specifically may further comprise the steps in step S01 on basis embodiment illustrated in fig. 1:
Step S011 sends datagram with pre-determined number to described network by described port;
Step S012 if receive the feedback message of described network to described data message, determines that then the type of described network is a wide area network;
Step S013 if do not receive the feedback message of described network to described data message, determines that then the type of described network is a local area network (LAN).
In the present embodiment, after the network equipment starts, behind a data message of the Web broadcast that is connected with this port (S011),, think that then the type of the network that connected is wide area network (S012) by its network port if the network equipment receives the feedback message of network to this data message; If attempt sending datagram several times, the network equipment does not all receive the feedback message of network to this data message, thinks that then the type of the network that connected is local area network (LAN) (S013).
The step of the above-mentioned detection network type in the present embodiment can start a detection procedure simultaneously automatically by the network equipment and realize that this process is used for detecting the type of the network that is connected with this network equipment when starting.The step that detects network type specifically can realize by the type that detects the link equipment that is connected by network with the network equipment.When detecting the link device type, send different data messages according to different link device types.Such as detecting PPPoE (Point to Point Protocol over Ethernet, point-to-point protocol based on Ethernet) server, then by the network port to the Web broadcast PADI message that is attached thereto, if link equipment is the PPPoE server really, then the PPPoE server can send as the PADS data message that feeds back message to the network equipment, the network equipment receives this feedback message, think that then the link equipment that its network port connected is WAN equipment, otherwise think that the link equipment that its network port connects is lan device.
In the present embodiment, whether basis receives network detects network to the feedback message of this data message type by send datagram also to the network that is connected with the network port, this scheme is simple and efficient, makes that network port changing method of the present invention is easier to realize.
In another embodiment of the present invention, the step that the mode switch of described port is become the pattern that the type with described network is complementary of above-mentioned steps S03 is to realize by described port being switched in the type corresponding virtual local area network (LAN) with described network.In the present embodiment, the switching of LAN mouth and WAN mouth mainly realizes that by revising corresponding relevant parameter be specially, the network equipment is by being divided into its network port among the different VLAN (VLAN), and dividing its network port is LAN mouth or WAN mouth.In the present embodiment, only need correspondingly this port to be switched to corresponding VLAN when needing the port switching pattern and get final product down, further simplified the realization of network port changing method of the present invention.
Fig. 3 is the structural representation of an embodiment of network interface mode switching device shifter of the present invention, and as shown in the figure, the device of present embodiment comprises:
Detection module 1 is used to detect the type of the network that is connected with described port;
First judge module 2 is used to judge whether the present mode of described port and the type that described detection module detects the described network that obtains mate;
Handover module 3, when the type that is used for judged result at described first judge module 2 and is the present mode of described port and described network does not match, the pattern that becomes the type with described network to be complementary the mode switch of described port.
In the present embodiment, at first detect the type of the network that is connected with port by detection module 1, whether mate by the present mode of first judge module 2 then according to detection module 1 detected network type and port, starting going to a nursery is judged as the port present mode and network type does not match, then handover module 3 pattern that becomes the type with described network to be complementary the mode switch of described port.For example, it is local area network (LAN) that detection module 1 detects the network that port connects, and the judged result of first judge module 2 is current network interface mode is the wide area network pattern, do not match with network type, then handover module 3 switches to the local area network (LAN) pattern with current network interface mode automatically according to this judged result.If current network interface mode is exactly the local area network (LAN) pattern, then handover module 2 is failure to actuate, and port mode keeps current pattern both can.
In the present embodiment, the port of the network equipment can be according to the difference of connection network type, automatically switch to LAN mouth or WAN mouth pattern, thereby the network equipment only need be equipped with the purpose that a physical port just can realize inserting wide area network or access to LAN automatically, save resource, also saved the trouble of user's manual switchover port mode.
Fig. 4 is the structural representation of another embodiment of network interface mode switching device shifter of the present invention.As shown in the figure, the device of present embodiment also comprises following each module in detection module 1 on basis embodiment illustrated in fig. 3:
Sending module 11 is used for sending datagram with pre-determined number to described network by described port;
Second judge module 12 is used for when receiving the feedback message of the data message that described network sends described sending module, and the type of determining described network is a wide area network; And be used for when not receiving the feedback message of the data message that described network sends described sending module, the type of determining described network is a local area network (LAN).
In the present embodiment, after the network equipment starts, by sending module 11 by the network port to the Web broadcast data message that is connected with this port, if second judge module 12 receives the feedback message of network to above-mentioned data message, confirm that then the network connected is a wide area network; If attempt sending several times, judge module 12 does not all receive the feedback message of network to above-mentioned data message, confirms that then the network that is connected is a local area network (LAN).
In the present embodiment, second judge module 12 confirms that network types can realize by the type of judging the link equipment that is connected by network with the network equipment.When judging the link device type, send different data messages according to different link device types.Such as detecting the PPPoE server, then by the network port to the Web broadcast PADI message that is attached thereto; If link equipment is the PPPoE server really, then the PPPoE server sends the PADS data message to routing device, routing device receives this message, think that then the link equipment that its network port connected is WAN equipment, otherwise think that the link equipment that its network port connects is lan device.
In the present embodiment, whether basis receives network detects network to the feedback message of this data message type by send datagram also to the network that is connected with the network port, this scheme is simple and efficient, makes that network port changing method of the present invention is easier to realize.
In another embodiment, described handover module 3 specifically is used for, in the judged result of described first judge module is the type of the present mode of described port and described network when not matching, and described port is switched in the type corresponding virtual local area network (LAN) with described network.In the present embodiment, handover module 3 is realized the switching of port between LAN mouth and WAN mouth by revising corresponding relevant parameter, be specially, handover module 3 is divided into different VLAN (VLAN) with the network port of the network equipment, and dividing this network port is LAN mouth or WAN mouth.In the present embodiment, when needing the port switching pattern, by handover module 3 this port is switched to corresponding VLAN and get final product down, further simplified the realization of network port changing method of the present invention.
According to the abovementioned embodiments of the present invention, the physical port of routing device can be according to the difference of connection network type, automatically switch to LAN mouth or WAN mouth pattern, routing device only needs a port just can realize inserting the purpose that wide area network can connect local area network (LAN) again.Embodiments of the invention have been expanded the function of routing device physical port, expanded the application of routing device to a great extent, the automatic realization port mode of routing device switches between LAN mouth and WAN mouth, saved the trouble of user's manual switchover, user-friendly to a great extent.
The above is embodiments more of the present invention, being equal to of the understandable above-mentioned execution mode of any person of ordinary skill in the field replace or obviously distortion all belong to protection scope of the present invention.
In addition; each technology that illustrates respectively among the above embodiment; device; among method and each embodiment respectively the technical characterictic of explanation can make up, thereby form other the module do not break away within the spirit and principles in the present invention, method; device and technology; the module that these combine according to the record of the embodiment of the invention, method, device and technology are all within protection scope of the present invention.

Claims (6)

1, a kind of network interface mode switching method is characterized in that, comprising:
Detect the type of the network that is connected with described port;
Judge whether the present mode of described port and the type of described network mate;
If the present mode of described port does not match with the type of described network, then the mode switch of described port is become and pattern that the type of described network is complementary.
2, the method for claim 1 is characterized in that, the type of the network that described detection is connected with described port comprises:
Send datagram with pre-determined number to described network by described port;
If receive the feedback message of described network, determine that then the type of described network is a wide area network to described data message;
If do not receive the feedback message of described network, determine that then the type of described network is a local area network (LAN) to described data message.
3, the method for claim 1 is characterized in that, the step that described mode switch with described port becomes the pattern that the type with described network is complementary realizes by described port being switched in the type corresponding virtual local area network (LAN) with described network.
4, a kind of network interface mode switching device shifter is characterized in that, comprising:
Detection module is used to detect the type of the network that is connected with described port;
First judge module is used to judge whether the present mode of described port and the type that described detection module detects the described network that obtains mate;
Handover module, when the type that is used for judged result at described first judge module and is the present mode of described port and described network does not match, the pattern that becomes the type with described network to be complementary the mode switch of described port.
5, device as claimed in claim 4 is characterized in that, described detection module further comprises:
Sending module is used for sending datagram with pre-determined number to described network by described port;
Second judge module is used for when receiving the feedback message of the data message that described network sends described sending module, and the type of determining described network is a wide area network; When not receiving the feedback message of the data message that described network sends described sending module, the type of determining described network is a local area network (LAN).
6, device as claimed in claim 4, it is characterized in that, described handover module specifically is used for, in the judged result of described first judge module is the type of the present mode of described port and described network when not matching, and described port is switched in the type corresponding virtual local area network (LAN) with described network.
CNA2008101747971A 2008-11-05 2008-11-05 Network interface mode switching method and device Pending CN101388816A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008101747971A CN101388816A (en) 2008-11-05 2008-11-05 Network interface mode switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008101747971A CN101388816A (en) 2008-11-05 2008-11-05 Network interface mode switching method and device

Publications (1)

Publication Number Publication Date
CN101388816A true CN101388816A (en) 2009-03-18

Family

ID=40478012

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008101747971A Pending CN101388816A (en) 2008-11-05 2008-11-05 Network interface mode switching method and device

Country Status (1)

Country Link
CN (1) CN101388816A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011069406A1 (en) * 2009-12-08 2011-06-16 中兴通讯股份有限公司 Method and apparatus compatible with 10ge lan port and wan port
CN102521053A (en) * 2011-12-13 2012-06-27 深圳市创新科信息技术有限公司 Memory system and on-line switching method of FC (Fiber Channel) port working mode
CN103238147A (en) * 2010-12-08 2013-08-07 日本电气株式会社 Communication service providing system, method of providing communication service and data center management system
WO2014056135A1 (en) * 2012-10-08 2014-04-17 华为终端有限公司 Port setting method, routing device, and computer program product
CN104796306A (en) * 2015-03-26 2015-07-22 杭州华三通信技术有限公司 Port mode negotiation method and device
WO2016192505A1 (en) * 2015-06-05 2016-12-08 中兴通讯股份有限公司 Automatic switching method and apparatus for external network port connection type, and subrack management board
CN106341246A (en) * 2015-07-07 2017-01-18 西安中兴新软件有限责任公司 Method and device for automatically recognizing LAN (Local Area Network) port and WAN (Wide Area Network) port
CN106713039A (en) * 2016-12-27 2017-05-24 普联技术有限公司 Method and device for identifying Ethernet ports and router
CN106888130A (en) * 2017-04-21 2017-06-23 新华三技术有限公司 The method to set up and device of router
CN107070727A (en) * 2017-05-23 2017-08-18 上海斐讯数据通信技术有限公司 The USB mode switching method and system of a kind of router
CN107454090A (en) * 2017-08-17 2017-12-08 京信通信系统(中国)有限公司 Cable data identification authentication method and system
CN109327360A (en) * 2017-08-01 2019-02-12 中兴通讯股份有限公司 A kind of method and device of multiplexed port
RU2684572C1 (en) * 2018-06-14 2019-04-09 Федеральное государственное бюджетное учреждение "16 Центральный научно-исследовательский испытательный ордена Красной Звезды институт имени маршала войск связи А.И. Белова" Министерства обороны Российской Федерации Documented communication multichannel subscriber terminal
CN110311815A (en) * 2019-06-25 2019-10-08 厦门四信通信科技有限公司 Realize switching method, device, equipment and the storage medium of Ethernet operating mode
CN114244704A (en) * 2021-12-31 2022-03-25 四川天邑康和通信股份有限公司 Router LANWAN self-adaptation method and system

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011069406A1 (en) * 2009-12-08 2011-06-16 中兴通讯股份有限公司 Method and apparatus compatible with 10ge lan port and wan port
CN103238147A (en) * 2010-12-08 2013-08-07 日本电气株式会社 Communication service providing system, method of providing communication service and data center management system
CN102521053A (en) * 2011-12-13 2012-06-27 深圳市创新科信息技术有限公司 Memory system and on-line switching method of FC (Fiber Channel) port working mode
CN102521053B (en) * 2011-12-13 2014-04-16 深圳市安云信息科技有限公司 Memory system and on-line switching method of FC (Fiber Channel) port working mode
WO2014056135A1 (en) * 2012-10-08 2014-04-17 华为终端有限公司 Port setting method, routing device, and computer program product
CN104796306A (en) * 2015-03-26 2015-07-22 杭州华三通信技术有限公司 Port mode negotiation method and device
CN104796306B (en) * 2015-03-26 2018-11-27 新华三技术有限公司 A kind of port mode machinery of consultation and equipment
WO2016192505A1 (en) * 2015-06-05 2016-12-08 中兴通讯股份有限公司 Automatic switching method and apparatus for external network port connection type, and subrack management board
CN106301854A (en) * 2015-06-05 2017-01-04 中兴通讯股份有限公司 The externally automatic switching method of network interface connection type, device and subrack management board
CN106301854B (en) * 2015-06-05 2020-02-14 中兴通讯股份有限公司 Automatic switching method and device for external network port connection types and sub-rack management board
CN106341246A (en) * 2015-07-07 2017-01-18 西安中兴新软件有限责任公司 Method and device for automatically recognizing LAN (Local Area Network) port and WAN (Wide Area Network) port
CN106713039A (en) * 2016-12-27 2017-05-24 普联技术有限公司 Method and device for identifying Ethernet ports and router
CN106713039B (en) * 2016-12-27 2020-10-02 普联技术有限公司 Ethernet port identification method and device and router
CN106888130A (en) * 2017-04-21 2017-06-23 新华三技术有限公司 The method to set up and device of router
CN106888130B (en) * 2017-04-21 2019-11-12 新华三技术有限公司 The setting method and device of router
WO2018214351A1 (en) * 2017-05-23 2018-11-29 上海斐讯数据通信技术有限公司 Switching method and system for usb working mode of router
CN107070727A (en) * 2017-05-23 2017-08-18 上海斐讯数据通信技术有限公司 The USB mode switching method and system of a kind of router
CN109327360A (en) * 2017-08-01 2019-02-12 中兴通讯股份有限公司 A kind of method and device of multiplexed port
CN107454090A (en) * 2017-08-17 2017-12-08 京信通信系统(中国)有限公司 Cable data identification authentication method and system
RU2684572C1 (en) * 2018-06-14 2019-04-09 Федеральное государственное бюджетное учреждение "16 Центральный научно-исследовательский испытательный ордена Красной Звезды институт имени маршала войск связи А.И. Белова" Министерства обороны Российской Федерации Documented communication multichannel subscriber terminal
CN110311815A (en) * 2019-06-25 2019-10-08 厦门四信通信科技有限公司 Realize switching method, device, equipment and the storage medium of Ethernet operating mode
CN110311815B (en) * 2019-06-25 2021-12-14 厦门四信通信科技有限公司 Method, device, equipment and storage medium for realizing switching of Ethernet working mode
CN114244704A (en) * 2021-12-31 2022-03-25 四川天邑康和通信股份有限公司 Router LANWAN self-adaptation method and system

Similar Documents

Publication Publication Date Title
CN101388816A (en) Network interface mode switching method and device
KR101860234B1 (en) Method for setting link speed of dual port switch
US7839771B2 (en) Backhaul failover method and system for a wireless network
US8213320B2 (en) Method and switching device for stack port configuration
US20080068985A1 (en) Network redundancy method and middle switch apparatus
EP1655906B1 (en) Stack switch manager protocol with temporary suspension of supervision
US7756045B2 (en) Optical cross connect apparatus and network
EP1919138B1 (en) A method for implementing backup of the uplink
CN101479992B (en) A method and device to realize punch-through of point-to-multipoint network link status
US20070081463A1 (en) System and Method for Negotiating Stack Link Speed in a Stackable Ethernet Switch System
EP1379038A1 (en) Method for implementing router interface backup with virtual router redundancy protocol
EP1655904A1 (en) Stack switch manager protocol with pass-through mode
US20080225699A1 (en) Router and method of supporting nonstop packet forwarding on system redundant network
WO2005020022A2 (en) Self-healing tree network
WO2007092132A2 (en) System and method for detecting and recovering from virtual switch link failures
US20070081535A1 (en) Method and system for implementing virtual router redundacy protocol on a resilient packet ring
JP5609995B2 (en) COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMMUNICATION DEVICE
JP2013503580A (en) Broadcast packet / multicast control message processing method and apparatus
CN101238684B (en) System for cluster managing in the Ethernet switch layer and the method thereof
WO2009100662A1 (en) Service switching method and device in the ring network
US20080316919A1 (en) Trunk interface in resilient packet ring, method and apparatus for realizing the trunk interface
WO2009059505A1 (en) A remote initialization method and system
CN101150478B (en) A method, system and router for establishing master/slave link
EP1633087A1 (en) Repeater apparatus for supporting a plurality of protocols, and a method for controlling proctocol conversion in the repeater apparatus
JP2011049958A (en) Communication terminal, communication system and node switching method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20090318