11-28-2013 03:06 AM - edited 03-07-2019 04:49 PM
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
Solved! Go to Solution.
12-01-2013 12:29 AM
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-28-2013 04:49 AM
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
11-28-2013 06:37 AM
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
11-30-2013 01:15 PM
http://img841.imageshack.us/img841/9941/3hax.jpg
---
Posted by WebUser Charalampos Skeleton C'trattou from Cisco Support Community App
12-01-2013 12:09 AM
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
12-01-2013 12:29 AM
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-30-2013 01:33 PM
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
12-01-2013 06:41 AM
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
12-04-2013 03:36 AM
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
12-04-2013 03:45 AM
HI ,
Did u connect the right interface to switch.?
swicth interface should be in trunk mode which is connect to router.
Regards
12-04-2013 06:54 AM
Can you post the "show cdp neighbors" from three of those devices ?
Regards,
Chandu
12-04-2013 08:49 AM
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
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: