Показаны сообщения с ярлыком policy. Показать все сообщения
Показаны сообщения с ярлыком policy. Показать все сообщения

понедельник, 8 июня 2015 г.

PBR in Extreme summit switch

* Int.X460-Core.4 # edit policy police_vlan8_pbr
entry permit_local_00 {
if {
   source-address 192.168.0.0/16;
   destination-address 192.168.0.0/16;
   } then {
     permit;
}
}

entry permit_local_01 {
if {
   source-address 192.168.0.0/16;
   destination-address 10.0.0.0/8;
   } then {
     permit;
}
}

entry permit_local_02 {
if {
   source-address 192.168.0.0/16;
   destination-address 172.168.0.0/12;
   } then {
     permit;
}
}

entry redirect_local_00 {
if {
   source-address 192.168.253.0/24;
   } then {
   redirect 10.255.255.41;
}
}


configure access-list police_vlan8_pbr vlan "VLAN8_USERS-NEW" ingress 
unconfigure access-list police_vlan8_pbr ingress

===

Policy-Based Redirection Redundancy
Multiple Next-hop Support
As discussed above, Layer 3 and Layer 2 policy-based redirect support only one next-hop for one
policy-based entry. Multiple next-hops with different priorities can be configured. A higher priority is
denoted with a higher number; for example, “priority 5” has a higher precedence than “priority 1.” When
a high priority next-hop becomes unreachable, another preconfigured next-hop, based on priority,
replaces the first. This is done by first creating a flow-redirect name that is used to hold next-hop
information. User-created flow-redirect names are not case-sensitive.
Use the following command:
create flow-redirect flow_redirect_name
To delete the flow-redirect name, use:
delete flow-redirect flow_redirect_name
Then information for each next-hop, including a defined priority, is added one by one to the new flowredirect
name. Use the following command:
configure flow-redirect flow_redirect_name add nexthop ipaddress priority number

===

An example.
We want to redirect all traffic from 10.91.0.48/28 to address 10.91.0.234

create flow-redirect redir1
configure flow-redirect redir1 add nexthop 10.91.0.234 priority 100
configure flow-redirect redir1 nexthop 10.91.0.234 ping health-check interval 60 miss 3

Create an ACL:
entry subnet1 {
if match all {
source-address 10.91.0.48/28 ;
} then {
permit;
redirect-name redir1;
}
}

configure access-list redir1 vlan "vlan_name" ingress


That will redirect traffic in this vlan only from subnet 10.91.0.48/28 to 10.91.0.234.

https://community.extremenetworks.com/extreme/topics/help_required_for_l3_policy_based_redirect_summit_x460_24t_exos_12_5-mb5hr

вторник, 18 ноября 2014 г.

Dual ISP enterprise (branch) cisco router, firewall (ASA)

Классическая задача для предприятий и малого бизнеса - настройка маршрутизатора с двумя каналами в интернет без использования динамических протоколов маршрутизации. Очень много информации на эту тему есть в сети. Решил и я сделать заметку.

Нужно дать пользователям интернет и опубликовать какой-либо сервис (например, RDP) наружу.

Основные затыки происходят тут:
- динамическая смена маршрута 0.0.0.0 0.0.0.0;
- настройка NAT для двух внешних интерфейсов;
- доступность опубликованного сервиса сразу через оба ISP.

Есть хороший пост на хабре - По просьбам трудящихся: Dual ISP на маршрутизаторах cisco без BGP и на сайте этого же автора более полная дока, с рассмотренным вариантом использования сразу двух ISP - Сергей Фёдоров "Подключение к 2 ISP с настройкой трекинговой маршрутизации и NAT.

Вот дока 2008 года с сайта cisco - http://www.cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/100658-ios-nat-load-balancing-2isp.html.

Итак, нам нужно использовать IP SLA для решения первого пункта, ROUTE-MAP для решения второго и третьего.

Использую эти документы, я собрал схему в GNS3. В моем случае опубликован был сервис telnet. На внешних адресах (172.16.X.X) он светился в порту 10023, внутри шел на 192.168.1.2:23.


четверг, 26 декабря 2013 г.

EEM, IP SLA, TRACK, VERIFY-REACHABILITY in Catalyst 4500

Нужно часть трафика перекинуть на прокси-сервер. Если сервер падает, нужно пускать трафик мимо него. В ядре стоит коммутатор Catalyst 4900M  с лицензией IP Services. Несмотря на лицензию, функционал EEM и PBR на коммутаторах урезан. В EEM нельзя привязать событие к track, в route-map при установке next-hop нельзя проверять доступность, используя IP SLA. Для себя решил это, находя соответствие определенному шаблону в syslog.

!
interface Vlan31
 ip address 10.6.100.50 255.255.255.252
!
interface Port-channel11
 ip address 10.6.100.1 255.255.255.252
 ip policy route-map PBR
!
ip access-list extended USERS-SUBNETS
 permit ip host 10.6.112.101 any
 permit ip host 10.6.112.85 any
 permit ip host 10.6.13.12 any
!
ip sla 12
 icmp-echo 10.6.100.49 source-interface Vlan31
 threshold 3000
 frequency 10
ip sla schedule 12 life forever start-time now
!
track 12 ip sla 12
 delay down 30
!
route-map PBR permit 10
 match ip address USERS-SUBNETS
 set ip next-hop 10.6.100.49
route-map PBR deny 100
!
event manager applet KERIO-UP
 event syslog pattern "%TRACKING-5-STATE: 12 ip sla 12 state Down->Up"
 action 1.0 syslog msg "KERIO-UP"
 action 2.0 cli command "enable"
 action 3.0 cli command "config t"
 action 3.2 cli command "interface Port-channel11"
 action 3.3 cli command "ip policy route-map PBR"
 action 3.4 cli command "exit"
event manager applet KERIODOWN
 event syslog pattern "%TRACKING-5-STATE: 12 ip sla 12 state Up->Down"
 action 1.0 syslog msg "KERIO-DOWN"
 action 2.0 cli command "enable"
 action 3.0 cli command "config t"
 action 3.2 cli command "interface Port-channel11"
 action 3.3 cli command "no ip policy route-map PBR"
 action 3.4 cli command "exit"
!