Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 2014 10:25:55 +0200
From:      Piotr Kubaj <p.kubaj@pp.com.pl>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Sending data via MAC address
Message-ID:  <53F30A13.7050505@pp.com.pl>
In-Reply-To: <CAFMmRNwC4xC2Bx1NR=dirZhU346UeO64FurP1rPirJgJyuSC=Q@mail.gmail.com>
References:  <53F1F863.8000408@pp.com.pl> <CAFMmRNwC4xC2Bx1NR=dirZhU346UeO64FurP1rPirJgJyuSC=Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 18.08.2014 20:05, Ryan Stone wrote:
> On Mon, Aug 18, 2014 at 8:58 AM, Piotr Kubaj <p.kubaj@pp.com.pl> wrote:
>> Hi. Please see
>> http://forums.freebsd.org/viewtopic.php?f=15&t=45303#p264204 and
>> http://forums.freebsd.org/viewtopic.php?f=15&t=45303#p264249 .
>> I know I can use web interface or ssh but WinBox is required. In short,
>> using Linux and Wine, I can connect to my routers via MAC, provided they
>> are in the same network. With FreeBSD it's not possible (I've checked
>> various Wine versions, so it's not its fault). Right now I have Debian
>> running on my PC and have tested FreeBSD in VM with bridged NIC. When I
>> run Winbox in Linux, I can connect to RB, with FreeBSD in VM it works
>> only with IP (provided both PC and the router are in the same network).
>> Is it possible in any way to connect using only MAC addresses or when PC
>> and the router are in different networks (no network aliases, as there
>> are times when it's not known what network the router is in). Thanks for
>> answers.
>> _______________________________________________
>> freebsd-net@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-net
>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
> So the problem, if I'm understanding you correctly, is that you have a
> router with an unknown IP address (but a known MAC address).  You're
> unable to set the IP on the router and you want to use it to forward
> your traffic?
>
> You could do something like this (assuming your NIC is on the
> 192.168.1.0/24 subnet:
>
> route add default 192.168.1.1
>
> The IP address that you use here is arbitrary.  Pick an unused address
> on your subnet.  If you only want to route certain subnets through
> this router, replace "default" with the subnet that you want to route.
>
> arp -s 192.168.1.1 xx:xx:xx:xx:xx:xx pub
>
> This will create a static arp entry for 192.168.1.1.  Now when you try
> to route traffic to 192.168.1.1 it will use the static MAC and things
> should just work.
>
> Note that you probably won't be able to do this to access the router
> at all (e.g. ping 192.168.1.1).  The router's IP stack won't respond
> to packets that aren't addressed to the router's IP address.
Thanks, that seems to work, although adding default route is unnecessary
as the whole subnet is already in the routing table, so I only need to
create a new ARP entry. And when the entry is deleted, I can no longer
connect via MAC.
Anyway, something is clearly wrong, since there are no problems like
that on Linux and OSX.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53F30A13.7050505>