R2
R2
configure terminal
no ip domain lookup
hostname R2
enable secret ciscoenpass
line console 0
password ciscoconpass
login
exit
interface GigabitEthernet0/0/0
description Connection to R1
ip address 198.51.100.2 255.255.255.252
no shutdown
interface GigabitEthernet0/0/1
description Connection to S4
ip address 172.16.2.1 255.255.255.0
no shutdown
interface GigabitEthernet0/0/2
description Connection to S3
ip address 209.165.202.129 255.255.255.224
no shutdown
line vty 0 15
login local
transport input ssh
exit
ip ssh version 2
router ospf 1
router-id 0.0.0.2
network 209.165.202.128 0.0.0.31 area 0
network 198.51.100.0 0.0.0.3 area 0
exit
router ospf 1
passive-interface GigabitEthernet0/0/1
passive-interface GigabitEthernet0/0/2
auto-cost reference-bandwidth 1000
exit
interface GigabitEthernet0/0/0
ip ospf network point-to-point
ip ospf hello-interval 30
exit
ip nat pool IPNAT1 209.165.202.140 209.165.202.150 netmask 255.255.255.224
ip nat inside source list 1 pool IPNAT1 overload
access-list 1 permit 172.16.2.0 0.0.0.15
interface GigabitEthernet0/0/1
ip nat inside
line vty 0 15
access-class R2-VTY-LIMIT in
exit
interface GigabitEthernet0/0/0
ip access-group R2-SECURITY in
ip nat outside
exit