enable
configure terminal
hostname SWITCH1
no ip domain-lookup
service password-encryption
banner motd #Unauthorized access prohibited#
line console 0
password cisco
login
exit
line vty 0 4
password cisco
login
exit
configure terminal
vlan 10
name SALES
vlan 20
name HR
exit
interface fastEthernet 0/1
switchport mode access
switchport access vlan 10
exit
interface fastEthernet 0/2
switchport mode access
switchport access vlan 20
exit
interface gigabitEthernet 0/0
no shutdown
interface gig0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
interface gig0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
enable
configure terminal
hostname ROUTER1
no ip domain-lookup
service password-encryption
interface gig0/0
ip address 10.0.0.1 255.255.255.0
no shutdown
exit
interface gig0/1
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
configure terminal
ip route 192.168.20.0 255.255.255.0 10.0.0.2
ip route 0.0.0.0 0.0.0.0 192.168.1.254
configure terminal
ip dhcp pool SALES
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 8.8.8.8
exit
ip dhcp excluded-address 192.168.10.1 192.168.10.10
access-list 1 permit 192.168.1.0 0.0.0.255
interface gig0/1
ip nat inside
interface gig0/0
ip nat outside
ip nat inside source list 1 interface gig0/0 overload
access-list 100 deny tcp any any eq 23
access-list 100 permit ip any any
interface gig0/1
ip access-group 100 in