#!/bin/bash
cat << EOF
hostname R1
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
interface FastEthernet0/1
ip address 20.1.1.1 255.255.255.0
interface FastEthernet1/0
ip address 192.168.12.1 255.255.255.0
router rip
version 2
network 10.0.0.0
network 20.0.0.0
network 192.168.12.0
no auto-summary
hostname R2
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
interface FastEthernet0/1
ip address 192.168.23.2 255.255.255.0
router rip
version 2
network 192.168.12.0
network 192.168.23.0
no auto-summary
hostname R3
interface FastEthernet0/0
ip address 192.168.23.3 255.255.255.0
ip access-group 112 in
router rip
version 2
network 192.168.23.0
no auto-summary
access-list 111 permit tcp host 192.168.23.2 host 192.168.23.3 eq telnet
access-list 112 deny icmp host 10.1.1.10 host 192.168.23.3
access-list 112 permit icmp any host 192.168.23.3
line vty 0 4
password 123
login
set pcname PC1
ip 10.1.1.10 10.1.1.1 24
set pcname PC2
ip 20.1.1.10 20.1.1.1 24
EOF