From owner-freebsd-net@FreeBSD.ORG Mon Aug 18 18:05:08 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1405EC7D for ; Mon, 18 Aug 2014 18:05:08 +0000 (UTC) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D43333337 for ; Mon, 18 Aug 2014 18:05:07 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id a3so3800905oib.15 for ; Mon, 18 Aug 2014 11:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MRHEFpcSvc4aLD8y/ezx6Z1MzEbDuWDC2S7GaFdhgyo=; b=h1+XLzrJs01mcJFpBcqu4Aokl4u8FT3ggUn2XvefhKkpK84rPEImhEe/g4Og5GEbGb xD5HHQ4ew05u31+IFKRkEocwROAJZVPhLbxEUb2402OHf/90K7tN71y+iazLlhuL9uOa hZVCaD3oY2rAy1W4XRNk4iBa0ZDlvQpv0k7GMYxF42m+PfpjZnC6j3YV8aL19VFBjOZM vfdVlOycCrQiHwEw4tTi39nEXYVu3GgT/t5ItPYxGK42EKBCdMydik80eSdDLrhD0zjj Pi6bQw+j90fteHh9KnORHrkYQEsX3uVk0zKxh2kTkXnn7VkrGKPwKErpYay51ZxR3KmY nr5g== MIME-Version: 1.0 X-Received: by 10.182.241.200 with SMTP id wk8mr38631436obc.27.1408385107197; Mon, 18 Aug 2014 11:05:07 -0700 (PDT) Received: by 10.76.187.39 with HTTP; Mon, 18 Aug 2014 11:05:07 -0700 (PDT) In-Reply-To: <53F1F863.8000408@pp.com.pl> References: <53F1F863.8000408@pp.com.pl> Date: Mon, 18 Aug 2014 14:05:07 -0400 Message-ID: Subject: Re: Sending data via MAC address From: Ryan Stone To: Piotr Kubaj Content-Type: text/plain; charset=UTF-8 Cc: freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 18:05:08 -0000 On Mon, Aug 18, 2014 at 8:58 AM, Piotr Kubaj 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.