Could someone provide guidance as to how to communicate with devices on
another subnet using lwip? Thanks in advance.
Attached below is a snapshot of the network status:
My computer: /IP/ 172.20.123.144 /subnet mask/ 255.255.254.0 /default
gateway/ 172.20.122.1
My board running lwip: /IP/ 172.20.122.224 /subnet mask/ 255.255.254.0
/default gateway/ 172.20.122.1
school FTP server: IP 172.20.106.31
--
View this message in context: http://old.nabble.com/Communication-between-different-subnets-tp29706546p29706546.html
Sent from the lwip-users mailing list archive at Nabble.com.
_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users
Yes, your textbook is right. But to find the MAC address of the gateway
we have to use the IP address of the gateway in the lookup. The packet
itself will still be sent with the IP address of the FTP server.
It should just work if you've configured the netif with the gateway
address properly.
Can you get a packet capture to show what's going wrong. You've said it
doesn't work but we need more information about what goes wrong to debug
this problem.
Kieran
Why? Looks OK to me. Perhaps you didn't spot his netmask setting?
Kieran
--
View this message in context: http://old.nabble.com/Communication-between-different-subnets-tp29706546p29708089.html
Sent from the lwip-users mailing list archive at Nabble.com.
Where were you running wireshark? If on your PC you wouldn't expect it
to see packets as they're not going to or from it. If you can configure
your switch to do port mirroring you might be able to get them that way.
Alternatively get the packet capture by running it on something
mid-stream (e.g. the gateway). That probably isn't an option on your
live school network, so you might need to set up a little network of
your own to reproduce it.
If the traffic level is very low and you can get the console output from
your board you might have luck just using the debug statements in lwIP
to dump details of the packets sent and received. This is potentially
easy to try, though much less useful than a full packet capture.
Lesson learned:
1. When sending packets to non-local subnets, during the lookup stage lwip
changes the destination IP to that of the gateway in order to find gateway's
MAC address. The destination IP of the packet itself remains unchanged.
2. Wireshark can't capture packets that are neither sent or received by the
host.
Thanks again for your detailed suggestions, Kieran!
--
View this message in context: http://old.nabble.com/Communication-between-different-subnets-tp29706546p29715772.html
Sent from the lwip-users mailing list archive at Nabble.com.