1

I have VLAN10 and VLAN20, I am trying to communicate between computers with the same VLAN on the following setup:

enter image description here

I want to apply encapsulation from Router but it doesn't seem to recognize corresponding commands. Here's the report as follows:

R14(config)#int gig2/2
R14(config-if)#int gig2/2.10
               ^
% Invalid input detected at '^' marker.
    
R14(config-if)#exit
R14(config)#int gig2/1
R14(config-if)#int gig2/2.10
               ^
% Invalid input detected at '^' marker.
    
R14(config-if)#
R14#

Here's the running config of the router:

R14#show running-config
Building configuration...

Current configuration : 1257 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R14
!
!
boot system flash cgr1000-universalk9-mz.SPA.154-2.CG 
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet2/3
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet2/4
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet2/5
 switchport mode access
 switchport nonegotiate
!
interface FastEthernet2/6
 switchport mode access
 switchport nonegotiate
!
interface GigabitEthernet2/1
 switchport mode trunk
!
interface GigabitEthernet2/2
 switchport mode trunk
!
interface Dot11Radio2/1
 no ip address
 shutdown
!
interface Vlan1
 ip address 192.168.10.1 255.255.255.0
!
ip classless
!
ip flow-export version 9
!
!
access-list 10 permit 192.168.10.0 0.0.0.255
access-list 10 deny 192.168.20.0 0.0.0.255
access-list 20 permit 192.168.20.0 0.0.0.255
access-list 20 deny 192.168.10.0 0.0.0.255
access-list 30 permit any
!
!
!
!
!
!
line con 0
!
line 1/1 1/2
 stopbits 1
!
line 1/3 1/6
 stopbits 1
!
line vty 0 4
 login
!
!
!
!
end

Don't know if relevant, but I have adjusted vlan 1 ip addresses of both switches and router as 192.168.10.1 .

Why router can't recognise this command and how can I fix it?

1
  • 2
    You are trying to use the interfaces on the switch module as if they were router interfaces, but they are switch interfaces.
    – Ron Maupin
    Jul 28 '20 at 22:56
1

The problem is that all the interfaces in slot 2 (G2/1-2 and F2/3-2) of the router are switch interfaces, and you are trying to use them as router interfaces, but that will not work.

What you need to do for those interfaces is to create SVIs for the various VLANs, then assign the switch interfaces to specific VLANs as access interfaces or as trunk interfaces.

Something like:

interface Vlan10
 ip address <address> <mask>
!
interface Vlan20
 ip address <address> <mask>
!
interface FastEthernet2/2
 switchport mode access
 switchport access vlan 10
!
interface FastEthernet2/3
 switchport mode access
 switchport access vlan 20
!
interface FastEthernet2/4
  switchport mode trunk
  switchport trunk vlan allowed 10,20
!
1
  • Thanks! I didn't thought of the "trunk vlan allowed" part, also I realized I didn't have to apply encapsulate, now my system works after a bit configuration. Aug 3 '20 at 22:46
-1

your topology seems to be incorrect servers should not Connect with router interfaces.

your requirement can be optimized by replacing router with layer 3 switch with possible SVI switch Virtual Interface configuration with VLAN 10 ,VLAN 20 ,VLAN 30 please try with below topology

Network Diagram

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.