kern/121437: Routing to layer-2 address does not work on VLAN interface

Frank Volf frank at deze.org
Thu Mar 6 19:30:01 UTC 2008


>Number:         121437
>Category:       kern
>Synopsis:       Routing to layer-2 address does not work on VLAN interface
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 06 19:30:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Frank Volf
>Release:        7.0-STABLE
>Organization:
None
>Environment:
FreeBSD drawbridge.deze.org 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Mar  5 20:47:3 8 CET 2008     volf at drawbridge.deze.org:/home4/obj/usr/sources/src7/sys/DRAWBRID GE  i386

>Description:

I have a transparent ADSL modem (the modem does not have assigned an IP address from the provider but forwards all traffic to my FreeBSD box, which owns the actual IP address). 

For mgmt purposes I access the modem from the FreeBSD box using the modems 10.0.0.138 IP address. Because the ISP IP address is assigned to the FreeBSD box, the FreeBSD box does not have an address in 10.0.0.0/24.

To make this work I use the following command to create 

route add 10.0.0.138 -netmask 255.255.255.255 -interface -link xl2:00.0e.50.23.5e.13

This works perfectly, a host entry is created in the routing table and the link layer address is added as well:

# netstat -nr | grep 10.0.0.138
10.0.0.138/32      00:0e:50:23:5e:13  ULS         5     5370    xl2


The problem is that it does not work if a vlan interface is used instead of a physical interface:

# ifconfig em0.99 create
# route add 1.2.3.4 -netmask 255.255.255.255 -interface -link em0.99:00.0e.50.23.5e.14
add net 1.2.3.4: gateway em0.99:00.0e.50.23.5e.14
# netstat -nr |grep 1.2.3.4
1.2.3.4/32         em0:99.0.e.50.23.5e.14 US          0        0    em0

As you can see, something seems to go wrong with the parsing. This problem also exists in FreeBSD 6.x




>How-To-Repeat:
# ifconfig em0.99 create
# route add 1.2.3.4 -netmask 255.255.255.255 -interface -link em0.99:00.0e.50.23.5e.14
add net 1.2.3.4: gateway em0.99:00.0e.50.23.5e.14
# netstat -nr |grep 1.2.3.4
1.2.3.4/32         em0:99.0.e.50.23.5e.14 US          0        0    em0

>Fix:
No fix known.


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list