BC AppNote 005

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

For additional documentation,

please visit
www.beckhoffautomation.com
For further assistance, please
contact Beckhoff USA support
at supportUSA@beckhoff.com
BECKHOFF
www.beckhoffautomation.com
Application Notes
Beckhoff Automation
12150 Nicollet Avenue South
Burnsville, MN 55337
Phone: + 1 952 / 890 0000
Fax: + 1 952 / 890 2888
beckhoff.usa@beckhoff.com
Beckhoff BC9000 IP Address Change Using
DOS ARP Commands
BC-AppNote-005
2.0
1 November 2007
This application note describes how to make changes to the BK9000 or
BC9000 Beckhoff Bus Coupler using DOS ARP commands. An ARP
command stands for Address Resolution Protocol and is used to relate
a device's IP address to its MAC-ID.
16 April 2008 Beckhoff Application Notes 2
Beckhoff BC9000 IP Address Change Using DOS ARP Commands
Overview
Supporting Documents
BC9000 Documentation
ftp://ftp.beckhoff.com/Document/BusTermi/BCoupler/BC9000e.chm
A useful definition of ARP and other TCP/IP utilities
http://www.hildrum.com/TCPIPutil.htm
Key Conceps
1. The bus coupler must be pinged first to get the ARP table that contains the MAC-ID
of the coupler.
2. This first ping is best done when a known, static or default IP address is set on the
coupler, for example, 172.16.17.255. (dip switches 1-8 on, 9-10 off).
3. If the new IP address is on a different network class, the ping to the new address
won't wok unless the network settings of the PC are changed.
4. The basic steps required to change the IP address are as follows:
The PC must have the same network class as the Bus Coupler, i.e., 172.16.xxx.xxx
(where xxx is a value between 0-255).
From the DOS window, send a ping to the Bus Coupler:
C:\>ping 172.16.17.255
When it has answered, enter the command "arp -a". You now receive the IP
address and the MAC-ID in the form of the table.
Delete the IP address from the ARP store:
C:>arp -d 172.16.17.255
Set a new IP address for that MAC ID:
C:>arp -s 172.16.44.44 00-01-05-00-11-22
Test the new IP Address with a ping:
C:>ping -l 123 172.16.44.44
If it responds, 172.16.4..44 is the Bus Coupler's new IP address
16 April 2008 Beckhoff Application Notes 3
Beckhoff BC9000 IP Address Change Using DOS ARP Commands
Procedure
The IP address of a bus coupler can be changed most easily in KS2000 under the field-
bus specific node in the configuration tree. Sometimes, however, KS2000 is not available
and the bus coupler needs to be changed via an Ethernet interface. The Address Resolu-
tion Portocol (ARP) utility accessed with a command prompt is used to set the IP address
in this way.
BK9000 bus couplers shipped with v B2 or higher have the MAC-ID printed on the label.
1. If needed, install new firmware, BK9000B200.hex, using Beckhoff KS2000 software
and serial cable connected to the top of the Bus Coupler. Refer to the KS2000 docu-
mentation for this procedure. This file can be obtained from Beckhoff USA support.
(support.usa@beckhoff.com)
When updating, wait for all bus coupler LED's to stop flashing, then exit KS2000 and
power cycle the bus coupler. The firmware takes a few minutes to load and it may
appear that KS2000 has frozen, but wait for the download to complete.
2. Connect a 10/100Base T RJ45 CROSSOVER cable between the bus coupler and
computer. If a hub or switch is used, two patch cables can be substituted.
3. Set your Computer to a defined IP address on the same network as the bus coupler,
for example, 172.16.17.2 mask of 255.255.0.0
4. Set the BK9000 DIP switches 1-8 to on. This represents the IP of X.X.X.255.
5. Open a DOS command prompt screen on your computer.
6. Follow the procedure below (BK9000B200.hex firmware is required):
Ping the BK9000
C:\>ping 172.16.17.255
A Table showing the six byte MAC-ID (physical address) for each pinged IP
address is displayed.
C:\>arp -a
C:\>172.16.17.255 00-01-05-00-11-22
The following command deletes the IP address from ARP store:
C:\>arp -d 172.16.17.255
The following command sets a new IP address for the MAC-ID:
C:\>arp -s 172.16.44.44 00-01-05-00-11-22
172.16.44.44 is the new Bus Coupler IP address.
C:\>ping -l 123 172.16.44.44
16 April 2008 Beckhoff Application Notes 4
Beckhoff BC9000 IP Address Change Using DOS ARP Commands
Don't forget the -l 123 argument in the ping command!
ARP Details
Address Resolution Protocol (ARP) resides in the bottom half of the Network layer. It can
be considered a mechanism for mapping addresses between the Network logical
addresses and MAC (Media Access Control) layer physical addresses. For example: the
Network layer protocol IP is not aware of 48 bit MAC addresses such as Ethernet. Like-
wise the MAC layer protocol such as Ethernet is not aware of 32 bit IP addresses. ARP
provides the mechanism to map MAC addresses to IP addresses in a temporary memory
space called the ARP cache.
The ARP cache is a dynamic cache and the information is stored only for 120 seconds,
after which it is discarded. Because of this, the ARP cache remains small. The ARP
cache can be viewed by using the "ARP -a" command at a command prompt. This should
display the current ARP cache. If nothing is displayed, then most likely the computer
hasn't communicated on the network for the past 120 seconds. Ping another device on
the network and see if the ARP cache has changed.
The basic operation of ARP is as follows:
1. When the IP layer wants to communicate with another device on the network, it
checks the ARP cache (to see if there is a match with an Ethernet address).
2. If there is no matching entry in the ARP cache, an ARP broadcast datagram is sent
out that basically asks, "Does anybody know whose Ethernet address belongs to
this IP address?"
3. The receiving station (that has the IP address) responds with an ARP datagram that
says, "This is my IP address and here is my Ethernet address.
4. The ARP cache is updated, and the original IP layer information is passed on to the
MAC layer for processing.
16 April 2008 Beckhoff Application Notes 5
Beckhoff BC9000 IP Address Change Using DOS ARP Commands
The figure below shows the command prompt and an ARP table for a BC9000 with IP
address 10.12.2.234 and MAC-ID 00-01-05-00-04-69.
The figure below shows the sequence that a ping command uses to adjust the ARP table
to the new values in the ARP table. Then these values can be deleted and reset to a new
IP address for the bus coupler if it is not in DHCP or BootP mode.
16 April 2008 Beckhoff Application Notes 6
Beckhoff BC9000 IP Address Change Using DOS ARP Commands
The following table shows the structure of the ARP command and the arguments it
needs. This table can also be accessed with the command prompt by typing ARP.

You might also like