purecopper Posted March 31, 2016 Коллеги приветствую. Пытаюсь разобраться с Cisco ISG, т.к. планируем ставить на сеть ASR-1001-x. Пока сидим на SE100. С цисками до этого момента дел практически не имел. Для ознакомления выкачал csr-1000v с cisco.com и установил на ESXi. Задача - в схеме vlan-на-пользователя авторизовать клиента по opt82, назначить ip путем выдачи из пула dhcp на ASR ( Ip для выдачи выдается через атрибут Framed-Ip-Address) и выпустить в Интернет. Для начала пытаюсь добиться, чтобы на радиус стали прилетать хоть какие-нибудь запросы: version 15.4 service timestamps debug datetime msec service timestamps log datetime msec no platform punt-keepalive disable-kernel-core platform console virtual ! hostname ASR-1000-test ! boot-start-marker boot-end-marker ! ! enable password cisco ! aaa new-model ! ! aaa group server radius ipoe-radius server 172.16.0.11 auth-port 1812 acct-port 1813 ip radius source-interface GigabitEthernet1 ! aaa authentication login ISG-AUTH group ipoe-radius aaa authorization network ISG-AUTH group ipoe-radius aaa authorization subscriber-service default local group ipoe-radius aaa accounting update newinfo periodic 30 aaa accounting network ISG-AUTH action-type start-stop group ipoe-radius ! aaa accounting network ipoe-radius action-type start-stop group ipoe-radius ! ! ! ! ! aaa server radius dynamic-author client 172.16.0.11 server-key testing123 auth-type any ! aaa session-id common ! ! ! ! ! ! ! ip domain name test.local ! ! ! ! ! ! ! ! ! ! subscriber templating service-policy type control ISG-CUSTOMER-POLICY multilink bundle-name authenticated ! ! license udi pid CSR1000V sn 9VYTLL9KKJA ! username cisco privilege 15 password 0 cisco ! redundancy mode none ! ! ! policy-map type control CUSTOMERS-POLICY class type control always event session-start 10 authorize aaa list ISG-AUTH password TEST identifier remote-id plus circuit-id ! ! ! ! ! ! interface Loopback2 description Users unnumbered ip address 192.168.2.1 255.255.255.0 ! interface Loopback3 ip address 192.168.3.1 255.255.255.0 ! interface GigabitEthernet1 ip address 172.16.0.10 255.255.255.0 negotiation auto ! interface GigabitEthernet2 no ip address negotiation auto ! interface GigabitEthernet2.3999 encapsulation dot1Q 3999 ip address 172.16.255.1 255.255.255.0 ! interface GigabitEthernet2.4000 encapsulation dot1Q 4000 second-dot1q 1-1000 service-policy type control CUSTOMERS-POLICY ip subscriber l2-connected initiator dhcp ! router ospf 1 redistribute connected subnets network 172.16.0.0 0.0.0.255 area 0 ! ! virtual-service csr_mgmt ! ip forward-protocol nd ! no ip http server no ip http secure-server ! ! ! ! radius-server attribute 44 include-in-access-req default-vrf radius-server attribute 44 extend-with-addr radius-server attribute 8 include-in-access-req radius-server attribute 32 include-in-accounting-req radius-server attribute 55 include-in-acct-req radius-server attribute 31 mac format unformatted radius-server host 172.16.0.11 auth-port 1812 acct-port 1813 key testing123 radius-server vsa send cisco-nas-port ! ! control-plane ! ! line con 0 stopbits 1 line aux 0 stopbits 1 line vty 0 4 transport input ssh ! ! end На DES-3200 поднят QinQ с SVLAN 4000. В результате клиент во влане 4000.1 отправляет DHCP-request, но на radius-сервер ничего не прилетает (слушал tcpdump). Вопрос как всегда стандартный: чяднт :) Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted March 31, 2016 Как минимум то, что бросилось в глаза: Активируйте авторизацию подписчиков глобально на коробке: subscriber authorization enable. Нет IP-адреса на интерфейсе или хотя бы unnumbered на loopback, это нормально? Не совсем понятно, как вы видите выдачу IP-адреса подписчику? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted March 31, 2016 Вопрос: можно ли как на SE отсылать клиенту loopback-интерфейс через radius-атрибут? Для клиента планирую создать пулы dhcp на брасе. При получении атрибута Framed-IP-address клиенту должен выдаться соответствующий адрес из пула. Такое на isg возможно? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted March 31, 2016 Теперь понял. К сожалению, в такой схеме не настраивал ISG. Есть возможность при помощи policy-map type service передать параметр vr1(config-service-policymap)#ip ? access-group Specify access control for packets address IP Address parameters portbundle IP Portbundle configuration unnumbered Enable IP processing without an explicit address vrf VPN Routing/Forwarding parameters Я так передаю VRF, но этот service еще надо где-то применить, можно, например, попробовать по событию в control policy. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted March 31, 2016 tehmeh спасибо за ответы :) Добавил subscriber authorization enable и все равно нет запросов к радиус-серверу. Связь между клиентом и CSR точно есть - ставлю на обоих концах ip-адреса и пускаю пинг - сеть работает. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted March 31, 2016 (edited) Тяжело что-то сказать, я бы попробовал убрать из control policy фрагмент с list ISG-AUTH, у вас всё таки: aaa authorization subscriber-service default local group ipoe-radius в нем не описан. Попробуйте просто: 10 authorize aaa password TEST identifier remote-id plus circuit-id Он, по-идее, возьмёт дефолтный список. Еще, у меня большие сомнения на счёт того, что без IP на интерфейсе подписчика, а также пула или relay на маршрутизаторе, ISG сможет передать remote-id/circuit-id. Когда идентификаторы пустые, ISG не шлет ничего в сторону radius. Но могу сильно ошибаться. Можно попробовать debug subscriber policy fsm или all, посмотреть error'ы. Edited March 31, 2016 by tehmeh Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted March 31, 2016 То ли лыжи не едут, то ли ... Назначил ip интерфейсу, который смотрит на subscriber: Current configuration : 218 bytes ! interface GigabitEthernet2.4000 encapsulation dot1Q 4000 second-dot1q 1-1000 ip address 192.168.254.254 255.255.255.0 service-policy type control CUSTOMERS-POLICY ip subscriber l2-connected initiator dhcp end сделал debug subscriber policy all Отправляю с клиента dhcp-req. В ответ опять тишина. В show log - пусто. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted March 31, 2016 Попробуйте все таки добавить dhcp pool хотя бы в тест. Есть подозрение, что если маршрутизатор не является dhcp server или dhcp relay agent, то discover для него просто пакет, и initiator dhcp не отрабатывает. aaa group server radius Customers server 172.16.0.1 auth-port 1812 acct-port 1813 ip radius source-interface FastEthernet0/0 ! aaa authentication login default local-case aaa authorization console aaa authorization exec default local aaa authorization subscriber-service default local group Customers ! ip dhcp excluded-address 172.16.1.1 ! subscriber authorization enable ! ip dhcp pool AddressSpace network 172.16.1.0 255.255.255.0 default-router 172.16.1.1 lease 0 4 ! policy-map type control Customers class type control always event session-start 1 authorize aaa password cisco identifier mac-address ! interface FastEthernet1/0 description Customer faced ip address 172.16.1.1 255.255.255.0 service-policy type control Customers ip subscriber l2-connected initiator dhcp ! С вот таким конфигом у меня даже в 7200 под Dynamips взлетает, не говоря уже про csr1000v. Разве что опцию на linux сложновато соорудить. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 1, 2016 tehmeh Продолжаю опыты :) Добавил dhcp-pool. В результате конфиг получился такой: Current configuration : 2882 bytes ! ! Last configuration change at 11:12:49 UTC Fri Apr 1 2016 by cisco ! version 15.4 service timestamps debug datetime msec service timestamps log datetime msec no platform punt-keepalive disable-kernel-core platform console virtual ! hostname ASR-1000-test ! boot-start-marker boot-end-marker ! ! enable password cisco ! aaa new-model ! ! aaa group server radius ipoe-radius server 172.16.0.11 auth-port 1812 acct-port 1813 ip radius source-interface GigabitEthernet1 ! aaa authentication login ISG-AUTH group ipoe-radius aaa authorization network ISG-AUTH group ipoe-radius aaa authorization subscriber-service default local group ipoe-radius aaa accounting update newinfo periodic 30 aaa accounting network ISG-AUTH action-type start-stop group ipoe-radius ! aaa accounting network ipoe-radius action-type start-stop group ipoe-radius ! ! ! ! ! aaa server radius dynamic-author client 172.16.0.11 server-key testing123 auth-type any ! aaa session-id common ! ! ! ! ! ! ! ip domain name test.local ! ip dhcp pool AddressSpace network 192.168.2.0 255.255.255.0 default-router 192.168.2.1 lease 0 4 ! ! ! ! ! ! ! ! ! ! subscriber templating subscriber authorization enable service-policy type control ISG-CUSTOMER-POLICY multilink bundle-name authenticated ! ! license udi pid CSR1000V sn 9VYTLL9KKJA ! username cisco privilege 15 password 0 cisco ! redundancy mode none ! ! ! policy-map type control CUSTOMERS-POLICY class type control always event session-start 10 authorize aaa password TEST identifier remote-id plus circuit-id ! ! ! ! ! ! interface Loopback2 ip address 192.168.2.1 255.255.255.0 ! interface Loopback3 ip address 192.168.3.1 255.255.255.0 ! interface GigabitEthernet1 ip address 172.16.0.10 255.255.255.0 negotiation auto ! interface GigabitEthernet1.4000 ! interface GigabitEthernet2 no ip address negotiation auto ! interface GigabitEthernet2.3999 encapsulation dot1Q 3999 ip address 172.16.255.1 255.255.255.0 ! interface GigabitEthernet2.4000 encapsulation dot1Q 4000 second-dot1q 1-1000 ip unnumbered Loopback2 service-policy type control CUSTOMERS-POLICY ip subscriber l2-connected initiator dhcp ! router ospf 1 redistribute connected subnets network 172.16.0.0 0.0.0.255 area 0 ! ! virtual-service csr_mgmt ! ip forward-protocol nd ! no ip http server no ip http secure-server ! ! ! ! radius-server attribute 44 include-in-access-req default-vrf radius-server attribute 44 extend-with-addr radius-server attribute 8 include-in-access-req radius-server attribute 32 include-in-accounting-req radius-server attribute 55 include-in-acct-req radius-server attribute 31 mac format unformatted radius-server host 172.16.0.11 auth-port 1812 acct-port 1813 key testing123 radius-server vsa send cisco-nas-port ! ! control-plane ! ! line con 0 stopbits 1 line aux 0 stopbits 1 line vty 0 4 transport input ssh ! ! end В результате запросов на радиус как не было, так и нет. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted April 1, 2016 В sh ip dhcp binding x.x.x.x есть поля Remote id, Circuit id? В debug'ах точно пусто? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 1, 2016 (edited) В show log - пусто. Странно, что сам dhcp-сервер так же не работает. Для теста запихнул во vlan 4000.1 isc-dhcp. Линуксовый dhcp адреса выдает влёт. Сделал debug dhcp server: *Apr 1 13:10:12.913: DHCPD: client's VPN is . *Apr 1 13:10:12.913: DHCPD: inconsistent relay information. *Apr 1 13:10:12.913: DHCPD: relay information option exists, but giaddr is zero. *Apr 1 13:10:21.721: DHCPD: Reload workspace interface GigabitEthernet2.4000 tableid 0. *Apr 1 13:10:21.721: DHCPD: tableid for 192.168.2.1 on GigabitEthernet2.4000 is 0 *Apr 1 13:10:21.721: DHCPD: client's VPN is . *Apr 1 13:10:21.721: DHCPD: inconsistent relay information. *Apr 1 13:10:21.721: DHCPD: relay information option exists, but giaddr is zero. Edited April 1, 2016 by purecopper Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted April 1, 2016 *Apr 1 13:10:21.721: DHCPD: inconsistent relay information.*Apr 1 13:10:21.721: DHCPD: relay information option exists, but giaddr is zero. В DHCP запросах, приходящих напрямую с l2-сегмента, есть opt82, но при этом поле giaddr пустое, что свидетельствует об отсутствии relay agent'ов по пути следования пакета. По умолчанию Cisco такие пакеты отбрасывает, поэтому у вас ничего не работает. Когда маршрутизатор выступает в качестве relay, можно указать глобально ip dhcp relay information trust-all, либо на конкретном интерфейсе ip dhcp relay information trusted. Возможно прокатит и сервером, честно говоря, не пробовал. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 1, 2016 tehmeh спасибо огромное! Теперь всё ок. В логах появились сообщения о попытках применения policy. Запросов на Radius пока нет, но с этим хоть можно работать :) Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted April 1, 2016 По запросам в сторону радиуса самые "популярные" грабли, которые я собирал, это или пустой идентификатор, типа не работающего s-tag, c-tag, либо неправильно подобранный. В любом случае можно будет ошибки в дебаге поковырять. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 1, 2016 tehmeh а можно еще один вопрос? Все начинает работать с указанием на интерфейсе ip либо unnumbered интерфейса. Допустим мне надо выдавать пользователям адреса из серой сети 192.168.2.0/24 и из белой 8.8.8.0/24. Насколько это плохая идея прибивать несколько адресов из разных подсетей на один loopback? :) Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted April 1, 2016 Благородные доны, возможно, меня поправят, но мы используем unnumbered и loopback с кучей адресов через secondary, пока никаких проблем нет, что на обычных Catalyst, что с ISG. Проблемы могут начаться, когда надо будет статику делать, придется делать явный маршрут руками. Но это мелочи, как по мне. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 1, 2016 И снова спасибо! Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 15, 2016 Подниму, пожалуй, тему еще раз :) Пытаюсь запустить dhcp-relay на интерфейсе с сабскрайберами: interface GigabitEthernet2.4000 encapsulation dot1Q 4000 second-dot1q 1-1000 ip dhcp relay information trusted ip dhcp relay information policy-action keep ip unnumbered Loopback2 ip helper-address 172.16.0.11 service-policy type control CUSTOMERS-POLICY ip subscriber l2-connected initiator dhcp ! А в логах какая-то ерунда, запросы на DHCP-сервер не приходят: *Apr 15 17:36:01.058: DHCPD: Reload workspace interface GigabitEthernet2.4000 tableid 0. *Apr 15 17:36:01.058: DHCPD: tableid for 10.228.8.1 on GigabitEthernet2.4000 is 0 *Apr 15 17:36:01.058: DHCPD: client's VPN is . *Apr 15 17:36:01.058: DHCPD: using received relay info. *Apr 15 17:36:01.058: DHCPD: Sending notification of DISCOVER: *Apr 15 17:36:01.058: DHCPD: htype 1 chaddr 000c.29e1.7c18 *Apr 15 17:36:01.058: DHCPD: remote id 010b582d414b2d35365f315f35 *Apr 15 17:36:01.058: DHCPD: circuit id 00040fa00001 *Apr 15 17:36:01.058: DHCPD: interface = GigabitEthernet2.4000 *Apr 15 17:36:01.058: DHCPD: FSM state change WAIT-FOR-CONFIG *Apr 15 17:36:01.058: DHCPD: Workspace state changed from INIT to WAIT-FOR-CONFIG *Apr 15 17:36:01.058: DHCPD: Saving workspace (ID=0x920003F5) *Apr 15 17:36:01.058: DHCPD: New packet workspace 0x7F69F28B3DA0 (ID=0x570003F6) *Apr 15 17:36:01.060: DHCPD: Callback for workspace (ID=0x920003F5) *Apr 15 17:36:01.060: DHCPD: Config Callback returns error 1, drop request *Apr 15 17:36:01.060: DHCPD: Freeing saved workspace (ID=0x920003F5) *Apr 15 17:36:01.060: DHCPD: Sending notification of ASSIGNMENT FAILURE: *Apr 15 17:36:01.060: DHCPD: htype 1 chaddr 000c.29e1.7c18 *Apr 15 17:36:01.060: DHCPD: remote id 030c00000ae408010000efa00001 *Apr 15 17:36:01.060: DHCPD: interface = GigabitEthernet2.4000 *Apr 15 17:36:01.060: DHCPD: Sending notification of ASSIGNMENT_FAILURE: *Apr 15 17:36:01.060: DHCPD: due to: NO REASON *Apr 15 17:36:01.060: DHCPD: htype 1 chaddr 000c.29e1.7c18 *Apr 15 17:36:01.060: DHCPD: remote id 030c00000ae408010000efa00001 *Apr 15 17:36:01.060: DHCPD: interface = GigabitEthernet2.4000 Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 18, 2016 Вроде бы с релеем разобрался. Но возникла новая проблема: Создал тестовый сервис на ASR: class-map type traffic match-any Internet match access-group output name Any-Traf match access-group input name Any-Traf ! policy-map type service Unlim-Test-1M class type traffic Internet police input 1000000 187500 375000 police output 1000000 187500 375000 ! ! ip access-list extended Any-Traf permit ip any any На радиус пользователю при авторизации отдаю: Mon Apr 18 13:05:14 2016 Packet-Type = Access-Accept Cisco-Service-Info = "Unlim-Test-1M" Acct-Interim-Interval = 300 В логах asr: *Apr 18 13:07:50.837: RADIUS/ENCODE(00000174):Orig. component type = Iedge DHCP SIP *Apr 18 13:07:50.837: RADIUS(00000174): Config NAS IP: 172.16.0.10 *Apr 18 13:07:50.837: RADIUS(00000174): Config NAS IPv6: :: *Apr 18 13:07:50.837: RADIUS/ENCODE(00000174): acct_session_id: 362 *Apr 18 13:07:50.837: RADIUS(00000174): sending *Apr 18 13:07:50.837: RADIUS(00000174): Send Access-Request to 172.16.0.11:1812 id 1645/104, len 238 *Apr 18 13:07:50.837: RADIUS: authenticator 45 1B 9E 8E 4C 6B FE AE - E3 2B A0 58 89 2A A6 A6 *Apr 18 13:07:50.837: RADIUS: User-Name [1] 41 "010b582d414b2d35365f315f35:00040fa00001" *Apr 18 13:07:50.837: RADIUS: User-Password [2] 18 * *Apr 18 13:07:50.837: RADIUS: NAS-Port-Type [61] 6 Virtual [5] *Apr 18 13:07:50.837: RADIUS: Vendor, Cisco [26] 20 *Apr 18 13:07:50.837: RADIUS: cisco-nas-port [2] 14 "0/0/0/1.4000" *Apr 18 13:07:50.837: RADIUS: NAS-Port [5] 6 0 *Apr 18 13:07:50.837: RADIUS: NAS-Port-Id [87] 14 "0/0/0/1.4000" *Apr 18 13:07:50.837: RADIUS: Vendor, Cisco [26] 35 *Apr 18 13:07:50.837: RADIUS: Cisco AVpair [1] 29 "circuit-id-tag=00040fa00001" *Apr 18 13:07:50.837: RADIUS: Vendor, Cisco [26] 48 *Apr 18 13:07:50.837: RADIUS: Cisco AVpair [1] 42 "remote-id-tag=010b582d414b2d35365f315f35" *Apr 18 13:07:50.837: RADIUS: Service-Type [6] 6 Outbound [5] *Apr 18 13:07:50.837: RADIUS: NAS-IP-Address [4] 6 172.16.0.10 *Apr 18 13:07:50.837: RADIUS: Acct-Session-Id [44] 18 "AC10000A0000016A" *Apr 18 13:07:50.837: RADIUS(00000174): Sending a IPv4 Radius Packet *Apr 18 13:07:50.837: RADIUS(00000174): Started 5 sec timeout *Apr 18 13:07:50.838: RADIUS: Received from id 1645/104 172.16.0.11:1812, Access-Accept, len 47 *Apr 18 13:07:50.838: RADIUS: authenticator 0B 2E DC 59 F4 88 97 74 - 67 CF F8 39 D8 90 0B 9F *Apr 18 13:07:50.838: RADIUS: Vendor, Cisco [26] 21 *Apr 18 13:07:50.838: RADIUS: ssg-service-info [251] 15 "Unlim-Test-1M" *Apr 18 13:07:50.838: RADIUS: Acct-Interim-Interva[85] 6 300 *Apr 18 13:07:50.838: RADIUS(00000174): Received from id 1645/104 *Apr 18 13:07:50.838: IPSUB: Invalid magic 0xFADEDEAF in IP session 0x7F22D725E538 *Apr 18 13:07:50.838: IPSUB-VRFSET: Entered allocate feature info *Apr 18 13:07:50.838: IPSUB-VRFSET: Allocated sg vrfset info 0x7F22D7A9C108 *Apr 18 13:07:50.838: IPSUB-VRFSET: Freeing the sg vrfset info 0x7F22D7A9C108 *Apr 18 13:07:50.839: Deleting mac 000c.29e1.7c18 from SIP common DB *Apr 18 13:07:50.839: Deleted mac 000c.29e1.7c18 from SIP common DB Вот что это за IPSUB: Invalid magic 0xFADEDEAF in IP session 0x7F22D725E538 ? Уже всю голову сломал, а гугл молчит :) Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
tehmeh Posted April 18, 2016 Насчет ошибки не подскажу. А пробовали имя сервиса передавать с "A" вначале? Cisco-Service-Info := "AUnlim-Test-1M" Step 1 Add the Auto Service attribute to the user profile. Example: 26,9,251="A service-name[; username ; password]" Automatically logs the subscriber in to the specified service when the user profile is downloaded. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
purecopper Posted April 18, 2016 tehmeh не-а, не помогает. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...