Перейти к содержимому
Калькуляторы

Как переписать опцию 82

Итак, есть коммутатор:

  SNR-S2960-24G Device, Compiled on Nov 16 13:52:51 2012
 SoftWare Version 6.2.139.118
 BootRom Version 4.22.1
 HardWare Version 1.0.1
 CPLD Version 1.2
 Device serial number A20004EK9P
 Copyright (C) 2012 NAG LLC
 All rights reserved
 Last reboot is cold reset.
 Uptime is 0 weeks, 2 days, 16 hours, 0 minutes

 

Включен снупинг и вставка опции 82:

 

ip dhcp snooping enable
ip dhcp snooping binding enable
!
ip dhcp snooping information enable
ip dhcp snooping information option subscriber-id format hex

 

DHCP Snooping is enabled
DHCP Snooping maxnum of action info:10
DHCP Snooping limit rate is 100 pps, switch ID 00-03-0f-25-fb-c4
DHCP Snooping droped packets 583, discarded packets 0
DHCP Snooping alarm count 19, binding count 204,
static binding count 0, from shell 0, from server 0
expired binding 0, request binding 0

interface       trust      action     recovery   alarm num  bind num
--------------- ---------- ---------- ---------- ---------- ----------
Ethernet1/1     untrust    none       0          6          10
Ethernet1/2     untrust    none       0          2          27
Ethernet1/3     untrust    none       0          3          30
Ethernet1/4     untrust    none       0          5          19
Ethernet1/5     untrust    none       0          2          17
Ethernet1/6     untrust    none       0          0          22
Ethernet1/7     untrust    none       0          1          18
Ethernet1/8     untrust    none       0          0          16
Ethernet1/9     untrust    none       0          0          14
Ethernet1/10    untrust    none       0          0          0
Ethernet1/11    untrust    none       0          0          4
Ethernet1/12    untrust    none       0          0          15
Ethernet1/13    untrust    none       0          0          10
Ethernet1/14    untrust    none       0          0          0
Ethernet1/15    untrust    none       0          0          2
Ethernet1/16    untrust    none       0          0          0
Ethernet1/17    untrust    none       0          0          0
Ethernet1/18    untrust    none       0          0          0
Ethernet1/19    untrust    none       0          0          0
Ethernet1/20    untrust    none       0          0          0
Ethernet1/21    untrust    none       0          0          0
Ethernet1/22    untrust    none       0          0          0
Ethernet1/23    untrust    none       0          0          0
Ethernet1/24    untrust    none       0          0          0
Ethernet1/25    trust      none       0          0          0
Ethernet1/26    trust      none       0          0          0
Ethernet1/27    trust      none       0          0          0
Ethernet1/28    trust      none       0          0          0

 

Все вставляется, записи в биндинге создаются. Но за свитчем есть еще некоторое количество оборудования, которое тоже вставляет опцию 82. Так вот, хотелось бы эту опцию на SNR переписать, чтобы в качестве remote id вставился MAC SNRа. В мануале написано только про сохранение опции на недоверенном порту или про дроп запросов с опцией. Это вообще возможно?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Он по умолчанию в remote id пихает мак свитча.

 Agent information{82}=
   sub{1}={000603E901000004} #subscriber id (03E9 - vlan, последний байт - порт)
   sub{2}={00030F1E3494} #remote id (mac свитча)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Как определить формат рации я знаю. Речь идет о переписывании уже вставленной опции.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Вроде должен по умолчанию переписывать

ip dhcp relay information policy {drop | keep | replace}

This command is used to set the retransmitting policy of the system for the received DHCP request message which contains option 82. The drop mode means that if the message has option82, then the system will drop it without processing; keep mode means that the system will keep the original option 82 segment in the message, and forward it to the server to process; replace mode means that the system will replace the option 82 segment in the existing message with its own option 82, and forward the message to the server to process. The “no ip dhcp relay information policy” will set the retransmitting policy of the option 82 DCHP message as “replace”.

Пример конфигурации

ip forward-protocol udp bootps
ip dhcp relay information option
ip dhcp relay information option subscriber-id format hex
ip dhcp relay share-vlan 1 sub-vlan 1001
...
interface Vlan1
ip address a.a.a.a 255.255.240.0
 !forward protocol udp 67(active)!
ip helper-address x.x.x.x
!ip dhcp relay information policy {drop | keep | replace}

Или вам нужно чтобы SNR менял только remote id не трогая circuit id ?

Если так - то сомневаюсь что это возможно.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Join the conversation

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

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.