Accton Edge Core ES 3526XA: различия между версиями
Sirmax (обсуждение | вклад) |
Sirmax (обсуждение | вклад) |
||
| Строка 167: | Строка 167: | ||
{ |
{ |
||
match if( |
match if( |
||
| − | binary-to-ascii(10, |
+ | binary-to-ascii(10, 8, "/", suffix(option agent.circuit-id, 1)) = "1" |
); |
); |
||
} |
} |
||
Версия 10:55, 23 июня 2009
Accton Edge-Core ES-3526XA
Цель статьи - описатьпроцедуру тестирования коммутатора Accton Edge-Core ES-3526XA. Планируется как замена Dlink DES-3526.
Загрузка
Наблюдаю загрузку (9600 8N1) с консоли. По первому впечатлению - не похож ни на один другой коммутатор.
Image Loader 1.0.0.2 Loading Diagnostic Image File : ES3526XA-V2_DIAG_1005.bix Diagnostic 1.0.0.5 --- Performing Power-On Self Tests (POST) --- DUMMY Test 1 ................. PASS UART Loopback Test ........... PASS DRAM Test .................... PASS I2C Bus Initialization ....... PASS Done All Pass. ------------------ DONE --------------------- Loading Runtime Image File : ES3526XA_ES3510_V11022.bix Runtime 1.1.0.22 root init done [get stackingMac done ret_val] = 1 Assigned Unit ID:[1] stacking DB: unit = 0, module type = 0 Set Transition mode ... Finish Set Transition mode ... Enter Transition mode ... Finish Transition mode ... Enter Master mode ... Load certificate files : Starting Load certificate files : Finished Finish Master mode ... Performing startup provision ... ............................................................................................................................................................................................................. Notify provision complete CLI provision has been completed Provision Complete ... Finish Provision Complete ... [get stackingMac done ret_val] = 1 *************************************************************** WARNING - MONITORED ACTIONS AND ACCESSES Station's information: Floor / Row / Rack / Sub-Rack / / / DC power supply: Power Source A: Floor / Row / Rack / Electrical circuit / / / Number of LP: Position MUX: IP LAN: Note: ********************************** User Access Verification Username:
Настройка
Не смотря на то что CLI вцелом cisco-like, это пожалуй самый неудобный в нстройке коммутатор из тех с которыми мне приходилось иметь дело.
DHCP Relay
Настройка коммутатора
Настройка достаточно простоа и вцелом аналогична другим коммутаторам (AT-8000S, Lucent LS-62..., DES- ...)
ip dhcp relay information option ip dhcp relay information option remote-id ip-address ip dhcp relay information policy replace IP DHCP relay server 172.16.251.1
Однако, отмечу что в пакете в качестве Remote-ID содержиться не ip а какой-то мусор. На данный момент у меня нет ответа от поставщика как расшифровать remote-id.
Настойка DHCPd
tshark -V -n ...
Вот пример пакета (только option 82)
Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0xa5ee3a70
Seconds elapsed: 0
Bootp flags: 0x8000 (Broadcast)
1... .... .... .... = Broadcast flag: Broadcast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 192.168.199.2 (192.168.199.2)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 172.16.251.2 (172.16.251.2)
Client MAC address: 00:1c:23:95:8d:8b (00:1c:23:95:8d:8b)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (53) DHCP Message Type
Length: 1
Value: 02
Option: (t=54,l=4) Server Identifier = 172.16.251.1
Option: (54) Server Identifier
Length: 4
Value: AC10FB01
Option: (t=51,l=4) IP Address Lease Time = 8 hours, 36 minutes, 40 seconds
Option: (51) IP Address Lease Time
Length: 4
Value: 00007918
Option: (t=1,l=4) Subnet Mask = 255.255.255.0
Option: (1) Subnet Mask
Length: 4
Value: FFFFFF00
Option: (t=3,l=4) Router = 192.168.199.254
Option: (3) Router
Length: 4
Value: C0A8C7FE
Option: (t=6,l=8) Domain Name Server
Option: (6) Domain Name Server
Length: 8
Value: C1213021C12130A0
IP Address: 193.33.48.33
IP Address: 193.33.48.160
Option: (t=82,l=16) Agent Information Option
Option: (82) Agent Information Option
Length: 16
Value: 01060004006501010206010400000000
Agent Circuit ID: 000400650101
Agent Remote ID: 010400000000
End Option
Padding
Первое впечатление, что формат Circuit ID анлогичен Dlink DES-3526 и другим коммутаторам (Если есть стандарт то хорошо бы найти докумнтацию)
Значение Circuit ID побайтно:00 04 0065 01 01
00 - Тип Circit ID (Всегда 0?) (1 байт, смещение 0)
04 - Длинна (констаната? почему такое значение?) (1 байт смещение 1)
0065 - VLAN ID (2 байта, смещение 2)
01 - Stack/Module ID (0 или 1 у stand-alone switch) 1 байт, смещение 4
01 - Port (1 байт, смещение 5)
Конфиг сервера аналогичен.
Простой пример:
class "port-1"
{
match if(
binary-to-ascii(10, 8, "/", suffix(option agent.circuit-id, 1)) = "1"
);
}
Для логов использую следующюю конструкцию:
if exists agent.circuit-id {
log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", leased-address), " is connected to interface ",
binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)), " , VLAN ",
binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 2, 2)), " on switch ",
binary-to-ascii(16, 8, ":", substring( option agent.remote-id, 2, 6))));
log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", leased-address),
"<>raw option-82 info is CID: ", binary-to-ascii (10, 8, ".", option agent.circuit-id), " AID: ",
binary-to-ascii(16, 8, ".", option agent.remote-i
В логах наблюдаю успешную выдачу IP
anarxist dhcpd: DHCPDISCOVER from 00:1c:ХХ:ХХ:ХХ:ХХ (tester) via 172.16.251.2 anarxist dhcpd: DHCPOFFER on 192.168.199.2 to 00:1c:ХХ:ХХ:ХХ:ХХ (tester) via 172.16.251.2 anarxist dhcpd: Lease for 192.168.199.2 is connected to interface 1/1 , VLAN 101 on switch 0:0:0:0 anarxist dhcpd: Lease for 192.168.199.2 raw option-82 info is CID: 0.4.0.101.1.1 AID: 1.4.0.0.0.0
DHCP Snooping
При настройке DHCP Snopping мне удалось вызвать зависание коммутатора.
Пробую настроить согласно инструкции Монблана
<PRE> ip dhcp snooping ip dhcp snooping vlan 102 ip dhcp snooping information option ip dhcp snooping information policy replace
Console#sh ip dhcp snooping Global DHCP Snooping status: disable DHCP Snooping Information Option Status: disable DHCPSNP_MGR_GetInformationRidMode:3650 DHCPSNP_MGR_GetInformationRidMode:3657 DHCPSNP_MGR_GetInformationRidMode:3664 DHCPSNP_MGR_GetInformationRidMode:3666 DHCPSNP_MGR_GetInformationRidMode:3674 DHCPSNP_MGR_GetInformationRidMode:3677 CLI_API_Show_Ip_Dhcpsnp:450,rid mode = 1 DHCP Snooping Information Option Remote ID: mac address DHCP Snooping Information Policy: replace DHCP Snooping is configured on the following VLANs: 101, Verify Source Mac-Address: enable Interface Trusted ---------- ---------- Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No Eth 1/1 No ...