此Lab與Coolking一同練習,下圖為Topology。
Cater's PC是我家的PC,內部網段為192.168.3.0 / 24
Coolking's PC是智超家的PC,內部網段為192.168.10.0 / 24
確定兩邊都可上Internet後要建立一條GRE Tunnel
以下為Cater's Router的設定檔
Router#sh run
Building configuration...
Current configuration : 1469 bytes
!
version 12.4
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
no ip cef
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
interface Tunnel 10
ip address 10.1.1.2 255.255.255.0 (我的Tunnel IP)
tunnel source Dialer1
tunnel destination 204.16.252.112 (智超的Internet Public IP)
!
!
interface FastEthernet0/0
description LAN interface
ip address 192.168.3.254 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
!
interface FastEthernet0/1
description ADSL_WAN interface
no ip address
speed auto
half-duplex
pppoe enable group global
pppoe-client dial-pool-number 1
no cdp enable
!
interface Dialer1
description ADSL_WAN dialer
ip address negotiated
no ip unreachables
ip nat outside
ip virtual-reassembly
encapsulation ppp
no ip mroute-cache
dialer pool 1
dialer-group 1
ppp authentication chap pap callin
ppp chap hostname 播接帳號@hinet.net
ppp chap password 0 播接密碼
ppp pap sent-username 播接帳號@hinet.net password 0 播接密碼
!
no ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Dialer1
ip route 192.168.10.0 255.255.255.0 Tunnel 10 (將要往智超的內部網路封包都丟Tunnel 10丟)
!
!
ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer1 overload
!
!
access-list 1 permit 192.168.3.0 0.0.0.255
!
!
control-plane
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end