tun interface address conflict

Max Laier max at love2party.net
Fri Dec 3 10:55:52 PST 2004


On Friday 03 December 2004 18:19, Giovanni P. Tirloni wrote:
> Hi,
>
>   I tried to connect two ADSL lines from the same telco using ppp but
> it breaks when setting the second interface. The problem seems an
> address conflict between them, like this:
>
> # ifconfig tun1 192.168.100.1 192.168.100.254 netmask 255.255.255.255
> # ifconfig tun2 192.168.100.2 192.168.100.254 netmask 255.255.255.255
> ifconfig: ioctl (SIOCAIFADDR): File exists
>
>   "File exists" is the same error that I find on /var/log/ppp.log. Is
> there anything that can be done to use both at the same time?

As a quick fix you can just delete the route table entry created from tun1 
before you ifconfig tun2. In your example you'd do:
 # route delete 192.168.100.254
Of course you have to take care of the routing for yourself.

Alternatively (assumeing you are on RELENG_5) you can try to apply the 
following patch:
   http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/in.c.diff?r1=1.77&r2=1.80
to src/sys/netinet/in.c which should fix the problem altogether. Please tell 
me if you have troubles with it as I am going to MFC this shortly.

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20041203/9a7cba7f/attachment.bin


More information about the freebsd-net mailing list