Home  >  Support  >  Support Forum  >  Why the ip adress isn't changing while program is running?
Notice! We've recently migrated to using a new forum, we hope you enjoy it. If you are an existing member and this is your first time visiting our new forum, please reset your password to be able to sign in.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Why the ip adress isn't changing while program is running?

0 votes
Hello, I use next code on my RCM 6710:

int Init()
if (ifconfig(IF_ETH0, IFS_IPADDR, aton(""),
IFS_NETMASK, aton(""), IFS_ROUTER_SET, aton(""),
return 1;
return 0;

This code doesn't work, because sock_init_or_exit(1) says that ip is the one I set by #define _PRIMARY_STATIC_IP
asked Mar 25 in Rabbit Software by airens New to the Community (5 points)

Please log in or register to answer this question.

2 Answers

+1 vote
Best answer
If you set a primary static IP address the way you have done then it is not possible to change the address at run time.

If you want to have full flexibility on setting IP configurations at run time you are probably best setting TCPCONFIG to 6 and issuing the required ifconfig()s to set up the addressing you need. The addp.c example in the samples\tcpip folder is a good one to examin to see how this works.

answered Mar 25 by petermcs Veteran of the Digi Community (398 points)
selected Mar 26 by airens
0 votes
Worked great for me, thank you.
answered Mar 26 by airens New to the Community (5 points)
Contact a Digi expert and get started today! CONTACT US