Thứ Ba, 11 tháng 2, 2014

Tài liệu PPP over Ethernet with VPN docx

hash md5
authentication pre-share
crypto isakmp key cisco address 203.162.3.1  tạo key để xác minh
!
!
crypto ipsec transform-set vnpro esp-des  tạo chính sách mã hoá cho luống traffic trong tunnel
!
crypto map lee 10 ipsec-isakmp  tạo crypto map để match traffic
set peer 203.162.3.1
set transform-set vnpro
match address 120
!
!
!
voice call carrier capacity active
!
!
!
!
!
!
!
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Ethernet0/0
ip address 10.10.2.1 255.255.255.0
ip nat inside
half-duplex
!
interface Serial0/0
ip address 203.30.30.2 255.255.255.252
ip nat outside
no fair-queue
crypto map lee  áp crypto map vào interface S0/0
!
interface Serial0/1
no ip address
shutdown
!
ip nat inside source route-map nonat interface Serial0/0 overload tạo NAT
ip classless
ip route 0.0.0.0 0.0.0.0 203.30.30.1
ip http server
!
!
access-list 120 permit ip 10.10.2.0 0.0.0.255 10.10.1.0 0.0.0.255 xác định traffic được mã hoá
access-list 130 deny ip 10.10.2.0 0.0.0.255 10.10.1.0 0.0.0.255 miễn NAT cho traffic trong tunnel
access-list 130 permit ip any any
!
route-map nonat permit 10
match ip address 130
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

R3
Building configuration

*Mar 1 01:25:49.913: %SYS-5-CONFIG_I: Configured from console by console
Current configuration : 1523 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
!
memory-size iomem 10
ip subnet-zero
!
!
!
vpdn enable bật PPPoE
!
vpdn-group 1 tạo vpdn group để giao tiếp với server
request-dialin  xác định đây là PPPoE client
protocol pppoe
!
!
crypto isakmp policy 10  tạo chính sách xác minh
hash md5
authentication pre-share
crypto isakmp key cisco address 203.30.30.2  tạo key để xác minh
!
!
crypto ipsec transform-set vnpro esp-des  xác định giải thuật mã hoá cho traffic trong tunnel
!
crypto map lee 10 ipsec-isakmp  tạo crypto map để xác định traffci được mã hoá
set peer 203.30.30.2
set transform-set vnpro
match address 120
!
!
!
voice call carrier capacity active
!
!
!
!
!
!
!
!
!
mta receive maximum-recipients 0
!
!
!
!
interface Loopback0
ip address 10.10.1.1 255.255.255.0
ip nat inside
!
interface Ethernet0/0
no ip address
half-duplex
pppoe enable bật PPPoE trên interface nối với server
pppoe-client dial-pool-number 1  sử dụng Dieler để giao tiếp với PPPoE server
!
interface Serial0/0
no ip address
shutdown
no fair-queue
!
interface Dialer1  xây dựng interface Dialer
mtu 1492
ip address 203.162.3.1 255.255.255.0
ip nat outside
encapsulation ppp
dialer pool 1
dialer-group 1
crypto map lee  gán crypto map vào interface này
!
ip nat inside source route-map nonat interface Dialer1 overload sử dụng PAT
ip classless
ip route 0.0.0.0 0.0.0.0 203.162.3.2
ip http server
!
!
access-list 120 permit ip 10.10.1.0 0.0.0.255 10.10.2.0 0.0.0.255  xác định traffic được bảo vệ
access-list 130 deny ip 10.10.1.0 0.0.0.255 10.10.2.0 0.0.0.255  miễn NAT cho traffic trong tunnel
access-list 130 permit ip any any
dialer-list 1 protocol ip permit
!
route-map nonat permit 10
match ip address 130
!
call rsvp-sync
!
!
mgcp profile default
!
dial-peer cor custom
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

ISP
Building configuration

01:17:31: %SYS-5-CONFIG_I: Configured from console by console
Current configuration:
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname ISP
!
!
ip subnet-zero
!
!
!
interface Ethernet0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0
ip address 203.20.20.1 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
no fair-queue
clockrate 64000
!
interface Serial1
ip address 203.30.30.1 255.255.255.252
no ip directed-broadcast
clockrate 64000
!
ip classless
ip route 10.10.1.0 255.255.255.0 203.20.20.2  ISP sử dụng static routing
ip route 10.10.2.0 255.255.255.0 203.30.30.2
ip route 203.162.0.0 255.255.0.0 203.20.20.2
!
!
line con 0
transport input none
line aux 0
line vty 0 4
!
end

Thực hiện:
1. Cấu hình PPPoE:
PPP over Ethernet là một sự phát triển dựa trên kỹ thuật PPP truyền thống. PPPoE cung cấp khả năng kết
nối nhiều host trong mạng qua một thiết bị chuyển mạch vào một DSLAM, để cung cấp một kết nối
PPPoE, mỗi phiên PPP phải học địa chỉ Ethernet của remote peer và thiết lập một danh định duy nhất.
PPPoE gồm 2 pha: Discovery và Session:
• Discovery: khi một router muốn khởi tạo 1 phiên PPPoE, nó phải xác định địa chỉ MAC của
thiết bị bên kia (Lát nửa debug sẽ cho thấy điều này) và thiết lập một PPPoE Session-ID. Trong
quá trình này, CPE sẽ tìm các DSLAM và chọn một cái để sử dụng. Khi quá trình này chấm dứt,
cả CPE và DSLAM đều sẽ có thông tin mà nó sử dụng để xây dựng kết nối PPPoE. Khi
PPPsession được thiết lập thì cả CPE và DSLAM sẽ phải phân phát tài nguyên của mình cho một
PPP virtual interface.
• Session: khi được thiết lập thì dữ liệu sẽ được gửi.
Để cấu hình, ta thực hiện các bước sau:

PPPoE server(R1):
R1(config)#vpdn enable  bật PPPoE
R1(config)#vpdn-group 1
R1(config-vpdn)#accept-dialin xác định đây là PPPoE server
R1(config-vpdn-acc-in)#protocol pppoe
R1(config-vpdn-acc-in)#virtual-template 1  sử dụng virtual để giao tiếp với client
R1(config-vpdn-acc-in)#exit
R1(config)#int lo1
R1(config-if)#ip add 203.162.3.2 255.255.255.255
R1(config-if)#int e0/0
R1(config-if)#pppoe enable  bật PPPoE trên interface kết nối với client
R1(config)#int virtual-template 1  tạo virtual template
R1(config-if)#ip unnumbered lo1

Không có nhận xét nào:

Đăng nhận xét