GNS3, Site-to-Site VPN, nie wiem co robię źle Temat rozwiązany

VIRL, Dynamips, Boson NetSim, Packet Tracert, Olive, UNL, EVE-NG
Wiadomość
Autor
MrSeba
fresh
fresh
Posty: 3
Rejestracja: 07 sty 2017, 05:20

GNS3, Site-to-Site VPN, nie wiem co robię źle

#1

#1 Post autor: MrSeba »

Dzień dobry!

Powoli poznaję świat sieci. Mam do zrobienia proste zadanie i nie wiem gdzie jest błąd, co robię źle.
Mam zrobić w GN3 sieć VPN Site-to-Site. Znalazłem na YT filmik. Ale na filmiku działa a u mnie nie. I serdecznie proszę Was o pomoc.

Sieć, którą zrobiłem wygląda tak:
Obrazek

W GNS3 pracuję na routerach 3725. W GNS3 połączenie z lokalnym serverem jest, ponieważ widzę zielonego kółeczko.

Musiałem coś źle ustawić, ale tego nie widzę.
Dla przykładu, pingując z R1 z 20.20.20.1 "widzę" 10.10.10.1, nie widzę 10.10.10.2, widzę 20.20.20.2, nie widzę 172.16.10.1.
Pingując z R2 z 20.20.20.2 widzę 20.20.20.1, ale pingując z 172.16.10.1 (polecenie ping 20.20.20.1 source 172.16.10.1) to już nie widzę.
Oczywiście routery R3 i R4 się nie widzą.

Mogę prosić Was o pomoc?

Pozdrawiam

Poniżej sh run'y routerów.

R1:

Kod: Zaznacz cały

Current configuration : 1552 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
archive
 log config
  hidekeys
!
!
crypto isakmp policy 1
 authentication pre-share
crypto isakmp key cisco address 20.20.20.2
!
!
crypto ipsec transform-set myset esp-aes esp-sha-hmac
!
crypto map R1-R2 10 ipsec-isakmp
 set peer 20.20.20.2
 set transform-set myset
 match address 101
!
!
ip tcp synwait-time 5
!
!
interface FastEthernet0/0
 ip address 10.10.10.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 20.20.20.1 255.255.255.0
 serial restart-delay 0
 crypto map R1-R2
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 101 permit ip 10.10.10.0 0.0.0.255 172.16.10.0 0.0.0.255
no cdp log mismatch duplex
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end
R2:

Kod: Zaznacz cały

Current configuration : 1553 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
archive
 log config
  hidekeys
!
!
crypto isakmp policy 1
 authentication pre-share
crypto isakmp key cisco address 20.20.20.1
!
!
crypto ipsec transform-set myset esp-aes esp-sha-hmac
!
crypto map R2-R1 10 ipsec-isakmp
 set peer 20.20.20.1
 set transform-set myset
 match address 101
!
!
!
ip tcp synwait-time 5
!
!
interface FastEthernet0/0
 ip address 172.16.10.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 20.20.20.2 255.255.255.0
 serial restart-delay 0
 crypto map R2-R1
!
interface Serial1/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 101 permit ip 172.16.10.0 0.0.0.255 10.10.10.0 0.0.0.255
no cdp log mismatch duplex
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end
R3:

Kod: Zaznacz cały

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
archive
 log config
  hidekeys
!
!
ip tcp synwait-time 5
!
!
interface FastEthernet0/0
 ip address 10.10.10.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end
R4:

Kod: Zaznacz cały

Current configuration : 915 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
archive
 log config
  hidekeys
!
!
ip tcp synwait-time 5
!
!
interface FastEthernet0/0
 ip address 176.16.10.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

Awatar użytkownika
konradrz
CCIE
CCIE
Posty: 400
Rejestracja: 23 sty 2008, 14:21
Lokalizacja: Singapore, SG
Kontakt:

Re: GNS3, Site-to-Site VPN, nie wiem co robię źle

#2

#2 Post autor: konradrz »

MrSeba pisze:Dla przykładu, pingując z R1 z 20.20.20.1 "widzę" 10.10.10.1, nie widzę 10.10.10.2
Wait, what?
Nie 'widzisz' urządzenia directly connected (R1 nie widzi R3)?
To chyba coś nie tak z tym symulatorem.

(swoją drogą, nie masz żadnego routingu ustawionego, żadnego OSPF czy nawet static routes - więc za grzyba 172... nie zobaczysz z R1)
Weź no pokaż

Kod: Zaznacz cały

sh ip route

MrSeba
fresh
fresh
Posty: 3
Rejestracja: 07 sty 2017, 05:20

Re: GNS3, Site-to-Site VPN, nie wiem co robię źle

#3

#3 Post autor: MrSeba »

konradrz pisze: Wait, what?
Nie 'widzisz' urządzenia directly connected (R1 nie widzi R3)?
To chyba coś nie tak z tym symulatorem.
Poprawka, przepraszam, jednak widzę z R1 z R3. Ponownie ustawiłem interface f0/0 na R1 i jest teraz OK.
Tak samo musiałem powtórzyć z interface'm f0/0 na R2. I R2 z R4 widzą się.
konradrz pisze: (swoją drogą, nie masz żadnego routingu ustawionego, żadnego OSPF czy nawet static routes - więc za grzyba 172... nie zobaczysz z R1)
Weź no pokaż

Kod: Zaznacz cały

sh ip route
Oto sh ip route:

R1:

Kod: Zaznacz cały

Gateway of last resort is not set

     20.0.0.0/24 is subnetted, 1 subnets
C       20.20.20.0 is directly connected, Serial1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/0
R2:

Kod: Zaznacz cały

Gateway of last resort is not set

     20.0.0.0/24 is subnetted, 1 subnets
C       20.20.20.0 is directly connected, Serial1/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.10.0 is directly connected, FastEthernet0/0
R3:

Kod: Zaznacz cały

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/0
R4:

Kod: Zaznacz cały

Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.10.0 is directly connected, FastEthernet0/0
Pomyślałem, że aby nie było domysłów po prostu spiszę jakie polecenia dałem na R1 i R2.

R1:

Kod: Zaznacz cały

1.
crypto isakmp policy 1
authentication pre-share
hash sha

2.
crypto isakmp key cisco address 20.20.20.2

3.
crypto ipsec transform-set myset esp-sha-hmac esp-aes

4.
access-list 101 permit ip 10.10.10.0 0.0.0.255 172.16.10.0 0.0.0.255

5.
crypto map R1-R2 10 ipsec-isakmp
set peer 20.20.20.2
match address 101
set transform-set myset

Następnie na s1/0:
crypto map R1-R2
R2:

Kod: Zaznacz cały

1.
crypto isakmp policy 1
authentication pre-share
hash sha

2.
crypto isakmp key cisco address 20.20.20.1

3.
crypto ipsec transform-set myset esp-sha-hmac esp-aes

4.
access-list 101 permit ip 172.16.10.0 0.0.0.255 10.10.10.0 0.0.0.255

5.
crypto map R2-R1 10 ipsec-isakmp
set peer 20.20.20.1
set transform-set myset
match address 101

Następnie na s1/0
crypto map R2-R1
Dzięki za odpowiedź :roll:

Awatar użytkownika
konradrz
CCIE
CCIE
Posty: 400
Rejestracja: 23 sty 2008, 14:21
Lokalizacja: Singapore, SG
Kontakt:

Re: GNS3, Site-to-Site VPN, nie wiem co robię źle

#4

#4 Post autor: konradrz »

MrSeba pisze:Tak samo musiałem powtórzyć z interface'm f0/0 na R2. I R2 z R4 widzą się.
To teraz musisz nauczyć np R3, jak trafić do sieci 20.x.
Możesz to albo zrobić "ręcznie" (tzw static routing, mówisz routerowi R3 "aby trafić do sieci 20/8, idź przez urządzenie R1", podobnie na R4 "idź via R2", potem jeszcze wpisy na R1 i R2 odnośnie R4 i R3, odpowiednio; 4 linijki w sumie, po 1 na każdym routerze), albo automagicznie, "chłopaki sami se porozgłaszajcie jakie sieci widzicie", np tak.

MrSeba
fresh
fresh
Posty: 3
Rejestracja: 07 sty 2017, 05:20

Re: GNS3, Site-to-Site VPN, nie wiem co robię źle

#5

#5 Post autor: MrSeba »

Jejku, działa. Śmiga aż miło popatrzeć. Bardzo Ci konradrz dziękuję! Poczytałem o routingu statycznym i o OSPF, poćwiczyłem obie metody. Super!
Jestem Ci bardzo wdzięczny za pomoc! :D

Czyli nie masz zastrzeżeń do tego co zrobiłem, tak? Jest dobrze, tylko tych kilku ważnych linijek zabrakło, zgadza się? :)

Awatar użytkownika
konradrz
CCIE
CCIE
Posty: 400
Rejestracja: 23 sty 2008, 14:21
Lokalizacja: Singapore, SG
Kontakt:

Re: GNS3, Site-to-Site VPN, nie wiem co robię źle

#6

#6 Post autor: konradrz »

MrSeba pisze:Poczytałem o routingu statycznym i o OSPF, poćwiczyłem obie metody.
Świetnie, początki masz za sobą.
MrSeba pisze:Czyli nie masz zastrzeżeń do tego co zrobiłem
Jedyne co mi od palca/ręki przychodzi, to - niektóre routery mają jeszcze komendę "crypto isakmp policy" w której można parę dodatków potuningować.
Ale poza tym - nic zdrożnego. A i dużo się nauczyłeś, a o to przecież chodzi.

ODPOWIEDZ