forum.bitel.ru
http://forum.bitel.ru/

шлюз на основе DLINK
http://forum.bitel.ru/viewtopic.php?f=7&t=3386
Страница 1 из 1

Автор:  optimous [ 31 дек 2009, 15:45 ]
Заголовок сообщения:  шлюз на основе DLINK

Добрый день.
Настраиваю стандартный шлюз на дес3526:
Код:
конфигурация тип шлюза:

user_rule.editor.class=bitel.billing.module.services.ipn.editor.DlinkContractRuleEditor
gate_manager.class=bitel.billing.server.ipn.DlinkGateWorker
#версия snmp 1 или 2c
snmp.version=1
#1 - для 35xx, 2 - для 38xx
model=1


конфигурация шлюза

#Роутер(ы), если несколько - через запятую
dhcp.router=10.0.210.10
#Маска подсети
dhcp.subnetMask=255.255.255.224
#адрес днс сервера
dhcp.dns=x.x.x.x
#маска открытых серверов
open.mask=255.255.255.255
#адрес открытого сервера
open.address=x.x.x.x
#количество портов
ports=26
#номера uplink портов (связь с другими коммутаторами)
uplink=25,26
#занимаемые профили
profile.4=4
profile.8=8
profile.12=12
profile.16=16
profile.20=20
profile.24=24
profile.28=28

При закрытии шлюза в договоре все профили создаются логично (для меня).

Код:
create access_profile ip destination_ip_mask 255.255.255.255 udp dst_port_mask 0xFFFF profile_id 4
config access_profile profile_id 4 add access_id 1 ip source_ip 0.0.0.0 destination_ip 255.255.255.255 udp dst_port 67 port 1 permit

create access_profile ip source_ip_mask 255.255.255.255 destination_ip_mask 255.255.255.255 profile_id 8
config access_profile profile_id 8 add access_id 1 ip source_ip 10.0.210.7 destination_ip x.x.x.x port 1 permit

create access_profile ip source_ip_mask 255.255.255.255 destination_ip_mask 255.255.255.255 profile_id 12
config access_profile profile_id 12 add access_id 1 ip source_ip x.x.x.x destination_ip 10.0.210.7 port 25 permit
config access_profile profile_id 12 add access_id 1001 ip source_ip x.x.x.x destination_ip 10.0.210.7 port 26 permit

create access_profile ip destination_ip_mask 255.255.255.255 profile_id 16
config access_profile profile_id 16 add access_id 1 ip source_ip 0.0.0.0 destination_ip 10.0.210.7 port 25 deny
config access_profile profile_id 16 add access_id 1001 ip source_ip 0.0.0.0 destination_ip 10.0.210.7 port 26 deny

create access_profile ip source_ip_mask 255.255.255.255 profile_id 20

create access_profile ethernet ethernet_type profile_id 24
config access_profile profile_id 24 add access_id 1 ethernet source_mac 00-00-00-00-00-00 destination_mac 00-00-00-00-00-00 ethernet_type 0x806 port 1 permit

create access_profile ethernet source_mac 00-00-00-00-00-00 profile_id 28
config access_profile profile_id 28 add access_id 1 ethernet source_mac 00-00-00-00-00-00 destination_mac 00-00-00-00-00-00 ethernet_type 0x0 port 1 deny


А вот профили после открытия шлюза:
Код:
create access_profile ip destination_ip_mask 255.255.255.255 udp dst_port_mask 0xFFFF profile_id 4
config access_profile profile_id 4 add access_id 1 ip source_ip 0.0.0.0 destination_ip 255.255.255.255 udp dst_port 67 port 1 permit

create access_profile ip source_ip_mask 255.255.255.255 destination_ip_mask 255.255.255.255 profile_id 8
config access_profile profile_id 8 add access_id 1 ip source_ip 10.0.210.7 destination_ip x.x.x.x port 1 permit

create access_profile ip source_ip_mask 255.255.255.255 destination_ip_mask 255.255.255.255 profile_id 12
config access_profile profile_id 12 add access_id 1 ip source_ip x.x.x.x destination_ip 10.0.210.7 port 25 permit
config access_profile profile_id 12 add access_id 1001 ip source_ip x.x.x.x destination_ip 10.0.210.7 port 26 permit

create access_profile ip destination_ip_mask 255.255.255.255 profile_id 16
                                                                               
create access_profile ip source_ip_mask 255.255.255.255 profile_id 20
config access_profile profile_id 20 add access_id 1 ip source_ip 10.0.210.7 destination_ip 0.0.0.0 port 1 permit

create access_profile ethernet ethernet_type profile_id 24
config access_profile profile_id 24 add access_id 1 ethernet source_mac 00-00-00-00-00-00 destination_mac 00-00-00-00-00-00 ethernet_type 0x806 port 1 permit

create access_profile ethernet source_mac 00-00-00-00-00-00 profile_id 28
config access_profile profile_id 28 add access_id 1 ethernet source_mac 00-00-00-00-00-00 destination_mac 00-00-00-00-00-00 ethernet_type 0x0 port 1 deny

Т.е. блокируются/разблокируются ip пакеты, а если у меня клиенты терминируются через pppoe, то как разрешить им прохождение pppoe-пакетов?Есть ли какой-то вариант, кроме самописного шлюза?

Автор:  stark [ 11 янв 2010, 13:35 ]
Заголовок сообщения:  Re: шлюз на основе DLINK

самописный шлюз нужен

Автор:  snark [ 11 янв 2010, 18:48 ]
Заголовок сообщения:  Re: шлюз на основе DLINK

optimous писал(а):
шлюз на дес3526:
...
При закрытии шлюза в договоре все профили создаются логично (для меня).
Код:
create access_profile ip destination_ip_mask 255.255.255.255 udp dst_port_mask 0xFFFF profile_id 4
config access_profile profile_id 4 add access_id 1 ip source_ip 0.0.0.0 destination_ip 255.255.255.255 udp dst_port 67 port 1 permit

А вот профили после открытия шлюза:
Код:
create access_profile ip destination_ip_mask 255.255.255.255 udp dst_port_mask 0xFFFF profile_id 4
config access_profile profile_id 4 add access_id 1 ip source_ip 0.0.0.0 destination_ip 255.255.255.255 udp dst_port 67 port 1 permit

Т.е. блокируются/разблокируются ip пакеты, а если у меня клиенты терминируются через pppoe, то как разрешить им прохождение pppoe-пакетов?

на 3526 (не на 3028!) при использовании DHCP Relay нет нужды разрешать прохождение DHCP пакетов, т.е. profile_id 4 не нужен, вместо него можете написать:
Код:
create access_profile                                        ethernet ethernet_type        profile_id 1
config access_profile profile_id 1 add access_id auto_assign ethernet ethernet_type 0x8863 port 1-24 permit
config access_profile profile_id 1 add access_id auto_assign ethernet ethernet_type 0x8864 port 1-24 permit

и РРРоЕ будет у Вас прекрасно бегать ;)

Автор:  cheha [ 05 мар 2010, 02:06 ]
Заголовок сообщения:  Re: шлюз на основе DLINK

Возможна совместная работа dlinka DGS-36хх(DGS-3612 или DGS-3612g). в доке только про 35 и 38 написано а оно как то не устраивает

Автор:  stark [ 05 мар 2010, 12:19 ]
Заголовок сообщения:  Re: шлюз на основе DLINK

cheha писал(а):
Возможна совместная работа dlinka DGS-36хх(DGS-3612 или DGS-3612g). в доке только про 35 и 38 написано а оно как то не устраивает

Точно сказать не могу . Я не знаю чем там отличается система команд и возможностей шлюза . Это скорее вам виднее . с первом посте листинг команд показан . Он будет работать у вас ? или там другие команды/синтакис ?
Стандартный шлюз работает работает по snmp, так что тут даже дело не в синтаксисе, а возможностях шлюза. Т.е можно ли на нем править так же профили и т.п .

Если даже что-то отличается, то можно взять вот этот шлюз например:
http://wiki.bgbilling.ru/index.php/%D0% ... 1%8B%D1%85
и поправить

Автор:  snark [ 05 мар 2010, 16:53 ]
Заголовок сообщения:  Re: шлюз на основе DLINK

практически во всех блинках синтаксис команд одинаковый (там разве что в 3610 cisco-like cli ЕМНИП), так что все будет работать

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/