ADDRESS DUPLICATION DETECTION IN A NETWORK
This invention relates to communications networks, and in particular to the detection of addressing errors in communications or computer networks.
Ethernet Local Area Network (LAN) technology is widely used to interconnect computers. Ethernet is very well established and is now used internally within equipment to link component circuit boards. The availability of low cost dedicated integrated circuits makes this possible.
Ethernet uses the MAC (Media Access Control) address of each node in the network to address nodes. The MAC address is carried in the data layer (layer 2 in the OSI model). In an external network, each node will have a public MAC address. However, in a closed system, such as Ethernet used within a piece of equipment, some parts of the Ethernet protocol may not be observed. For example, there are no constraints as to how addressing of individual components is used if the internal network will never be connected to a local area network.
Ethernet technology has progressed from being based on a shared media (bus) topology to a centrally switched star topology. The complexity of the central switch function has increased progressively such that there are a number of address processing functions present. Central switching functions were originally merely repeated hubs providing an electrical boosting function. They then progressed to Ethernet switches providing the equivalent of multi-port bridging functions using the layer 2 Ethernet MAC
address. Currently, processing is based on layer 3 (IP) and layer 4 (TCP/UDP) packet header information.
Address processing in a layer 2 switch can result in message packets being sent directly to their intended addressed destinations instead of the previous behaviour in which message packets were broadcast through the network and therefore seen by all nodes connected to the Ethernet. This has resulted in some subtle changes in the behaviour of some protocols used within Ethernet networks in this environment.
Figures 1 to 3 show the registering behaviour of end stations in a layer 2 switch. In
Figure 1, all end stations 0, 1, 2, 3 and 4 are unregistered. In Figure 2, the second end station (1) registers on switch port, and in Figure 3, subsequent packets are sent directly to end station 1. The first time a packet is received by the switch for any of the end stations it is sent out on all ports of the layer 2 switch 10 apart from the port on which it was received on. Thus, in Figure 1, a packet received from end station 0 is sent out to end stations 1 to 4. If an end station transmits a packet then its MAC address will be registered against that switch port. Any further packets for that end station are sent just to that end station.
If end stations with duplicate MAC addresses are present, then erratic behaviour may occur. Any packets (strictly only uni-cast packets, that is packets which are not broadcast or multicast) addressed to the end-station will be sent to the port that last received a packet from that address.
Thus, individual, uni-cast, addresses cannot be used to discover address duplication on a layer-2 switched environment.
In some systems that use Ethernet as an internal control system, using a proprietary format for the MAC address can be advantageous. These addresses are not globally unique public addresses and do not need to be so as there is no external network connection. These private addresses may be generated algorithmically based on an internal system variable. This can create problems when equipment misconfigurations can cause duplicate MAC addresses to be present on the control system. This is clearly undesirable as it prevents a given system component from being addressed uniquely and prevents the equipment from working properly, if at all.
There is, therefore, a need for a capability to detect duplicated Ethernet MAC addresses so that appropriate action can be taken.
The present invention aims to meet that need and, in its broadest form, provides a system and method in which each address is sent a message and more than a single reply from any given address indicates address duplication.
More specifically, there is provided a method of checking for duplicate hardware addresses assigned to nodes on a network comprising: sending a message from a first node on the network to all other nodes on the network, the message including a specific hardware address for which duplication is to be checked; receiving at the first node a response message from any node on the network containing the specific hardware address;
noting the number of responses; and identifying an address as duplicate if more than one response is received.
The invention also provides apparatus for checking for duplicate hardware addresses on a network, comprising; at a source node: means for sending a message to all other nodes on the network, the message including a specific hardware address for which duplication is to be checked; means for receiving at the first node a response message from any node on the network containing the specific hardware address; and means for noting the number of responses and for identifying an address as duplicate if more than one response is received.
Preferably, the message is broadcast as an ARP type packet within an Ethernet network to which each target node replies enabling the source node to look for duplicates. If a duplicate is found an alarm can be raised.
Embodiments of the invention have the advantage that duplicate MAC addresses can be identified and then the misconfiguration resolved.
The first node sending the message is an initiator and the nodes that reply are responders.
A preferred embodiment of the invention will now be described, by way of example only, and with reference to the accompanying drawings in which:
Figure 1, referred to above, shows a layer 2 switch with all stations unregistered;
Figure 2, referred to above, shows a layer 2 switch with one station registered on a switch port;
Figure 3, referred to above, shows how subsequent packets are sent directly to the registered port;
Figure 4 shows, schematically, a centrally switched Ethernet network;
Figures 5a and 5b show, respectively, correct and duplicate address responses using a method and system embodying the invention; and
Figures 6a and 6b show respectively, the process at a DMADP Initiator node and a DMADP responder node.
Figure 4 shows a simple Ethernet centrally switched network, by way of example. A central hub node 10 communicates with a number of other nodes 12 and all nodes communicate across the network by passing data through the hub.
Figures 5a and 5b illustrate a Duplicate MAC Address Detection Protocol (DMADP), which intended to detect the presence of duplicate MAC addresses on the system. These addresses are detected by pinging each MAC address from the hub 10 with a DMADP request packet.
If the addresses are correctly assigned, and there is a unique MAC address per node, the hub will only detect a single DMADP reply for each MAC address, as indicated in Figure 5a. However, if an address has been duplicated, two DMADP replies will be received identifying the same MAC address. This situation is shown in Figure 5b. On detection of the duplicate address, and in theory there could be more than two nodes with the same address, action can be taken, for example an alarm or a fault condition can be raised.
The protocol packet uses a broadcast address as its destination address. This will get through Ethernet switches if duplicate MACs are present.
The DMADP packet format is preferably based on the ARP packet structure. ARP
(Address Resolution Protocol) is used to convert IP addresses into physical addresses and is set down in RFC-826/STD-37. ARP structure is as follows:
(Ethernet Header)
Ethernet Address of Destination (Broadcast)
Ethernet Address of Source
Protocol Type (Ether-Type) (Ethernet Payload)
Hardware Address Space
Protocol Address Space
Length of Hardware Address
Length of Protocol Address
Opcode (Request/Reply) Hardware Address of Source Protocol Address of Source Hardware Address of Target Protocol Address of Target
The DMADP packet differs from the above ARP packet in that the Ether-Type is changed from that used for ARP (0806) to a new value specific to DMADP for example AOOl. In addition the protocol address fields are not used but retained to maintain a common structure with ARP to allow re-use of some software in the implementation. Thus, the DMADP packet has the following structure:
Ethernet Header
Ethernet Address of Destination (Broadcast) Ethernet Address of Source
Protocol Type (AOOl)
Ethernet Payload
Hardware Address Space
Protocol Address Space Length of Hardware Address
Length of Protocol Address
Opcode (Request/Reply)
Hardware Address of Source
Protocol Address of Source
Hardware Address of Target Protocol Address of Target
When a target node receives a DMADP packet it will perform the following steps as exemplified in Figures 6a and 6b. Figure 6a shows the procedure at the DMAPDP Initiator, the node that sends out the message including the hardware address suspected of being duplicated. Figure 6b shows the procedure at the DMADP responder. At step 100 in figure 6a, the Initiator mode sends a DMADP request message to all other nodes on the network. The message includes a specific hardware address that is suspected of being duplicated. A timer window is started and a counter set to zero. The Initiator node then waits for responses within a time window before the timer expires. At step 102, a DMADP packet is received from a node having the hardware address contained in the request message. At step 104 the counter, which counts the number of responses, is incremented. The process then determines at step 106 whether the time has expired and the window closed. If it has not, the process reverts to waiting for further responses from nodes having the same MAC address. If it has expired, the system looks at the counter value (108). If it is greater than one, the hardware address in the original message is, at least, duplicated and an alarm is raised at step 110. If the count is less than or equal to one, the process terminates at step 112 without raising an alarm.
Figure 6b shows the process from the point of view of the intended recipient. At step 120, the target node receives the DMADP packet and at step 122 decides whether it is the target of the request. If it is not it discards thepacket at 130. If it is the intended target it modifies the packet content by swapping, at 124, the hardware address fields of the Source
and Target at the end of the payload of the packet. At 128, the node sends the modified packet back to the original source that is now the new target address by changing the destination Ethernet Address at the front of the packet (i.e. in the packet header) and inserting its own Ethernet address (its MAC (Hardware) address) as the source.
Thus, the embodiment described provides a simple efficient protocol for detecting duplicate MAC addresses on an Ethernet network. It is particularly suited to equipment that uses an internal Ethernet between component circuit boards but may be used in any environment in which addresses other than public MAC addresses are used. Although described in relation to a star network, the protocol is suitable for use with any network topology.
The embodiment described is based on the ARP packet structure. It will be appreciated that the invention is not limited to such a packet structure and covers any system in which node addresses are sought and then compared to identify duplicates. The scope of the invention is limited by the following claims.