rootbmb Posted January 5, 2016 Помогите с настройкой связки Alcatel 6224 + option82 + isc-dhcpd-server. Прошивка на коммутаторе: 1.7.1.7 Конфиг коммутатора: interface range ethernet e1,g2spanning-tree portfast autoexitinterface ethernet g2switchport mode trunkexitvlan databasevlan 1002exitinterface ethernet e1switchport access vlan 1002exitinterface ethernet g2switchport trunk allowed vlan add 1002exitip dhcp snooping ip dhcp snooping information option allowed-untrusted ip dhcp snooping vlan 1002 interface ethernet g2ip dhcp snooping trust exitinterface vlan 1ip address 172.16.0.10 255.255.0.0 exitip default-gateway 172.16.0.1 dhcp.conf option ms-classless-static-routes code 249 = array of unsigned integer 8;option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;ddns-update-style none;#ddns-update-style interim;#ignore client-updates;default-lease-time 600;max-lease-time 600;authoritative;local-address 172.16.0.2;log-facility local7;option domain-name "intset.ru";option domain-name-servers 10.0.0.11;log(info, "***");if exists agent.circuit-id { log( info,concat("*Leased ",binary-to-ascii(10,8,".",leased-address)," (with opt82)") ); log( info,concat("*Remote-ID: ",binary-to-ascii(16,8,":",substring(option agent.remote-id,2,6))) ); log( info,concat("*Port: ",binary-to-ascii(10,8,"",suffix(option agent.circuit-id,1))) );# log( info,concat("*Vlan ",binary-to-ascii(10,16,"",substring(option agent.circuit-id, 2, 2)) );} else { log( info,concat("*Leased ",binary-to-ascii(10,8,".",leased-address)," (without opt82)") );}log(info, "***");subnet 192.168.200.0 netmask 255.255.255.192 { option subnet-mask 255.255.255.192; option broadcast-address 192.168.200.63; option ms-classless-static-routes 8, 10, 192, 168, 200, 1, 16, 172, 16, 192, 168, 200, 1; option rfc3442-classless-static-routes 8, 10, 192, 168, 200, 1, 16, 172, 16, 192, 168, 200, 1; option routers 192.168.200.1;include "/etc/dhcp/switch/u1.conf";}} include "/etc/dhcp/switch/u1.conf" class "port-1"{ match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" );}pool {range 192.168.200.2; allow members of "port-1"; } log dhcp: Jan 5 17:32:14 bmb dhcpd: ***Jan 5 17:32:14 bmb dhcpd: *Leased 192.168.200.2 (with opt82)Jan 5 17:32:14 bmb dhcpd: *Remote-ID: 0:12:cf:86:45:e0Jan 5 17:32:14 bmb dhcpd: *Port: 1Jan 5 17:32:14 bmb dhcpd: ***Jan 5 17:32:14 bmb dhcpd: DHCPDISCOVER from 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:14 bmb dhcpd: DHCPOFFER on 192.168.200.2 to 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:18 bmb dhcpd: ***Jan 5 17:32:18 bmb dhcpd: *Leased 192.168.200.2 (with opt82)Jan 5 17:32:18 bmb dhcpd: *Remote-ID: 0:12:cf:86:45:e0Jan 5 17:32:18 bmb dhcpd: *Port: 1Jan 5 17:32:18 bmb dhcpd: ***Jan 5 17:32:18 bmb dhcpd: DHCPDISCOVER from 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:18 bmb dhcpd: DHCPOFFER on 192.168.200.2 to 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:23 bmb dhcpd: ***Jan 5 17:32:23 bmb dhcpd: *Leased 192.168.200.2 (with opt82)Jan 5 17:32:23 bmb dhcpd: *Remote-ID: 0:12:cf:86:45:e0Jan 5 17:32:23 bmb dhcpd: *Port: 1Jan 5 17:32:23 bmb dhcpd: ***Jan 5 17:32:23 bmb dhcpd: DHCPDISCOVER from 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:23 bmb dhcpd: DHCPOFFER on 192.168.200.2 to 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:25 bmb dhcpd: ***Jan 5 17:32:25 bmb dhcpd: *Leased 192.168.200.2 (with opt82)Jan 5 17:32:25 bmb dhcpd: *Remote-ID: 0:12:cf:86:45:e0Jan 5 17:32:25 bmb dhcpd: *Port: 1Jan 5 17:32:25 bmb dhcpd: ***Jan 5 17:32:25 bmb dhcpd: DHCPDISCOVER from 4c:5e:0c:0b:e8:02 (MikroTik) via eth0Jan 5 17:32:25 bmb dhcpd: DHCPOFFER on 192.168.200.2 to 4c:5e:0c:0b:e8:02 (MikroTik) via eth0 Не отдает ip адреса клиенту если по vlan. Просьба сбросить примеры конфигурационных файлов, у кого работает такая связка. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 5, 2016 Не отдает ip адреса клиенту если по vlan у вас dhcp-server находится в vlan? что-то типа via eth0.1002 class "port-1" { match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } к своему классу можете показать: tcpdump -nn -s 0 -v port 67 or port 68 tcpdump -nn -s 0 -v port 67 or port 68 -i eth.1002(?) и еще, зачем ip dhcp snooping information option allowed-untrusted? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
rootbmb Posted January 5, 2016 dhcp server находиться в том же влане, верней vlan1 использую как менеджмент vlan. ip dhcp snooping information option allowed-untrusted - это не мешает и без него не отдают. vlan 1002 клиентский Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 5, 2016 dhcp server находиться в том же влане, верней vlan1 использую как менеджмент vlan я не понял, вы не используете relay, потому и вопрос - dhcp-server с dhcp-client находяться в одном vlan? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
rootbmb Posted January 5, 2016 клиент--е1(vlan1002)-(ls6224)-g2(vlan1)--L3(коммутатор)--dhcp-server dhcp-server= 172.16.0.2 ls6224(vlan1)=172.16.0.10 g2-транковый порт dhcp-server отвечает видит клиента через L3, а с ls6224 в одном влане vlan1 и по этой схеме у меня работают куча свичей(des3526,snr s2960,qsw2800)и нет с ними проблем, а тут привезли ls6224 Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 5, 2016 запустите tcpdump -nn -s 0 -v port 67 or port 68 сделайте dhcp-запрос, покажите пожалуйста :) Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 Пишу с другой учетки 10:55:30.689240 IP (tos 0x0, ttl 128, id 255, offset 0, flags [none], proto UDP (17), length 334) 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from e8:03:9a:2f:84:43, length 306, xid 0xb2e368bf, secs 3072, Flags [none] Client-Ethernet-Address e8:03:9a:2f:84:43 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Client-ID Option 61, length 7: ether e8:03:9a:2f:84:43 Hostname Option 12, length 7: "ibra-M-^OM-^J" Vendor-Class Option 60, length 8: "MSFT 5.0" Parameter-Request Option 55, length 12: Subnet-Mask, Domain-Name, Default-Gateway, Domain-Name-Server Netbios-Name-Server, Netbios-Node, Netbios-Scope, Router-Discovery Static-Route, Classless-Static-Route, Classless-Static-Route-Microsoft, Vendor-Option Agent-Information Option 82, length 18: Circuit-ID SubOption 1, length 6: ^@^D^CM-j^A^A Remote-ID SubOption 2, length 8: ^@^F^@^RM-OM-^FEM-` 10:55:31.699563 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 363) 172.16.0.2.67 > 192.168.200.2.68: BOOTP/DHCP, Reply, length 335, xid 0xb2e368bf, secs 3072, Flags [none] Your-IP 192.168.200.2 Server-IP 172.16.0.2 Client-Ethernet-Address e8:03:9a:2f:84:43 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 172.16.0.2 Lease-Time Option 51, length 4: 600 Subnet-Mask Option 1, length 4: 255.255.255.192 Domain-Name Option 15, length 9: "intset.ru" Default-Gateway Option 3, length 4: 192.168.200.1 Domain-Name-Server Option 6, length 4: 10.0.0.11 Classless-Static-Route Option 121, length 13: (10.0.0.0/8:192.168.200.1),(172.16.0.0/16:192.168.200.1) Classless-Static-Route-Microsoft Option 249, length 13: (10.0.0.0/8:192.168.200.1),(172.16.0.0/16:192.168.200.1) Agent-Information Option 82, length 18: Circuit-ID SubOption 1, length 6: ^@^D^CM-j^A^A Remote-ID SubOption 2, length 8: ^@^F^@^RM-OM-^FEM-` 10:55:31.699670 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 363) 172.16.0.2.67 > 192.168.200.2.68: BOOTP/DHCP, Reply, length 335, xid 0xb2e368bf, secs 3072, Flags [none] Your-IP 192.168.200.2 Server-IP 172.16.0.2 Client-Ethernet-Address e8:03:9a:2f:84:43 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 172.16.0.2 Lease-Time Option 51, length 4: 600 Subnet-Mask Option 1, length 4: 255.255.255.192 Domain-Name Option 15, length 9: "intset.ru" Default-Gateway Option 3, length 4: 192.168.200.1 Domain-Name-Server Option 6, length 4: 10.0.0.11 Classless-Static-Route Option 121, length 13: (10.0.0.0/8:192.168.200.1),(172.16.0.0/16:192.168.200.1) Classless-Static-Route-Microsoft Option 249, length 13: (10.0.0.0/8:192.168.200.1),(172.16.0.0/16:192.168.200.1) Agent-Information Option 82, length 18: Circuit-ID SubOption 1, length 6: ^@^D^CM-j^A^A Remote-ID SubOption 2, length 8: ^@^F^@^RM-OM-^FEM-` Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 так что скажите ??? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 6, 2016 давайте с dhcpdump -i eth0 покажите запрос, а то не понятно: Agent-Information Option 82, length 18: Circuit-ID SubOption 1, length 6: ^@^D^CM-j^A^A Remote-ID SubOption 2, length 8: ^@^F^@^RM-OM-^FEM-` Не отдает ip адреса клиенту если по vlan class "port-1" { match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } я так понимаю, если class "port-1" { match if ( binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } то работает, а если: class "port-1" { match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } не работает, правильно? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 да да!!! так не работает class "port-1" { match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } dhcpdump Ignored non IPv4 packet: 129 TIME: 2016-01-06 16:28:54.464 IP: 172.16.0.2 (68:5:ca:7:6f:30) > 255.255.255.255 (ff:ff:ff:ff:ff:ff) OP: 2 (BOOTPREPLY) HTYPE: 1 (Ethernet) HLEN: 6 HOPS: 0 XID: 378842b9 SECS: 0 FLAGS: 7f80 CIADDR: 0.0.0.0 YIADDR: 192.168.200.2 SIADDR: 172.16.0.2 GIADDR: 0.0.0.0 CHADDR: 4c:5e:0c:0b:e8:02:00:00:00:00:00:00:00:00:00:00 SNAME: . FNAME: . OPTION: 53 ( 1) DHCP message type 2 (DHCPOFFER) OPTION: 54 ( 4) Server identifier 172.16.0.2 OPTION: 51 ( 4) IP address leasetime 600 (10m) OPTION: 1 ( 4) Subnet mask 255.255.255.192 OPTION: 3 ( 4) Routers 192.168.200.1 OPTION: 6 ( 4) DNS server 10.0.0.11 OPTION: 82 ( 18) Relay Agent Information Circuit-ID 00:04:03:ea:01:01 Remote-ID 00:06:00:12:cf:86:45:e0 --------------------------------------------------------------------------- Ignored non IPv4 packet: 129 Ignored non IPv4 packet: 129 TIME: 2016-01-06 16:28:55.552 IP: 172.16.0.2 (68:5:ca:7:6f:30) > 255.255.255.255 (ff:ff:ff:ff:ff:ff) OP: 2 (BOOTPREPLY) HTYPE: 1 (Ethernet) HLEN: 6 HOPS: 0 XID: a539eab7 SECS: 0 FLAGS: 7f80 CIADDR: 0.0.0.0 YIADDR: 192.168.200.2 SIADDR: 172.16.0.2 GIADDR: 0.0.0.0 CHADDR: 4c:5e:0c:0b:e8:02:00:00:00:00:00:00:00:00:00:00 SNAME: . FNAME: . OPTION: 53 ( 1) DHCP message type 2 (DHCPOFFER) OPTION: 54 ( 4) Server identifier 172.16.0.2 OPTION: 51 ( 4) IP address leasetime 600 (10m) OPTION: 1 ( 4) Subnet mask 255.255.255.192 OPTION: 3 ( 4) Routers 192.168.200.1 OPTION: 6 ( 4) DNS server 10.0.0.11 OPTION: 82 ( 18) Relay Agent Information Circuit-ID 00:04:03:ea:01:01 Remote-ID 00:06:00:12:cf:86:45:e0 Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 подключал dhcp server напрямую к коммутатору так же не выдает Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 ну так какие мысли ???))))))))))) Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 6, 2016 возможно я ошибаюсь, уже все записи свои по dhcp/opt82 похерил: class "vlan-1002" { match if ( binary-to-ascii(10, 8, "", substring(option agent.circuit-id, 2, 2)) = "1002" ); } Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
zhenya` Posted January 6, 2016 Тут конфиг непричем. Видно же, что оффер уходит, но до клиента не доходит. Дело в коммутаторе, поиграйте с софтом. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
rootbmb Posted January 6, 2016 Так конфиг на свиче дефолтный. И настроен по минимум. В acl тоже пустые. Может есть какие то дефолтные ограничения ? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 6, 2016 Тут конфиг непричем. Видно же, что оффер уходит, но до клиента не доходит. да да!!! так не работает эти ответы, что вы показали, с match на vlan в конфиге dhcp-server? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 ну они в include "/etc/dhcp/switch/u1.conf" Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 (edited) все работает по этой же схеме на други коммутаторах, у меня от 6 производителей коммутаторы и все работают, а эти алкатели нет (((((( Edited January 6, 2016 by OvNazu Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 6, 2016 ну они в include "/etc/dhcp/switch/u1.conf" да это понятно, просто уточняю, что этот ответ от dhcp: 10:55:31.699563 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 363) 172.16.0.2.67 > 192.168.200.2.68: BOOTP/DHCP, Reply, length 335, xid 0xb2e368bf, secs 3072, Flags [none] Your-IP 192.168.200.2 Server-IP 172.16.0.2 Client-Ethernet-Address e8:03:9a:2f:84:43 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 172.16.0.2 Lease-Time Option 51, length 4: 600 Subnet-Mask Option 1, length 4: 255.255.255.192 Domain-Name Option 15, length 9: "intset.ru" Default-Gateway Option 3, length 4: 192.168.200.1 Domain-Name-Server Option 6, length 4: 10.0.0.11 Classless-Static-Route Option 121, length 13: (10.0.0.0/8:192.168.200.1),(172.16.0.0/16:192.168.200.1) Classless-Static-Route-Microsoft Option 249, length 13: (10.0.0.0/8:192.168.200.1),(172.16.0.0/16:192.168.200.1) Agent-Information Option 82, length 18: Circuit-ID SubOption 1, length 6: ^@^D^CM-j^A^A Remote-ID SubOption 2, length 8: ^@^F^@^RM-OM-^FEM-` сервер отдал при конфиге: class "port-1" { match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } или все же class "port-1" { match if ( binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 сервер отдал при конфиге: class "port-1" { match if ( binary-to-ascii(10, 16, "", substring(option agent.circuit-id, 2, 2)) = "1002" and binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1)) = "1" ); } Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
axisBeam Posted January 6, 2016 тогда Тут конфиг непричем. Видно же, что оффер уходит, но до клиента не доходит. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
OvNazu Posted January 6, 2016 (edited) понятно ))))), а где в конфиге свича ошибся??? сделал как в оф.доках у кого есть опыт использования alcatel ls6224 помогите Edited January 6, 2016 by OvNazu Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
zhenya` Posted January 6, 2016 Если оффер есть, конфиг дхцп верный. Говорю софт поперебирайте. Такое бывает, что ломают функционал.. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
rootbmb Posted January 6, 2016 Ладно завтра проверю Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
zvukovik Posted January 6, 2016 Давно было дело, кусок конфига, всё работало. interface range ethernet g(1-2) switchport trunk allowed vlan add 701 exit interface range ethernet g(1-2) switchport trunk allowed vlan add 771 exit ip dhcp snooping ip dhcp snooping database no ip dhcp snooping verify ip dhcp snooping vlan 701 interface ethernet g1 ip dhcp snooping trust exit interface ethernet g2 ip dhcp snooping trust exit Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...