08-20-2020 01:24 PM
Hi,
I have attached PT-Topology for VLAN configuration.
Used vlan10,20,30 in SW1 & SW2.End devices connected to SW1 & SW2 is assigned with ip addresses in same subnets in both switches in respect with vlans.
I've created sub interfaces(Fa 0/0.10,0.20&0.30) in Router for Fa 0/0 interface which is connecting to Switch 1.
Should i need to create subinterfaces for Fa 0/1 which is connecting to SW1.
Please find below show run command output for router, SW1 & SW2.
I am little confused here. Please help me.
Router#sh run
Building configuration...
Current configuration : 941 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.1.100 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.100 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.100 255.255.255.0
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.100 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.2.100 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1.10
encapsulation dot1Q 10
no ip address
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
SW1#sh run
Building configuration...
Current configuration : 1299 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
ip default-gateway 192.168.1.100
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
SW2#sh run
Building configuration...
Current configuration : 1299 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW2
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.2.1 255.255.255.0
!
ip default-gateway 192.168.2.100
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
Solved! Go to Solution.
08-20-2020 01:33 PM
08-20-2020 01:59 PM
Vlans on switch and routers do separate broadcast domains; and router interfaces must be on different networks, subnets. Hence, On right side of a router, you must use different subnetting scheme (ip addressing). you can use same vlan numbers but usually we use different vlan numbers and networks/subnets/addressing from left side.
if you do have identical vlans and subnets on left and right side of a router, then this would imply 2 different companies connected together. in such case, you would have to add a router to do NAT translations in order for left side to communicate with right side.
Regards, ML
**Please Rate All Helpful Responses **
08-20-2020 01:32 PM - edited 08-20-2020 01:36 PM
On Router :
interface FastEthernet0/0
no ip address 192.168.1.100 255.255.255.0
no ip address
duplex auto
speed auto
On switch side :
Interface fas 0/1
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree portfast trunk
test and advise
EDIT :
Sorry i missed the Picture, you can have different VLAN numbers on another side in the router on fas 0/1
08-20-2020 01:33 PM
Hello,
this won't work. You cannot have subinterfaces for the same Vlan on two interfaces of the same router. What are you trying to accomplish ?
08-20-2020 01:33 PM
08-20-2020 02:01 PM
08-20-2020 02:29 PM
08-20-2020 01:59 PM
Vlans on switch and routers do separate broadcast domains; and router interfaces must be on different networks, subnets. Hence, On right side of a router, you must use different subnetting scheme (ip addressing). you can use same vlan numbers but usually we use different vlan numbers and networks/subnets/addressing from left side.
if you do have identical vlans and subnets on left and right side of a router, then this would imply 2 different companies connected together. in such case, you would have to add a router to do NAT translations in order for left side to communicate with right side.
Regards, ML
**Please Rate All Helpful Responses **
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide