faq обучение настройка
Текущее время: Чт авг 21, 2025 05:33

Часовой пояс: UTC + 3 часа




Начать новую тему Ответить на тему  [ Сообщений: 16 ]  На страницу 1, 2  След.
Автор Сообщение
 Заголовок сообщения: DHCP+Option 82. Выдача IP по ID vlan
СообщениеДобавлено: Вт июн 23, 2009 10:48 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Добрый день.
Пытаемся выдавать IP по ID вилана с сервера DHCP. На свитче 3526 настроили 2 вилана на порту 3 и 6. С 2-х клиентов, которые находятся в порту 3 и 6 соответственно, пытаемся получить IP. Удается получить адрес только если IP самого свитча находится в сегменте вилана. Т.е. 1 клиент получил IP, чтобы 2 клиент получил IP надо изменить IP свитча.
Схема такая: клиенты подключены к свитчу 3526, DHCP сервер подключен к свитчу 3612. На 3 порту свитча 3526 vlan 10.13.13.0, на 6 - 10.11.11.0.

Конфиг DHCP сервера:
Код:
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "vltele.com";
option domain-name-servers 80.244.224.250;

default-lease-time 600;
max-lease-time 7200;
# local address
local-address 10.1.2.30;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates
ddns-update-style none;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection)
log-facility local7;

#if option 82 comes

if exists agent.circuit-id
{
 log (info, concat ("Lease for",
                   binary-to-ascii (10, 8, ".",leased-address),
                   "Switch port: ",
                   binary-to-ascii (10, 8, ".", option agent.circuit-id),
                   "Switch MAC: ",
                   binary-to-ascii (16, 8, ".", option agent.remote-id)));
}
#subnet

subnet 10.1.2.0 netmask 255.255.255.0 {
 range 10.1.2.15 10.1.2.40;
 option routers 10.1.2.30;
}

#zaprosi s vlan4
subnet 10.12.12.0 netmask 255.255.255.0 {
 class "vlan4"
 {
 match if binary-to-ascii (10, 16, "", substring(option agent.circuit-id, 2, 2))="4";
 }
 pool {
 range 10.12.12.5 10.12.12.55;
 option routers 10.12.12.254;
 allow members of "vlan4";
 }
}

#zaprosi s vlan5
subnet 10.13.13.0 netmask 255.255.255.0 {
 class "vlan5"
 {
 match if (binary-to-ascii (10, 16, "", substring(option agent.circuit-id, 2, 2))="5");
 }
 pool {
 range 10.13.13.5 10.13.13.55;
 option routers 10.13.13.254;
 allow members of "vlan5";
 }
}

#zaprosi s vlan3
subnet 10.11.11.0 netmask 255.255.255.0 {
 class "vlan3"
 {
 match if (binary-to-ascii (10, 16, "", substring(option agent.circuit-id, 2, 2))="3");
 }
 pool {
 range  10.11.11.55;
 option routers 10.11.11.254;
 allow members of "vlan3";
 }
}


Кофниги свитчей:
Код:
#-------------------------------------------------------------------------------
# DGS-3612G Gigabit Ethernet Switch
# Configuration
#
# Firmware: Build 2.51.B13
# Copyright(C) 2009 D-Link Corporation. All rights reserved.
#-------------------------------------------------------------------------------


# DOUBLE_VLAN

disable double_vlan

# BASIC

config serial_port auto_logout 10_minutes
enable telnet 23
enable web 80
enable clipaging

# STORM

config traffic trap none
config traffic control 1-12 broadcast disable multicast disable unicast disable action drop threshold 131072 countdown 0 time_interval 5

# LOOP_DETECT


# GM

config sim candidate
disable sim
config sim dp_interval 30
config sim hold_time 100

# GM_H


# SYSLOG

disable syslog
config system_severity log information
config system_severity trap information
config log_save_timing on_demand

# QOS

config scheduling_mechanism strict
config scheduling 0 max_packet 1
config scheduling 1 max_packet 2
config scheduling 2 max_packet 3
config scheduling 3 max_packet 4
config scheduling 4 max_packet 5
config scheduling 5 max_packet 6
config scheduling 6 max_packet 7
config 802.1p user_priority 0 2
config 802.1p user_priority 1 0
config 802.1p user_priority 2 1
config 802.1p user_priority 3 3
config 802.1p user_priority 4 4
config 802.1p user_priority 5 5
config 802.1p user_priority 6 6
config 802.1p user_priority 7 6
enable hol_prevention
config 802.1p default_priority 1-12 0
config bandwidth_control 1-12 rx_rate no_limit tx_rate no_limit

# MIRROR

config mirror port 11 add source ports 9-10,12 rx
config mirror port 11 add source ports 9-10,12 tx
disable mirror

# TRAF-SEGMENTATION

config traffic_segmentation 1-12 forward_list all

# SSL

disable ssl
enable ssl ciphersuite RSA_with_RC4_128_MD5
enable ssl ciphersuite RSA_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite DHE_DSS_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite RSA_EXPORT_with_RC4_40_MD5
config ssl cachetimeout 600

# PORT

disable jumbo_frame
config ports 1-8 speed auto capability_advertised 100_full 1000_full flow_control disable learning enable state enable
config ports 9-12 medium_type copper speed auto capability_advertised 10_half 10_full 100_half 100_full 1000_full flow_control disable learning enable state enable
config ports 9-12 medium_type fiber speed auto capability_advertised 100_full 1000_full flow_control disable learning enable state enable

# PORT_LOCK

config port_security ports 1-12 admin_state disable max_learning_addr 1 lock_address_mode DeleteOnReset

# SNMPv3

delete snmp community public
delete snmp community private
delete snmp user initial
delete snmp group initial
delete snmp group ReadGroup
delete snmp group WriteGroup
delete snmp view restricted all
delete snmp view CommunityView all
config snmp engineID 800000ab0300195bf23f00
create snmp view restricted 1.3.6.1.2.1.1 view_type included
create snmp view restricted 1.3.6.1.2.1.11 view_type included
create snmp view restricted 1.3.6.1.6.3.10.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.11.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.15.1.1 view_type included
create snmp view CommunityView 1 view_type included
create snmp view CommunityView 1.3.6.1.6.3 view_type excluded
create snmp view CommunityView 1.3.6.1.6.3.1 view_type included
create snmp group public v1 read_view CommunityView notify_view CommunityView
create snmp group public v2c read_view CommunityView notify_view CommunityView
create snmp group initial v3 noauth_nopriv read_view restricted notify_view restricted
create snmp group private v1 read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp group private v2c read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp group ReadGroup v1 read_view CommunityView notify_view CommunityView
create snmp group ReadGroup v2c read_view CommunityView notify_view CommunityView
create snmp group WriteGroup v1 read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp group WriteGroup v2c read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp community private view CommunityView read_write
create snmp community public view CommunityView read_only
create snmp user initial initial

# MANAGEMENT

enable snmp traps
enable snmp authenticate_traps
disable snmp
enable snmp linkchange_traps
disable rmon
config snmp linkchange_traps ports 1-12 enable

# VLAN

enable pvid auto_assign
config vlan default delete 1-12
config vlan default add untagged 9
config vlan default advertisement enable
create vlan dhcp tag 2
config vlan dhcp add tagged 12
config vlan dhcp add untagged 10-11 advertisement disable
create vlan dhcp2 tag 3
config vlan dhcp2 add tagged 12 advertisement disable
create vlan dhcp3 tag 4
config vlan dhcp3 add tagged 12 advertisement disable
create vlan dhcp4 tag 5
config vlan dhcp4 add tagged 12 advertisement disable
disable qinq
disable gvrp
config gvrp 1-9,12 state disable ingress_checking enable acceptable_frame admit_all pvid 1
config gvrp 10-11 state disable ingress_checking enable acceptable_frame admit_all pvid 2

# PROTOCOL_VLAN


# QINQ

config qinq ports 1-12 missdrop disable tpid 0x8100

# RSPAN

disable rspan

# MEF

config mef_l2_protocols port 1-12 peer addr_00_0F
config mef_l2_protocols port 1-12 peer addr_10
config mef_l2_protocols port 1-12 peer addr_20_2F

# 8021X

disable 802.1x
config 802.1x auth_mode port_based
config 802.1x auth_protocol radius_eap
config 802.1x fwd_pdu system disable
config 802.1x max_users 4000
config 802.1x authorization network radius enable
config 802.1x capability ports 1-12 none
config 802.1x auth_parameter ports 1-12 direction both port_control auto quiet_period 60 tx_period 30 supp_timeout 30 server_timeout 30 max_req 2 reauth_period 3600 enable_reauth disable
config 802.1x auth_parameter ports 1-12 max_users 16

# guestvlan


# TR


# ACL

disable cpu_interface_filtering

# LIMITED_MULTICAST_RANGE


# MULTICAST_VLAN


# FDB

config fdb aging_time 300

# ADDRBIND

config address_binding ip_mac ports 1-12 forward_dhcppkt enable
disable address_binding dhcp_snoop
disable address_binding trap_log
config address_binding dhcp_snoop max_entry ports 1-12 limit no_limit

# DhcpServerScreening

config filter dhcp_server port all state disable
config filter dhcp_server illegal_server_log_suppress_duration 5min
config filter dhcp_server trap_log disable

# MAC_ADDRESS_TABLE_NOTIFICATION

disable mac_notification
config mac_notification interval 1 historysize 1
config mac_notification ports 1-12 disable

# STP

config stp version rstp
config stp maxage 20 maxhops 20 forwarddelay 15 txholdcount 3 fbpdu disable hellotime 2 lbd enable lbd_recover_timer 60
config stp priority 32768 instance_id 0
config stp mst_config_id name 00:19:5B:F2:3F:00 revision_level 0
disable stp
config stp ports 1-12 externalCost auto edge false p2p auto state enable lbd disable
config stp mst_ports 1-12 instance_id 0 internalCost auto priority 128
config stp ports 1-12 fbpdu disable

# BPDU_TUNNEL

config bpdu_tunnel ports all type none
disable bpdu_tunnel

# SAFEGUARD_ENGINE

config safeguard_engine state disable utilization rising 30 falling 20 trap_log disable mode fuzzy

# BANNER_PROMP

config command_prompt default
config greeting_message default

# SSH

config ssh algorithm 3DES enable
config ssh algorithm AES128 enable
config ssh algorithm AES192 enable
config ssh algorithm AES256 enable
config ssh algorithm arcfour enable
config ssh algorithm blowfish enable
config ssh algorithm cast128 enable
config ssh algorithm twofish128 enable
config ssh algorithm twofish192 enable
config ssh algorithm twofish256 enable
config ssh algorithm MD5 enable
config ssh algorithm SHA1 enable
config ssh algorithm RSA enable
config ssh algorithm DSA enable
config ssh authmode password enable
config ssh authmode publickey enable
config ssh authmode hostbased enable
config ssh server maxsession 8
config ssh server contimeout 120
config ssh server authfail 2
config ssh server rekey never
disable ssh

# SERVER_PROFILE


# SNTP

disable sntp
config time_zone operator + hour 0 min 0
config sntp primary 0.0.0.0 secondary 0.0.0.0 poll-interval 720
config dst disable

# LACP

config link_aggregation algorithm ip_source
config lacp_port 1-12 mode passive

# IP

config ipif_mac_mapping ipif System mac_offset 0
config ipif System ipaddress 10.1.2.254/24 vlan default
config ipif System proxy_arp disable local disable
config ipif_mac_mapping ipif dhcp mac_offset 1
create ipif dhcp 10.10.10.254/24 dhcp state enable
config ipif dhcp proxy_arp disable local disable
config ipif_mac_mapping ipif dhcp2 mac_offset 2
create ipif dhcp2 10.11.11.254/24 dhcp2 state enable
config ipif dhcp2 proxy_arp disable local disable
config ipif_mac_mapping ipif dhcp3 mac_offset 3
create ipif dhcp3 10.12.12.254/24 dhcp3 state enable
config ipif dhcp3 proxy_arp disable local disable
config ipif_mac_mapping ipif dhcp4 mac_offset 4
create ipif dhcp4 10.13.13.254/24 dhcp4 state enable
config ipif dhcp4 proxy_arp disable local disable
config ipif dhcp ip_mtu 1500
config ipif dhcp2 ip_mtu 1500
config ipif dhcp3 ip_mtu 1500
config ipif dhcp4 ip_mtu 1500
config ipif System ip_mtu 1500
disable autoconfig

# ERPS

disable erps

# WAC

config wac switch_http_port 80
config wac method local
config wac authorization network local enable
config wac authorization network radius enable
disable wac
config wac ports 1-12 aging_time 1440 idle_time infinite block_time 60

# JWAC

config jwac switch_http_port 80
config jwac clear_quarantine_server_url
config jwac radius_protocol pap
disable jwac quarantine_server_monitor
config jwac quarantine_server_error_timeout 30
enable jwac forcible_logout
enable jwac udp_filtering
enable jwac redirect
config jwac redirect destination quarantine_server delay_time 1
disable jwac
config jwac authenticate_page english
config jwac auth_failover disable
config jwac authorization network radius enable
config jwac authorization network local enable
config jwac ports 1-12 auth_mode host_based max_authenticating_host 50 aging_time 1440 idle_time infinite block_time 60

# LLDP

disable lldp
config lldp message_tx_interval 30
config lldp tx_delay 2
config lldp message_tx_hold_multiplier 4
config lldp reinit_delay 2
config lldp notification_interval 5
config lldp ports 1-12 notification disable
config lldp ports 1-12 admin_status tx_and_rx

# MBA

disable mac_based_access_control
config mac_based_access_control auth_failover disable
config mac_based_access_control authorization network radius enable local enable
config mac_based_access_control ports 1-12 state disable
config mac_based_access_control ports 1-12 mode host_based
config mac_based_access_control method local
config mac_based_access_control password default
config mac_based_access_control max_users 128

# MCFILTER


# MULTI_AUTHEN

config authentication ports 1-12 auth_mode host_based
config authentication ports 1-12 multi_authen_methods none
enable authorization network

# SNOOP

config limited_multicast_addr ports 1-12 state disable

# MLDSNP


# ACCESS_AUTHENTICATION_CONTROL

config authen_login default method local
config authen_enable default method local_enable
config authen application console login default
config authen application console enable default
config authen application telnet login default
config authen application telnet enable default
config authen application ssh login default
config authen application ssh enable default
config authen application http login default
config authen application http enable default
config authen parameter response_timeout 30
config authen parameter attempt 3
disable authen_policy
config accounting service network state disable
config accounting service shell state disable
config accounting service system state disable

# AAA_LOCAL_ENABLE_PASSWORD


# NDP

config ipv6 nd ns ipif System retrans_time 0
config ipv6 nd ra ipif System state disable life_time 1800 reachable_time 1200000 retrans_time 0 hop_limit 64 managed_flag disable other_config_flag disable min_rtr_adv_interval 198 max_rtr_adv_interval 600
config ipv6 nd ns ipif dhcp retrans_time 0
config ipv6 nd ra ipif dhcp state disable life_time 1800 reachable_time 1200000 retrans_time 0 hop_limit 64 managed_flag disable other_config_flag disable min_rtr_adv_interval 198 max_rtr_adv_interval 600
config ipv6 nd ns ipif dhcp2 retrans_time 0
config ipv6 nd ra ipif dhcp2 state disable life_time 1800 reachable_time 1200000 retrans_time 0 hop_limit 64 managed_flag disable other_config_flag disable min_rtr_adv_interval 198 max_rtr_adv_interval 600
config ipv6 nd ns ipif dhcp3 retrans_time 0
config ipv6 nd ra ipif dhcp3 state disable life_time 1800 reachable_time 1200000 retrans_time 0 hop_limit 64 managed_flag disable other_config_flag disable min_rtr_adv_interval 198 max_rtr_adv_interval 600
config ipv6 nd ns ipif dhcp4 retrans_time 0
config ipv6 nd ra ipif dhcp4 state disable life_time 1800 reachable_time 1200000 retrans_time 0 hop_limit 64 managed_flag disable other_config_flag disable min_rtr_adv_interval 198 max_rtr_adv_interval 600

# ARP

config arp_aging time 20
config gratuitous_arp send ipif_status_up disable
config gratuitous_arp send dup_ip_detected disable
config gratuitous_arp learning disable

# ROUTE

config route preference static 60
config route preference default 1
config route preference rip 100
config route preference ospfIntra 80
config route preference ospfInter 90
config route preference ospfExt1 110
config route preference ospfExt2 115
create iproute default 10.1.2.30 1 primary
config ecmp algorithm ip_destination crc_low
enable ecmp ospf

# PROUTE


# IGMP

config igmp ipif System version 3 query_interval 125 max_response_time 10 robustness_variable 2 state disable
config igmp ipif System last_member_query_interval 1
config igmp check_subscriber_source_network ipif System enable
config igmp ipif dhcp version 3 query_interval 125 max_response_time 10 robustness_variable 2 state disable
config igmp ipif dhcp last_member_query_interval 1
config igmp check_subscriber_source_network ipif dhcp enable
config igmp ipif dhcp2 version 3 query_interval 125 max_response_time 10 robustness_variable 2 state disable
config igmp ipif dhcp2 last_member_query_interval 1
config igmp check_subscriber_source_network ipif dhcp2 enable
config igmp ipif dhcp3 version 3 query_interval 125 max_response_time 10 robustness_variable 2 state disable
config igmp ipif dhcp3 last_member_query_interval 1
config igmp check_subscriber_source_network ipif dhcp3 enable
config igmp ipif dhcp4 version 3 query_interval 125 max_response_time 10 robustness_variable 2 state disable
config igmp ipif dhcp4 last_member_query_interval 1
config igmp check_subscriber_source_network ipif dhcp4 enable

# PIMSM

disable pim
config pim cbsr hash_masklen 30
config pim cbsr bootstrap_period 60
config pim register_suppression_time 60
config pim register_probe_time 5
config pim last_hop_spt_switchover never
config pim crp holdtime 150 priority 192
config pim crp wildcard_prefix_cnt 0
config pim ipif System state disable hello 30 jp_interval 60 mode dm dr_priority 1
config pim cbsr ipif System priority -1
config pim ipif dhcp state disable hello 30 jp_interval 60 mode dm dr_priority 1
config pim cbsr ipif dhcp priority -1
config pim ipif dhcp2 state disable hello 30 jp_interval 60 mode dm dr_priority 1
config pim cbsr ipif dhcp2 priority -1
config pim ipif dhcp3 state disable hello 30 jp_interval 60 mode dm dr_priority 1
config pim cbsr ipif dhcp3 priority -1
config pim ipif dhcp4 state disable hello 30 jp_interval 60 mode dm dr_priority 1
config pim cbsr ipif dhcp4 priority -1

# DVMRP

disable dvmrp
config dvmrp ipif System metric 1 probe 10 neighbor_timeout 35 state disable
config dvmrp ipif dhcp metric 1 probe 10 neighbor_timeout 35 state disable
config dvmrp ipif dhcp2 metric 1 probe 10 neighbor_timeout 35 state disable
config dvmrp ipif dhcp3 metric 1 probe 10 neighbor_timeout 35 state disable
config dvmrp ipif dhcp4 metric 1 probe 10 neighbor_timeout 35 state disable

# IPMROUTE


# RIP

disable rip
config rip ipif System tx_mode disable state disable
config rip ipif System rx_mode disable state disable
config rip ipif dhcp tx_mode disable state disable
config rip ipif dhcp rx_mode disable state disable
config rip ipif dhcp2 tx_mode disable state disable
config rip ipif dhcp2 rx_mode disable state disable
config rip ipif dhcp3 tx_mode disable state disable
config rip ipif dhcp3 rx_mode disable state disable
config rip ipif dhcp4 tx_mode disable state disable
config rip ipif dhcp4 rx_mode disable state disable

# MD5


# SFLOW


# OSPF

config ospf ipif System area 0.0.0.0 priority 1 hello_interval 10 dead_interval 40
config ospf ipif System authentication none metric 1 state disable passive disable
config ospf ipif dhcp area 0.0.0.0 priority 1 hello_interval 10 dead_interval 40
config ospf ipif dhcp authentication none metric 1 state disable passive disable
config ospf ipif dhcp2 area 0.0.0.0 priority 1 hello_interval 10 dead_interval 40
config ospf ipif dhcp2 authentication none metric 1 state disable passive disable
config ospf ipif dhcp3 area 0.0.0.0 priority 1 hello_interval 10 dead_interval 40
config ospf ipif dhcp3 authentication none metric 1 state disable passive disable
config ospf ipif dhcp4 area 0.0.0.0 priority 1 hello_interval 10 dead_interval 40
config ospf ipif dhcp4 authentication none metric 1 state disable passive disable
config ospf router_id 0.0.0.0
disable ospf

# DNSR

disable dnsr
config dnsr primary nameserver 0.0.0.0
config dnsr secondary nameserver 0.0.0.0
disable dnsr cache
disable dnsr static

# DHCP_RELAY

enable dhcp_relay
config dhcp_relay hops 4 time 0
config dhcp_relay option_82 state disable
config dhcp_relay option_82 check disable
config dhcp_relay option_82 policy replace

# DHCP_SERVER

config dhcp ping_packets 2
config dhcp ping_timeout 500
disable dhcp_server

# VRRP

config vrrp ipif System authtype none
config vrrp ipif dhcp authtype none
config vrrp ipif dhcp2 authtype none
config vrrp ipif dhcp3 authtype none
config vrrp ipif dhcp4 authtype none
disable vrrp

disable vrrp ping


#-------------------------------------------------------------------
# End of configuration file for DGS-3612G
#-------------------------------------------------------------------
Присоединенный к письму файл 3526.cfg:


#-------------------------------------------------------------------
# DES-3526 Configuration
#
# Firmware: Build 5.01.B51
# Copyright(C) 2008 D-Link Corporation. All rights reserved.
#-------------------------------------------------------------------


# BASIC

config serial_port baud_rate 9600 auto_logout 10_minutes
enable telnet 23
enable web 80

# ACCOUNT LIST


# PASSWORD ENCRYPTION

disable password encryption
config terminal_line default

# BNR

config command_prompt default

# STORM

config traffic control_trap none
config traffic control 1-5 broadcast disable multicast disable unicast disable action drop threshold 128000

# LOOP_DETECT

disable loopdetect
config loopdetect recover_timer 60
config loopdetect interval 10
config loopdetect mode port-based
config loopdetect ports 1-26 state disabled

# GM

config sim candidate
disable sim
config sim dp_interval 30
config sim hold_time 100

# SYSLOG

disable syslog
config system_severity trap information
config system_severity log information

# QOS

config scheduling 0 max_packet 0 max_latency 0
config scheduling 1 max_packet 0 max_latency 0
config scheduling 2 max_packet 0 max_latency 0
config scheduling 3 max_packet 0 max_latency 0
config 802.1p user_priority 0 1
config 802.1p user_priority 1 0
config 802.1p user_priority 2 0
config 802.1p user_priority 3 1
config 802.1p user_priority 4 2
config 802.1p user_priority 5 2
config 802.1p user_priority 6 3
config 802.1p user_priority 7 3
config 802.1p default_priority 1-26 0
config bandwidth_control 1-26 rx_rate no_limit tx_rate no_limit

# MIRROR

disable mirror

# TRAF-SEGMENTATION

config traffic_segmentation 1-26 forward_list 1-26

# PORT

config ports 1-24 speed auto flow_control disable mdix auto learning enable state enable trap enable
config ports 25-26 medium_type copper speed auto flow_control disable mdix auto learning enable state enable trap enable
config ports 25-26 medium_type fiber speed auto flow_control disable learning enable state enable trap enable

# PORT_LOCK

disable port_security trap_log
config port_security ports 1-26 admin_state disable max_learning_addr 1 lock_address_mode DeleteOnReset

# 8021X

disable 802.1x
config 802.1x auth_protocol radius_eap
config 802.1x capability ports 1-26 none
config 802.1x auth_parameter ports 1-26 direction both port_control auto quiet_period 60 tx_period 30 supp_timeout 30 server_timeout 30 max_req 2 reauth_period 3600 enable_reauth disable

# SNMPv3

delete snmp community public
delete snmp community private
delete snmp user initial
delete snmp group initial
delete snmp view restricted all
delete snmp view CommunityView all
config snmp engineID 800000ab0300179abbd4dd
create snmp view restricted 1.3.6.1.2.1.1 view_type included
create snmp view restricted 1.3.6.1.2.1.11 view_type included
create snmp view restricted 1.3.6.1.6.3.10.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.11.2.1 view_type included
create snmp view restricted 1.3.6.1.6.3.15.1.1 view_type included
create snmp view CommunityView 1 view_type included
create snmp view CommunityView 1.3.6.1.6.3 view_type excluded
create snmp view CommunityView 1.3.6.1.6.3.1 view_type included
create snmp group public v1 read_view CommunityView notify_view CommunityView
create snmp group public v2c read_view CommunityView notify_view CommunityView
create snmp group initial v3 noauth_nopriv read_view restricted notify_view restricted
create snmp group private v1 read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp group private v2c read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp group ReadGroup v1 read_view CommunityView notify_view CommunityView
create snmp group ReadGroup v2c read_view CommunityView notify_view CommunityView
create snmp group WriteGroup v1 read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp group WriteGroup v2c read_view CommunityView write_view CommunityView notify_view CommunityView
create snmp community private view CommunityView read_write
create snmp community public view CommunityView read_only
create snmp user initial initial

# MANAGEMENT

enable snmp traps
enable snmp authenticate traps
config snmp system_name D-Link
disable rmon

# VLAN

disable asymmetric_vlan
config vlan default delete 1-26
config vlan default advertisement enable
create vlan dhcp2 tag 3
config vlan dhcp2 add tagged 25-26
config vlan dhcp2 add untagged 6
config vlan dhcp2 advertisement disable
create vlan dhcp4 tag 5
config vlan dhcp4 add tagged 25-26
config vlan dhcp4 add untagged 3
config vlan dhcp4 advertisement disable
disable gvrp
config gvrp 1-2,4-5,7-26 state disable ingress_checking enable acceptable_frame admit_all pvid 1
config gvrp 3 state disable ingress_checking enable acceptable_frame admit_all pvid 5
config gvrp 6 state disable ingress_checking enable acceptable_frame admit_all pvid 3

# FDB

config fdb aging_time 300
config multicast port_filtering_mode 1-26 forward_unregistered_groups

# MAC_ADDRESS_TABLE_NOTIFICATION

config mac_notification interval 1 historysize 1
disable mac_notification
config mac_notification ports 1-26 disable

# STP

config stp version rstp
config stp maxage 20 maxhops 20 forwarddelay 15 txholdcount 6 fbpdu enable
config stp priority 32768 instance_id 0
config stp hellotime 2
config stp mst_config_id name 00:17:9A:BB:D4:DD revision_level 0
disable stp
config stp ports 1-26 externalCost auto edge false p2p auto state enable
config stp ports 1-26 fbpdu disable
config stp ports 1-26 restricted_role false
config stp ports 1-26 restricted_tcn false
config stp mst_ports 1-26 instance_id 0 internalCost auto priority 128

# SSH

config ssh server maxsession 8
config ssh server contimeout 300
config ssh server authfail 2
config ssh server rekey never
config ssh server port 22
disable ssh

# SSL

disable ssl
enable ssl ciphersuite RSA_with_RC4_128_MD5
enable ssl ciphersuite RSA_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite DHE_DSS_with_3DES_EDE_CBC_SHA
enable ssl ciphersuite RSA_EXPORT_with_RC4_40_MD5
config ssl cachetimeout timeout 600

# SAFE_GUARD

config safeguard_engine state disable cpu_utilization rising_threshold 100 falling_threshold 20 trap_log disable

# TIMERANGE


# ACL

disable cpu_interface_filtering

# SNTP

disable sntp
config time_zone operator - hour 6 min 0
config sntp primary 0.0.0.0 secondary 0.0.0.0 poll-interval 720
config dst disable

# IPBIND
disable address_binding acl_mode
disable address_binding trap_log
disable address_binding dhcp_snoop
config address_binding dhcp_snoop max_entry ports 1-26 limit 5


# FILTER


# ARP_Spoofing_Prevention


# ROUTE

create iproute default 10.11.11.254 1

# SNOOP

disable igmp_snooping
config igmp_snooping default host_timeout 260 router_timeout 260 leave_timer 2 state disable
config igmp_snooping querier default query_interval 125 max_response_time 10 robustness_variable 2
config igmp_snooping querier default last_member_query_interval 1 state disable
config igmp_snooping dhcp2 host_timeout 260 router_timeout 260 leave_timer 2 state disable
config igmp_snooping querier dhcp2 query_interval 125 max_response_time 10 robustness_variable 2
config igmp_snooping querier dhcp2 last_member_query_interval 1 state disable
config igmp_snooping dhcp4 host_timeout 260 router_timeout 260 leave_timer 2 state disable
config igmp_snooping querier dhcp4 query_interval 125 max_response_time 10 robustness_variable 2
config igmp_snooping querier dhcp4 last_member_query_interval 1 state disable
config limited_multicast_addr ports 1-26 access deny state disable

# LACP

config link_aggregation algorithm mac_source
config lacp_port 1-26 mode passive

# GVLAN


# IP

config ipif System vlan dhcp2 ipaddress 10.11.11.253/24 state enable
disable autoconfig

# ARP

config arp_aging time 20
config gratuitous_arp send ipif_status_up enable
config gratuitous_arp send dup_ip_detected enable
config gratuitous_arp learning enable

# LLDP

disable lldp
config lldp message_tx_interval 30
config lldp tx_delay 2
config lldp message_tx_hold_multiplier 4
config lldp reinit_delay 2
config lldp notification_interval 5
config lldp ports 1-26 notification disable
config lldp ports 1-26 admin_status tx_and_rx

# ACCESS_AUTHENTICATION_CONTROL

config authen_login default method local
config authen_enable default method local_enable
config authen application console login default
config authen application console enable default
config authen application telnet login default
config authen application telnet enable default
config authen application ssh login default
config authen application ssh enable default
config authen application http login default
config authen application http enable default
config authen parameter response_timeout 0
config authen parameter attempt 3
config authen enable_admin all state enable
disable authen_policy

# DHCP_RELAY

enable dhcp_relay
config dhcp_relay hops 4 time 0
config dhcp_relay option_82 state enable
config dhcp_relay option_82 check disable
config dhcp_relay option_82 policy replace
config dhcp_relay option_82 remote_id default
config dhcp_relay option_60 state disable
config dhcp_relay option_60 default mode drop
config dhcp_relay option_61 state disable
config dhcp_relay option_61 default drop
config dhcp_relay add ipif System 10.1.2.30

# DHCP_LOCAL_RELAY

disable dhcp_local_relay

#-------------------------------------------------------------------
# End of configuration file for DES-3526
#---------------------------------------------------------


Как 2 клинетам выдать IP, не меняя IP свитча?
Спасибо.


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 23, 2009 14:52 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Проблема все еще актуальна!


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 23, 2009 17:26 
Не в сети

Зарегистрирован: Вт июн 17, 2008 18:59
Сообщений: 1203
Откуда: Минск, Беларусь
на 3526 надо ещё enable dhcp_local_relay

_________________
Это текст, который можно добавлять к размещаемым вами сообщениям. Длина его ограничена 255 символами.


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 23, 2009 22:37 
Не в сети
Сотрудник D-LINK
Сотрудник D-LINK

Зарегистрирован: Пт май 13, 2005 15:49
Сообщений: 20616
Откуда: D-Link, Moscow
Попробуйте пожалуйста прошивки которые я Вам выслал. В прошивке DGS-36XX есть фиксы в плане DHCP Relay. Также укажите по каким портам соединены свитчи.


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Чт июн 25, 2009 10:01 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Проблема не решилась, получает IP только клиент, находящийся в управляющем вилане((
Ставил высланные прошивки.
Свитчи соединены так: 25 порт на 3526 и 11 порт на 3612.


Вернуться наверх
 Профиль  
 
 Заголовок сообщения: Re: DHCP+Option 82. Выдача IP по ID vlan
СообщениеДобавлено: Чт июн 25, 2009 15:18 
Не в сети

Зарегистрирован: Пн сен 27, 2004 18:18
Сообщений: 1642
Откуда: Vault 13
Дмуха Николай писал(а):
Схема такая: клиенты подключены к свитчу 3526, DHCP сервер подключен к свитчу 3612. На 3 порту свитча 3526 vlan 10.13.13.0, на 6 - 10.11.11.0.

это понятно, но не понятно зачем это:

Дмуха Николай писал(а):
Код:
#-------------------------------------------------------------------------------
# DGS-3612G Gigabit Ethernet Switch
# Configuration
#
# Firmware: Build 2.51.B13
# Copyright(C) 2009 D-Link Corporation. All rights reserved.
#-------------------------------------------------------------------------------

...

# DHCP_RELAY

enable dhcp_relay
config dhcp_relay hops 4 time 0
config dhcp_relay option_82 state disable
config dhcp_relay option_82 check disable
config dhcp_relay option_82 policy replace

...

#-------------------------------------------------------------------
# End of configuration file for DGS-3612G
#-------------------------------------------------------------------

а именно - зачем на 36-м свиче dhcp relay? ведь клиенты подключены в 35-й свич ...

Дмуха Николай писал(а):
Пытаемся выдавать IP по ID вилана с сервера DHCP.

в Вашей схеме (1 клиент = 1 порт) волне можно выдавать адреса на основе IP адреса свича + номера порта ... если надумаете - вот Вам примерчик:
Код:
class "your.switch.with_option_82.IP_address:switch_port_number" {
    match if concat(
        binary-to-ascii(10, 8, ".", packet(24, 4)),
        ":",
        binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1))
    ) = "your.switch.with_option_82.IP_address:switch_port_number";
}

# то же но в сокращенном виде:
class "your.switch.with_option_82.IP_address:switch_port_number" {
    match if concat(binary-to-ascii(10,8,".",packet(24,4)),":",binary-to-ascii(10,8,"",suffix(optionagent.circuit-id,1))) = "your.switch.with_option_82.IP_address:switch_port_number";
}

_________________
с уважением, БП


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Чт июн 25, 2009 15:41 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Спасибо. Предложенную Вами схему я уже уже проверял, все работает!
Просто собираемся переходить на схему vlan-per-user. Вот и пытаемся выдавать IP адрес по ID вилана.


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Пн июн 29, 2009 12:52 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Проблема все еще актуальна...


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 30, 2009 00:10 
Не в сети

Зарегистрирован: Вт июн 16, 2009 01:27
Сообщений: 113
Откуда: Киев
А зачем вы ipif System на 3526 кидаете в клиентский vlan dhcp2 и еще туда же маршрут пишете ? а роутинг на 3612 включен ?

Если я правильно прочел по диагонали все конфиги, то у вас немного концепция всего этого неверная ..
В теории должно быть так - на 3526 каждый акцесс порт впихиваете в свой влан (например с 11 по 34й, Систем - в 10й), все это тэгированое добро кидаете в 25й порт, который приходит на, допустим 1й порт 3612 ... на 1м порту создаете вланы с 10го по 34й, для каждого свой ИпИф (например, 10й влан - 10.1.2.1/24, 11й -10.1.6.1/30, 12й - 10.1.6.5/30 и тд) ..

На 3612 делаете акцесный порт с влан 10 (это упр влан) и в него впихиваете дхцп сервер... на 3612 все, что связано добавлением опт 82 надо сделать в положение "Keep" (у меня Циска с ип аннамберед, поэтому как точно будет на Длинке не скажу ...
config dhcp_relay option_82 state enable
config dhcp_relay option_82 check disable
config dhcp_relay option_82 policy KEEP

может вот так )
Включаете роутинг и пишете дефолтный маршрут на вышестоящий роутер ... на нем не забываете прописать обратный маршрут на вашу подсеть 10.1.6.0/24 ... в нее помещается 64 клиентских адреса с маской 30 ...

Cоответственно на 3526 пишете деф маршрут 10.1.2.1 (инт. Л3 свича) и Систем адрес, допустим, 10.1.2.2 влан 10, ну и config dhcp_relay add ipif System 10.1.2.30.
config dhcp_relay option_82 state enable
config dhcp_relay option_82 check ENABLE
config dhcp_relay option_82 policy REPLACE


Дхцп 10.1.2.30 настраиваете так, что бы в данном примере он выдавал на влан 11 шлюз 10.1.6.1, адрес 10.1.6.2 маска /30 и тд с другими вланами ...

Вообщем, дето так )) У меня все это добро настроено на Циске 3750 + Длинк 1228 + еще куча других длинков ..

п.с. Есть такая штука у Длинков - Супервлан .. вот это было бы сюда как раз в тему ..


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 30, 2009 13:31 
Не в сети

Зарегистрирован: Пн сен 27, 2004 18:18
Сообщений: 1642
Откуда: Vault 13
Дмуха Николай писал(а):
собираемся переходить на схему vlan-per-user. Вот и пытаемся выдавать IP адрес по ID вилана.

как я понял, в схеме vlan-per-user у Вас будут ситуации когда будет больше 1-го порта принадлежать конкретному пользователю? т.е. vlan у него один, а вот портов он может занимать несколько, на ХЗ скольких свичах, и поэтому хочется выдавать ему адреса из его сети на основе его vlan без учета того где какой порт, верно?

_________________
с уважением, БП


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 30, 2009 14:20 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Нет, планируется, что на каждом порту свой vlan.


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 30, 2009 14:33 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
to Elisium:
Спасибо за совет. Я сделал следующее:
DHCP сервер 10.1.2.30
На 3612 создал интерфейсы и vlan'ы:
Код:
Command: show vlan


VID             : 1          VLAN Name     : default
VLAN Type       : Static     Advertisement : Enabled
Member Ports    : 9                   
Static Ports    : 9                   
Current Tagged Ports  :                     
Current Untagged Ports: 9                   
Static Tagged Ports   :                     
Static Untagged Ports : 9                   
Forbidden Ports       :                     

VID             : 2          VLAN Name     : dhcp
VLAN Type       : Static     Advertisement : Disabled
Member Ports    : 12                 
Static Ports    : 12                 
Current Tagged Ports  : 12                 
Current Untagged Ports:                     
Static Tagged Ports   : 12                 
Static Untagged Ports :                     
Forbidden Ports       :                     
                                                                               
VID             : 3          VLAN Name     : dhcp2
VLAN Type       : Static     Advertisement : Disabled
Member Ports    : 11-12               
Static Ports    : 11-12               
Current Tagged Ports  : 11-12               
Current Untagged Ports:                     
Static Tagged Ports   : 11-12               
Static Untagged Ports :                     
Forbidden Ports       :                     

VID             : 4          VLAN Name     : dhcp3
VLAN Type       : Static     Advertisement : Disabled
Member Ports    : 11-12               
Static Ports    : 11-12               
Current Tagged Ports  : 11-12               
Current Untagged Ports:                     
Static Tagged Ports   : 11-12               
Static Untagged Ports :                     
Forbidden Ports       :                     

VID             : 10         VLAN Name     : main
VLAN Type       : Static     Advertisement : Disabled
Member Ports    : 9,11-12             
Static Ports    : 9,11-12             
Current Tagged Ports  : 11-12               
Current Untagged Ports: 9                   
Static Tagged Ports   : 11-12               
Static Untagged Ports : 9                   
Forbidden Ports       :                     

Соответсвенно интерфейсы их:
Код:
show ipif
Command: show ipif

IP Interface                : dhcp
VLAN Name                   : dhcp
Interface Admin state       : Enabled
IPv4 Address                : 10.10.10.254/24 (Manual)  Primary
Proxy ARP                   : Disabled   (Local : Disabled)
IP MTU                      : 1500

IP Interface                : main
VLAN Name                   : main
Interface Admin state       : Enabled
IPv4 Address                : 10.1.2.254/24 (Manual)  Primary
Proxy ARP                   : Disabled   (Local : Disabled)
IP MTU                      : 1500

IP Interface                : dhcp2
VLAN Name                   : dhcp2
Interface Admin state       : Enabled
IPv4 Address                : 10.11.11.254/24 (Manual)  Primary
Proxy ARP                   : Disabled   (Local : Disabled)
IP MTU                      : 1500

IP Interface                : System                                           
VLAN Name                   : default
Interface Admin state       : Enabled
IPv4 Address                : 10.20.30.40/24 (Manual)  Primary
Proxy ARP                   : Disabled   (Local : Disabled)
IP MTU                      : 1500


Vlan main я прокинул на 3526.
Код:
show vlan
Command: show vlan

VID             : 1          VLAN Name     : default
VLAN TYPE       : static     Advertisement : Enabled
Member ports    :                     
Static ports    :                     
Current Tagged ports   :                     
Current Untagged ports :                     
Static Tagged ports    :                     
Static Untagged ports  :                     
Forbidden ports :                     

VID             : 3          VLAN Name     : dhcp2
VLAN TYPE       : static     Advertisement : Disabled
Member ports    : 1-8,25-26           
Static ports    : 1-8,25-26           
Current Tagged ports   : 25-26               
Current Untagged ports : 1-8                 
Static Tagged ports    : 25-26               
Static Untagged ports  : 1-8                 
Forbidden ports :                     

VID             : 4          VLAN Name     : dhcp3                             
VLAN TYPE       : static     Advertisement : Disabled
Member ports    : 9-16,25-26         
Static ports    : 9-16,25-26         
Current Tagged ports   : 25-26               
Current Untagged ports : 9-16               
Static Tagged ports    : 25-26               
Static Untagged ports  : 9-16               
Forbidden ports :                     

VID             : 10         VLAN Name     : main
VLAN TYPE       : static     Advertisement : Disabled
Member ports    : 25-26               
Static ports    : 25-26               
Current Tagged ports   : 25-26               
Current Untagged ports :                     
Static Tagged ports    : 25-26               
Static Untagged ports  :                     
Forbidden ports :     

ipif на свитче 3526:
Код:
show ipif

IP Interface Settings

Interface Name : System
IP Address     : 10.1.2.253      (MANUAL)
Subnet Mask    : 255.255.255.0
VLAN Name      : main
Admin. State   : Enabled
Link Status    : Link UP
Member Ports   : 25-26


Втыкаю клиентов в соответствующие виланам dhcp2 и dhcp3 порты и получаю IP из сегмента 10.1.2.0/24
Что я не так делаю? ((
На 3526 сделал:
Код:
show dhcp_relay

DHCP/BOOTP Relay Status         : Enabled
DHCP/BOOTP Hops Count Limit     : 4
DHCP/BOOTP Relay Time Threshold : 0
DHCP Relay Agent Information Option 82 State  : Enabled
DHCP Relay Agent Information Option 82 Check  : Disabled
DHCP Relay Agent Information Option 82 Policy : Replace
DHCP Relay Agent Information Option 82 Remote ID : 00-17-9A-BB-D5-BF

Interface     Server 1         Server 2         Server 3         Server 4
------------  ---------------  ---------------  ---------------  --------------
System        10.1.2.30        10.1.2.3
1

На 3612:
Код:
show dhcp_relay                             
Command: show dhcp_relay

DHCP/Bootp Relay Status         : Enabled
DHCP/Bootp Hops Count Limit     : 4
DHCP/Bootp Relay Time Threshold : 0 second(s)
DHCP Relay Agent Information Option 82 State  : Disabled
DHCP Relay Agent Information Option 82 Check  : Disabled
DHCP Relay Agent Information Option 82 Policy : Keep



Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 30, 2009 17:31 
Не в сети

Зарегистрирован: Вт июн 16, 2009 14:37
Сообщений: 66
Разобрался. Ошибка была в конфиге dhcpd.conf.
Огромное спасибо всем ответившим!


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Вт июн 30, 2009 17:36 
Не в сети
Сотрудник D-LINK
Сотрудник D-LINK

Зарегистрирован: Пт май 13, 2005 15:49
Сообщений: 20616
Откуда: D-Link, Moscow
Рад слышать!


Вернуться наверх
 Профиль  
 
 Заголовок сообщения:
СообщениеДобавлено: Ср июл 01, 2009 00:01 
Не в сети

Зарегистрирован: Вт июн 16, 2009 01:27
Сообщений: 113
Откуда: Киев
Аналогично ... если мой ответ чемто помог или натолкнул на нужную мысль - то я тоже рад ))))


Вернуться наверх
 Профиль  
 
Показать сообщения за:  Сортировать по:  
Начать новую тему Ответить на тему  [ Сообщений: 16 ]  На страницу 1, 2  След.

Часовой пояс: UTC + 3 часа


Кто сейчас на форуме

Сейчас этот форум просматривают: altred и гости: 24


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
Создано на основе phpBB® Forum Software © phpBB Group
Русская поддержка phpBB