Incompatibility IP Address and default IP Gateway Adress on TCP/IP Stack

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Incompatibility IP Address and default IP Gateway Adress on TCP/IP Stack

848件の閲覧回数
Angelillo
Contributor III

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.

タグ(3)
0 件の賞賛
返信
3 返答(返信)

626件の閲覧回数
Luis_Garabo
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

626件の閲覧回数
RadekS
NXP Employee
NXP Employee

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).

0 件の賞賛
返信

626件の閲覧回数
Wlodek_D_
Senior Contributor II

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.

0 件の賞賛
返信