Bug 181800

Summary: problem with router and vlan interface
Product: Base System Reporter: Pavel <pawel401>
Component: kernAssignee: Andrey V. Elsukov <ae>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 1.0-CURRENT   
Hardware: Any   
OS: Any   

Description Pavel 2013-09-04 10:10:00 UTC
The problem is that when adding a router to vlan interface with the number 100 is added to the interface 10 when added to the 110 it is added to the 11, if you add to it will add 998 to 99, 4000 if you add it to add 40.

netstat -rn
10.1.1.195/32 00:24:81:7d:9d:2b US 0 0 em2.94
10.1.1.196/32 00:24:81:7d:9d:2b US 0 0 em2.95
10.1.1.197/32 00:24:81:7d:9d:2b US 0 0 em2.96
10.1.1.198/32 00:24:81:7d:9d:2b US 0 0 em2.97
10.1.1.199/32 00:24:81:7d:9d:2b US 0 0 em2.98
10.1.1.200/32 00:24:81:7d:9d:2b US 0 0 em2.99
10.1.1.201/32 00:24:81:7d:9d:2b US 0 0 em2.10
10.1.1.202/32 00:24:81:7d:9d:2b US 0 0 em2.10
10.1.1.203/32 00:24:81:7d:9d:2b US 0 0 em2.10

How-To-Repeat: ifconfig em2.94 create inet 10.0.0.1/32 up
ifconfig em2.95 create inet 10.0.0.1/32 up
ifconfig em2.96 create inet 10.0.0.1/32 up
ifconfig em2.97 create inet 10.0.0.1/32 up
ifconfig em2.98 create inet 10.0.0.1/32 up
ifconfig em2.99 create inet 10.0.0.1/32 up
ifconfig em2.100 create inet 10.0.0.1/32 up
ifconfig em2.101 create inet 10.0.0.1/32 up
ifconfig em2.102 create inet 10.0.0.1/32 up

route delete 10.0.0.1/32

route add -host 10.1.1.195 -iface em2.94
route add -host 10.1.1.196 -iface em2.95
route add -host 10.1.1.197 -iface em2.96
route add -host 10.1.1.198 -iface em2.97
route add -host 10.1.1.199 -iface em2.98
route add -host 10.1.1.200 -iface em2.99
route add -host 10.1.1.201 -iface em2.100
route add -host 10.1.1.202 -iface em2.101
route add -host 10.1.1.203 -iface em2.102
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-09-05 03:08:57 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Andrey V. Elsukov freebsd_committer freebsd_triage 2013-09-05 09:25:17 UTC
State Changed
From-To: open->closed

Actually the kernel uses right interfaces. 
Use -W key with netstat(1) and it will not truncate interface 
names in the output. 


Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2013-09-05 09:25:17 UTC
Responsible Changed
From-To: freebsd-net->ae

Take it.