PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:network:cisco:vpn:tunneling:gre:gre

This is an old revision of the document!


Cisco: GRE

Topology

IP

Project name: ccna-vpn-gre-0001-gre

  • R1
enable
configure terminal
!
hostname R1
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
exit
!
interface GigabitEthernet 0/0
ip address 10.100.0.1 255.255.255.0
no shutdown
exit
interface GigabitEthernet 0/1
ip address 100.0.0.1 255.255.0.0
no shutdown
exit
!
end
write
  • R2
enable
configure terminal
!
hostname R2
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
exit
!
interface GigabitEthernet 0/0
ip address 10.200.0.2 255.255.255.0
no shutdown
exit
interface GigabitEthernet 0/1
ip address 200.0.0.2 255.255.0.0
no shutdown
exit
!
end
write
  • R3
enable
configure terminal
!
hostname R3
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
exit
!
interface GigabitEthernet 0/0
ip address 34.0.0.3 255.255.255.0
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
!
end
write
  • R4
enable
configure terminal
!
hostname R4
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
exit
!
interface GigabitEthernet 0/0
ip address 34.0.0.4 255.255.255.0
no shutdown
exit
interface GigabitEthernet 0/1
no shutdown
exit
!
end
write
  • PC-1
ip 10.100.0.100 255.255.255.0 10.100.0.1
save
  • PC-2
ip 10.200.0.200 255.255.255.0 10.200.0.2
save

Configure Basic Routing Protocol(BGP, Static routing)

  • R3
configure terminal
!
router bgp 3
neighbor 34.0.0.4 remote-as 4
network 100.0.0.1 mask 255.255.255.255
exit
!
end
  • R4
configure terminal
!
router bgp 3
neighbor 34.0.0.3 remote-as 3
network 200.0.0.2 mask 255.255.255.255
exit
!
end

Configure PPPoE Server, Client

  • R1
configure terminal
!
interface GigabitEthernet 0/1
no ip address
pppoe enable
pppoe-client dial-pool-number 10
exit
!
interface GigabitEthernet 0/0
ip tcp adjust-mss 1356
exit
!
interface Loopback 1
ip address 100.0.0.1 255.255.255.0
exit
!
interface Dialer 1
ip unnumbered Loopback 1
ip mtu 1454
encapsulation ppp
dialer pool 10
dialer-group 20
ppp authentication chap callin
ppp chap hostname ccie@example.com
ppp chap password cc13
no shutdown
exit
!
ip route 200.0.0.0 255.255.0.0 Dialer 1
ip route 34.0.0.0 255.255.255.0 Dialer 1
!
dialer-list 20 protocol ip permit
!
end
  • R2
configure terminal
!
interface GigabitEthernet 0/1
no ip address
pppoe enable
pppoe-client dial-pool-number 10
exit
!
interface GigabitEthernet 0/0
ip tcp adjust-mss 1356
exit
!
interface Loopback 1
ip address 200.0.0.2 255.255.255.0
exit
!
interface Dialer 1
ip unnumbered Loopback 1
ip mtu 1454
encapsulation ppp
dialer pool 10
dialer-group 20
ppp authentication chap callin
ppp chap hostname ccie@example.com
ppp chap password cc13
no shutdown
exit
!
ip route 100.0.0.0 255.255.0.0 Dialer 1
ip route 34.0.0.0 255.255.255.0 Dialer 1
!
dialer-list 20 protocol ip permit
!
end
  • R3
configure terminal
!
username ccie@example.com password cc13
!
ip local pool POOL1 100.0.0.1
!
interface Loopback1
ip address 100.1.3.3 255.255.255.0
exit
!
interface Virtual-Template1
mtu 1454
ip unnumbered Loopback1
peer default ip address pool POOL1
ppp authentication chap
exit
!
bba-group pppoe PPPOE-GROUP1
virtual-template 1
exit
!
interface GigabitEthernet 0/1
no ip address
pppoe enable group PPPOE-GROUP1
no shut
exit
!
end
  • R4
configure terminal
!
username ccie@example.com password cc13
!
ip local pool POOL1 200.0.0.2
!
interface Loopback1
ip address 200.2.4.4 255.255.255.0
exit
!
interface Virtual-Template1
mtu 1454
ip unnumbered Loopback1
peer default ip address pool POOL1
ppp authentication chap
exit
!
bba-group pppoe PPPOE-GROUP1
virtual-template 1
exit
!
interface GigabitEthernet 0/1
no ip address
pppoe enable group PPPOE-GROUP1
no shut
exit
!
end

Static Routing

configure terminal
!
interface GigabitEthernet 0/0
 ! MSS 1500 - 24 = 1476 (Ethernet + GRE)
 ! MSS 1500 - 8 = 1492 (PPPoE)
 ! MSS 1454 - 40 = 1414 (NTT NGN + PPPoE)
 ! MSS 1454 - 40 - 24 = 1390 (NTT NGN + PPPoE + GRE)
 ! MSS 1356 - 24 = 1332 (NTT NGN + PPPoE + IPsec(3des, md5-hamc)+ GRE)
 ip tcp adjust mss 1332
exit
!
interface Tunnel 0
 ip address 192.168.0.1 255.255.255.252
 tunnel source 100.0.0.1
 tunnel destination 200.0.0.2
 keepalive 10 5
exit
!
ip route 10.200.0.0 255.255.255.0 Tunnel 0
!
end
configure terminal
!
interface GigabitEthernet 0/0
 ! MSS 1356 - 24 = 1332 (NTT NGN + PPPoE + IPsec(3des, md5-hamc)+ GRE)
 ip tcp adjust mss 1332
exit
!
interface Tunnel 0
 ip address 192.168.0.2 255.255.255.252
 tunnel source 200.0.0.2
 tunnel destination 100.0.0.1
 keepalive 10 5
exit
!
ip route 10.100.0.0 255.255.255.0 Tunnel 0
!
end

Dynamic Routing

configure terminal
!
interface GigabitEthernet 0/0
 ! MSS 1356 - 24 = 1332 (NTT NGN + PPPoE + IPsec(3des, md5-hamc)+ GRE)
 ip tcp adjust mss 1332
exit
!
interface Tunnel 0
 ip address 192.168.0.1 255.255.255.252
 tunnel source 100.0.0.1
 tunnel destination 200.0.0.2
exit
!
router ospf 1
 network 10.100.0.1 0.0.0.0 area 0
 network 192.168.0.1 0.0.0.0 area 0
exit
!
end
configure terminal
!
interface GigabitEthernet 0/0
 ! MSS 1356 - 24 = 1332 (NTT NGN + PPPoE + IPsec(3des, md5-hamc)+ GRE)
 ip tcp adjust mss 1332
exit
!
interface Tunnel 0
 ip address 192.168.0.2 255.255.255.252
 tunnel source 200.0.0.2
 tunnel destination 100.0.0.1
exit
!
router ospf 1
 network 10.200.0.2 0.0.0.0 area 0
 network 192.168.0.2 0.0.0.0 area 0
exit
!
end

References

tech/network/cisco/vpn/tunneling/gre/gre.1555015584.txt.gz · Last modified: 2019/04/12 05:46 by wnoguchi