Jump to content

Recommended Posts

Posted (edited)

Здравствуйте. Купил б.у. Zyxel ES-2024A и надо реализовать dhcp relay на нем

 

test# show running-config
 Building configuration...

 Current configuration:

vlan 1
 name 1
 normal ""
 fixed 25-26
 forbidden 1-24
 untagged 1-26
 ip address default-management 172.16.4.200 255.255.0.0
exit
vlan 400
 normal 26
 fixed 1-25
 forbidden ""
 untagged 1-24
exit
interface port-channel 1
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 2
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 3
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 4
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 5
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 6
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 7
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 8
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 9
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 10
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 11
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 12
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 13
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 14
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 15
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 16
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 17
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 18
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 19
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 20
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 21
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 22
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 23
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 24
 pvid 400
 bmstorm-limit 100
 loopguard
exit
interface port-channel 25
 name uplink
 diffserv
exit
hostname test
time timezone 300
timesync server 172.16.0.1
timesync ntp
loopguard
snmp-server contact rootbmb@gmail.com location rus
dhcp smart-relay
dhcp smart-relay helper-address 172.16.0.2
dhcp smart-relay option
dhcp smart-relay information
syslog server 172.16.3.100 level 4

 

dhcpd.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 300;
max-lease-time 7200;
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))) );
} else {
       log( info,concat("*Leased ",binary-to-ascii(10,8,".",leased-address)," (without opt82)") );
}
log(info, "***");


shared-network "clients" {
   subnet 172.16.0.0  netmask 255.255.0.0 { }

subnet 192.168.100.0 netmask 255.255.255.192 {
       option subnet-mask 255.255.255.192;
       option ms-classless-static-routes 8, 10, 192, 168, 100, 1, 16, 172, 16, 192, 168, 100, 1;
       option rfc3442-classless-static-routes 8, 10, 192, 168, 100, 1, 16, 172, 16, 192, 168, 100, 1;
       option routers 192.168.100.1;
include "/etc/dhcp/switch/es2024a";

}


}

 

include "/etc/dhcp/switch/es2024a";

class "vlan400"{match if ( binary-to-ascii(10, 16, "",  substring(option agent.circuit-id, 2, 2)) = "400"); }
pool {range 192.168.100.3 192.168.100.50; allow members of "vlan400"; }

 

dhcpdump

 

Ignored non IPv4 packet: 129
Ignored non IPv4 packet: 129
 TIME: 2016-02-27 12:10:31.902
   IP: 172.16.4.200 (0:13:49:ff:3b:e3) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
   OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
 HLEN: 6
 HOPS: 0
  XID: 11d4388d
 SECS: 0
FLAGS: 7f80
CIADDR: 192.168.30.135
YIADDR: 192.168.30.135
SIADDR: 172.16.0.2
GIADDR: 0.0.0.0
CHADDR: 90:f6:52:5e:5e:d5:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         172.16.0.2
OPTION:  51 (  4) IP address leasetime      300 (5m)
OPTION:   1 (  4) Subnet mask               255.255.255.192
OPTION:   3 (  4) Routers                   192.168.30.129
OPTION:   6 (  4) DNS server                10.0.0.11
OPTION:  15 (  9) Domainname                intset.ru
OPTION: 121 ( 13) Classless Static Route    10ac10c0a81e8108 ........
                                           0ac0a81e81       .....
OPTION: 249 ( 13) MSFT - Classless route    10ac10c0a81e8108 ........
                                           0ac0a81e81       .....
---------------------------------------------------------------------------

 TIME: 2016-02-27 12:10:36.542
   IP: 172.16.4.200 (0:13:49:ff:3b:e3) > 172.16.0.2 (0:4:23:88:23:c9)
   OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
 HLEN: 6
 HOPS: 1
  XID: 363a0a8c
 SECS: 3506
FLAGS: 7f80
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 172.16.4.200
CHADDR: a8:f9:4b:7f:fc:00:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
OPTION:  61 (  7) Client-identifier         01:a8:f9:4b:7f:fc:00
OPTION:  51 (  4) IP address leasetime      -1 ()
OPTION:  12 (  0) Host name
OPTION:  60 (  7) Vendor class identifier   MES2124
OPTION:  55 ( 11) Parameter Request List      1 (Subnet mask)
                                             3 (Routers)
                                            66 (TFTP server name)
                                            67 (Bootfile name)
                                            54 (Server identifier)
                                           125 (???)
                                           129 (???)
                                           150 (???)
                                             6 (DNS server)
                                            15 (Domainname)
                                           100 (Printer Name)

OPTION:  82 ( 10) Relay Agent Information
                 Circuit-ID    00:19:00:01:74:65:73:74

Из дампа видно что он в Circuit-ID прописал 25 порт и vlan1, а должен 6 порт и vlan400. Он перехватывает запросы на vlan1 и адреса получает не верные.

Кто сталкивался и как решил эту проблему или может я что то не правильно делаю ??

Edited by rootbmb
Posted

Кстати оьратине внимание у Вас 1 и 400 vlan прописаны как untagget

 

vlan 1

name 1

normal ""

fixed 25-26

forbidden 1-24

untagged 1-26

ip address default-management 172.16.4.200 255.255.0.0

exit

vlan 400

normal 26

fixed 1-25

forbidden ""

untagged 1-24

Posted

Скорее всего 1 влан это управление, но почему то нет шлюза. Без него сислог к примеру не будет работать, который прописан в конфиге.

400 влан явно юзерский.

Работали и работаем много с этими свичами, но по пппое

Posted (edited)

У меня работает только при таком конфиге его младший собрат ES-2108-G.

Обязательно поставить двух значный hostname иначе прилетает непонятного значения MAC.

 

https://zyxel.ru/kb/1307 - пруф того, что адрес управления должен быть в обоих VLAN

post-44541-036965800 1457067058_thumb.png

post-44541-000993900 1457067067_thumb.png

Edited by BAHbKA
Posted

400 влан это клиенский, а 1 это менеджмент просто сеть перестраивается тяжело отойти от первого влана

так на конфиге и в правду входяший 25 порт в акцесе так это не проблема могу и в транк закинуть разницы не будет, но в влан400 25 порт в транке так что должно по сути работать )))

просто не могу понять почему он перехватывает запросы к дхцп, но в запросе приходит влан1 и 25 порт ((( хотя должен в запросе 6 порт и влан400

Posted

Какая разница на каком. Открой ссылку на kb zyxel. В моем посте. У зикселей старых обязательно адрес управления в обоих вилан

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.