Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Silver

Router on a Stick Inter-Vlan

Router(config)#interface f0/0

Router(config-if)#no shutdown

Router(config)#interface f1/0

Router(config-if)#no shutdown

Router(config)#interface f0/0.1

Router(config-subif)#encapsulation dot1q 15

Router(config-subif)#ip address 192.168.15.1 255.255.255.0

Router(config-subif)#interface f0/0.2

Router(config-subif)#encapsulation dot1q 20

Router(config-subif)#ip address 192.168.20.1 255.255.255.0

Switch1(config)#vlan 15

Switch1(config-vlan)#name SALES

Switch1(config-vlan)#vlan 20

Switch1(config-vlan)#name SUPPORT

Switch1(config)#interface fa0/1

Switch1(config)#switchport mode trunk

Switch1(config)#interface range fa1/1

Switch1(config-if)#no shutdown

Switch1(config-if)# switchport mode access

Switch1(config-if)# switchport access vlan 15

Switch1(config-if)#interface range fa2/1

Switch1(config-if)#no shutdown

Switch1(config-if)#switchport mode access

Switch1(config-if)# switchport access vlan 20

Switch2(config)#vlan 15

Switch2(config-vlan)#name SALES

Switch2(config-vlan)#vlan 20

Switch2(config-vlan)#name SUPPORT

Switch2(config)#interface fa0/1

Switch2(config)#switchport mode trunk

Switch2(config)#interface range fa1/1

Switch2(config-if)#no shutdown

Switch2(config-if)# switchport mode access

Switch2(config-if)# switchport access vlan 15

Switch2(config-if)#interface range fa2/1

Switch2(config-if)#no shutdown

Switch2(config-if)#switchport mode access

Switch2(config-if)# switchport access vlan 20

This is the Commands i used for 1 Router connected t o 2 Switches but it somehow i dont know it doesnt working :/.Im trying to add 2 Vlans + Default Vlan and connected it with class c /27 ip address Any help?

---

Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App

1 ACCEPTED SOLUTION

Accepted Solutions
VIP Purple

Router on a Stick Inter-Vlan

Hi,

As per your topology.

see this and match ur config:

Router

---------------

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

interface FastEthernet0/0.1

encapsulation dot1Q 15

ip address 192.168.15.1 255.255.255.0

!

interface FastEthernet0/0.2

encapsulation dot1Q 20

ip address 192.168.20.1 255.255.255.0

-----------------------------------------------

Swicth 0

-------------

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport mode trunk

!

interface FastEthernet0/3

switchport access vlan 15

!

interface FastEthernet0/4

switchport access vlan 20

!

vlan 15

name SALES

!

vlan 20

name SUPPORT

-------------------------------------------------

Switch 2

---------

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 15

!

interface FastEthernet0/3

switchport access vlan 20

!

vlan 15

name SALES

!

vlan 20

name SUPPORT

------------------------------------------------------

PC0

------

IP: 192.168.15.2

mask:255.255.255.0

GW:192.168.15.1

PC1

------

IP: 192.168.20.2

mask:255.255.255.0

GW:192.168.20.1

PC2

------

IP: 192.168.15.3

mask:255.255.255.0

GW:192.168.15.1

PC3

------

IP: 192.168.20.3

mask:255.255.255.0

GW:192.168.20.1

Hope it helps.

Regards

11 REPLIES
VIP Purple

Re: Router on a Stick Inter-Vlan


Where u r connecting the 2nd switch on router because you are creating sub interfaces on fa0/0.



What exactly not working ???
What u want yo acheive ??

Regards

Sent from Cisco Technical Support iPhone App

Community Member

Router on a Stick Inter-Vlan

Is possible for you to the post the topology pic ?

or else

Can you make it clear with physical connection between the devices ?

Regards,

Chandu

Regards, Chandu
Silver

Router on a Stick Inter-Vlan

http://img841.imageshack.us/img841/9941/3hax.jpg

---

Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App

Router on a Stick Inter-Vlan

Do the computers already have a valid IP address, DNS value and Default gateway??

If yes, what happens if you ping the Router sub-interface IP address for the respective vlan??

Can you ping between computers on the same VLAN???

Can you provide the output of show interface trunk of both switches?

Rate all of the helpful posts!!!

Regards,

Jcarvaja

Follow me on http://laguiadelnetworking.com

Julio Carvajal
Senior Network Security and Core Specialist
CCIE #42930, 2xCCNP, JNCIP-SEC
VIP Purple

Router on a Stick Inter-Vlan

Hi,

As per your topology.

see this and match ur config:

Router

---------------

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

interface FastEthernet0/0.1

encapsulation dot1Q 15

ip address 192.168.15.1 255.255.255.0

!

interface FastEthernet0/0.2

encapsulation dot1Q 20

ip address 192.168.20.1 255.255.255.0

-----------------------------------------------

Swicth 0

-------------

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport mode trunk

!

interface FastEthernet0/3

switchport access vlan 15

!

interface FastEthernet0/4

switchport access vlan 20

!

vlan 15

name SALES

!

vlan 20

name SUPPORT

-------------------------------------------------

Switch 2

---------

interface FastEthernet0/1

switchport mode trunk

!

interface FastEthernet0/2

switchport access vlan 15

!

interface FastEthernet0/3

switchport access vlan 20

!

vlan 15

name SALES

!

vlan 20

name SUPPORT

------------------------------------------------------

PC0

------

IP: 192.168.15.2

mask:255.255.255.0

GW:192.168.15.1

PC1

------

IP: 192.168.20.2

mask:255.255.255.0

GW:192.168.20.1

PC2

------

IP: 192.168.15.3

mask:255.255.255.0

GW:192.168.15.1

PC3

------

IP: 192.168.20.3

mask:255.255.255.0

GW:192.168.20.1

Hope it helps.

Regards

Community Member

Re: Router on a Stick Inter-Vlan

Are both the interfaces from Switch 1 going to the Router and to Switch 2 trunking? Your config shows only one port on Switch 1 statically configured as a trunk. Hope that helps

Silver

Router on a Stick Inter-Vlan

The topology on the image is a Router on A stick which is based on 1 router and 2 switches. Basically the 1 switch is connected with the router and the other one is connected to the switch which leads to a inter vlan routing. The commands i posted lead to an error to ping between the pcs.i used a class c ip address which are basically writing at the post. im gonna try san deep answer and see afterwards

---

Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App

Silver

Router on a Stick Inter-Vlan

why router link is still red? or it suppose to stay like that?

---

Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App

VIP Purple

Router on a Stick Inter-Vlan

HI ,

Did u connect the right interface to switch.?

swicth interface should be in trunk mode which is connect to router.

Regards

Community Member

Router on a Stick Inter-Vlan

Can you post the "show cdp neighbors" from three of those devices ?

Regards,

Chandu

Regards, Chandu
Silver

Router on a Stick Inter-Vlan

ok found the problem forgot to put no shutdown to the router thanks

---

Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App

1295
Views
0
Helpful
11
Replies
CreatePlease to create content