07-19-2021 12:10 AM
Hello Well done.
I want to configure VLANs into my Cisco ISR4221 router.
I tried the vlan commands but they refused.
How do I do it
Bellow is my config.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2021.07.19 09:56:10 =~=~=~=~=~=~=~=~=~=~=~=
login as: admin
Pre-authentication banner message from server:
| Yumbe Hospital
End of banner message from server
Keyboard-interactive authentication prompts from server:
| Password:
End of keyboard-interactive prompts from server
There have been 3 successful attempts in the past 1 hours
YH-Cisco-Router>en
Password:
YH-Cisco-Router#show runn start
Using 3306 out of 33554432 bytes
!
! Last configuration change at 01:02:29 UTC Fri Jul 16 2021 by YH
!
version 16.9
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service call-home
platform qfp utilization monitor load 80
no platform punt-keepalive disable-kernel-core
!
hostname YH-Cisco-Router
!
boot-start-marker
boot system flash bootflash:isr4200-universalk9_ias.16.09.07.SPA_2.bin
boot-end-marker
!
!
enable secret 5 $1$8cDL$X9cytQtYgmHRAxVz/wM0Z/
!
aaa new-model
!
--More-- !
--More-- aaa authentication login default local
--More-- !
--More-- !
--More-- aaa login success-track-conf-time 1
--More-- !
--More-- !
--More-- !
--More-- !
--More-- aaa session-id common
--More-- clock timezone UTC 3 0
--More-- call-home
--More-- contact-email-addr support@aircomit.com
--More-- contract-id "204167269"
--More-- phone-number "+256704251030 "
--More-- sender from support@aircomit.com
--More-- sender reply-to support@aircomit.com
--More-- source-interface GigabitEthernet0/0/0
--More-- street-address "Kampala"
--More-- profile "YH"
--More-- destination transport-method http
--More-- destination address http http://aircomit.com/yh
--More-- destination address email support@aircomit.com
--More-- !
--More-- !
--More-- ip nbar http-services
--More-- !
--More-- ip dhcp excluded-address 10.10.0.1 10.10.0.100
--More-- !
--More-- ip dhcp pool YH-LAN
--More-- network 10.10.0.0 255.255.0.0
--More-- default-router 10.10.0.1
--More-- dns-server 8.8.8.8
--More-- !
--More-- !
--More-- !
--More-- login on-success log
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- subscriber templating
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- multilink bundle-name authenticated
--More-- !
--More-- !
--More-- !
--More-- crypto pki trustpoint TP-self-signed-4009722129
--More-- enrollment selfsigned
--More-- subject-name cn=IOS-Self-Signed-Certificate-4009722129
--More-- revocation-check none
--More-- rsakeypair TP-self-signed-4009722129
--More-- !
--More-- !
--More-- crypto pki certificate chain TP-self-signed-4009722129
--More-- certificate self-signed 01 nvram:IOS-Self-Sig#2.cer
--More-- !
--More-- crypto pki certificate pool
--More-- cabundle nvram:ios_core.p7b
--More-- !
--More-- license udi pid ISR4221/K9 sn FGL2518LU5C
--More-- no license smart enable
--More-- diagnostic bootup level minimal
--More-- !
--More-- spanning-tree extend system-id
--More--
--More-- et-analytics
--More-- !
--More-- !
--More-- !
--More-- username YH privilege 15 password 7 013E1F267F02155C701B
--More-- username admin secret 9 $9$3.wD2F.H3lQK4.$SQuAdZUCcXSd1bHs2tZVhF1UW2GKebLAca9cUwacJ8o
--More-- !
--More-- redundancy
--More-- mode none
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- interface GigabitEthernet0/0/0
--More-- description YH_Internet
--More-- ip address 41.222.0.133 255.255.255.248
--More-- ip nbar protocol-discovery
--More-- ip nat outside
--More-- negotiation auto
--More-- !
--More-- interface GigabitEthernet0/0/1
--More-- description YH_LAN
--More-- ip address 10.10.0.1 255.255.0.0
--More-- ip nbar protocol-discovery
--More-- ip nat inside
--More-- negotiation auto
--More-- !
--More-- ip forward-protocol nd
--More-- ip ftp source-interface GigabitEthernet0/0/1
--More-- ip http server
--More-- ip http authentication local
--More-- ip http secure-server
--More-- ip http client source-interface GigabitEthernet0/0/0
--More-- ip tftp source-interface GigabitEthernet0/0/1
--More-- ip nat inside source list 1 interface GigabitEthernet0/0/0 overload
--More-- ip route 0.0.0.0 0.0.0.0 41.222.0.129
--More-- !
--More-- !
--More-- access-list 1 permit 10.10.0.0 0.0.255.255
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- !
--More-- control-plane
--More-- !
--More-- banner login ^CYumbe Hospital^C
--More-- !
--More-- line con 0
--More-- transport input none
--More-- stopbits 1
--More-- line aux 0
--More-- stopbits 1
--More-- line vty 0 4
--More-- password 7 0961572B3D0C04415A5B
--More-- !
--More-- ntp server time.google.com prefer
--More-- !
--More-- !
--More-- !
--More-- !
--More-- event manager applet 1626339866715storeShowTech
--More-- event none sync no maxrun 31536000
--More-- action 001 cli command "enable"
--More-- action 002 cli command "traceroute 41.222.0.132 source GigabitEthernet0/0/1"
--More-- action 003 file open TECHFILE bootflash:1626339866715sh_tech.txt w+
--More-- action 004 file puts TECHFILE "$_cli_result"
--More-- action 005 file close TECHFILE
--More-- !
--More-- end
--More--
YH-Cisco-Router#
YH-Cisco-Router#
YH-Cisco-Router#
YH-Cisco-Router#
YH-Cisco-Router#
07-19-2021 12:56 AM
The details of how to configure support for vlans on Cisco routers depends on whether the particular router has some layer 2 interfaces in addition to the normal layer 3 interfaces (some routers may have imbedded switches and thus have layer 2 interfaces). For routers that have only layer 3 interfaces (such as your router) you would configure support for vlans by configuring subinterfaces on a physical interface and specifying encapsulation 802.1q.
07-19-2021 01:47 AM
07-19-2021 02:16 AM
Hello,
in addition to what Richard is saying, here is an example:
interface GigabitEthernet0/0/1
description YH_LAN
ip address 10.10.0.1 255.255.0.0
ip nbar protocol-discovery
ip nat inside
negotiation auto
!
interface GigabitEthernet0/0/1.10
description Vlan 10
encapsulation dot1q 10
ip address 192.168.10.1 255.255.255.0
ip nbar protocol-discovery
ip nat inside
negotiation auto
!
interface GigabitEthernet0/0/1.20
description Vlan 20
encapsulation dot1q 20
ip address 192.168.20.1 255.255.255.0
ip nbar protocol-discovery
ip nat inside
negotiation auto
07-19-2021 03:57 AM
07-19-2021 04:01 AM
Hello,
whatever is connected to interface GigabitEthernet0/0/1 (a switch I assume) must have the port that is connected to the router configured as a trunk. Can you post the configuration of the device connected to interface GigabitEthernet0/0/1 ?
07-21-2021 12:32 PM - edited 07-21-2021 12:36 PM
@Richard Burts and @Georg Pauwen At first I connected my computer directly to GigabitEthernet0/0/1 and assigned it a static ip address 172.16.0.10 , I couldn't reach the router, not even through pings
Next I used a DLink smart switch, I configured in the same vlans, vlan10 and vlan172 but still I didn't connect to the router
07-21-2021 08:05 PM
To help us understand what is happening it would help if you would post the current configuration of the interface and its associated subinterfaces.
It would also help us understand what is happening if you would give us specifics of what device is connected to your router interface and how that device is configured.
07-19-2021 05:20 AM
Hello @wanumet ,
to get a clean readable output use:
term len 0
show run
hint: with normal pager at 25 lines use the spacebar to move on of one page if you use enter you move on of a single line creating a terrible mess.
Be aware that some default configuration of routers have an access-list applied under line vty. This could explain what you see.
Hope to help
Giuseppe
07-19-2021 05:46 AM
07-19-2021 06:03 AM - edited 07-19-2021 06:04 AM
My guess is that the device that connects to the router port is not configured as a trunk. I agree with @Georg Pauwen Can you tell us what device this is and post the configuration of the device connected to interface GigabitEthernet0/0/1 ?
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