Bug 121437 - [vlan] Routing to layer-2 address does not work on VLAN interface
Summary: [vlan] Routing to layer-2 address does not work on VLAN interface
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-06 19:30 UTC by frank
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frank 2008-03-06 19:30:00 UTC
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

Fix: 

No fix known.
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
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-03-08 05:53:10 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 frank 2009-12-25 13:21:00 UTC
Just checked, and the bug is still present in FreeBSD 8.x

Regards,

Frank
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:22 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped