Зарегистрирован: Чт мар 03, 2011 17:00 Сообщений: 8
|
Добрый день Помогите пожалуйста решить проблему. Есть тестовый сервер под управлением freebsd, с определенным конфигом dhcpd.conf option domain-name-servers 10.100.10.1; lease-file-name "/var/log/dhcpd.leases"; log-facility local7; default-lease-time 60; max-lease-time 120; ddns-update-style none; local-address 192.168.2.1;
include "/usr/local/etc/dhcp/sw-170.conf"; include "/usr/local/etc/dhcp/sw-171.conf";
if exists agent.circuit-id { log(info, concat("Lease"," IP ",binary-to-ascii(10, 8,".",leased-address), " MAC ",binary-to-ascii(16,8,":",substring(hardware,1, 6)), " port ",binary-to-ascii(10,16, "",substring(option agent.circuit-id, 4, 2)), " VLAN ",binary-to-ascii(10, 16,"",substring(option agent.circuit-id, 2, 2)) ) ); } ################################################################################################################ shared-network test {
############################################################################# subnet 192.168.2.0 netmask 255.255.255.0 { deny unknown-clients; } ############################################################################# subnet 10.100.10.0 netmask 255.255.255.0 { option broadcast-address 10.100.10.255; option domain-name-servers 10.100.10.1; option routers 10.100.10.1; option subnet-mask 255.255.255.0; ######################################################## pool { range 10.100.10.101; allow members of "sw170-1";} pool { range 10.100.10.102; allow members of "sw170-2";} pool { range 10.100.10.103; allow members of "sw170-3";} pool { range 10.100.10.104; allow members of "sw170-4";} pool { range 10.100.10.105; allow members of "sw170-5";} pool { range 10.100.10.106; allow members of "sw170-6";} pool { range 10.100.10.107; allow members of "sw170-7";} pool { range 10.100.10.108; allow members of "sw170-8";} pool { range 10.100.10.109; allow members of "sw170-9";} pool { range 10.100.10.110; allow members of "sw170-10";} pool { range 10.100.10.111; allow members of "sw170-11";} pool { range 10.100.10.112; allow members of "sw170-12";} pool { range 10.100.10.113; allow members of "sw170-13";} pool { range 10.100.10.114; allow members of "sw170-14";} pool { range 10.100.10.115; allow members of "sw170-15";} pool { range 10.100.10.116; allow members of "sw170-16";} pool { range 10.100.10.117; allow members of "sw170-17";} pool { range 10.100.10.118; allow members of "sw170-18";} pool { range 10.100.10.119; allow members of "sw170-19";} pool { range 10.100.10.120; allow members of "sw170-20";} pool { range 10.100.10.121; allow members of "sw170-21";} pool { range 10.100.10.122; allow members of "sw170-22";} pool { range 10.100.10.123; allow members of "sw170-23";} pool { range 10.100.10.124; allow members of "sw170-24";} pool { range 10.100.10.201; allow members of "sw171-1";} pool { range 10.100.10.202; allow members of "sw171-2";} pool { range 10.100.10.203; allow members of "sw171-3";} pool { range 10.100.10.204; allow members of "sw171-4";} pool { range 10.100.10.205; allow members of "sw171-5";} pool { range 10.100.10.206; allow members of "sw171-6";} pool { range 10.100.10.207; allow members of "sw171-7";} pool { range 10.100.10.208; allow members of "sw171-8";} pool { range 10.100.10.209; allow members of "sw171-9";} pool { range 10.100.10.210; allow members of "sw171-10";} pool { range 10.100.10.211; allow members of "sw171-11";} pool { range 10.100.10.212; allow members of "sw171-12";} pool { range 10.100.10.213; allow members of "sw171-13";} pool { range 10.100.10.214; allow members of "sw171-14";} pool { range 10.100.10.215; allow members of "sw171-15";} pool { range 10.100.10.216; allow members of "sw171-16";} pool { range 10.100.10.217; allow members of "sw171-17";} pool { range 10.100.10.218; allow members of "sw171-18";} pool { range 10.100.10.219; allow members of "sw171-19";} pool { range 10.100.10.220; allow members of "sw171-20";} pool { range 10.100.10.221; allow members of "sw171-21";} pool { range 10.100.10.222; allow members of "sw171-22";} pool { range 10.100.10.223; allow members of "sw171-23";} pool { range 10.100.10.224; allow members of "sw171-24";} } } sw-170.conf#Device Type : DES-1210-28 Fast Ethernet Switch #MAC Address : 1C-AF-F7-C9-31-59 #IP Address : 192.168.2.170 (Manual) #VLAN Name : #Subnet Mask : 255.255.255.0 #Default Gateway : 192.168.2.1 #Boot PROM Version : 1.00.002 #Firmware Version : 5.10.B012 #Hardware Version : A1 #System Name :sw-170
class "sw170-1" { match if binary-to-ascii(16, 8, "-", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1"; } class "sw170-2" { match if binary-to-ascii(16, 8, "-", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "2"; } class "sw170-3" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "3"; } class "sw170-4" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "4"; } class "sw170-5" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "5"; } class "sw170-6" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "6"; } class "sw170-7" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "7"; } class "sw170-8" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "8"; } class "sw170-9" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "9"; } class "sw170-10" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "10"; } class "sw170-11" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "11"; } class "sw170-12" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "12"; } class "sw170-13" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "13"; } class "sw170-14" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "14"; } class "sw170-15" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "15"; } class "sw170-16" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "16"; } class "sw170-17" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "17"; } class "sw170-18" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "18"; } class "sw170-19" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "19"; } class "sw170-20" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "20"; } class "sw170-21" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "21"; } class "sw170-22" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "22"; } class "sw170-23" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "23"; } class "sw170-24" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "af:f7:c9:31:59" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "24"; } sw-171.conf#Device Type : DES-3028 Fast Ethernet Switch #MAC Address : 00:21:91:8D:23:29 #IP Address : 192.168.2.171 (Manual) #VLAN Name : #Subnet Mask : 255.255.255.0 #Default Gateway : 192.168.2.1 #Boot PROM Version : Build 1.00-B04 #Firmware Version : Build 2.52.B02 #Hardware Version : A1 #System Name : sw-171
class "sw171-1" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1"; } class "sw171-2" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "2"; } class "sw171-3" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "3"; } class "sw171-4" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "4"; } class "sw171-5" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "5"; } class "sw171-6" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "6"; } class "sw171-7" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "7"; } class "sw171-8" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "8"; } class "sw171-9" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "9"; } class "sw171-10" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "10"; } class "sw171-11" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "11"; } class "sw171-12" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "12"; } class "sw171-13" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "13"; } class "sw171-14" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "14"; } class "sw171-15" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "15"; } class "sw171-16" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "16"; } class "sw171-17" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "17"; } class "sw171-18" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "18"; } class "sw171-19" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "19"; } class "sw171-20" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "20"; } class "sw171-21" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "21"; } class "sw171-22" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "22"; } class "sw171-23" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "23"; } class "sw171-24" { match if binary-to-ascii(16, 8, ":", suffix(option agent.remote-id, 5)) = "21:91:8d:23:29" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "24"; } Конфигурация DES-1210-28DES-1210-28:5# show dhcp_relay Command: show dhcp_relay
DHCP/BOOTP Relay Status : Enabled DHCP/BOOTP Hops Count Limit : 16 DHCP/BOOTP Relay Time Threshold : 0 DHCP Relay Agent Information Option 82 State : Enabled DHCP Relay Agent Information Option 82 Check : Disabled DHCP Relay Agent Information Option 82 Policy : Keep DHCP Relay Agent Information Option 82 ID : 1C-AF-F7-C9-31-59
Interface Server 1 Server 2 Server 3 Server 4 --------- --------------- --------------- --------------- --------------- System 192.168.2.1
DES-1210-28:5# Проблема в том, что на DES-3028 все работает, а на DES-1210-28 --- УВЫ НЕТ! Грешим на неправильное описание классов в конфиге sw-170.conf или же Option 82 попросту не работает. В чем может быть причина? Если баг прошивки, скажите какая работает, а если неправильное описание классов - дайте, пожалуйста правильное. Заранее благодарю!
|
|