lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] ARP forwarding


From: Simon Goldschmidt
Subject: Re: [lwip-users] ARP forwarding
Date: Tue, 13 Dec 2022 18:58:39 +0100
User-agent: K-9 Mail for Android


Am 13. Dezember 2022 17:50:34 MEZ schrieb "Александр via lwip-users" 
<lwip-users@nongnu.org>:
>
>Hello!
>I am trying to implement dual ethernet interface device on Xilinx baremetal 
>logic. I’v already implement receiving data from both of two interfaces but 
>now I want to realize forwarding from one interface to another. I’v connected 
>to 1st interface and try to ping the second one. On wireshark I see arp 
>requests that have no responses.
>May be problem is in forwarding of broadcast messages?
> 
>#if IP_FORWARD
>    /* non-broadcast packet? */
>    if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), inp)) {
>      /* try to forward IP packet on (other) interfaces */
>      ip4_forward(p, (struct ip_hdr *)p->payload, inp);
>    } else
>#endif /* IP_FORWARD */

This is IP code. It would never touch or even see ARP packets at all.

> 
>I can not understand this part. Why do we forward only unicast messages?
>Sorry, i am niewbe in this stuff

Forwarding is between two IP subnets with known routes between that subnets. 
Think of lwip like a router here. And broadcasts should never be routed.

What you want sounds like a bridge maybe? A bridge forwards L2 traffic and 
would this also send on your ARP broadcast.

Regards,
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]