cisco p2p gre ipsec vpn met meerdere verbindingen

Pagina: 1
Acties:

  • _fm
  • Registratie: September 2003
  • Niet online
Doel: een vpn tussen 3 netwerken over internet, waarbij netwerk1 (v1) 2 verbindingen heeft (kabel/adsl), netwerk 2 (v2) heeft 1 verbinding, en netwerk 3 (v2) heeft 2 verbindingen.
Mijn vraag gaat over de vpn verbinding tussen v1 en v2.
Het is de bedoeling dat onder goede omstandigheden alle tunnels up zijn (en gaan loadsharen), bij het uitvallen van een of meerdere verbindingen moet het vpn zo lang mogelijk blijven werken.
Op v1 en v2 is ook Ethernet 0/3 al geconfigureerd als 'lan' netwerk, maar daar hangt nog niets aan.

Alle adressen in 10.76.0.0/16 zijn wan ip adressen.
Alle adressen in 10.77.1.0/24 zijn tunnel interface adressen (steeds een /30)
Alle adressen in 192.168.x.0/24 zijn potentiele lan netwerk adressen. (x=1 voor router v1, x=2 voor router v2 enzovoorts)
Alle verbindingen zijn "eenvoudige breedbandverbindingen" met 1 vast ip adres per verbinding. (geen bgp enz)
Om het geheel te proberen/te testen (in gns3/dynagen) zitten alle 3 de routers met 1 of 2 verbindingen aangesloten op een 4e router, genaamd 'internet'.

Het probleem:
De interface v1 tunnel 1 vanaf router v1 e0/1 naar router v2 e0/0 komt niet 'up'

Router v2 meldt:
*Mar 1 03:37:33.759: %CRYPTO-4-RECVD_PKT_NOT_IPSEC: Rec'd packet not an IPSEC packet.
(ip) vrf/dest_addr= /10.76.2.2, src_addr= 10.76.1.2, prot= 47

En die pakketen zie je ook op de link tussen v1 en internet langskomen, terwijl er voor gre toch een crypto map op v1 e0/1 staat

Wat ben ik vergeten of wat doe ik fout?


Plaatje:
Afbeeldingslocatie: http://www.xs4all.nl/~bp368/top.jpg
v1 e0/0 <-> internet e0/0
v1 e0/1 <-> internet e0/1
v2 e0/0 <-> internet e0/2

Router v3 doet in dit probleem verder niet mee, daarvan staat hieronder ook geen configuratie. Er zijn nog wel verwijzigingen naar te vinden in de configuratie van 'internet' en 'v1' natuurlijk.
Er staan nog wat "ip sla" zaken in de configuratie van v1, dat zijn resten/onderdelen van een alternatieve poging om het op te zetten, die mogen nu genegeerd worden.

Router "internet"
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname internet
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
!
ip cef
!
interface Ethernet0/0
 ip address 10.76.0.1 255.255.255.0
 ip verify unicast source reachable-via rx
 half-duplex
!
interface Ethernet0/1
 ip address 10.76.1.1 255.255.255.0
 ip verify unicast source reachable-via rx
 half-duplex
!
interface Ethernet0/2
 ip address 10.76.2.1 255.255.255.0
 ip verify unicast source reachable-via rx
 half-duplex
!
interface Ethernet0/3
 ip address 10.76.3.1 255.255.255.0
 ip verify unicast source reachable-via rx
 half-duplex
!
interface Ethernet1/0
 ip address 10.76.4.1 255.255.255.0
 ip verify unicast source reachable-via rx
 half-duplex
!
interface Ethernet1/1
 ip address 10.76.5.1 255.255.255.0
 ip verify unicast source reachable-via rx
 half-duplex
!
interface Ethernet1/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet1/3
 no ip address
 shutdown
 half-duplex
!
ip http server
no ip http secure-server
!
access-list 1 deny   any
!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
!
end

Router "v1"
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname v1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
!
ip cef
!
ip sla monitor 1
 type echo protocol ipIcmpEcho 10.76.0.1 source-interface Ethernet0/0
 timeout 1000
 threshold 40
 frequency 3
ip sla monitor schedule 1 life forever start-time now
ip sla monitor 2
 type echo protocol ipIcmpEcho 10.76.1.1 source-interface Ethernet0/1
 timeout 1000
 threshold 40
 frequency 3
ip sla monitor schedule 2 life forever start-time now
!
track 1 rtr 1 reachability
 delay down 15 up 10
!
track 2 rtr 2 reachability
 delay down 15 up 10
!
crypto isakmp policy 10
 authentication pre-share
crypto isakmp key bigsecretv1v2 address 10.76.2.2
crypto isakmp key bigsecretv1v3 address 10.76.4.2
crypto isakmp key bigsecretv1v3 address 10.76.5.2
crypto isakmp keepalive 10
!
crypto ipsec transform-set vpn-test esp-des esp-md5-hmac
!
crypto map static-map1 local-address Ethernet0/0
crypto map static-map1 10 ipsec-isakmp
 set peer 10.76.2.2
 set transform-set vpn-test
 match address v1l0v2l2
crypto map static-map1 20 ipsec-isakmp
 set peer 10.76.4.2
 set transform-set vpn-test
 match address v1l0v3l4
!
crypto map static-map2 local-address Ethernet0/1
crypto map static-map2 10 ipsec-isakmp
 set peer 10.76.2.2
 set transform-set vpn-test
 match address v1l1v2l2
crypto map static-map2 20 ipsec-isakmp
 set peer 10.76.5.2
 set transform-set vpn-test
 match address v1l1v3l5
!
interface Tunnel0
 ip address 10.77.1.1 255.255.255.252
 no ip route-cache cef
 no ip route-cache
 ip policy route-map localmap
 keepalive 10 3
 tunnel source Ethernet0/0
 tunnel destination 10.76.2.2
!
interface Tunnel1
 ip address 10.77.1.5 255.255.255.252
 no ip route-cache cef
 no ip route-cache
 ip policy route-map localmap
 keepalive 10 3
 tunnel source Ethernet0/1
 tunnel destination 10.76.2.2
!
interface Tunnel4
 ip address 10.77.1.13 255.255.255.252
 keepalive 10 3
 tunnel source 10.76.0.2
 tunnel destination 10.76.4.2
!
interface Tunnel6
 ip address 10.77.1.21 255.255.255.252
 keepalive 10 3
 tunnel source 10.76.1.2
 tunnel destination 10.76.5.2
!
interface Ethernet0/0
 ip address 10.76.0.2 255.255.255.0
 no ip route-cache cef
 no ip route-cache
 half-duplex
 crypto map static-map1
!
interface Ethernet0/1
 ip address 10.76.1.2 255.255.255.0
 no ip route-cache cef
 no ip route-cache
 half-duplex
 crypto map static-map2
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 ip address 192.168.1.254 255.255.255.0
 half-duplex
!
ip local policy route-map localmap
ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 10.76.0.1
ip route 0.0.0.0 0.0.0.0 10.76.1.1
ip route 10.76.4.2 255.255.255.255 10.76.0.1
ip route 10.76.5.2 255.255.255.255 10.76.1.1
ip route 192.168.2.0 255.255.255.0 10.77.1.2
ip route 192.168.2.0 255.255.255.0 10.77.1.6
ip route 192.168.3.0 255.255.255.0 10.77.1.14
ip route 192.168.3.0 255.255.255.0 10.77.1.22
!
ip access-list extended l0source
 permit ip host 10.76.0.2 any
ip access-list extended l1source
 permit ip host 10.76.1.2 any
ip access-list extended v1l0v2l2
 permit gre host 10.76.0.2 host 10.76.2.2
ip access-list extended v1l0v3l4
 permit gre host 10.76.0.2 host 10.76.4.2
ip access-list extended v1l1v2l2
 permit gre host 10.76.1.2 host 10.76.2.2
ip access-list extended v1l1v3l5
 permit gre host 10.76.1.2 host 10.76.5.2
!
route-map localmap permit 10
 match ip address l0source
 set ip next-hop 10.76.0.1
 set interface Ethernet0/0
!
route-map localmap permit 20
 match ip address l1source
 set ip next-hop 10.76.1.1
 set interface Ethernet0/1
!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
end

Router v2
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname v2
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
!
ip cef
!
crypto isakmp policy 10
 authentication pre-share
crypto isakmp key bigsecretv1v2 address 10.76.0.2
crypto isakmp key bigsecretv1v2 address 10.76.1.2
crypto isakmp keepalive 10
!
crypto ipsec transform-set vpn-test esp-des esp-md5-hmac
!
crypto map static-map1 local-address Ethernet0/0
crypto map static-map1 10 ipsec-isakmp
 set peer 10.76.0.2
 set transform-set vpn-test
 match address v2l2v1l0
crypto map static-map1 11 ipsec-isakmp
 set peer 10.76.1.2
 set transform-set vpn-test
 match address v2l2v1l1
!
interface Tunnel0
 ip address 10.77.1.2 255.255.255.252
 no ip route-cache cef
 no ip route-cache
 keepalive 10 3
 tunnel source 10.76.2.2
 tunnel destination 10.76.0.2
!
interface Tunnel1
 ip address 10.77.1.6 255.255.255.252
 no ip route-cache cef
 no ip route-cache
 keepalive 10 3
 tunnel source 10.76.2.2
 tunnel destination 10.76.1.2
!
interface Ethernet0/0
 ip address 10.76.2.2 255.255.255.0
 no ip route-cache cef
 no ip route-cache
 half-duplex
 crypto map static-map1
!
interface Ethernet0/1
 ip address 10.76.3.2 255.255.255.0
 half-duplex
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 ip address 192.168.2.254 255.255.255.0
 half-duplex
!
ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 10.76.2.1
ip route 192.168.0.0 255.255.0.0 10.77.1.1
ip route 192.168.0.0 255.255.0.0 10.77.1.5
!
ip access-list extended v2l2v1l0
 permit gre host 10.76.2.2 host 10.76.0.2
ip access-list extended v2l2v1l1
 permit gre host 10.76.2.2 host 10.76.1.2
!
control-plane
!
line con 0
line aux 0
line vty 0 4
 login
!
end

  • Vicarious
  • Registratie: Juni 2008
  • Laatst online: 24-06-2024

Vicarious

☑Rekt | ☐ Not rekt

Het enige verschil dat ik zie met diverse configuratie-examples is dat jij alleen GRE-verkeer toestaat in je ACL. In de examples is dat gewoon ip. Zie bijvoorbeeld http://www.cisco.com/en/U...ple09186a00800f6d82.shtml (niet op het Cisco 6500-deel letten)

Vicariously I live while the whole world dies


  • _fm
  • Registratie: September 2003
  • Niet online
Vicarious schreef op woensdag 15 april 2009 @ 15:54:
Het enige verschil dat ik zie met diverse configuratie-examples is dat jij alleen GRE-verkeer toestaat in je ACL. In de examples is dat gewoon ip. Zie bijvoorbeeld http://www.cisco.com/en/U...ple09186a00800f6d82.shtml (niet op het Cisco 6500-deel letten)
Ik match op gre verkeer omdat ik (alleen) de gre tunnels beveiligd wil hebben met ipsec. Als ik match op ip verkeer match ik ook het verkeer dat de key-negotiation moet doen voordat de ipsec verbinding opgezet is, en werkt het niet. Ik moest dit ook even wel testen voor ik het ontdekte overigens. In je link gaat het om een ipsec vpn zonder gre tunnels.

  • Leon T
  • Registratie: Juni 2001
  • Niet online

Leon T

Ni!

Cisco zegt het volgende:
%CRYPTO-4-RECVD_PKT_NOT_IPSEC : Rec'd packet not an IPSEC packet.
(ip) dest_addr= [IP_address], src_addr= [IP_address], prot= [dec]

Explanation The received packet matches the crypto map ACL, but the packet is not encapsulated by the IPSec. The IPSec peer is sending unencapsulated packets. There may simply be a policy setup error on the peer. This activity could be considered a hostile event.

Recommended Action Contact the peer administrator to compare policy settings.

Complete these steps to resolve this issue:

1. Match the access lists with the peer. 2. Make sure that the same access list is not applied to two or more crypto map entries. 3. Refrain from using the any any statement in the access list. 4. Check routing.

[ Voor 22% gewijzigd door Leon T op 15-04-2009 17:13 ]


  • _fm
  • Registratie: September 2003
  • Niet online
Ik had natuurlijk al even rondgegoogled voor het posten, maar om zo veel mogelijk uit te sluiten:
Leon T schreef op woensdag 15 april 2009 @ 17:08:
Cisco zegt het volgende:

Complete these steps to resolve this issue:

1. Match the access lists with the peer.
Router v1, regel 58->138:139
code:
138
139
ip access-list extended v1l1v2l2
 permit gre host 10.76.1.2 host 10.76.2.2

Router v2, regel 32-> 79:80
code:
79
80
ip access-list extended v2l2v1l1
 permit gre host 10.76.2.2 host 10.76.1.2

-> match
2. Make sure that the same access list is not applied to two or more crypto map entries.
Alle crypto map entries hebben andere access lists
3. Refrain from using the any any statement in the access list.
Ook nergens het geval
4. Check routing.
code:
1
2
3
4
5
6
7
8
9
10
11
12
v2>ping 10.76.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.76.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/48 ms
v2>ping 10.76.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.76.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/31/48 ms

en vanaf de andere kant:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
v1#ping ip 10.76.2.2 source 10.76.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.76.2.2, timeout is 2 seconds:
Packet sent with a source address of 10.76.0.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/31/64 ms
v1#ping ip 10.76.2.2 source 10.76.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.76.2.2, timeout is 2 seconds:
Packet sent with a source address of 10.76.1.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/32/44 ms

Verwijderd

De crypto map moet op zowel de fysieke als op de tunnel interfaces worden toegepast.

http://www.cisco.com/en/U...ple09186a008009438e.shtml

  • _fm
  • Registratie: September 2003
  • Niet online
Verwijderd schreef op donderdag 16 april 2009 @ 00:16:
De crypto map moet op zowel de fysieke als op de tunnel interfaces worden toegepast.

http://www.cisco.com/en/U...ple09186a008009438e.shtml
Hm, dat is inderdaad wat daar staat. Ik heb bij het opzetten deze design guide gevolgd, en daar zegt men daar niets over: http://www.cisco.com/en/U...pGRE_Phase2.html#wp116966

Echter, na het herinladen van de configuraties hedenochtend kreeg ik in de ts genoemde error niet meer. Tunnel 1 (op v1/v2) bleef echter gewoon down, of ik nu de crypto map op de tunnels erbij deed of niet, geen verschil.

Meest recente configuratie (internet, v1, v2): http://pastebin.ca/1393770
Pagina: 1