GREvpn
发一下这些日忙的东西~
实验拓扑
以R2为界限的左半边运行ospf,各个链路已经ping通,用R7模拟PC1,PC1和R2的f0/0来回链路没问题
右半边同左半边做相应的配置也成功ping通
在R2和R3之间建立vpn隧道,网段为172.16.23.0/24,配置完成后在R2和R3中宣告隧道网段,PC1成功ping通PC2,也走vpn
所在的网段
实验成功!
R1的配置
!
hostname R1
!
ip cef
!
!
interface FastEthernet0/0
ip address 10.1.10.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 10.1.10.1 0.0.0.0 area 0
network 192.168.12.1 0.0.0.0 area 0
!
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R2
!
hostname R2
!
ip cef
!
!
interface Tunnel1
ip address 172.16.23.1 255.255.255.0
tunnel source 202.103.23.1
tunnel destination 202.103.23.2
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 202.103.23.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 10.253.1.2
log-adjacency-changes
network 172.16.23.1 0.0.0.0 area 0
network 192.168.12.2 0.0.0.0 area 0
!
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R3
!
hostname R3
!
ip cef
!
!
interface Tunnel1
ip address 172.16.23.2 255.255.255.0
tunnel source 202.103.23.2
tunnel destination 202.103.23.1
!
interface FastEthernet0/0
ip address 202.103.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 192.168.34.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 10.253.1.3
log-adjacency-changes
network 172.16.23.2 0.0.0.0 area 0
network 192.168.34.1 0.0.0.0 area 10
!
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
!
end
R4
!
hostname R4
!
interface FastEthernet0/0
ip address 192.168.34.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.1.20.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 10.253.1.4
log-adjacency-changes
network 10.1.20.1 0.0.0.0 area 10
network 192.168.34.2 0.0.0.0 area 10
!
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R6
!
hostname PC2
!
interface FastEthernet0/0
ip address 10.1.20.2 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
ip default-gateway 10.1.20.1
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end
R7
!
hostname PC1
!
interface FastEthernet0/0
ip address 10.1.10.2 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
ip default-gateway 10.1.10.1
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
!
end