Cisco router on a stick


* packet tracer is used in this setup

ROUTER CONFIGURATION

A. Create sub-interfaces

# configure terminal

# interface FastEthernet 0/0.10

# encapsulation dot1q  10

# ip address 192.168.10.1 255.255.255.0

# interface FastEthernet 0/0.20

# encapsulation dot1q  20

# ip address 192.168.20.1 255.255.255.0

# interface FastEthernet 0/0.30

# encapsulation dot1q  30

# ip address 192.168.30.1 255.255.255.0

! Check time

CREATE DHCP SERVER FOR THE SUBNETS

# configure terminal

# ip dhcp excluded-address 192.168.10.1 192.168.10.5

# ip dhcp excluded-address 192.168.20.1 192.168.20.5

# ip dhcp excluded-address 192.168.30.1 192.168.30.5

# ip dhcp pool accounting

# network 192.168.10.0 255.255.255.0

# default-router 192.168.10.1

# ip dhcp pool procurement

# network 192.168.20.0 255.255.255.0

# default-router 192.168.20.1

# ip dhcp pool services

# network 192.168.30.0 255.255.255.0

# default-router 192.168.30.1

! Check time

SWITCH CONFIGURATION

A. Create VLANs

# configure terminal

# vlan 10

# name ACCOUNTING_DEPT

# vlan 20

# name PROCUREMENT_DEPT

# vlan 30

# name SERVICES_DEPT

B. Configure Interfaces

# configure terminal

# interface fastEthernet 0/1

# switchport mode access

# switchport access vlan 10

# interface  fastEthernet 0/2

# switchport mode access

# switchport access vlan 20

# interface  fastEthernet 0/3

# switchport mode access

# switchport access vlan 30

! Check time

Set PC configuration to DHCP (obtain IP address from DHCP server)