mac2vlan文件在freeradius中的语法?

下面是freeradius中的mac2vlan文件的内容。 当我取消注释这一行00:01:02:03:04:05,VLAN1会logging一个parsing错误,包括configuration文件/ etc / raddb / modules / mac2vlan

 /etc/raddb/modules/mac2vlan[10]: Parse error after "00:01:02:03:04:05" Errors reading /etc/raddb/radiusd.conf 

什么是正确的语法?

 # -*- text -*- # # $Id$ # A simple file to map a MAC address to a VLAN. # # The file should be in the format MAC,VLAN # the VLAN name cannot have spaces in it, for example: # 00:01:02:03:04:05,VLAN1 # 03:04:05:06:07:08,VLAN2 # ... passwd mac2vlan { filename = ${confdir}/mac2vlan format = "*VMPS-Mac:=VMPS-VLAN-Name" delimiter = "," } 

我知道这已经有一段时间了,但是对于下一个在这个post中寻找帮助的人(或者gal),我希望能够在我的答案中find价值。

/etc/raddb/modules/mac2vlan文件只显示了一个mac2vlan文件的样子。

该脚本中引用了实际的mac2vlan文件:

 filename = ${confdir}/mac2vlan 

你应该使用上面提到的语法在/etc/raddb /中创build一个mac2vlan文件(或者创build它)。 不要取消注释/etc/raddb/modules/mac2vlan文件中的任何内容。

我还要提一下,我使用的是freeradius的版本,path实际上是/etc/freeradius而不是/etc/raddb ,如上所述。

看起来像是在抱怨一条评论,在行首缺less一个#字符。 此外,最后一行可能不应该是一个注释,所以最后一行的#字符需要删除。