0

I'm trying to connect 4 networks with 1 router, i created 2 sub-interfaces in the router, when i tried to create the 3rd sub-interface i got this output "%Cannot create sub-interface", this is my topology: https://i.gyazo.com/0d7939a1116e10e3792fe5fd843e35d7.png

This is my Router's configuration:

hostname Router
!
ip cef
ip ipv6 cef
!
spanning-tree mode pvst
!
interface GigabitEthernet0/0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/0.10
encapsulation dot 1Q 10
ip address 10.1.1.254 255.255.255.0
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/1.20
no ip address
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1/0
swithport mode access
switchport nonegotiate
!
!
interface GigabitEthernet0/1/1
swithport mode access
switchport nonegotiate
!
!
interface GigabitEthernet0/1/2
swithport mode access
switchport nonegotiate
!
!
interface GigabitEthernet0/1/3
swithport mode access
switchport nonegotiate
!
interface Vlan1
no ip address 
!
ip classless
!
ip flow-export version 9
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
end

I need to create 4 networks, each network has a unique VLAN. And add default gateway to each VLAN to make the PC's communicate with each other. I know it's much better to put 1 network only and separate the VLAN's by 1 switch. But i want to use more interfaces in a Router, than Switches.

  • The idea is that subinterfaces are used on a physical interface, but you are putting one subionterface per physical interface, and that does not make sense. You normally would put all your subinterfaces on a single physical interface, then turn on trunking on the switch interface that connects to the router interface. It looks like you only have three router interfaces: GigabitEthernet0/0/0 to GigabitEthernet0/0/2. The other four interfaces are switch interfaces, and you cannot use them as router interfaces. – Ron Maupin Jul 2 at 11:06
  • 2
    The GigabitEthernet0/1/0 and GigabitEthernet0/1/1 in your router are switch interfaces in the switch module. They are not router interfaces, and you cannot use them as router interfaces. In any case, your topology does not need subinterfaces. – Ron Maupin Jul 2 at 11:09
1

Please fallow my configuration and try

Router(config)#iint gigabit Ethernet 0/0/0 #no ip address #no shutdown

Router(config)# int gigabit Ethernet 0/0/0.10 #ip address x.x.x.x x.x.x.x #encapusation dot1q 10 #no shut`

Router(config)#int gigabit ethernet 0/0/0.20 #encapsulation dot1q 20 #ip address x.x.x.x x.xx.x #no shutdown

Router (config)#int gigabit ethernet 0/0/0.30 #encapsulation dot1q 30 #ip address x.x.x.x x.x.x.x #no shutdown

Router(config)# int gigabit Ethernet 0/0/0.40 #encapsulation dot1q 40 #ip address x.x.x.x x.x.x.x #no shutdown

In layer2 switch configuration

Configure trunk Port in switch interface connectiing to router so that vlan 10, Vlan20, Vlan30,Vlan40 traffic will flow from router towards switch from this trunk Port

Switch(config)# int 0/1 #switch Port trunk #switch trunk allowed vlan all #no shutdown

Create access ports as per your requirements for example below

Switch (config)#int 0/2 #switchport mode access #switch Port access vlan10 #no shutdown /please connect this interface to end devices/

Create vlans in this switch

Switch(config)#vlan 10 #name finances

Switch(config)#vlan 20 #name account

Switch(config)#vlan30 #name operation

Switch(config)# Vlan40 #name hr

Try above configuration ....

| improve this answer | |

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.