how can i configure router on a stick?

Computer Science
Tutor: None Selected Time limit: 1 Day

I have configured  my vtp correctly but when i want to configure router on a stick, devices frm diffrent vlans arent able to ping each other, what could i be possibly doing wrong?? HELP PLEASE

Aug 7th, 2015

Hello friend...Thank you for the opportunity to help you with your question :-)

Try this...

First step is to create the required two VLANs on the Cisco switch and configure them with an IP address. Since all Cisco swiches contain VLAN1 (Default VLAN), you only need to create VLAN2:

SW1# configure terminal
SW1(config)# vlan2
SW1(config-vlan)# name voice
SW1(config-vlan)# exitSW1(config)# interface vlan1
SW1(config-if)# description Data Vlan
SW1(config-if)# ip address 192.168.0.2 255.255.255.0
SW1(config-if)# exit
SW1(config)# interface vlan2
SW1(config-if)# description Voice Vlan
SW1(config-if)# ip address 192.168.2.2 255.255.255.0
SW1(config-if)# exit

Next, you will need to create the trunk port that will connect to the router. For this purpose, you have to select port GigabitEthernet 0/1 (port 1):

SW1# configure terminal
SW1(config)# interface gigabitethernet 0/1
SW1(config-if)# description Trunk-to-Router
SW1(config-if)# switchport trunk encapsulation dot1q
SW1(config-if)# switchport mode trunk
SW1(config-if)# spanning-tree portfast trunk

To eliminate confusion, these commands are instructing the switch thus:

1) Define the trunk to use the 802.1q protocol

2) Set the specific port to trunk mode

3) Enable the spanning-tree portfast trunk function to ensure the port will forward packets immediately when connected to a device e.g router. Note: The spanning-tree portfast trunk command should never be used on ports that connect to another switch, to ensure network loops are avoided.

After completion of The above step, the switch-side configuration is now complete. The second part is the Router configuration:

We need to follow a similar configuration for our router to enable communication with our switch and allow all VLAN traffic to pass through and route as necessary. Creating a trunk link on a router port is not very different from the process used above - while we create the trunk port on one physical interface, we are required to create a sub-interface for each VLAN. Again, this is a fairly simple process and easy to understand once you've done it at least one time.

R1# configure terminal
R1(config)# interface gigabitethernet0/1
R1(config-if)# no ip address
R1(config-if)# duplex auto
R1(config-if)# speed auto
R1(config-if)# interface gigabitethernet0/1.1
R1(config-subif)# description Data VLAN
R1(config-subif)# encapsulation dot1q 1 native
R1(config-subif)# ip address 192.168.0.1 255.255.255.0
R1(config-subif)# ip nat inside
R1(config-subif)# ip virtual-reassembly
R1(config-subif)# interface gigabitethernet0/1.2
R1(config-subif)# description Voice VLAN
R1(config-subif)# encapsulation dot1q 2
R1(config-subif)# ip address 192.168.2.1 255.255.255.0
R1(config-subif)# ip nat inside
R1(config-subif)# ip virtual-reassembly


In order to form a trunk link with our switch it is necessary to create one sub-interface for every VLAN configured on our switch. After creating the sub-interface, we assign an IP address to it and set the encapsulation type to 802.1q along with the VLAN to which the subinterface belongs.

For example, the encapsulation dot1q 2 command defines 802.1q encapsulation and sets the subinterface to VLAN 2. The nativeparameter we used for subinterface gigabitethernet0/1.1 tells the router that the native vlan is VLAN 1. This is a default parameter on every Cisco switch and therefore must be matched by the router as well.

The ip virtual-reassembly command is usually automatically thrown in by the Cisco IOS (we've included it to show you the command) and is a security measure to avoid buffer overflow and control memory usage during an attack of fragmented packets which can cough up your router's resources. This command is added automatically when you enable the NAT service using the ip nat inside command.





Here is the complete answer! Please let me know if you need any clarification. Please best with a 5*. Thank you and Godbless!!!
Aug 7th, 2015

i dd all that but stil no luck, my link from switch to router is fastethernet could tht be the problem?

Aug 7th, 2015

yes please...like i said earlier For this purpose, you have to select port GigabitEthernet 0/1 (port 1):

Aug 7th, 2015

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Aug 7th, 2015
...
Aug 7th, 2015
Dec 5th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer