вторник, 23 декабря 2008 г.

VPN GRE tunnel with IPSEC

quick checklist

1) crypto isakmp policy 10
 encr aes 256
 authentication pre-share
 group 2

2) crypto isakmp key cisco address 192.168.3.2 no-xauth

3) crypto ipsec transform-set DEMO esp-aes 256 esp-sha-hmac
4) crypto ipsec profile VPN_PROFILE
set transform-set DEMO 
5)  tunnel int
    ip address 192.168.3.1 255.255.255.0
 tunnel source FastEthernet0/0
 tunnel destination 10.0.0.2
 tunnel mode ipsec ipv4
 tunnel protection ipsec profile VPN_PROFILE

среда, 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

Categories

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 sum
show ip bgp
show ip bgp rib-failure - может показать причину осутствия роута в роутинг таблице, несмотря на наличие этого роута в bgp table
etc



deb ip bgp events
deb ip bgp ?

BGP neighbor relationship

* Idle (active) - Searching for neighbors
* 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

Peer groups - позволяет создать шаблон атрибутов и применить его к нескольким neighbors сразу.

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

Packets
  • Open - starts the session
  • Keepalive
  • Update
  • Notification - smth bad has happened; close session

EBGP requires direct connection, но можно обойти с помощью команды ebgp-multihop

router bgp as
neighbor remote-as
update-source - если в качестве неибора указан адрес loopback


BGP Sync (выключено после 12.2(8)T )
Если маршрут пришел по iBGP, но при этом не пришел по внутреннему протоколу - такой маршрут не попадет в routing table.

BGP Next-hop

eBGP peers - меняет next-hop на себя
iBGP peers - не меняет next-hop на себя, оставляет как есть ( поменять поведение командой next-hop-self )