вторник, 23 декабря 2008 г.
VPN GRE tunnel with IPSEC
среда, 17 декабря 2008 г.
Controlling Route Selection
Weight Attribute
The weight attribute is Cisco proprietary, and is considered before any other attribute.
Weight is local to the router and not propagated to other routers.
Weight is a 16-bit value; higher is preferable. Default is 0 if the route is learned from a peer, or 32,768 if sourced locally.
Router(config-router)# neighbor {<IP address> | <group name>} weight <weight>
Local-Preference Attribute
Local preference is a 32-bit value; higher values are preferred. Default value is 100.
Распространяется только в пределах одной AS ! Не переходит в другие !
Общий стандарт.
Configured as a default:
Router(config-router)# bgp default local-preference <value>
Configured per prefix (via a route-map):
Router(config-router)# neighbor {<IP address> | <group name>} route-map <map name> in
MED Attribute
The multi-exit discriminator is used to influence path selection by external neighbors routing into the AS.
Default MED value is 0; lower is preferred.
Configured as a default:
Router(config-router)# default-metric <value>
MED can also be configured per prefix via route-maps.
среда, 10 декабря 2008 г.
BGP Attributes
1) Well-known - every vendor, who claimed to support BGP, must support this
2) Optional
3) Mandatory - must be in every route update ( Ex: "next hop address" )
4) Discretionary - optional
5) Transative - travel from router to router (from AS to AS) without change
6) Non-transative
Some of "Well-known" route attr:
1) AS-PATH (Mandatory) - путь прохождение через AS
2) Next-hop address (Mandatory)
3) Origin (Mandatory) - происхождение маршрута, т.е. откуда он пришел, откуда о нем стало известно.
4) Local preference (Discretionary)
5) Atomic aggregate (Discretionary)
Route decision process
Сравнение идет до первого совпадения ( как в ACL)
Weight - проприетарный атрибут циски. Имеет локальное значение. Можно указать weight для определенного neighbor ( точнее для всех приходящих от него маршрутов). Выигрывают маршруты с большим weight .
BGP troubleshooting
show ip bgp
show ip bgp rib-failure - может показать причину осутствия роута в роутинг таблице, несмотря на наличие этого роута в bgp table
etc
deb ip bgp events
deb ip bgp ?
BGP neighbor relationship
* Connect (active) - TCP connection established
* Open Sent (active) - Open message sent
* Open Confirm (active) - Response received. Если сконфигуренные параметры не совпадают, возвращается к состоянию Active. SIA.
* Established - BGP neighborship established
BGP neighborships can be confirmed with show ip bgp neighbors.
Neighbors still displayed as "active" after some time has passed have not correctly peered.
BGP peer groups
neighbor [name] peer-group
neighbor [name] remote-as [num]
neighbor [name] update-source [int_name]
применить к neighbor:
neighbor [ip] peer-group [group_name]
среда, 3 декабря 2008 г.
BGP notes
- Open - starts the session
- Keepalive
- Update
- Notification - smth bad has happened; close session
EBGP requires direct connection, но можно обойти с помощью команды ebgp-multihop
router bgp as
neighbor
update-source
BGP Sync (выключено после 12.2(8)T )
Если маршрут пришел по iBGP, но при этом не пришел по внутреннему протоколу - такой маршрут не попадет в routing table.
BGP Next-hop
eBGP peers - меняет next-hop на себя
iBGP peers - не меняет next-hop на себя, оставляет как есть ( поменять поведение командой next-hop-self )
вторник, 25 ноября 2008 г.
IS-IS Network Types
IS-IS packet types
понедельник, 24 ноября 2008 г.
IS-IS addressing
When CLNP assigned to a router it becomes a Network Service Access Point address (NSAP)
or Net address
NSAP address can be up to 20 bytes
Original OSI implementation defines 5 fields in NSAP
Cisco implementation defines 3 fields:
1) The Area address
2)The system ID
3)The NSAP selector (NSEL)
NSEL - всегда 00, просто определяет, что это IS система.
System ID - всегда 6 байт. Идентификатор роутера. Должен быть уникален
Остальное - Area address
EX: 49.0003.4444.4444.4444.00
49.0003 - Area id
Best practice: System ID = Router MAC
вторник, 18 ноября 2008 г.
IS-IS routing
routing
level 0 - взаимодействие End-System - IS
level 1 - взаимодействие IS-IS внутри area
level 2 - внутри AS
level 3 - с другой AS
![](file:///C:/DOCUME~1/PTARAT~1.INF/LOCALS~1/Temp/moz-screenshot.jpg)
IS-IS basics
Tuned for TCP/IP but still requires an OSI connectionless network services address (CLNS)
-Link-state - more tunable than OSPF
-Uses SPF - more efficient than OSPF
-Hello msg
L1 routers - internal routers, only knows about routes inside the area
L2 routers - backbone routers, only knows about backbone routes
L1/L2 routers - что-то вроде граничных роутеров. Поддерживают как базу internal area routes, так и backbone routes.
L1 - аналог клиента - внутри area он знает маршруты, но если надо попасть в другую area он обращается за помощью к L1/L2 ( аналог default gw)
Для IS-IS необязательно наличие area 0 - главное чтоб backbone был неразрывен.
По умолчанию, все линки имеют cost = 10. Необходимо вручную настроить все линки cost ( 0 - 63 )
Формирование relationship
L1 <----->L1
L2 <------>L2
L1 ////----/// L2 - не сформируются
L1/L2 <--------> L1/L2 - relationship формируется независимо для L1-to-L1 и для L2-to-L2 и формируются независимые DB
пятница, 31 октября 2008 г.
OSPF Authentication
- per-interface basis
- every ospf packet keyed with password
Authentication types:
- null (no authentication)(type 0)
- plaintext
- MD5
Authentication is enabled per interface.
Plaintext
Router(config-if)# ip ospf authentication-key
Router(config-if)# ip ospf authentication
MD5
Router(config-if)# ip ospf message-digest-key md5
Router(config-if)# ip ospf authentication message-digest
вторник, 28 октября 2008 г.
OSPF Area types
Area Types
- Standard area
- Stub area - Will not accept external routes (type 5 LSAs); type 5 LSAs are replaced by a default route
- Totally stubby area - Will not accept LSAs of type 3, 4, or 5; routes are replaced by the ABR with a default route; Cisco proprietary. Полный аналог static default route
- Not-so-stubby area (NSSA) - Stub areas which contain one or more ASBRs; ASBRs in a NSSA generate type 7 LSAs which are then converted to type 5 by the ABR
The greatest advantage of designating stub areas is decreased convergence time.
Stub & Totally stub areas
Not-So-Stubby-Area
area stub
Areas are designated as stubs when the chosen exit ABR is unimportant (or there is only one).
Router(config-router)# area [id] stub
All routers within a stub area must be configured as such. A stub router will not form an adjacency with a non-stub router in the same area.
area stub no-summary
no-summary further limits a stub area by creating a totally subby area. Totally stubby areas do not receive type 3 or 5 LSAs from other areas.
Router(config-router)# area [id] stub no-summary
Only ABRs need to be configured with no-summary appended to the stub command. Остальные роутеры в area могут быть просто с флагом stub.
To direct packets outside the stub area, routers rely on a default route advertised by the ABR(s).
The concept of totally stubby areas is Cisco proprietary.
area default-cost
Not-So-Stubby area configuration:Router(config-router)# area [id] nssa
Used to define the cost of the default route injected by an ABR into a stub area. The default is (cost to the ABR + 1).
This can be used to prefer one stub exit over others.
Router(config-router)# area default-cost
Configuration is done only on the ABR.
OSPF Virtual links
Virtual links - фактически туннелирование в area 0. Может быть реализовано с помощью туннельных интерфейсов.
Virtual links cannot use a stub area for transit.
Router(config-router)#area [id] virtual-link [router id]
В нашем случае :
R3(config-router)#area 1 virtual-link 2.2.2.2
Virtual link должен быть сконфигурен с обоих сторон
R2(config-router)#area 1 virtual-link 3.3.3.3
При этом не важно, сколько роутеров между двумя конечными ABR.
sh ip ospf neighbors при этом выглядят также как и без использования VL.
sh ip ospf virtual-links
понедельник, 27 октября 2008 г.
OSPF LSA types
Link-State Advertisements
- Router link (type 1) - Lists a router's neighbors and its cost to each; flooded throughout the area. Используется в пределах area
- Network link (type 2) - Advertisement by the DR containing all routers on the segment it is adjacent to; flooded throughout the area
- Network summary link (type 3) - ABRs generate this type of LSA to send between areas; it lists all prefixes available in an are.Используется для анонсов из одной area в другую.
- AS external ASBR summary link (type 4) - Router link LSA for ASBRs. Анонс IP ASBR.
- External link (type 5) - Originated by an ASBR, contains a route external to OSPF
- NSSA external (type 7) - Equivalent to a type 5 LSA, but generated by an ASBR in a not-so-stubby area (NSSA); converted to a type 5 by the ABR
OSPF summarization
Summarization
- Inter-area summarization - Performed at the ABR; creates type 3 LSAs. Type 4 LSAs advertise ASBRs.
- External summarization - Performed at the ASBR; creates type 5 LSAs.
1)ABR summarization
Used on an ABR to summarize multiple networks into a single type 3 LSA.
Router(config-router)# area range
В нашем случае (см. картинку)
(config-router)# area 1 range 192.168.0.0 255.255.0.0 - указываем area ИЗ которой будет анонсироваться summary route !Summary address указывает на Null0 интерфейс - loop prevention mechanism.
В случае, если трафик придет на summary address, но не предназначен ни одной из сетей, входящих в summary,
он дропается на Null0 интерфейсе.
2)ASBR summarization
При суммировании маршрутов приходящих из другой AS используется другая команда.
Так как в другой AS может не использоваться area (например redistribution из RIP),то используется просто summary-address
Router(config-router)# summary-address address mask [no-advertise] [tag]
В нашем случае172.16.0.0 255.255.0.0
Router(config-router)# summary-address
![](file:///C:/DOCUME%7E1/PTARAT%7E1.INF/LOCALS%7E1/Temp/moz-screenshot.jpg)
OSPF Areas
четверг, 23 октября 2008 г.
OSPF network types
-single operation mode
-10 s hello, 40 s dead timers
- DR/BDR election
- dual multicast
II. Point-to-point network
-single operation mode
-10 s hello, 40 s dead
-no DR/BDR
-single multicast
III. NBMA network
- 5 operation modes: 2 RFC, 3 Cisco
3.1 NBMA modes
1) Non-Broadcast mode (RFC)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiciZjvPxzsNmoL77aMXk83ik97TxNgRzPMXmuuGCcPFkIjQ4i3cNtmjIe-SsqONb5T0AS407Tyk0VP2CZJvFO4nL6z9Gpzdb50b24f0v6luHJ3JvU5E_Wg5upGZdrLN-aQcSN0D6YrnYSk/s400/ospf+networks%231.bmp)
Могут быть задержки в установлении neighbour relationship
Neighbors должны быть статически сконфигурены на роутере, который выступает в качестве DR/BDR. На остальных - необязательно.
Роутер, который будет выступать в качестве DR/BDR должен иметь высший приоритет.
Или остальные - низший.
DR priorities should be specified to ensure only candidates positioned well in the topology are elected DR and BDR.
Router(config-if)# neighbor [priority ] [poll-interval ]
[cost ]
-
priority
- This can be used to specify a higher priority than what has been configured on the neighbor (but not lower) -
poll interval
- The rate at which hellos are sent to inactive neighbors (default 120 seconds) -
cost
- Cost to reach the neighbor
На соответсвующем интерфейсе соседа (DROTHER)
(config-if)# ip ospf priority 0
2) Point-to-multipoint (RFC)
!! Cloud & routers must allow broadcast accross links !!
Не нужно дополнительно прописывать никакие frame-relay maps.
3) Point-to-multipoint non-broadcast (Cisco)
То же, что и p2mp но позволяет реализовать без broadcast. Но при этом neighbors приходится конфигурить статично вручную.
4) Broadcast (Cisco)
Full emulation of broadcast env in NBMA network. Full mesh required. Single subnet required
5) Point-to-point (Cisco)
1) needs subinf to be configured
2) needs different subnets
Maybe the best mode for NBMA. Меньше всего проблемы, наиболее детерминированное поведение.
NBMA | Point-to-multipoint broadcast | Point-to-multipoint nonbroadcast | Broadcast | Point-to-point | |
DR/BDR | Yes | No | No | Yes | No |
Identify neighbor? | Yes | No | Yes | No | No |
Hello/dead timers | 30/120 | 30/120 | 30/120 | 10/40 | 10/40 |
Standard | RFC | RFC | Cisco | Cisco | Cisco |
Network supported | Full mesh | Any | Any | Full mesh | Point-to-point |
среда, 22 октября 2008 г.
Implementing & verification OSPF
Configuring OSPF in a Single Area
Necessary information:
- OSPF process ID (locally significant)
- Participating interfaces
- Area ID
- Router ID
Enable OSPF
Router(config)# router ospf
Configure Included Networks
Router(config-router)# network area
A single interface can be specified by supplying its IP address and a null wildcard mask:
network 192.168.0.1 0.0.0.0 area 0
Router ID
If no router ID has been administratively declared, a router will choose the highest loopback IP address. If no loopback addresses are present, the highest IP address of the first active interface will be used.
A router ID can be manually specified:
Router(config-router)# router-id
Best practice dictates the creation of a loopback address to be used as the router ID for stability and continuity:
Router(config)# interface loopback 0
Router(config-if)# ip address
Default Cost
Link cost is a 16-bit value (0-65535); default cost is calculated as 100Mbps/interface bandwidth. (Interfaces 100Mbps and faster are assigned a cost of 1.)
OSPF cost can be manually specified per interface:
Router(config-if)# ip ospf cost
An alternative to defining static costs per interface is to change the numerator bandwidth (default 100Mbps):
Router(config-router)# ospf auto-cost reference-bandwidth
Reference speed is a 32-bit value (1 - 4294967). If reference speed is modified, the same modification should be performed on all routers within the area.
Router Priority
Default DR election priority is 1, and a router with a priority of 0 will not become a DR. Priority range is 0 - 255.
Router(config-if)# ip ospf priority
Verifying OSPF Configuration
show ip ospf
- OSPF process detailsshow ip ospf
database - Contents of the topology databaseshow ip ospf
interface - Interfaces participating in OSPFshow ip ospf
neighbor - Neighbor informationshow ip protocols
- Displays all active routing protocolsshow ip route
debug ip ospf events
debug ip packet
# clear ip ospf process
понедельник, 20 октября 2008 г.
OSPF basics
All areas must be connected to backbone area 0 ( исключение - использование virtual link - только если нет другого выхода). OSPF requires hierachical design
hello broadcast/p2p - 10 s
NBMA - 30 s
dead timer - 4 x hello
OSPF tables:
- Neighbor table
- Topology database
- Routing table
224.0.0.5
-DR_other, common224.0.0.6 - DR, BDR in broadcast env
cost = 100 / bandwidth_in_mbs
DR & BDR has to be elected in every shared segment
DR, BDR election
1) priority
2) highest router-id
HELLO packet
- Router ID - 32-bit unique number (IP address)
- Hello/dead intervals - Timers
- Neighbor list - List of neighboring router IDs
- Area ID
- Priority - Used in electing the DR and BDR
- DR and BDR
- Authentication (if enabled)
- Stub Area Flag - On if this is a stub area
Neighbor relationship
1. Determine Router ID
![](file:///C:/DOCUME%7E1/PTARAT%7E1.INF/LOCALS%7E1/Temp/moz-screenshot.jpg)
2) highest loobback int (lo int can be pingable)
3) highest physical int (only active int participate)
! router ID changes only after reboot or ospf process reload !
2. Add interfaces to LSBD (dictated by network command)
3. Send HELLO on choosen interfaces (**DOWN state**)
HELLO contains:
1) Router ID
2) Hello & dead timers *
3) Network mask *
4) Area id *
5) Neighbors
6) Router priority
7) DR/ BDR ip address
8) Authentication password *
9) Stub flag *
* - must match
4. Receive HELLO (**INIT** state)
Check * to match. If conditions do not match you'll see cycling from **DOWN** to **INIT**
5. Send HELLO reply (** 2-way state**)
Router checks if it listed as neighbor in the received hello:
If yes ----> just reset dead timers, neighbor relationship have been already established earlier
If no -----> adds as new neighbor
6. Master - Slave determine ( **Exstart state ** )
determined by priority; router-id breaks the tie
Master send DBD first.
DBD = Database Desciption ("cliff notes" - заметки на полях - краткое описание topology DB)
7. DBD are acknowleged and received (**Loading state**)
Router просматривает DBD и если находит там сети, о которых он не знает, он запрашивает подробную инфу об этих сетках через Link-State Request (LSR). В ответ приходит Link-State Updates (LSU) c запрошеной инфой. LSU - своего рода контейнер, содержаший индивидуальные Link State Advertisement ( LSA) о каждой анонсируемой сети.
8. Neighbors are synchronized (**FULL state**)
Now it's time to start Dijkstra SPF algorithm to analyze received data
!!! In broadcast env every router establish **FULL state** only with DR &BDR, with DR_Other **2-way state** established !!!
Packet Types
OSPF is IP protocol 89.
- Hello - Used to establish communication with directly connected neighbors
- Database Descriptor (DBD) - Lists router IDs from which the router has an LSA and its current sequence number
- Link State Request (LSR) - Request for an LSA
- Link State Update (LSU) - Reply to an LSR with the requested information
- Link State Acknowledgment (LSAck) - Used to confirm receipt of link-state information
вторник, 14 октября 2008 г.
Сертификация в ИБ
1) Международные
2) Национальные
3) Отраслевые (от ЦБ для финансовой сферы, от Газпрома)
4) Корпоративные
Также делятся на
1) Обязательные
2) Спорные / неявно обязательные
3) Рекомендованные
4) Best practices
В России в сфере ИБ основные регуляторы:
1) ФСБ
2) ФСТЭК
3) Минком-связь (последнее время)
4) МинОбороны
5) ФСО
6) СВР (служба внешней разведки)
Плюс неосновные:
1) ЦБ
2) Газпром
3) PCI Council
Сертификаты:
PCI DSS ( сертификация для работы с платежными системами VISA, MasterCard, Dinner Club, JCB)
последняя версия 1.2 (от 10.2008)
12 требований
см док Cisco Secure Store для PCI
ФСТЭК СТР-К (основной базовый документ ФСТЭК на данный момент)
ФСБ защита персданных
NME-RVPN серт КС1 и КС2
PACE (cisco)
Cisco NCM - аудит на соответствие требованиям сертификации. Не только циско, поддерживает 35 вендоров.
среда, 24 сентября 2008 г.
EIGRP Msg
EIGRP Terminology
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuOAWmelhUDUascT3Sr2GXYnY4eX_3-xNNSlYlQTBjz705peLY1CNiv9bhn_ftgvEgt2PkxtYLmkR5UKJpUDd3CC2IaiGelOoGh0zzvpv0HJJr11cScdAI_btCiFiIjJQEFb_GP_GFNr3b/s400/eigrp_terminology.jpg)
AD - advertised distance. For example 1900 in our case for net 10.1.2.0./24
FD - Feaseble distance = AD + cost. For example FD (R1) = 600 +10 for net 10.1.2.0./24
Successor - Primary route ( goes to the routing table)
Feaseble Successor - backup route. Must match condition - AD must be less then FD of the successor
Active route - route is actively search (DUAL) for path to net. Smth failed. If there is feaseble successor, backup route goes routing table without recalculation
Passive route - everything allright.
Feaseble successor shows in topology table #sh ip eigrp topology
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7XVkaw6D-eL5R0vtJa7qXyAa93jWjzgUNpCFv4CRCN1ifqjK3J4q7H97e5LVinU5t8WKnK_O5IttJt3-H1YMVtQe29lHL4H4uT3uOUzZmSb1lvIFGi7hlz8NVOf3_71R9Cdo0c_jWH2WY/s320/eigrp_topology+example.jpg)
![](file:///C:/Users/ash/AppData/Local/Temp/moz-screenshot.jpg)
четверг, 31 января 2008 г.
суббота, 19 января 2008 г.
Тестим GS
Вообщем развитие событий обещает быть интересным. Увидим ли мы банкротство Голиафа или же МС как всегда останется у руля ? Хмм....