View previous topic :: View next topic |
Author |
Message |
Manel28
Joined: 06 May 2010 Posts: 33
|
Implement 2 Ip addresses in TCP/IP stack |
Posted: Tue Mar 26, 2013 3:41 am |
|
|
Hi there,
does anybody know how to modify the TCP/IP stack in order to have 2 differenet IP addresses. I want my PIC+ ENC28J60 to listen to all incoming packets to 2 different IP interfaces.
Thanks for the help |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Mar 26, 2013 5:46 am |
|
|
As far as I see, multihoming requires several features that are not provided by the Microchip TCP stack. The Beta V6.0 has support for multiple network interfaces, you'll need to port it to CCS. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19541
|
|
Posted: Tue Mar 26, 2013 5:51 am |
|
|
I'm not sure it is easy with that Ethernet chip either. The automatic filters don't support two addresses (except things like the broadcast address), so you'd have to effectively 'manually check' the packets.
There are later Ethernet chips with support for this.
Best Wishes |
|
|
Manel28
Joined: 06 May 2010 Posts: 33
|
|
Posted: Tue Mar 26, 2013 6:15 am |
|
|
Thanks for the info |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Tue Mar 26, 2013 10:23 am |
|
|
These issues are solvable. Only one physical interface is being used and the low level NIC driver is not concerned about IP addresses so it does not prevent packets from being processed by the upper layer IP stack (which you can modify).
This leaves the issue of MAC addresses. If the two IP addresses are in different subnets then they may be able to share the same MAC address. It will not impact the upstream switch or router. You could use multiple MAC addresses but to do this you will either need to configure the Ethernet controller to accept all destination MAC addresses (not very good) or you need to configure and enable the MAC hash table. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Last edited by asmallri on Wed Mar 27, 2013 4:11 am; edited 1 time in total |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Mar 27, 2013 12:40 am |
|
|
Ttelmah wrote: | I'm not sure it is easy with that Ethernet chip either. The automatic filters don't support two addresses (except things like the broadcast address), so you'd have to effectively 'manually check' the packets.
There are later Ethernet chips with support for this.
|
I presume that multiple IP addresses will be bound to the same mac address. This can work with any network chip.
P.S.: I see, Andrew already commented the point. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19541
|
|
Posted: Wed Mar 27, 2013 5:52 am |
|
|
I must admit when I've done multi-homing, I've wanted multiple Mac addresses.
Have always just used a lot more 'grunt' than the PIC. When you look at what you can get a matchbox PC, running Linux for, this sort of job is the an absolute doddle. Especially going with a USB SD based machine...
Best Wishes |
|
|
|