Hi,
I'm using Ethernet communication with my K70 over MQX 3.8.1. My ethernet configuration should be:
#define ENET_IPADDR IPADDR(10,4,33,50)
#define ENET_IPMASK IPADDR(255,255,240,0)
#define ENET_IPGATEWAY IPADDR(10,4,32,254)
But if the second number of IP Address is the same that the second number of IP Gateway Adress (in my IP configuration is '4') my application doesn't run correctly. If these numbers aren't equals, my application run perfectly.
Can anyone help me?
Thank you very much in advance,
Ángel G.
Hi Angel,
The answer from RadekS is right.
You cannot use a gateway address on another subnet. The gateway IP tells the system how to get to another subnet, and without it, packets won't leave the current subnet.
A computer only knows how to talk to the other computers that are directly connected on the same subnet. A gateway is a "default route" which specifies where packets should be sent by default if they are not destined for somewhere on the local subnet.
Regards,
Garabo
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
It looks like some problem in LAN configuration.
If you want establish connection inside your LAN network (range 10.4.32.1 - 10.4.47.254), gateway should not have any influence.
If you want establish connection outside of your LAN network, you have to be sure that gateway address is equal to address of your router (connection to external world).
Hello,
Thank you for your post, however please consider moving it to the right community place (e.g. MQX Software Solutions ) to get it visible for active members.
For details please see general advice Where to post a Discussion?
Thank you for using Freescale Community.