- 论坛徽章:
- 0
|
图为:
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 |
|