免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1100 | 回复: 0
打印 上一主题 下一主题

L2TPV3实验及配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-17 14:04 |只看该作者 |倒序浏览

图为:

r1---------r2---------r3---------r4--------r8

r2和r4之间做一条l2tpv3的隧道,我做的是动态的,静态的相对比较简单.如果配置静态可以相关的部分改成下面即可:

去掉l2tp-class.

r2:
pseudowire-class lab-l2tpv3
encapsulation l2tpv3
protocol none
ip local interface Loopback0


xconnect 4.4.4.4 100  encapsulation l2tpv3 manual pw-class  lab-l2tpv3
  l2tp id 100 200                                                         
  l2tp cookie local 8 100 200                                      
  l2tp cookie remote 8 1000 2000                                       

r4:
pseudowire-class lab-l2tpv3
encapsulation l2tpv3
protocol none
ip local interface Loopback0


xconnect 2.2.2.2 100  encapsulation l2tpv3 manual pw-class  lab-l2tpv3
  l2tp id 100 200                                                         
  l2tp cookie local 8 1000 2000                                      
  l2tp cookie remote 8 100 200   


我的配置如下:
R1#wr t
Building configuration...
Current configuration : 1427 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
!
enable password en
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
ip host R1 1.1.1.1
ip host R2 2.2.2.2
ip host R3 3.3.3.3
ip host R4 4.4.4.4
ip host R5 5.5.5.5
ip host R6 6.6.6.6
ip host R7 7.7.7.7
ip host R8 8.8.8.8
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback10
ip address 10.10.10.10 255.255.255.255
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Ethernet1/0
ip address 192.168.4.1 255.255.255.0
duplex full
!
interface Ethernet1/1
no ip address
shutdown
duplex half
!
interface Ethernet1/2
no ip address
shutdown
duplex half
!
interface Ethernet1/3
no ip address
shutdown
duplex half
!
interface Ethernet1/4
no ip address
shutdown
duplex half
!
interface Ethernet1/5
no ip address
shutdown
duplex half
!         
interface Ethernet1/6
no ip address
shutdown
duplex half
!
interface Ethernet1/7
no ip address
shutdown
duplex half
!
ip route 0.0.0.0 0.0.0.0 10.10.0.2
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
!         
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password en
login
!
!
end
R1#            








R2#wr t
Building configuration...
Current configuration : 1694 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
!
enable password en
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
ip host R1 1.1.1.1
ip host R2 2.2.2.2
ip host R3 3.3.3.3
ip host R4 4.4.4.4
ip host R5 5.5.5.5
ip host R6 6.6.6.6
ip host R7 7.7.7.7
ip host R8 8.8.8.8
l2tp-class pass
authentication
password 7 111D1C1603
cookie size 8
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
pseudowire-class lab-l2tpv3
encapsulation l2tpv3
protocol l2tpv3 pass
ip local interface Loopback0
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Ethernet1/0
no ip address
duplex full
no cdp enable
xconnect 4.4.4.4 100 pw-class lab-l2tpv3 sequencing both
!
interface Ethernet1/1
ip address 10.10.1.1 255.255.255.0
duplex full
!
interface Ethernet1/2
no ip address
shutdown
duplex half
!
interface Ethernet1/3
no ip address
shutdown
duplex half
!
interface Ethernet1/4
no ip address
shutdown
duplex half
!
interface Ethernet1/5
no ip address
shutdown
duplex half
!
interface Ethernet1/6
no ip address
shutdown
duplex half
!
interface Ethernet1/7
no ip address
shutdown
duplex half
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 10.10.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!         
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password en
login
!
!
end
R2#   







R3#wr t
Building configuration...
Current configuration : 1438 bytes
!
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
!
enable password en
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
ip host R1 1.1.1.1
ip host R2 2.2.2.2
ip host R3 3.3.3.3
ip host R4 4.4.4.4
ip host R5 5.5.5.5
ip host R6 6.6.6.6
ip host R7 7.7.7.7
ip host R8 8.8.8.8
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Ethernet1/0
ip address 10.10.2.1 255.255.255.0
duplex full
!
interface Ethernet1/1
ip address 10.10.1.2 255.255.255.0
duplex full
!
interface Ethernet1/2
no ip address
shutdown
duplex half
!
interface Ethernet1/3
no ip address
shutdown
duplex half
!
interface Ethernet1/4
no ip address
shutdown
duplex half
!
interface Ethernet1/5
no ip address
shutdown
duplex half
!
interface Ethernet1/6
no ip address
shutdown
duplex half
!
interface Ethernet1/7
no ip address
shutdown
duplex half
!
router ospf 100
router-id 3.3.3.3
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
!         
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password en
login
!
!
end
R3#   









R4#wr t
Building configuration...
Current configuration : 1694 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
!
enable password en
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
ip host R1 1.1.1.1
ip host R2 2.2.2.2
ip host R3 3.3.3.3
ip host R4 4.4.4.4
ip host R5 5.5.5.5
ip host R6 6.6.6.6
ip host R7 7.7.7.7
ip host R8 8.8.8.8
l2tp-class pass
authentication
password 7 021201481F
cookie size 8
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
pseudowire-class lab-l2tpv3
encapsulation l2tpv3
protocol l2tpv3 pass
ip local interface Loopback0
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Ethernet1/0
ip address 10.10.2.2 255.255.255.0
duplex full
!
interface Ethernet1/1
no ip address
shutdown
duplex half
!
interface Ethernet1/2
no ip address
shutdown
duplex half
!
interface Ethernet1/3
no ip address
shutdown
duplex half
!
interface Ethernet1/4
no ip address
shutdown
duplex half
!
interface Ethernet1/5
no ip address
shutdown
duplex half
!
interface Ethernet1/6
no ip address
shutdown
duplex half
!
interface Ethernet1/7
no ip address
duplex full
no cdp enable
xconnect 2.2.2.2 100 pw-class lab-l2tpv3 sequencing both
!
router ospf 100
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 10.10.2.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!         
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password en
login
!
!
end
R4#      







R8#wr t
Building configuration...
Current configuration : 1429 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R8
!
boot-start-marker
boot-end-marker
!
enable password en
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
ip host R1 1.1.1.1
ip host R2 2.2.2.2
ip host R3 3.3.3.3
ip host R4 4.4.4.4
ip host R5 5.5.5.5
ip host R6 6.6.6.6
ip host R7 7.7.7.7
ip host R8 8.8.8.8
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
!
!
!
!
interface Loopback0
ip address 8.8.8.8 255.255.255.255
!
interface Loopback10
ip address 20.20.20.20 255.255.255.255
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Ethernet1/0
no ip address
shutdown
duplex half
!
interface Ethernet1/1
no ip address
shutdown
duplex half
!
interface Ethernet1/2
no ip address
shutdown
duplex half
!
interface Ethernet1/3
no ip address
shutdown
duplex half
!
interface Ethernet1/4
no ip address
shutdown
duplex half
!
interface Ethernet1/5
no ip address
shutdown
duplex half
!
interface Ethernet1/6
no ip address
shutdown
duplex half
!
interface Ethernet1/7
ip address 192.168.4.2 255.255.255.0
duplex full
!
ip route 0.0.0.0 0.0.0.0 192.168.4.1
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
!         
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
stopbits 1
line aux 0
line vty 0 4
password en
login
!
!
end
R8#         



测试ping:
R1#ping 192.168.4.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/26/40 ms



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/45470/showart_362089.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP