0% found this document useful (0 votes)
2 views

CCNA Notes-home

The document provides an overview of various Ethernet cabling standards, including UTP and STP categories, their speeds, and typical usage scenarios. It details the specifications for different categories of cables (Cat3 to Cat7) and various Ethernet standards (10Base-T, Fast Ethernet, Gigabit Ethernet, etc.), along with their operational characteristics. Additionally, it includes commands for configuring network devices and managing settings such as IP addresses and passwords.

Uploaded by

Syed zaidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CCNA Notes-home

The document provides an overview of various Ethernet cabling standards, including UTP and STP categories, their speeds, and typical usage scenarios. It details the specifications for different categories of cables (Cat3 to Cat7) and various Ethernet standards (10Base-T, Fast Ethernet, Gigabit Ethernet, etc.), along with their operational characteristics. Additionally, it includes commands for configuring network devices and managing settings such as IP addresses and passwords.

Uploaded by

Syed zaidi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Cabling Cat ( UTP/STP)

Cat: Category , UTP : Unshielded Twisted pair Cable, STP: Shielded Twisted pair cable

cat3 UTP 10 Mbps, 100 meter < Not in use now a day >

cat5 UTP 10/100 Mbps, 100 meter < Not in use now a day >

cat5e UTP 1000 Mbps, 100 meter < rarely using >

cat6 UTP or STP 1000 Mbps, 100 meter, 10Gbps if up to 55 meters < Mostly using in office/ Companied >

cat6a STP 10,000 Mbps, 100 meter, 10Gbps if up to 55 meters <for Server (HP, Dell, IBM, Fujitsu) for getting High Speed/
Throughput >

cat7 SSTP 10,000 Mbps, 100 meter <for Server (HP, Dell, IBM, Fujitsu)/ Firewall/high Eng Switch) for getting High Speed/
Throughput >

T: twisted pair

F: fiber optics

TX: Fast Ethernet

FX: Fast Ethernet over fiber optics

CX: copper twisted pair

SX: multimode fiber

LX: single-mode fiber

10Base-T

The first and oldest among the standards in this list, 10Base-T is formally known as IEEE 802.3. You’ll notice that nothing
comes after the “3” because this is the original 802.3 standard. Using the naming convention, this is a connection that
runs over twisted pair cables and can reach speeds of 10 Mbps. These cables max out at 100 meters in length.

100Base-TX

IEEE 802.3u is next on the list. This is a 100 Mbps connection that runs on Fast Ethernet. In fact, this is known commonly
just as “Fast Ethernet.” This standard supports Cat5, 5e, and 6 Ethernet cables. Fast Ethernet does also run on twisted
pairs, and it supports cable runs up to 100 meters.

100Base-FX

The formal designation here is IEEE 802.3u. You might notice that the IEEE designation is identical to the connection
above. That’s because this is also fast Ethernet. The important difference is that this form uses multimode fiber that
supports cable runs up to 412 meters in length. Otherwise, the general performance is still very much in the range of Fast
Ethernet.
1000Base-CX

Known as IEEE 802.3z, this is a copper twisted cable pair. While this standard supports higher speeds than the previous
standards on the list, the cable runs are much shorter. 1000Base-CX can only maintain 1000 Mbps speeds at runs of 25
meters or less.

1000Base-T

IEEE 802.3ab is the first form of what is commonly called “Gigabit Ethernet.” Since 1000 Mbps is the same as 1 Gbps,
that’s the source of the name. This is a twisted-pair standard that supports these speeds at lengths of 100 meters per
cable run. Most Ethernet hardware that you purchase today will support this standard.

1000Base-SX

The next Gigabit standard on the list is IEEE 802.3z. This form runs on multimode fiber optics. The performance is similar
to that of 1000Base-T, but the implementation of multimode fiber allows cable runs much longer than 100 meters without
dropping speeds.

1000Base-LX

This standard also uses the IEEE 802.3z designation. That’s because it provides the same performance. The key difference
is found in the standard name. LX refers to single-mode fiber instead of multimode fiber. Ultimately, single-mode fiber
supports even longer distances than multimode fiber (getting into km ranges).

10GBase-T

The last of our common connection types is 802.3.an. This is a twisted-pair standard that supports 10 Gbps connections.
These are the fastest of the common connections, and this standard utilizes Ethernet cables, supporting Cat5e, 6, and 7
cable types.

That’s it. That covers the most common IEEE standards for modern LAN networking, and now that you know the
convention, you can read other standards at a glance too.

-----------------------------------------------------------------------------------------------------------------

Ethernet

Speed: Standard Ethernet operates at a speed of 10 Mbps (megabits per second).


Standard: It is based on the IEEE 802.3 standard.
Cabling: Typically uses twisted-pair cables (Cat 3 or higher) or coaxial cables.
Distance: Can transmit data over distances of up to 100 meters using twisted-pair cables.
Usage: Commonly used in older networks and for applications that do not require high bandwidth.

Fast Ethernet

Speed: Fast Ethernet operates at a speed of 100 Mbps, which is ten times faster than standard Ethernet.
Standard: Also based on the IEEE 802.3 standard, specifically the 802.3u amendment.
Cabling: Generally, requires higher-quality cabling (Cat 5 or higher) to support the increased speed.
Distance: Maintains the same maximum distance of 100 meters for twisted-pair cables.
Compatibility: Designed to be backward compatible with standard Ethernet, allowing for mixed networks.
Gigabit Ethernet

Speed: 1000 Mbps or 1Gbps


Distance: Maintains the same maximum distance of 100 meters for twisted-pair cables.
Cabling: usually Cat5e or above , cat5e is also old mostly in companies/ office are using Cat6
Usage: Recently everywhere people are using

******************************************************************************
* Copyright (c) 2010-2016 Hewlett Packard Enterprise Development LP *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
User interface aux0 is available.

Please press ENTER.

<SPARE-PART>?

User view commands:


initialize Delete the startup configuration file and reboot system
ipsetup Assign an IP address to VLAN-interface 1
password Specify password of local user
ping Ping function
quit Exit from current command view
reboot Reboot system/board/card
summary Display summary information of the device.
telnet Establish one TELNET connection
upgrade Upgrade the system boot file or the Boot ROM program

<SPARE-PART>summary
Vlan-interface: 40

Select menu option: Summary


IP Method: Manual
IP address: 172.16.0.143
Subnet mask: 255.255.240.0
Default gateway:

IPv6 Method:
IPv6 link-local address:
IPv6 subnet mask length:
IPv6 global address:
IPv6 subnet mask length:
IPv6 default gateway:

Mac address: 40B9-3C26-DA24

Current boot app is: flash:/jg925a-cmw520-r1115.bin


Next main boot app is: flash:/jg925a-cmw520-r1115.bin
Next backup boot app is: flash:/jg925a-cmw520-r1115_bak.bin
HPE Comware Platform Software
Comware Software, Version 5.20.99, Release 1115
Copyright (c) 2010-2016 Hewlett Packard Enterprise Development LP
HPE 1920-24G-PoE+ (180W) Switch uptime is 0 week, 0 day, 17 hours, 46 minutes

HPE 1920-24G-PoE+ (180W) Switch


128M bytes DRAM
32M bytes Flash Memory
Config Register points to Flash

Hardware Version is REV.A


Bootrom Version is 117
[SubSlot 0] 24GE+4SFP Hardware Version is REV.A

<SPARE-PART>ipsetup ?
dhcp IP address negotiated with DHCP
ip-address Set the IP address manually
ipv6 IPv6 interface subcommands

<SPARE-PART>ipsetup ip-add
<SPARE-PART>ipsetup ip-address ?
X.X.X.X IP address

<SPARE-PART>ipsetup ip-address 172.16.0.143 ?


INTEGER<0-32> IP mask length
X.X.X.X IP mask

<SPARE-PART>ipsetup ip-address 172.16.0.143 255.255.240.0 ?


default-gateway Specify default gateway IP address
<cr>

<SPARE-PART>ipsetup ip-address 172.16.0.143 255.255.240.0 def


<SPARE-PART>ipsetup ip-address 172.16.0.143 255.255.240.0 default-gateway 172.16.0.20

<SPARE-PART>?
User view commands:
Initialize Delete the startup configuration file and reboot system
Ipsetup Assign an IP address to VLAN-interface 1
Password Specify password of local user
Ping Ping function
Quit Exit from current command view
Reboot Reboot system/board/card
Summary Display summary information of the device.
telnet Establish one TELNET connection
upgrade Upgrade the system boot file or the Boot ROM program

Changing the admin user Password


<SPARE-PART>password
Change password for user: admin
Old password:
Enter new password: ***********
Retype password: ***********
The password has been successfully changed.
<SPARE-PART>

Initialize command is used to delete all switch configuration

Rest of the configuration like vlan, stp, rstp, CDP, LLDP, Switch name, telnet, ssh, http, https, POE, routing, vlan interface
ip, clock setting / NTP , interface setting, untagged and Tagged setting all these you can do using browser

Note: In HP, Aruba, vlan Untagged / Tagged but is cisco switch these are called Access port and trunk port

How to Give Switch Name


Switch> < User Mode > very limited commands works , if you want to check what are the commands will work use ? >

Switch>?
Switch>?
Exec commands:
connect Open a terminal connection
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
exit Exit from the EXEC
logout Exit from the EXEC
ping Send echo messages
resume Resume an active network connection
show Show running system information
ssh Open a secure shell client connection
telnet Open a telnet connection
terminal Set terminal line parameters
traceroute Trace route to destination

Switch from user mode to Privilege Mode

Switch>enable
Switch# < This is a Privilege Mode here mode commands you can use >

clear Reset functions


clock Manage the system clock
configure Enter configuration mode
connect Open a terminal connection
copy Copy from one file to another
debug Debugging functions (see also 'undebug')
delete Delete a file
dir List files on a filesystem
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
erase Erase a filesystem
exit Exit from the EXEC
logout Exit from the EXEC
more Display the contents of a file
no Disable debugging informations
ping Send echo messages
reload Halt and perform a cold restart
resume Resume an active network connection
setup Run the SETUP command facility
show Show running system information
ssh Open a secure shell client connection
telnet Open a telnet connection
terminal Set terminal line parameters
traceroute Trace route to destination
undebug Disable debugging functions (see also 'debug')
write Write running configuration to memory, network, or terminal

Changing Hostname

Switch# configuration terminal < to switch to configuration Mode >


Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# Hostname MEDC < Chane Hostname >
MEDC(config)#

Giving Description to Interafce


MEDC#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
MEDC(config)#int
MEDC(config)#interface f0/5
MEDC(config-if)#description "Connected to Email Server"

MEDC(config-if)#exit
MEDC(config)#inter
MEDC(config)#interface fa0/4
MEDC(config-if)#shut
MEDC(config-if)#shutdown < Interface will be disabled >

MEDC(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to administratively down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down

MEDC(config-if)#

Difference between Exit and ^Z

MEDC(config-if)#exit < it will go back one by one step >


MEDC(config)#exit
MEDC#
%SYS-5-CONFIG_I: Configured from console by console

MEDC#conf
MEDC#configure ter
MEDC#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
MEDC(config)#int
MEDC(config)#interface f0/4
MEDC(config-if)#^Z < switch back directly from interface mode to privileged mode >

Setting Password of Privileged mode


MEDC(config)#enable password ?
7 Specifies a HIDDEN password will follow
LINE The UNENCRYPTED (cleartext) 'enable' password
level Set exec level password
MEDC(config)#enable password 123

How to Disable and Enable Interface

MEDC(config)#interface f0/4
MEDC(config-if)#shutdown
MEDC(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

Switch>enable
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host
Switch(config)#hostname Network-Device
Network-Device(config)#inter
Network-Device(config)#interface fa0/3
Network-Device(config-if)#des
Network-Device(config-if)#description "Network Controller"
Network-Device(config-if)#inter fa0/3
Network-Device(config-if)#description "IP Phone"
Network-Device(config-if)#interface fa0/5
Network-Device(config-if)#des
Network-Device(config-if)#description "Printer"
Network-Device(config-if)#^Z
Network-Device#
%SYS-5-CONFIG_I: Configured from console by console

Saving Configuration from Running-config to Startup-config


Running-config is Temporary Memory whereas Startup-config is permanent memory

Network-Device#write memory
Network-Device#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Network-Device#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]

Setting Password of Privileged mode


MEDC(config)#enable password ?
7 Specifies a HIDDEN password will follow
LINE The UNENCRYPTED (cleartext) 'enable' password
level Set exec level password
MEDC(config)#enable password 123

Showing Running- Configuration < in the configuration you can cee the privileged password , because it is in clear text”

MEDC#show running-config
Building configuration...
Current configuration : 1141 bytes
!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname MEDC
!
enable password 123
!

Now I want to Encrypt the Plain Text Password

MEDC#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
MEDC(config)#service password-encryption

Now again I will check the running configuration to conform

MEDC#show running-config
Building configuration...

Current configuration : 1145 bytes


!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname MEDC
!
enable password 7 08701E1D
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2

How to Decripy Cisco Type 7 Password Online

Removing Enable password

MEDC(config)#no enable password

Now will see there is no password , I removed it with the above command

MEDC#sh running-config
Building configuration...

Current configuration : 1168 bytes


!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname MEDC
!
enable secret 5 $1$mERr$3HhIgMGBA/9qNmgzccuxv0
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4

This is Type 5 Password this is long password in an encrypted form but can be decripted online
MEDC(config)#enable password level 15 cisco

MEDC#sh running-config
Building configuration...

Current configuration : 1168 bytes


!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname MEDC
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1

Decrypting Type 5 Online Password


These two password Type 7 and 5 can be encrypted online
MEDC(config)#enable password 123 < For Type 7 Password , you need to encrypt this password using the command
service password-encryption >

MEDC(config)#enable password level 15 cisco < This Lavel 5 Password automatic encrypt, no need to encrypt >

Note: If you can set both type 5 and 7 then type will not work only type 5 will work

Enable Secret Password < this password can not be Decrypted online
MEDC(config)#enable secret level 15 12345
Configuring Telnet to take Remote access to switch/ router

MEDC#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
MEDC(config)#line vty 0 15
MEDC(config-line)#password 321
MEDC(config-line)#privilege level 15
MEDC(config-line)#login

Assigning IP address to Switch , we are assigning ip address to vlan only in Layer 2 Switch to manage the switch/ router

Here I have given ip address to default vlan 1 , so that I can take remote access using telnet or ssh

MEDC(config)#interface vlan 1
MEDC(config-if)#ip add
MEDC(config-if)#ip address 192.168.1.254 255.255.255.0
MEDC(config-if)#no shutdown

Note: Layer 3 ( Network Layer of OSI Model, it has information of IP address and Mac address both, in L3 both L3 switch
and Router work , it helps it communicating between 2 more network togather, it make arp table and Routing table, L3
Device are Multiple Collision Domain and multiple broadcast domain means it stop the broadcast packet and collision
packet.
Note: Layer 2 Siwtch Only Has Mac address information, it do not understand ip address, it works at Datalink latey of the
osi model, data is in the form of Frames, Mac address id Burned in address means it is inbuild in IC.
L2 Switch creating a Mac Address Table in which it defines which mas address learn from with switch Ports.

Creating Van / Giving name to Vlan/ deleting VLan/ Assign Switch Port to Vlan/ Removing Port from Vlan

What is Vlan: Vlan is a (Virtual Network) in a Switch, we can create different Virtual Network in a Switch so that their
Broadcast Packet will not reach to other virtual network. To reduce the Broadcast we are creating a Virtual Network called
vlan. It means if you have multiple vlan in a switch the broadcast packet will never reach from one vlan to another vlan.
For security purpose also we are creating a vlan , if you want to exclude some dept. network from other you can create
vlan.

Creating a Vlan:

IN#conf terminal
Enter configuration commands, one per line. End with CNTL/Z.
IN(config)#vlan 10
IN(config-vlan)#name Sales
IN(config)#vlan 20
IN(config-vlan)#name
IN(config-vlan)#name HR
IN(config-vlan)#exit

Check the vlan is created or not

IN# show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
10 Sales active
20 HR active

Deleting Vlan

IN(config)#vlan 30
IN(config-vlan)#name testing
IN(config-vlan)#exit
IN(config)#no vlan 30 < deleting vlan 30 >

Assigning Switch Port to Vlan 10 ( making an Access port to vlan 10)

IN(config)#interface f0/1
IN(config-if)#switchport mode access
IN(config-if)#switchport access vlan 10
IN(config-if)#interface f0/2
IN(config-if)#switchport mode access
IN(config-if)#switchport access vlan 10

Check now to conform

IN#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gig0/1, Gig0/2
10 Sales active Fa0/1, Fa0/2

How to Configure Multiple Switch Port

IN(config)#interface range fa0/3-4


IN(config-if-range)#switchport mode access
IN(config-if-range)#switchport access vlan 20

Conform the vlan


IN#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
10 Sales active Fa0/1, Fa0/2
20 Purchase active Fa0/3, Fa0/4

Now Removing the Switch Port from one vlan to another vlan

20 Purchase active Fa0/3, Fa0/4


I am going to remove ports fa0/3 and fa0/4 from vlan 20 to vlan 10

IN(config)#interface range fa0/3-4


IN(config-if-range)#switchport access vlan 10

IN#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
10 Sales active Fa0/1, Fa0/2, Fa0/3, Fa0/4
20 Purchase active

If you remove any port from vlan it will be a member of default vlan 1
IN(config)#interface fa0/1
IN(config-if)#no switchport access vlan 10

IN#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/5, Fa0/6, Fa0/7

Note: In Cisco we use Access port whereas in Aruba/Hp Switch we use Untagged Port, Access port or Untagged port can
only be a member of one vlan.

It means Support fa0/1 either be a member of Vlan 10 or vlan 20 what so ever

But when we connect Switch to Switch that ports must be member of Multiple vlan and for that we use Tagged or Trunk
Port in Cisco

Trunk in cisco/ Tagged in HP/Aruba

IN(config)#interface range fa0/1-2


IN(config-if-range)#switchport mode access
IN(config-if-range)#switchport access vlan 10
IN(config-if-range)#interface range fa0/3-4
IN(config-if-range)#switchport mode access
IN(config-if-range)#switchport access vlan 20

IN(config)#interface fa0/24
IN(config-if)#switchport mode trunk
IN(config-if)#switchport trunk allowed vlan 10,20

OM(config)#interface range fa0/1-2


OM(config-if-range)#switchport mode access
OMconfig-if-range)#switchport access vlan 10
om(config-if-range)#interface range fa0/3-4
OM(config-if-range)#switchport mode access
OM(config-if-range)#switchport access vlan 20

OM(config)#interface fa0/24
OM(config-if)#switchport mode trunk
OM(config-if)#switchport trunk allowed vlan 10,20

How to Ping / Communicate vlan 10 and vlan 20 pc , it require a Router

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname In-Router
In-Router(config)#interface gi0/0
In-Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up


In-Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
In-Router(config)#interface gi0/0
In-Router(config-if)#ip address 20.0.0.10 255.0.0.0 < how to give ip address to the router interface >

In-Router#show ip interface brief < verify the ip address on router interface >
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 20.0.0.10 YES manual up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down

How to delete ip address from router interface

In-Router(config-if)#interface gi0/0
In-Router(config-if)#no ip address

Verify that the ip address is removed or not

In-Router#show ip interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES manual up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down

We need to create 2 Sub-interface on router Gi0/0 and will assign each to vlan 10 and vlan 20

In-Router(config)#interface gi0/0.10 < creating Sub- interface of Router port Gi0/0 >
In-Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.10, changed state to up

In-Router(config-subif)#encapsulation dot1Q 10
In-Router(config-subif)#ip address 10.0.0.10 255.0.0.0
In-Router(config-subif)#no shutdown
In-Router(config-subif)#description "Connected to Vlan 10"

In-Router(config)#interface gi0/0.20
In-Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.20, changed state to up

In-Router(config-subif)#encapsulation dot1Q 20
In-Router(config-subif)#ip address 20.0.0.10 255.0.0.0
In-Router(config-subif)#description "Connected to Vlan 20"

IN(config)#interface fa0/5
IN(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up
IN(config-if)#switchport trunk allowed vlan 10,20

Switch and Router has Running-config file which stored in Ram which is Temporary memory where as Startup-config file
is stored in NVRAM it is a Permanent Memory

Ram= Running-Config store configuration temporary


VMRAM= Startup-config Store configuration permanent

Copy Configuration from Running-config to Startup-config

IN# copy Running-config Startup-config


IN# Write Memory

If you did not save configuration in Startup-config and reboot the switch/router you will not get any configuration

How to take a Backup of Switch/ Router Configuration

Method 1. Copy all the configuration of running-config and save it in Notepad


Method 2. Using a tftp Server

IN#conf t
Enter configuration commands, one per line. End with CNTL/Z.
IN(config)#interface vlan 10
%LINK-5-CHANGED: Interface Vlan10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

IN(config-if)#ip address 10.0.0.20 255.0.0.0

IN#copy startup-config tftp:


Address or name of remote host []? 10.0.0.4
Destination filename [IN-confg]?
Writing startup-config...!!
[OK - 1351 bytes]
1351 bytes copied in 0 secs

How to Restore Configuration from the TFTP Server

switch#copy tftp: running-config


Address or name of remote host []? 10.0.0.4
Source filename []? IN-confg
Destination filename [running-config]?

Accessing tftp://10.0.0.4/IN-confg...
Loading IN-confg from 10.0.0.4: !
[OK - 1351 bytes]

How to delete the ip address from the interface vlan 10

IN(config)#interface vlan 10
IN(config-if)#no ip address
IN(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
IN#ping 10.0.0.4

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 10.0.0.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Deleting Vlan Interface

IN(config)#no interface vlan 10

Deleting a Startup-Config file form the NVRAM

IN#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]y[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram

How to Verify startup-config file

IN#show startup-config
startup-config is not present

Saving configuration from running-config to Startup-config

IN#copy running-config startup-config


or
IN#write memory
Building configuration...

IN#copy startup-config running-config

Saving configuration from Startup-config to running-config

IN#copy startup-config running-config


Destination filename [running-config]?

1527 bytes copied in 0.416 secs (3670 bytes/sec)


IN#
%LINK-5-CHANGED: Interface Vlan20, changed state to up

Configuring Telnet / SSH in Switch / Router

IN#conf terminal
IN(config)#enable password 321
IN(config)#line vty 0 15
IN(config-line)#password 123
IN(config-line)#login
If you want to bypass the enable password while telnet us the below command in line vty
IN(config-line)#privilege level 15

How to Configure SSH in Router and Switch


IN#conf terminal
IN(config)#ip domain name xyz.com
IN(config)#crypto key generate rsa
The name for the keys will be: IN.xyz.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

IN(config-line)#transport input ssh


IN(config)#username syed password 123
IN(config)#user saba password 321
IN(config-line)#login local

C:\>ssh -l syed 10.0.0.20


C:\>ssh -l saba 10.0.0.20

This will tell you the Switchport Status


The Below interface fa0/1 is showing Administrative Mode : Static Access, because I manually given the command
Swithport Mode Access
Oman(config)#interafce f0/1
Oman(Config-if)#Switchport Mode access

show interfaces g0/1 switchport

OMan#show interfaces fa0/1 switchport


Name: Fa0/1
Switchport: Enabled
Administrative Mode: static access
Operational Mode: down
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Making a Gi0/1 as a trunk Port nd allowing Vlan 2,3

India(config)#int g0/1
India(config-if)#switchport mode trunk
India(config-if)#switchport trunk allowed vlan 2,3

Switch / Router Configuration To Make Communication between 2 and 3 vlans

Switch Configuration
India(config)#interface range f0/1-2
India(config-if-range)#switchport mode access
India(config-if-range)#switchport access vlan 2
India(config-if-range)#^Z
India#
%SYS-5-CONFIG_I: Configured from console by console
India#wr
Building configuration...
[OK]
India#conf t
Enter configuration commands, one per line. End with CNTL/Z.
India(config)#interface range fa0/3-4
India(config-if-range)#switchport mode access
India(config-if-range)#switchport access vlan 3
India(config-if-range)#^Z
India#
%SYS-5-CONFIG_I: Configured from console by console

India#write
Building configuration...
[OK]
India#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/2
2 wifi active Fa0/1, Fa0/2
3 viop active Fa0/3, Fa0/4
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
India#conf t
Enter configuration commands, one per line. End with CNTL/Z.
India(config)#interface f0/10
India(config-if)#switchport mode access
India(config-if)#switchport access vlan 2
India(config-if)#exit
India(config)#interface f0/11
India(config-if)#switchport mode access
India(config-if)#switchport access vlan 3
India(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
India#write memory
Building configuration...
[OK]
India#
%LINK-5-CHANGED: Interface FastEthernet0/11, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up

%LINK-5-CHANGED: Interface FastEthernet0/10, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up

India#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24, Gig0/2
2 wifi active Fa0/1, Fa0/2, Fa0/10
3 viop active Fa0/3, Fa0/4, Fa0/11

Router Configuration

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface g0/1
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

R1(config-if)#ip address 192.168.2.5 255.255.255.0


R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface gi0/2
%Invalid interface type and number
R1(config)#
R1(config)#interface gi0/2^Z
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#show ip interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 192.168.2.5 YES manual up up
Vlan1 unassigned YES unset administratively down down
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface gi0/1
R1(config-if)#no ip address < to remove ip address >
R1(config-if)#^Z
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#show ip interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 unassigned YES manual up up
Vlan1 unassigned YES unset administratively down down
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int g0/0
R1(config-if)#ip address 192.168.2.5 255.255.255.0
R1(config-if)#no sh
R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R1(config-if)#exit
R1(config)#int g0/1
R1(config-if)#ip add
R1(config-if)#ip address 192.168.3.5 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#^Z

Second Switch Configuration Oman

OMan(config)#interface gi0/1
OMan(config-if)#switchport mode trunk
OMan(config-if)#switchport trunk allowed vlan 2,3
OMan(config-if)#^Z
OMan#write mem
OMan#write memory
Building configuration...
[OK]
OMan#show interfaces trunk

Port Mode Encapsulation Status Native vlan


Gig0/1 on 802.1q trunking 1

Port Vlans allowed on trunk


Gig0/1 2-3

Port Vlans allowed and active in management domain


Gig0/1 2,3

Port Vlans in spanning tree forwarding state and not pruned


Gig0/1 2,3

OMan#write memory
Building configuration...
[OK]
OMan#show vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/2
2 wifi active
3 voip active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

OMan#conf t
Enter configuration commands, one per line. End with CNTL/Z.
OMan(config)#interface fa0/1
OMan(config-if)#switchport mode access
OMan(config-if)#switchport access vlan 2
OMan(config-if)#exit
OMan(config)#interface f0/2
OMan(config-if)#switchport mode access
OMan(config-if)#switchport access vlan 3
OMan(config-if)#^Z
OMan#
%SYS-5-CONFIG_I: Configured from console by console

OMan#write memory

Connecting 2 PC those are is different vlan 2 and Vlan 3 using a Physical Router Interface
Switch Configuration
hostname IN
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
Description “ Connect to PC2”
!
interface FastEthernet0/2
switchport access vlan 3
switchport mode access
Description “ Connect to PC1”
!
interface FastEthernet0/3
switchport access vlan 2
Description “ Connect to Router Interface gi0/0/0 ”
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 3
switchport mode access
Description “ Connect to Router interface Gi0/0/1”

Router Configuration

Router(config)#int gi0/0/0
Router(config-if)#ip address 10.0.0.10 255.0.0.0
Router(config-if)#no shutdown

Router(config-if)#int gi0/0/1
Router(config-if)#ip address 20.0.0.10 255.0.0.0
Router(config-if)#no shutdown
Connecting 2 PC those are is different vlan 2 and Vlan 3 using a Virtual router Interface

Switch 1 Configuration

Switch1(config)#hostname IN
IN(config)#vlan 2
IN(config-vlan)#name Sales
IN(config-vlan)#exit
IN(config)#vlan 3
IN(config-vlan)#name HR

IN(config)#interface FastEthernet0/1
IN(config-if)#switchport access vlan 2
IN(config-if)#Description Connect to PC3

N(config-if)#interface FastEthernet0/2
IN(config-if)#switchport access vlan 3
IN(config-if)#Description Connect to PC4

IN(config)#interface gi0/2
IN(config-if)#switchport mode trunk
IN(config-if)#switchport trunk allowed vlan 2,3

Switch 2 Configuration
hostname OM
vlan 2
name sales
vlan 3
name HR

interface fa0/1
switchport mode access
switchport access vlan 2

interface fa0/2
switchport mode access
switchport access vlan 3

Interface gi0/1
switchport mode trunk
switchport trunk allowed vlan 2,3

Router Configuration

Router(config)#hostname R1
R1(config)#interface gi0/0
R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R1(config)#interface gi0/0.2
R1(config-subif)#encapsulation dot1Q 2
R1(config-subif)#ip address 10.0.0.10 255.0.0.0

R1(config-subif)#exit
R1(config)#interface gi0/0.3
%LINK-5-CHANGED: Interface GigabitEthernet0/0.3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.3, changed state to up

R1(config-subif)#encapsulation dot1Q 3
R1(config-subif)#ip address 20.0.0.10 255.0.0.0
R1(config-subif)#no shutdown
R1(config-subif)#^Z

Configuration Telnet and ssh


Switch Configuration for Telnet

Switch(config)#hostname RH
RH(config)#enable password 123
RH(config)#line vty 0 15
RH(config-line)#password 321
RH(config-line)#transport input telnet
RH(config-line)#login

Switch Configuration for SSH

Configuring SSH ( Secure Shell)

Step 1. Give Domain Name


Step.2 Assign ip address to vlan interface
Step 3. Generate Crypto Key rsa
Step 4. give priveledge password
Step 5. Create Local User name and Password
Step 6. Transport type ssh
----------------------------------- ------

Configuration of SSH on Switch

RH#conf t
Enter configuration commands, one per line. End with CNTL/Z.
RH(config)#ip domain name xyz.local
RH(config)#interface vlan 1
RH(config-if)#ip address 10.0.0.10 255.0.0.0
RH(config-if)#no sh
RH(config-if)#exit
RH(config)#crypto key generate rsa
The name for the keys will be: RH.xyz.local
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]: 1024


% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

RH(config)#username syed password 1234


RH(config)#user zaidi password 1234
RH(config)#line vty 0 15
RH(config-line)#transport input ssh
RH(config-line)#login local
RH(config-line)#^Z

Configuring DHCP Pool on Server

You might also like