PDA

View Full Version : LAB Cấu hình GRE Tunnel to a Remote Site



danghoangkhanh
03-06-2008, 01:56 PM
Cấu hình GRE Tunnel to a Remote Site

Mô hình:


http://wimaxpro.org/Hinh_upload/hinh_forum/IPSEC_VPN_042.jpg

Các bước tiến hành cấu hình GRE Tunnel:

Bước 1 :
cấu hình cho các Router ping được thông nhau:

Đối với Router P:

Router#config terminal
Router(config)#hostname RP
RP(config)#interface f0/1
RP(config-if)#ip address 172.30.1.2 255.255.255.0
RP(config-if)#no shut
RP(config-if)#exit
RP(config)#int f0/0
RP(config-if)#ip address 10.0.1.2 255.255.255.0
RP(config-if)#no shut
RP(config-if)#exit
RP(config)#ip route 0.0.0.0 0.0.0.0 172.30.1.1

Đối với Router Q

Router#config terminal
Router(config)hostname RQ
RQ(config)# int f0/1
RQ(config-if)#ip address 172.30.6.2 255.255.255.0
RQ(config-if)#no shut
RQ(config-if)#exit
RQ(config)int f0/0
RQ(config-if)#ip add 10.0.6.2 255.255.255.0
RQ(config-if)#no shut
RQ(config-if)#exit
RQ(config) ip route 0.0.0.0 0.0.0.0 172.30.6.1

Bước 2:
cấu hình interface tunnel

Đối với Router P

RP(config)# interface tunnel 0
RP(config-if)# ip address 172.16.1.1 255.255.255.0
RP(config-if)# tunnel source 172.30.1.2
RP(config-if)# tunnel destination 172.30.6.2
RP(config-if)# no shut
RP(config-if)#exit

Đối với Router Q

RQ(config)#interface tunnel 0
RQ(config-if)# ip address 172.16.1.6 255.255.255.0
RQ(config-if)# tunnel source 172.30.6.2
RQ(config-if)#tunnel destination 172.30.1.2
RQ(config-if)#no shut
RQ(config-if)#exit

Bước 3: cấu hình static route

RP(config)# ip route 10.0.6.0 255.255.255.0 tunnel 0
RQ(config)# ip route 10.0.1.0 255.255.255.0 tunnel 0
RP(config)#exit

thực hiện kiểm tra

đặt địa chỉ PC của RP là 10.0.1.12 v à PC của RQ là 10.0.6.12
Thực hiện ping đến 10.0.6.12 từ 10.0.1.12

kết quả ping thành công


http://wimaxpro.org/Hinh_upload/hinh_forum/IPSEC_VPN_043.jpg

kiểm tra hoạt động

RP#show run
hostname RP
interface Tunnel0
ip address 172.16.1.1 255.255.255.0
tunnel source 172.30.1.2
tunnel destination 172.30.6.2
!
interface FastEthernet0/0
ip address 10.0.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 172.30.1.2 255.255.255.0
duplex auto
speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.30.1.1
ip route 10.0.6.0 255.255.255.0 Tunnel0
!

RQ#show run
hostname RQ
!
interface Tunnel0
ip address 172.61.1.6 255.255.255.0
tunnel source 172.30.6.2
tunnel destination 172.30.1.2
!
interface FastEthernet0/0
ip address 10.0.6.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 172.30.6.2 255.255.255.0
duplex auto
speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.30.6.1
ip route 10.0.1.0 255.255.255.0 Tunnel0
!

kiểm tra interface tunnel:

RP#show interface tunnel 0


http://wimaxpro.org/Hinh_upload/hinh_forum/IPSEC_VPN_044.jpg

anhpfiev
09-03-2010, 01:51 PM
Chào anh,
Em cung dang tim hiểu về công nghẹ này,
Anh có tài liệu nào về nó co thể gửi cho em vao mail không ạ.

dangquangminh
09-03-2010, 04:33 PM
Hi

Bạn có thể đọc quyển sách về VPN bên dưới. Trong đó chương 4 là chương nói về các loại tunnels.

http://www.4shared.com/file/237456346/4868fd29/AddisonWesleyTelecommunication.html

anhpfiev
09-03-2010, 09:12 PM
Cam on anh

htsangit
24-03-2010, 04:13 PM
Bài viết hay có giá trị tuy nhưng sơ đồ lap không được chi tiết nên hơi khó hiểu. Cám ơn nhiều.

ngoccu123
07-05-2010, 08:31 AM
ban đã chay chương trình này trên phần mềm nao vậy:111:

chuonghn
14-06-2010, 09:09 AM
Hi

Bạn có thể đọc quyển sách về VPN bên dưới. Trong đó chương 4 là chương nói về các loại tunnels.

http://www.4shared.com/file/237456346/4868fd29/AddisonWesleyTelecommunication.html

Hình như nhầm sách rồi bác ợ :(

dangquangminh
13-07-2010, 10:32 PM
VPNDesign.zip

http://rapidshare.com/files/30676212/VPNDesign.zip.html

kenta
18-11-2010, 09:05 PM
thầy ơi, thầy up lên mediafire được không thầy? e download rapid hok được. :((

dungvh
28-11-2010, 10:23 AM
Bạn chuyển sang mode GRE : Hub and spock with IP Sec thử xem.
Mình đang bí cái này mà chưa dùng được.

Thanks bạn.

hthfox
23-12-2010, 12:12 AM
chào thầy và các bạn,

Mình đã config interface tunnel như bài Hướng dẫn cho hệ thống của cty nhưng không thể kết nối được với site.
Theo như mình debug thì thấy interface tunnel ở 1 đầu ko có traffic input:

VTP#show interfaces tunnel 6
Tunnel6 is up, line protocol is down
Hardware is Tunnel
Description: Tunnel VPN to CTP
Internet address is 172.16.6.2/24
MTU 1514 bytes, BW 1024 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive set (10 sec), retries 3
Tunnel source 113.160.aaa.aaa (Dialer1), destination 118.69.bbb.bbb
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Path MTU Discovery, ager 10 mins, min MTU 92, MTU 0, expires never
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input never, output 00:00:04, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 1
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
58 packets output, 2784 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
Còn interface của router đầu kia vẫn có traffice bình thường

Tunnel6 is up, line protocol is down
Hardware is Tunnel
Description: Tunnel VPN to DTP
Internet address is 172.16.6.1/24
MTU 1514 bytes, BW 1024 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive set (10 sec), retries 3
Tunnel source 118.69.bbb.bbb (Dialer1), destination 113.160.aaa.aaa
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Path MTU Discovery, ager 10 mins, min MTU 92, MTU 0, expires never
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 16:27:34, output 00:00:03, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 63
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
77169 packets input, 3767570 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
80740 packets output, 3938412 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out

Rất mong thầy và các bạn giúp đỡ mình để có thể debug lỗi này sớm, cần thêm thông tin có thể line hện với mình theo email: hatrhieu@gmail.com
PS: Mô hình đấu nối:http://picasaweb.google.com/lh/photo/88_NZVhtbtztd04zin5Vdg?feat=directlink

dungvh
05-01-2011, 07:13 AM
bạn khai network-id chưa ?

nevergive_up
03-12-2012, 02:38 PM
4992
các Huynh cho em hỏi với :

Sơ đồ như bài trên mà làm trên GNS3 cái đám mây ở giữa 2 Router và server đó thì làm cách nào để kết nối qua đám mây ở DNS với 3 thiết bị đó được nhỉ các Huynh ơi, giải đáp giúp em vs nhé!

lamvantu
13-12-2012, 03:31 PM
Đám mây bạn lấy router cấu hình giả lập nhé.