From owner-freebsd-net@FreeBSD.ORG Sun Sep 16 21:34:43 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48E1F106564A for ; Sun, 16 Sep 2012 21:34:43 +0000 (UTC) (envelope-from lpolaczyk@o2.pl) Received: from moh1-ve1.go2.pl (moh1-ve1.go2.pl [193.17.41.131]) by mx1.freebsd.org (Postfix) with ESMTP id B2BFA8FC12 for ; Sun, 16 Sep 2012 21:34:42 +0000 (UTC) Received: from moh1-ve1.go2.pl (unknown [10.0.0.131]) by moh1-ve1.go2.pl (Postfix) with ESMTP id C43E8928856 for ; Sun, 16 Sep 2012 23:34:34 +0200 (CEST) Received: from o2.pl (unknown [10.0.0.121]) by moh1-ve1.go2.pl (Postfix) with SMTP for ; Sun, 16 Sep 2012 23:34:33 +0200 (CEST) From: =?UTF-8?Q?Lukasz_Polaczyk?= To: freebsd-net@freebsd.org Mime-Version: 1.0 Message-ID: <4de583de.ec6cac4.505645e9.abcf9@o2.pl> Date: Sun, 16 Sep 2012 23:34:33 +0200 X-Originator: 89.75.184.182 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: proxy arp - openvpn X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 21:34:43 -0000 Hi. I=20am=20trying=20to=20use=20proxy=20arp=20mechanism=20to=20create=20new=20= registration=20in=20arp=20table. I=20have=20three=20NICs:=20xl0,=20em0=20and=20one=20virtual=20-=20tun0. Default=20route=20is=20going=20through=20em0.=20Route=20to=2010.146.0.0/1= 6=20network=20is going=20through=20xl0. OS=20is=20FreeBSD=209.0-RELEASE=20amd64 I=20would=20like=20to=20add=20registration=20in=20arp=20table=20for=20add= resses=20in 10.146.100.0/24=20network,=20so=20 all=20traffic=20to=20that=20network=20from=2010.146.0.0/16=20will=20go=20= through=20xl0.=20I would=20like=20to=20do=20this=20dynamically,=20when=20openvpn=20client=20= connects. The=20situation=20is=20like=20this: 1.=203=20NICs=20are=20up: s1%=20ifconfig em0:=20flags=3D8843=20metric=200=20= mtu 1500 =20=20=20=20=20=20=20=20options=3D4219b =20=20=20=20=20=20=20=20media:=20Ethernet=20autoselect=20(1000baseT=20) =20=20=20=20=20=20=20=20status:=20active lo0:=20flags=3D8049=20metric=200=20mtu=201= 6384 =20=20=20=20=20=20=20=20options=3D600003 =20=20=20=20=20=20=20=20inet=20127.0.0.1=20netmask=20255.0.0.0 xl0:=20flags=3D8843=20metric=200=20= mtu 1500 =20=20=20=20=20=20=20=20options=3D82009 =20=20=20=20=20=20=20=20ether=2000:10:4b:c3:db:5b =20=20=20=20=20=20=20=20inet=2010.146.225.1=20netmask=20255.255.0.0=20bro= adcast=2010.146.255.255 =20=20=20=20=20=20=20=20media:=20Ethernet=20autoselect=20(100baseTX=20) =20=20=20=20=20=20=20=20status:=20active tun0:=20flags=3D8010=20metric=200=20mtu=201500 =20=20=20=20=20=20=20=20options=3D80000 route=20table=20is=20like=20below: s1%=20netstat=20-rn Routing=20tables Internet: Destination=20=20=20=20=20=20=20=20Gateway=20=20=20=20=20=20=20=20=20=20=20= =20Flags=20=20=20=20Refs=20=20=20=20=20=20Use=20=20Netif Expire default=20=20=20=20=20=20=20=20=20=20=20=20A.B.C.D=20=20=20=20=20=20=20=20= =20=20=20=20UGS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20217=20=20=20= =20em0 10.146.0.0/16=20=20=20=20=20=20link#3=20=20=20=20=20=20=20=20=20=20=20=20= =20U=20=20=20=20=20=20=20=20=20=20=200=20=20=20=2011737=20=20=20=20xl0 10.146.225.1=20=20=20=20=20=20=20link#3=20=20=20=20=20=20=20=20=20=20=20=20= =20UHS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=200=20=20=20=20lo= 0 127.0.0.1=20=20=20=20=20=20=20=20=20=20link#2=20=20=20=20=20=20=20=20=20=20= =20=20=20UH=20=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=201=20=20= =20=20lo0 A.B.C.0/24=20=20=20=20=20=20=20=20=20link#1=20=20=20=20=20=20=20=20=20=20= =20=20=20U=20=20=20=20=20=20=20=20=20=20=200=20=20=20138837=20=20=20=20em= 0 A.B.C.D=20=20=20=20=20=20=20=20=20=20=20=20link#1=20=20=20=20=20=20=20=20= =20=20=20=20=20UHS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=200=20= =20=20=20lo0 A.B.C.D=20is=20my=20WAN=20interface. arp=20table=20is=20like=20below: s1%=20arp=20-a s1.lan=20(10.146.225.1)=20at=20S01-3C=20on=20xl0=20permanent=20[ethernet]= my.host.pl=20(A.B.C.D)=20at=20S01=20on=20em0=20permanent=20[ethernet] In=20this=20situation=20I=20could=20add=20new=20entry=20in=20arp=20table:= s1%=20#=20arp=20-s=2010.146.100.1=20auto=20pub using=20interface=20xl0=20for=20proxy=20with=20address=20S01-3C After=20adding=20I=20could=20see=20new=20entry=20in=20arp=20table: s1%=20arp=20-a s1.lan=20(10.146.225.1)=20at=20S01-3C=20on=20xl0=20permanent=20[ethernet]= ?=20(10.146.100.1)=20at=20S01-3C=20on=20xl0=20permanent=20published=20[et= hernet] Proxy=20ARP=20is=20working=20manually. 2.=20The=20second=20situation=20is=20diffrent=20(before=20using=20arp=20p= roxy),=20 =20=20=203=20NICs=20are=20working,=20I=20have=20added=20address=20and=20n= ew=20route=20like=20below: s1%=20ifconfig em0:=20flags=3D8843=20metric=200=20= mtu 1500 =20=20=20=20=20=20=20=20options=3D4219b =20=20=20=20=20=20=20=20media:=20Ethernet=20autoselect=20(1000baseT=20) =20=20=20=20=20=20=20=20status:=20active lo0:=20flags=3D8049=20metric=200=20mtu=201= 6384 =20=20=20=20=20=20=20=20options=3D600003 =20=20=20=20=20=20=20=20inet=20127.0.0.1=20netmask=20255.0.0.0 xl0:=20flags=3D8843=20metric=200=20= mtu 1500 =20=20=20=20=20=20=20=20options=3D82009 =20=20=20=20=20=20=20=20ether=2000:10:4b:c3:db:5b =20=20=20=20=20=20=20=20inet=2010.146.225.1=20netmask=20255.255.0.0=20bro= adcast=2010.146.255.255 =20=20=20=20=20=20=20=20media:=20Ethernet=20autoselect=20(100baseTX=20) =20=20=20=20=20=20=20=20status:=20active tun0:=20flags=3D8043=20metric=200=20mtu=20= 1500 =20=20=20=20=20=20=20=20options=3D80000 =20=20=20=20=20=20=20=20inet=2010.146.100.1=20netmask=20255.255.255.0=20b= roadcast=2010.146.100.255 =20=20=20=20=20=20=20=20Opened=20by=20PID=205211 s1%=20netstat=20-rn Routing=20tables Internet: Destination=20=20=20=20=20=20=20=20Gateway=20=20=20=20=20=20=20=20=20=20=20= =20Flags=20=20=20=20Refs=20=20=20=20=20=20Use=20=20Netif Expire default=20=20=20=20=20=20=20=20=20=20=20=20A.B.C.D=20=20=20=20=20=20=20=20= =20=20=20=20UGS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20223=20=20=20= =20em0 10.146.0.0/16=20=20=20=20=20=20link#3=20=20=20=20=20=20=20=20=20=20=20=20= =20U=20=20=20=20=20=20=20=20=20=20=200=20=20=20=2011739=20=20=20=20xl0 10.146.100.0/24=20=20=20=20link#4=20=20=20=20=20=20=20=20=20=20=20=20=20U= =20=20=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=200=20=20=20tun0 10.146.100.1=20=20=20=20=20=20=20link#4=20=20=20=20=20=20=20=20=20=20=20=20= =20UHS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=200=20=20=20=20lo= 0 10.146.225.1=20=20=20=20=20=20=20link#3=20=20=20=20=20=20=20=20=20=20=20=20= =20UHS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=200=20=20=20=20lo= 0 127.0.0.1=20=20=20=20=20=20=20=20=20=20link#2=20=20=20=20=20=20=20=20=20=20= =20=20=20UH=20=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=201=20=20= =20=20lo0 A.B.C.0/24=20=20=20=20=20=20=20=20=20link#1=20=20=20=20=20=20=20=20=20=20= =20=20=20U=20=20=20=20=20=20=20=20=20=20=200=20=20=20146082=20=20=20=20em= 0 A.B.C.D=20=20=20=20=20=20=20=20=20=20=20=20link#1=20=20=20=20=20=20=20=20= =20=20=20=20=20UHS=20=20=20=20=20=20=20=20=200=20=20=20=20=20=20=20=200=20= =20=20=20lo0 When=20trying=20to=20add=20an=20entry=20in=20arp=20table=20I=20got=20an=20= error=20like=20this: s1%=20arp=20-s=2010.146.100.100=20auto=20pub using=20interface=20xl0=20for=20proxy=20with=20address=20S01-3C cannot=20intuit=20interface=20index=20and=20type=20for=2010.146.100.100 I=20can=20not=20delete=20arp=20entries=20provided=20earlier,=20if=20are=20= any: s1%=20#=20arp=20-d=2010.146.100.100 delete:=20cannot=20locate=2010.146.100.100 Is=20there=20any=20solution=20to=20provide=20arp=20entries=20dynamically,= =20after=20creation of=2010.146.100.0/24=20network=20on=20xl0=20interace or=20I=20have=20to=20do=20this=20manually=20before=20creating=20this=20ne= twork? regards, Lukasz=20Polaczyk