<?xml version="1.0" encoding="koi8-r"?>
<rss version="0.91">
<channel>
    <title>OpenForum RSS: isc-dhcpd option 82</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html</link>
    <description>возникло несколько вопросов&lt;br&gt;&lt;br&gt;-dhcpd42 для работы option 82 с сокетом надо собирать?&lt;br&gt;-как сверить match в dhcpd в логах нет?&lt;br&gt;-поставил circuit и remote равными 0 для проверки все равно не получается. &lt;br&gt;&lt;br&gt;dhcpd.conf&lt;br&gt;subnet 10.0.0.0 netmask 255.0.0.0 &#123;&lt;br&gt;        class &quot;1&quot; &#123;&lt;br&gt;                match if (binary-to-ascii(10,8,&quot;&quot;,suffix(option agent.circuit-id,1)) = &quot;0&quot;) and&lt;br&gt;                        (binary-to-ascii(16,8,&quot;&quot;,substring(option agent.remote-id,2,6)) = &quot;0&quot;);&lt;br&gt;        &#125;&lt;br&gt;        pool &#123;&lt;br&gt;                range 10.1.255.2;&lt;br&gt;                allow members of &quot;1&quot;;&lt;br&gt;        &#125;&lt;br&gt;&lt;br&gt;tcpdump -i em1 -nn -s 0 -vvv port 67 or port 68&lt;br&gt;17:23:04.943370 IP (tos 0x0, ttl 64, id 0, offset 0, flags &#091;none&#093;, proto UDP (17), length 568)&lt;br&gt;    0.0.0.0.68 &amp;gt; 255.255.255.255.67: &#091;udp sum ok&#093; BOOTP/DHCP, Request from b8:a3:86:14:1d:c8, length 540, xid 0x40ad2c35, Flags &#091;none&#093; (0x0000)&lt;br&gt;          Client-Ethernet-Address b8:a3:86:14:1d:c8&lt;br&gt;          Vendor-rfc1048 Extensions&lt;br&gt;            Magic Cookie 0x63825363&lt;br&gt;            DHCP-Messa</description>

<item>
    <title>isc-dhcpd option 82 (АлексейТ)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#9</link>
    <pubDate>Sun, 10 Feb 2013 11:29:58 GMT</pubDate>
    <description>поставил получение ip стандартно с hardware ethernet с вышеуказанным логированием получил в логах строку:&lt;br&gt;&lt;br&gt;Lease for 10.1.255.2 Swith port: 0.1.0.5 Switch MAC: 64:70:2:91:44:f Switch IP: 0.0.0.0 VLAN: 5 MAC on the port: b8:a3:86:14:1d:c3&lt;br&gt;&lt;br&gt;подправил conf по полученным данным, похоже вопрос решен!&lt;br&gt;</description>
</item>

<item>
    <title>isc-dhcpd option 82 (АлексейТ)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#8</link>
    <pubDate>Sun, 10 Feb 2013 09:15:52 GMT</pubDate>
    <description>еще как не стараюсь не пишет в логи данные, которые приходят с option 82&lt;br&gt;конфигов по логам перепробовал штук 5, вот последний:&lt;br&gt;if exists agent.circuit-id&lt;br&gt;&#123;&lt;br&gt;log (&lt;br&gt;info, concat( &quot; Lease for &quot;, binary-to-ascii (10, 8, &quot;.&quot;, leased-address),&lt;br&gt;&quot; Swith port: &quot;,&lt;br&gt;binary-to-ascii (10, 8, &quot;.&quot;, option agent.circuit-id),&lt;br&gt;&quot; Switch MAC: &quot;,&lt;br&gt;binary-to-ascii (16, 8, &quot;:&quot;, suffix ( option agent.remote-id, 6)),&lt;br&gt;&quot; Switch IP: &quot;,&lt;br&gt;binary-to-ascii(10, 8, &quot;.&quot;, packet(24, 4)),&lt;br&gt;&quot; VLAN: &quot;,&lt;br&gt;binary-to-ascii (10, 16, &quot;&quot;, substring( option agent.circuit-id, 2, 2)),&lt;br&gt;&quot; MAC on the port: &quot;,&lt;br&gt;binary-to-ascii (16, 8, &quot;:&quot;, substring(hardware, 1, 6))&lt;br&gt;)&lt;br&gt;);&lt;br&gt;&#125;&lt;br&gt; &lt;br&gt;&lt;br&gt;</description>
</item>

<item>
    <title>isc-dhcpd option 82 (АлексейТ)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#7</link>
    <pubDate>Sun, 10 Feb 2013 07:34:32 GMT</pubDate>
    <description>я просто думаю, что у меня ошибка именно в match, но не знаю как это проверить :(&lt;br&gt;</description>
</item>

<item>
    <title>isc-dhcpd option 82 (alexmasz)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#6</link>
    <pubDate>Sun, 10 Feb 2013 06:40:24 GMT</pubDate>
    <description>&amp;gt; как match писать?&lt;br&gt;&amp;gt; match if (binary-to-ascii(10,8,&quot;&quot;,suffix(option agent.circuit-id,1)) = &quot;10004&quot;) and &lt;br&gt;&amp;gt;  (binary-to-ascii(16,8,&quot;&quot;,substring(option agent.remote-id,2,6)) = &quot;64700291440f&quot;); &lt;br&gt;&lt;br&gt;у меня так:&lt;br&gt;&lt;br&gt;log(info, &quot;***&quot;);&lt;br&gt;if exists agent.circuit-id &#123;&lt;br&gt;        log( info,concat(&quot;*Leased &quot;,binary-to-ascii(10,8,&quot;.&quot;,leased-address),&quot; (with opt82)&quot;) );&lt;br&gt;        log( info,concat(&quot;*Remote-ID: &quot;,binary-to-ascii(16,8,&quot;:&quot;,substring(option agent.remote-id,2,6))) );&lt;br&gt;        log( info,concat(&quot;*Port: &quot;,binary-to-ascii(10,8,&quot;&quot;,suffix(option agent.circuit-id,1))) );&lt;br&gt;&#125; else &#123;&lt;br&gt;        log( info,concat(&quot;*Leased &quot;,binary-to-ascii(10,8,&quot;.&quot;,leased-address),&quot; (without opt82)&quot;) );&lt;br&gt;&#125;&lt;br&gt;log(info, &quot;***&quot;);&lt;br&gt;&lt;br&gt;class &quot;247-10-1/4&quot; &#123; match if option agent.circuit-id=&quot;Vlan100+Ethernet1/4&quot; and option agent.remote-id=&quot;247-10&quot;; &#125;&lt;br&gt;&lt;br&gt;shared-network vlan100 &#123;&lt;br&gt;        subnet 192.168.100.0 netmask 255.255.255.0 &#123;&lt;br&gt;                option domain-name-servers 192.168.100.2;&lt;br&gt;                option domain-name &quot;dns.here&quot;;&lt;br&gt;                </description>
</item>

<item>
    <title>isc-dhcpd option 82 (АлексейТ)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#5</link>
    <pubDate>Sat, 09 Feb 2013 19:15:35 GMT</pubDate>
    <description>попробовал tshark&lt;br&gt;&lt;br&gt;Option: (t=82,l=14) Agent Information Option&lt;br&gt;        Option: (82) Agent Information Option&lt;br&gt;        Length: 14&lt;br&gt;        Value: 010400010004020664700291440f&lt;br&gt;        Agent Circuit ID: 00010004&lt;br&gt;        Agent Remote ID: 64700291440f&lt;br&gt;End Option&lt;br&gt;&lt;br&gt;как match писать?&lt;br&gt;&lt;br&gt;match if (binary-to-ascii(10,8,&quot;&quot;,suffix(option agent.circuit-id,1)) = &quot;10004&quot;) and&lt;br&gt; (binary-to-ascii(16,8,&quot;&quot;,substring(option agent.remote-id,2,6)) = &quot;64700291440f&quot;);&lt;br&gt;</description>
</item>

<item>
    <title>isc-dhcpd option 82 (alexmasz)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#4</link>
    <pubDate>Sat, 09 Feb 2013 18:35:26 GMT</pubDate>
    <description>&amp;gt;&amp;gt; спасибо за пример конфига, но меня интересует, как мне узнать, что получает &lt;br&gt;&amp;gt;&amp;gt; dhdcpd в опции 82 &lt;br&gt;&amp;gt;Agent-Information Option 82, length 6:&lt;br&gt;&amp;gt; Circuit-ID SubOption 1, length 1: 0&lt;br&gt;&amp;gt; Remote-ID SubOption 2, length 1: 0&lt;br&gt;&lt;br&gt;это он и получает, только затея с нулями, извините, какая-то дурацкая&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; конфиг:&lt;br&gt;&lt;br&gt;ddns-update-style interim;&lt;br&gt;default-lease-time 3600;&lt;br&gt;max-lease-time 7200;&lt;br&gt;authoritative;&lt;br&gt;log-facility local7;&lt;br&gt;ignore client-updates;&lt;br&gt;&lt;br&gt;log(info, &quot;***&quot;);&lt;br&gt;if exists agent.circuit-id &#123;&lt;br&gt;        log( info,concat(&quot;*Leased &quot;,binary-to-ascii(10,8,&quot;.&quot;,leased-address),&quot; (with opt82)&quot;) );&lt;br&gt;        log( info,concat(&quot;*Remote-ID: &quot;,binary-to-ascii(16,8,&quot;:&quot;,substring(option agent.remote-id,2,6))) );&lt;br&gt;        log( info,concat(&quot;*Port: &quot;,binary-to-ascii(10,8,&quot;&quot;,suffix(option agent.circuit-id,1))) );&lt;br&gt;&#125; else &#123;&lt;br&gt;        log( info,concat(&quot;*Leased &quot;,binary-to-ascii(10,8,&quot;.&quot;,leased-address),&quot; (without opt82)&quot;) );&lt;br&gt;&#125;&lt;br&gt;log(info, &quot;***&quot;);&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; дамп:&lt;br&gt;&lt;br&gt;20:29:01.729003 IP (tos 0x0, ttl 128, id 22004, offset 0, flags &#091;none&#093;, pr</description>
</item>

<item>
    <title>isc-dhcpd option 82 (John)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#3</link>
    <pubDate>Sat, 09 Feb 2013 17:49:49 GMT</pubDate>
    <description>&amp;gt; спасибо за пример конфига, но меня интересует, как мне узнать, что получает &lt;br&gt;&amp;gt; dhdcpd в опции 82 &lt;br&gt;&amp;gt; данный конфиг также опробовал, без изменений &lt;br&gt;&lt;br&gt;tcpdump, wireshark, ...&lt;br&gt;</description>
</item>

<item>
    <title>isc-dhcpd option 82 (АлексейТ)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#2</link>
    <pubDate>Sat, 09 Feb 2013 17:35:14 GMT</pubDate>
    <description>спасибо за пример конфига, но меня интересует, как мне узнать, что получает dhdcpd в опции 82&lt;br&gt;&lt;br&gt;данный конфиг также опробовал, без изменений&lt;br&gt;</description>
</item>

<item>
    <title>isc-dhcpd option 82 (John)</title>
    <link>https://opennet.me/openforum/vsluhforumID1/94359.html#1</link>
    <pubDate>Sat, 09 Feb 2013 16:12:00 GMT</pubDate>
    <description>class &quot;logging&quot; &#123;&lt;br&gt;    log(info, concat(&lt;br&gt;        &quot;VLAN = &quot;, binary-to-ascii(10, 16, &quot;&quot;, substring(option agent.circuit-id, 2, 2)),&lt;br&gt;        &quot;, Port = &quot;, binary-to-ascii(10, 8, &quot;&quot;, substring(option agent.circuit-id, 5, 1)),&lt;br&gt;        &quot;, AgentIP = &quot;, binary-to-ascii(10, 8, &quot;.&quot;, packet(24, 4))&lt;br&gt;        )&lt;br&gt;    );&lt;br&gt;&lt;br&gt;    match if (&lt;br&gt;        exists agent.circuit-id&lt;br&gt;    );&lt;br&gt;&#125;&lt;br&gt;&lt;br&gt;class &quot;Class_1&quot; &#123;&lt;br&gt;    match if (&lt;br&gt;        (&lt;br&gt;            exists agent.circuit-id&lt;br&gt;            and&lt;br&gt;            binary-to-ascii(10, 16, &quot;&quot;, substring(option agent.circuit-id, 2, 2)) = &quot;&amp;lt;VLAN_ID&amp;gt;&quot;&lt;br&gt;        ) or (&lt;br&gt;            binary-to-ascii(10, 8, &quot;.&quot;, packet(12, 3)) = &quot;A.B.C&quot;&lt;br&gt;        )&lt;br&gt;    );&lt;br&gt;&#125;&lt;br&gt;&lt;br&gt;subnet A.B.C.0 netmask 255.255.255.0 &#123;&lt;br&gt;    pool &#123;&lt;br&gt;        option subnet-mask 255.255.255.0;&lt;br&gt;        option routers A.B.C.254;&lt;br&gt;&lt;br&gt;        deny dynamic bootp clients;&lt;br&gt;        allow members of &quot;Class_1&quot;;&lt;br&gt;&lt;br&gt;        range A.B.C.1 A.B.C.253;&lt;br&gt;    &#125;&lt;br&gt;&#125;&lt;br&gt;</description>
</item>

</channel>
</rss>
