Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Sep 2012 23:34:33 +0200
From:      =?UTF-8?Q?Lukasz_Polaczyk?= <lpolaczyk@o2.pl>
To:        freebsd-net@freebsd.org
Subject:   proxy arp - openvpn
Message-ID:  <4de583de.ec6cac4.505645e9.abcf9@o2.pl>

next in thread | raw e-mail | index | archive | help
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>=20metric=200=20=
mtu
1500
=20=20=20=20=20=20=20=20options=3D4219b<RXCSUM,TXCSUM,VLAN=5FMTU,VLAN=5FH=
WTAGGING,VLAN=5FHWCSUM,TSO4,WOL=5FMAGIC,VLAN=5FHWTSO>
=20=20=20=20=20=20=20=20media:=20Ethernet=20autoselect=20(1000baseT=20<fu=
ll-duplex>)
=20=20=20=20=20=20=20=20status:=20active
lo0:=20flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST>=20metric=200=20mtu=201=
6384
=20=20=20=20=20=20=20=20options=3D600003<RXCSUM,TXCSUM,RXCSUM=5FIPV6,TXCS=
UM=5FIPV6>
=20=20=20=20=20=20=20=20inet=20127.0.0.1=20netmask=20255.0.0.0
xl0:=20flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>=20metric=200=20=
mtu
1500
=20=20=20=20=20=20=20=20options=3D82009<RXCSUM,VLAN=5FMTU,WOL=5FMAGIC,LIN=
KSTATE>
=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<fu=
ll-duplex>)
=20=20=20=20=20=20=20=20status:=20active
tun0:=20flags=3D8010<POINTOPOINT,MULTICAST>=20metric=200=20mtu=201500
=20=20=20=20=20=20=20=20options=3D80000<LINKSTATE>

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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>=20metric=200=20=
mtu
1500
=20=20=20=20=20=20=20=20options=3D4219b<RXCSUM,TXCSUM,VLAN=5FMTU,VLAN=5FH=
WTAGGING,VLAN=5FHWCSUM,TSO4,WOL=5FMAGIC,VLAN=5FHWTSO>
=20=20=20=20=20=20=20=20media:=20Ethernet=20autoselect=20(1000baseT=20<fu=
ll-duplex>)
=20=20=20=20=20=20=20=20status:=20active
lo0:=20flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST>=20metric=200=20mtu=201=
6384
=20=20=20=20=20=20=20=20options=3D600003<RXCSUM,TXCSUM,RXCSUM=5FIPV6,TXCS=
UM=5FIPV6>
=20=20=20=20=20=20=20=20inet=20127.0.0.1=20netmask=20255.0.0.0
xl0:=20flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>=20metric=200=20=
mtu
1500
=20=20=20=20=20=20=20=20options=3D82009<RXCSUM,VLAN=5FMTU,WOL=5FMAGIC,LIN=
KSTATE>
=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<fu=
ll-duplex>)
=20=20=20=20=20=20=20=20status:=20active
tun0:=20flags=3D8043<UP,BROADCAST,RUNNING,MULTICAST>=20metric=200=20mtu=20=
1500
=20=20=20=20=20=20=20=20options=3D80000<LINKSTATE>
=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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4de583de.ec6cac4.505645e9.abcf9>