FortiGate_BJ_Center # execute ping-options source 192.168.111.1
FortiGate_BJ_Center # execute ping 192.168.112.1
PING 192.168.112.1 (192.168.112.1): 56 data bytes
64 bytes from 192.168.112.1: icmp_seq=0 ttl=255 time=1.5 ms
64 bytes from 192.168.112.1: icmp_seq=1 ttl=255 time=1.2 ms
64 bytes from 192.168.112.1: icmp_seq=2 ttl=255 time=1.0 ms
64 bytes from 192.168.112.1: icmp_seq=3 ttl=255 time=0.9 ms
64 bytes from 192.168.112.1: icmp_seq=4 ttl=255 time=1.0 ms
--- 192.168.112.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.9/1.1/1.5 ms
FortiGate_BJ_Center # execute ping-options reset
FortiGate_BJ_Center # execute ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1): 56 data bytes
64 bytes from 10.10.10.1: icmp_seq=0 ttl=255 time=0.2 ms
64 bytes from 10.10.10.1: icmp_seq=1 ttl=255 time=0.0 ms
64 bytes from 10.10.10.1: icmp_seq=2 ttl=255 time=0.0 ms
64 bytes from 10.10.10.1: icmp_seq=3 ttl=255 time=0.0 ms
64 bytes from 10.10.10.1: icmp_seq=4 ttl=255 time=0.0 ms
--- 10.10.10.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.2 ms
FortiGate_BJ_Center # execute ping 10.10.10.2
PING 10.10.10.2 (10.10.10.2): 56 data bytes
64 bytes from 10.10.10.2: icmp_seq=0 ttl=255 time=1.2 ms
64 bytes from 10.10.10.2: icmp_seq=1 ttl=255 time=1.3 ms
64 bytes from 10.10.10.2: icmp_seq=2 ttl=255 time=1.2 ms
64 bytes from 10.10.10.2: icmp_seq=3 ttl=255 time=1.1 ms
64 bytes from 10.10.10.2: icmp_seq=4 ttl=255 time=1.2 ms
--- 10.10.10.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 1.1/1.2/1.3 ms
FortiGate_BJ_Center #
Cisco-Router-SH#ping 192.168.111.1 source 192.168.112.1 repeat 100
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 192.168.111.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.112.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 1/1/1 ms
Cisco-Router-SH#
Cisco-Router-SH#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Cisco-Router-SH#ping 10.10.10.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/5 ms
Cisco-Router-SH#
使用OSPF代替静态路由:
FortiGate_BJ_Center配置修改:
FortiGate_BJ_Center # config router static
FortiGate_BJ_Center (static) # show
config router static
edit 1
set gateway 202.106.1.254
set device "port1"
next
edit 2
set dst 192.168.112.0 255.255.255.0
set device "tunnel1"
next
end
FortiGate_BJ_Center (static) # delete 2
FortiGate_BJ_Center (static) # show
config router static
edit 1
set gateway 202.106.1.254
set device "port1"
next
end
FortiGate_BJ_Center (static) # end
config router ospf
set router-id 10.10.10.1
config area
edit 0.0.0.0
next
end
config ospf-interface
edit "tunnel1"
set interface "tunnel1"
set mtu-ignore enable
set network-type point-to-point
next
end
config network
edit 1
set prefix 10.10.10.0 255.255.255.0
next
edit 2
set prefix 192.168.111.0 255.255.255.0
next
end
end
Cisco-Router-SH配置修改:
no ip route 192.168.111.0 255.255.255.0 10.10.10.1
!
router ospf 10
network 10.10.10.0 0.0.0.255 area 0
network 192.168.112.0 0.0.0.255 area 0
!
interface Tunnel1
ip mtu 1400
ip ospf mtu-ignore
!
结果测试:
FortiGate_BJ_Center # get router info ospf neighbor
OSPF process 0, VRF 0:
Neighbor ID Pri State Dead Time Address Interface
202.106.2.1 1 Full/ - 00:00:30 10.10.10.2 tunnel1
FortiGate_BJ_Center #
FortiGate_BJ_Center # get router info routing-table all
Routing table for VRF=0
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default
S* 0.0.0.0/0 [10/0] via 202.106.1.254, port1
C 10.10.10.0/24 is directly connected, tunnel1
C 10.10.10.1/32 is directly connected, tunnel1
C 192.168.111.0/24 is directly connected, port2
O 192.168.112.0/24 [110/110] via 10.10.10.2, tunnel1, 00:41:10
C 202.106.1.0/24 is directly connected, port1
Cisco-Router-SH#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.10.10.1 0 FULL/ - 00:00:33 10.10.10.1 Tunnel1
Cisco-Router-SH#
Cisco-Router-SH#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is 202.106.2.254 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 202.106.2.254
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, Tunnel1
L 10.10.10.2/32 is directly connected, Tunnel1
O 192.168.111.0/24 [110/1001] via 10.10.10.1, 00:42:03, Tunnel1
192.168.112.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.112.0/24 is directly connected, Ethernet0/1
L 192.168.112.1/32 is directly connected, Ethernet0/1
202.106.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 202.106.2.0/24 is directly connected, Ethernet0/0
L 202.106.2.1/32 is directly connected, Ethernet0/0
Cisco-Router-SH#
Cisco-Router-SH#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Cisco-Router-SH#ping 10.10.10.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/5 ms
Cisco-Router-SH#
Cisco-Router-SH#ping 192.168.111.1 sou
Cisco-Router-SH#ping 192.168.111.1 source 192.168.112.1 re
Cisco-Router-SH#ping 192.168.111.1 source 192.168.112.1 repeat 100
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 192.168.111.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.112.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 1/1/1 ms
Cisco-Router-SH#