Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20687 Discussions

Is it possible to handle two IP addresses with one Ethernet device?

Altera_Forum
Honored Contributor II
1,070 Views

Hi all, 

I'm new about TSE and Nichestack and NIOS II, therefore keep it in account within eventual your answer to my post... :) 

 

I would like to know if is possible to handle two IP addresses with Nichestack with only one PHY device on my board. Can anybody help me? 

 

I found another post talking about change of IP address runtime, but unfortunately is not (right now) compliant with my customer request... :( 

 

Thank you all.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
362 Views

I don't think you can do it without patching the Nichestack. 

Other stacks, such as the FreeBSD stack or the one in Linux allow to create "aliases" on the network interfaces to add new IP addresses. 

 

An alternative could be to use multicast addresses (see this post (http://www.alteraforum.com/forum/showthread.php?t=3344)), but it depends on why your customer needs two IP addresses.
0 Kudos
Altera_Forum
Honored Contributor II
362 Views

Thank you Daixiwen, 

I don't think that Multicast is the right solution for me because my customer wants to have the possibility to connect to my device using two different IP (one fixed and one dependent on one device parameter). 

Now I will try to understand effort required to modify Nichestack (I have to use that TCPIP stack or as alternative Micrium one) and eventually handle only one IP address at runtime and give to my customer a simple way to switch to other IP address. 

Ciao
0 Kudos
Altera_Forum
Honored Contributor II
362 Views

You should first have a look into the ARP handler. That's the one that handles MAC-to-IP translation. 

 

Best regards, 

 

 

Ben
0 Kudos
Altera_Forum
Honored Contributor II
362 Views

Thank you RisingEdge (Ben), 

I will take a look! 

Ciao, 

P.
0 Kudos
Reply