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

Rupreht

Пользователи
  • Публикации

    2
  • Зарегистрирован

  • Посещение

Все публикации пользователя Rupreht


  1. Вот накидал Makefile для афтоматизации requests = *.xml export OPENSSL_CONF = ${HOME}/cert/openssl/openssl.cnf sign: ${requests} ${requests}: FORCE @rm -f ${@:.xml=.bin} @/usr/local/bin/openssl smime -sign -in $@ -out ${@:.xml=.bin} -binary -signer carm.pem -outform DER В Линуксе: make sign В любимой Фре: gmake sign подписывает все файлы в текущей директории с расширением *.xml (можно чуть допилить чтоб по директориям раскладывал)
  2. Что то не так в работе кеша. Схема такая: Между сервером db2dhcp и клиентом стоит железяка с включенным dhcp_relay. Клиент получает (51 Address Time 4 IP Address Lease Time) code type value 51 2 60 UINT4 2 Четырёхбайтовое число. %cat db2dhcp.conf ... DHCPCacheTTL = 36000 DBType = MySQL DBServerAddress = localhost DBServerPort = 3306 ... log 2011-03-29 17:00:55 [40737:34376559296] Got DHCPDISCOVER (1) message from client 00:1B:11:B5:DE:D5 on em1/10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:00:55 [40737:34376559296] DEBUG: Adding DHCP message to empty queue 'DHCP requests' 2011-03-29 17:00:55 [40737:34376559296] DEBUG: Queue (DHCP requests) length now is: 1, new requests: 1 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Trying to get DHCP request from queue 'DHCP requests'. 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Parsing DHCP message and preparing SQL statement. 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found network device variable: DEV-NETWORK-INT = "167843072" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found DHCP header variable: CLI-GIADDR = "0A010102" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found DHCP header variable: CLI-ETHER-ADDR = "001B11B5DED5" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found DHCP options variable: OPT82-REMOTE-ID = "001E58A92983" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found DHCP options variable: OPT82-PORT = "0F" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found DHCP options variable: OPT82-REMOTE-ID = "001E58A92983" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Found DHCP options variable: OPT82-PORT = "0F" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Executing SQL statement "SELECT code, type, value FROM dhcp_subnets WHERE subnet = '167843072' and CONV('0A010102', 16, 10) = 0 UNION SELECT code, type, value FROM dhcp_clients_by_ether WHERE ether = '001B11B5DED5' AND '001E58A92983' = '' AND '0F' = '' UNION SELECT code, type, value FROM dhcp_clients_by_relay WHERE relay_id = '001E58A92983' AND relay_port = '0F' ORDER BY CODE" 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Fetched 4 rows, 3 fields from DB. 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Option 'DHCP server ID' is not set. Set server ID = 10.1.21.104 (interface IP address). 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Added response for client 00:1B:11:B5:DE:D5/10.1.1.252 (relay: 10.1.1.2) to DHCP cache. 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Adding DHCP message to empty queue 'Offers queue for device em1' 2011-03-29 17:00:55 [40737:34376865536] DEBUG: Queue (Offers queue for device em1) length now is: 1, new requests: 1 2011-03-29 17:00:55 [40737:34376865536] DEBUG: DHCP request removed from queue 'DHCP requests'. Queue len now is: 0, new requests: 0 2011-03-29 17:00:56 [40737:34376559296] Sending DHCPOFFER (2) to 00:1B:11:B5:DE:D5/10.1.1.252 via 10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:00:56 [40737:34376559296] DEBUG: DHCP request removed from queue 'Offers queue for device em1'. Queue len now is: 0, new requests: 0 2011-03-29 17:00:56 [40737:34376559296] Got DHCPREQUEST (3) message from client 00:1B:11:B5:DE:D5 on em1/10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:00:56 [40737:34376559296] DEBUG: Adding DHCP message to empty queue 'DHCP requests' 2011-03-29 17:00:56 [40737:34376559296] DEBUG: Queue (DHCP requests) length now is: 1, new requests: 1 2011-03-29 17:00:56 [40737:34376865088] DEBUG: Trying to get DHCP request from queue 'DHCP requests'. 2011-03-29 17:00:56 [40737:34376865088] Found response for client 00:19:5B:14:7D:82 from relay 10.1.1.2 in DHCP cache. 2011-03-29 17:00:56 [40737:34376865088] DEBUG: Adding DHCP message to empty queue 'Ack queue for device em1' 2011-03-29 17:00:56 [40737:34376865088] DEBUG: Queue (Ack queue for device em1) length now is: 1, new requests: 1 2011-03-29 17:00:56 [40737:34376865088] DEBUG: DHCP request removed from queue 'DHCP requests'. Queue len now is: 0, new requests: 0 2011-03-29 17:00:56 [40737:34376559296] DEBUG: Trying to get DHCP request from queue 'Ack queue for device em1'. 2011-03-29 17:00:56 [40737:34376559296] Sending DHCPACK (5) to 00:1B:11:B5:DE:D5/10.1.1.252 via 10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:00:56 [40737:34376559296] DEBUG: DHCP request removed from queue 'Ack queue for device em1'. Queue len now is: 0, new requests: 0 2011-03-29 17:01:57 [40737:34376559296] Got DHCPDISCOVER (1) message from client 00:1B:11:B5:DE:D5 on em1/10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:01:57 [40737:34376559296] DEBUG: Adding DHCP message to empty queue 'DHCP requests' 2011-03-29 17:01:57 [40737:34376559296] DEBUG: Queue (DHCP requests) length now is: 1, new requests: 1 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Trying to get DHCP request from queue 'DHCP requests'. 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Flushing cache: last flush ts - 1301396448, flush period - 60, now is 1301396517. 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Cache flushed. Total 0 nodes deleted. 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Parsing DHCP message and preparing SQL statement. 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found network device variable: DEV-NETWORK-INT = "167843072" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found DHCP header variable: CLI-GIADDR = "0A010102" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found DHCP header variable: CLI-ETHER-ADDR = "001B11B5DED5" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found DHCP options variable: OPT82-REMOTE-ID = "001E58A92983" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found DHCP options variable: OPT82-PORT = "0F" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found DHCP options variable: OPT82-REMOTE-ID = "001E58A92983" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Found DHCP options variable: OPT82-PORT = "0F" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Executing SQL statement "SELECT code, type, value FROM dhcp_subnets WHERE subnet = '167843072' and CONV('0A010102', 16, 10) = 0 UNION SELECT code, type, value FROM dhcp_clients_by_ether WHERE ether = '001B11B5DED5' AND '001E58A92983' = '' AND '0F' = '' UNION SELECT code, type, value FROM dhcp_clients_by_relay WHERE relay_id = '001E58A92983' AND relay_port = '0F' ORDER BY CODE" 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Fetched 4 rows, 3 fields from DB. 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Option 'DHCP server ID' is not set. Set server ID = 10.1.21.104 (interface IP address). 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Update cached data for client 00:1B:11:B5:DE:D5/10.1.1.252. 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Adding DHCP message to empty queue 'Offers queue for device em1' 2011-03-29 17:01:57 [40737:34376864640] DEBUG: Queue (Offers queue for device em1) length now is: 1, new requests: 1 2011-03-29 17:01:57 [40737:34376864640] DEBUG: DHCP request removed from queue 'DHCP requests'. Queue len now is: 0, new requests: 0 2011-03-29 17:01:57 [40737:34376559296] Sending DHCPOFFER (2) to 00:1B:11:B5:DE:D5/10.1.1.252 via 10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:01:57 [40737:34376559296] DEBUG: DHCP request removed from queue 'Offers queue for device em1'. Queue len now is: 0, new requests: 0 2011-03-29 17:01:58 [40737:34376559296] Got DHCPREQUEST (3) message from client 00:1B:11:B5:DE:D5 on em1/10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:01:58 [40737:34376559296] DEBUG: Adding DHCP message to empty queue 'DHCP requests' 2011-03-29 17:01:58 [40737:34376559296] DEBUG: Queue (DHCP requests) length now is: 1, new requests: 1 2011-03-29 17:01:58 [40737:34376864192] DEBUG: Trying to get DHCP request from queue 'DHCP requests'. 2011-03-29 17:01:58 [40737:34376864192] Found response for client 00:19:5B:14:7D:82 from relay 10.1.1.2 in DHCP cache. 2011-03-29 17:01:58 [40737:34376864192] DEBUG: Adding DHCP message to empty queue 'Ack queue for device em1' 2011-03-29 17:01:58 [40737:34376864192] DEBUG: Queue (Ack queue for device em1) length now is: 1, new requests: 1 2011-03-29 17:01:58 [40737:34376864192] DEBUG: DHCP request removed from queue 'DHCP requests'. Queue len now is: 0, new requests: 0 2011-03-29 17:01:58 [40737:34376559296] DEBUG: Trying to get DHCP request from queue 'Ack queue for device em1'. 2011-03-29 17:01:58 [40737:34376559296] Sending DHCPACK (5) to 00:1B:11:B5:DE:D5/10.1.1.252 via 10.1.21.104 (relay 10.1.1.2) 2011-03-29 17:01:58 [40737:34376559296] DEBUG: DHCP request removed from queue 'Ack queue for device em1'. Queue len now is: 0, new requests: 0 OS: FreeBSD 8.1-RELEASE %ldd db2dhcp libmysqlclient.so.16 => /usr/local/lib/mysql/libmysqlclient.so.16 (0x800658000) libcrypt.so.5 => /lib/libcrypt.so.5 (0x8007ce000) libm.so.5 => /lib/libm.so.5 (0x8008e7000) libz.so.5 => /lib/libz.so.5 (0x800a06000) libpcap.so.7 => /lib/libpcap.so.7 (0x800b1b000) libthr.so.3 => /lib/libthr.so.3 (0x800c4c000) libc.so.7 => /lib/libc.so.7 (0x800d64000)