Feb 05

Cisco 2811 Router on Stick

Cisco  Router on Stick

main

For this tutorial, I am using the under given hardware.

  1. Cisco Router 2811
  2. Cisco Switch 2960
  3. Two PCs (PC0, PC1)

Setp-1. We configure PC0 with static IP address 192.168.1.100/24 and gateway 192.168.1.1 and PC1 with static IP address 192.168.2.100/24 and gateway 192.168.2.1.

Setp-2. Now connect PC0 to port fa0/1 and PC1 to port fa/10 on Cisco Switch 2960 with straight through cable as show in figure.

Setp-3 Now we configure Cisco 2960 switch for VLAN. In this tutorial I will configure two VLANs on switch with name of VLAN 10 and VLAN 20. Here I am assuming that you are connected use consol cable and on the switch port.

Switch>

Switch>enable (for privilege mode)

Switch#

Switch# configure terminal (you can use as short conf t as well)

Switch (config)# (Now we are in Global configuration mode)

Now we create VLANs 10 and 20.

Switch (config)# vlan 10 (press enter vlan 10 created)

Switch (config)# vlan 20 (press enter vlan 20 created)

Switch (config)#end ( this bring you back to privilege mode)

Switch#show vlan (this command will you show you the newly created VLANs)

s_conf

Switch# configure terminal (this command will take you in to Global Configuration Mode)

Switch (config)# (Now we are in Global configuration mode)

Now we add we add some ports to our newly created VLANs

Switch (config)#interface fa0/1 (this command enter us in port 1 interface)

Switch (config-if)# (now we are in fa0/1 interface)

Switch (config-if)# switchport mode access

Switch (config-if)#switchport access vlan 10

Switch (config-if)#interface fa0/10 (this command enter us in port 10 interface)

Switch (config-if)# switchport mode access

Switch (config-if)#switchport access vlan 20

Switch (config-if)# switchport mode access

Switch (config-if)#end

Switch#

Let save our configurations now.

Switch#copy running-config startup-config (enter and the enter again)

Let set the trunk port now, here I am configuring fa0/24 as trunk.

Switch#en

Switch(config)#int fa0/24 (press enter)

Switch(config-if)#switchport mode trunk

Switch(config-if)#end

Lets save our configuration again.

Switch# copy running-config startup-config (enter and the enter again)

Good luck friends we have just configured 2 VLANs 10 on fa0/1, 20 on fa0/10 and a trunk port on fa0/24.

Let go in router now here I am using Cisco 2811 router.

Router>enable

Router# configure terminal

Router(config)#int fa0/0.1 (This command will takes us in sub interface of fa0/0)

Router(config-subif)#encapsulation dot1q 10

Router(config-subif)#ip address 192.168.1.1 255.255.255.0

Router(config-subif)#no shut

Router(config)#int fa0/0.2 (This command will takes us in sub interface of fa0/0)

Router(config-subif)#encapsulation dot1q 20

Router(config-subif)#ip address 192.168.2.1 255.255.255.0

Router(config-subif)#no shut

Router(config-subif)#end

Router#show run ( this will show running configuration)

router2

Router#show ip route

That’s all friend I hope this will helpful to you, now you can ping from the both PCs.