Showing posts with label Network Lab. Show all posts
Showing posts with label Network Lab. Show all posts

Monday, June 10, 2024

CCNA: LLDP VS CDP DISCOVERY PROTOCOL UNDERSTANDING & LAB

Cisco Discovery Protocol (CDP):

Overview: A Cisco proprietary network protocol. Information about Cisco devices that are directly connected is shared via it. It is exclusive to Cisco equipment and functions similarly to LLDP. It works over the OSI model's L2 (data link layer). By default, on Cisco hardware, enabled.

Important CDP Features

  • Cisco-Specific
  • Information Sharing
  • Topology Discovery
  • Device Management

 Link Layer Discovery Protocol (LLDP)

Overview: On a local network, network devices can advertise their identities, capabilities, and neighbors using LLDP, a vendor-neutral Layer 2 discovery protocol. It runs over the OSI model's L2 (data link layer), as defined by the IEEE 802.1AB standard.

Important LLDP Features

  • Vendor-Neutral
  • Information Exchange
  • Topology Discovery
  • Automated Configuration



Note: CDP is Cisco proprietary protocol, CDP is enabled on Cisco
devices by default. No need to enable it. 

Verification Commands 

Switch1#show cdp
Switch1#show cdp neighbors
Switch1#show cdp neighbors detail 
Switch1#show cdp interface 

Change CDP timers to 45 sec and holdtime to 60 sec (this command only supports real ISO Devices)

Siwtch1#config t
Siwtch1(config)#cdp timer 45
Siwtch1(config)#cdp holdtime 60

Verification Commands 

Switch1#show cdp

Disable CDP Globally or on an Interface Basis.

Switch1#config t
Switch1(config)#no cdp run
Switch1(config)#exit
Switch1#
Or
Switch1#config t
Switch1(config)#interface range fa0/1, fa0/2
Switch1(config-if)#no cdp enable
Switch1(config-if)#exit
Switch1(config)#exit
Switch1#

LLDP (Link Layer Discovery Protocol)


Note: The Link Layer Discovery Protocol (LLDP) is a vendor-neutral link layer
protocol and we need to manually enable it on a network device

Configuration:
Switch1#config t
Switch1(config)#lldp run
Switch1(config)#exit
Switch1#

Verification Commands 

Switch1#show lldp 
Switch1#show lldp neighbors
Switch1#show lldp neighbors detail 

Change LLDP timers to 15 sec and holdtime to 30 sec 

Configuration:
Switch1#config t
Switch1(config)#lldp timer 15
Switch1(config)#lldp holdtime 30
Switch1(config)#exit
Switch1#

Disable LLDP globally or on interface basis.

Switch1#config t
Switch1(config)#no lldp run
Switch1(config)#exit
Switch1#
Or
Switch1#config t
Switch1(config)#interface range fa0/0, fa0/1
Switch1(config-if-range)#no lldp transmit
Switch1(config-if-range)#no lldp receive
Switch1(config-if-range)#exit
Switch1(config)#exit
Switch1#

Important Commands:

sh cdp
sh cdp neighbors
sh cdp neighbors details
sh cdp interface 
sh lldp
sh lldp neighbors
sh lldp neighbors detail
sh lldp interface fa x/x

Sunday, June 2, 2024

CCNA Lab Implement Inter-VLAN Routing

Network Topology: 

"Router on a stick" is a network configuration where a single router is connected to a switch via one physical interface but can manage multiple VLANs (Virtual Local Area Networks). In this scenario we used VLAN10 and VLAN20 for different groups for different purpose. 

This setup allows the router to route traffic between VLANs on the switch, acting as a gateway for inter-VLAN communication.



Objectives

  • Build the network and configuration basic Cisco Router
  • Configuration Gateway for all vlan at Router
  • Creating VLANs 
  • Configuration Trunking / Access at Switch Layer 2 

Step 1: In first setup, Cisco Router question to you about initial configuration dialog. You should be type “no” bypass this step



Step 2: You must be basic configuration for Router as following 

                      Commands

                             Details 

 Router>        

User mode

 Router> enable                                                   

Moving to Privilege mode

 Router# configuration terminal              

Moving to global config

 Router(config)# hostname R1 

Config hostname from Router to R1

 R1 (config)# banner motd #This is Router #

Config banner message 

 R1 (config)# enable password   cisco123enable 

Set password login from user mode to Privilege mode

 R1 (config)# service password-encryption

Request Router use service password encryption

 R1 (config)# line con 0

Configuration line console

 R1 (config-line)# password ccna

Set password login from console

 R1 (config-line)# login

Apply password into line console

 R1 (config-line)# exit

Exit configuration line console

 R1 (config)# line vty 0 4

Configuration line vty

 R1 (config-line)# transport in all

Set method access into router via line vty

 R1 (config-line)# password telnet

Set password login from live vty

 R1 (config-line)# login

Apply password on line vty

 R1 (config-line)# exit 

Exit configuration line vty

                                
                                                     

Step 3: IP Configuration for R1                                              

                       Commands 

                              Details 

 R1 (config)#

Privilege mode

 R1 (config)# interface gi0/0/1

Configuration interface eth (eth-mode)

 R1 (config-if)# description Connectio-to-SW1

Add a description on interface

 R1 (config-if)# no shutdown

Active interface

 R1 (config-if)# exit

Exit interface 

 R1 (config)# interface gi0/0/1.10 

Configuration sub interface

 R1 (config-if)# description Connection-to-VLAN-10

Add a description on sub interface

 R1 (config-if)# encapsulation dot1Q 10

Set Sub-interface working with VLAN10

 R1 (config-if)# ip address 10.10.10.1 255.255.255.0

Set ip address for sub interface

 R1 (config-if)# no shutdown

Active interface 

 R1 (config-if)# exit

Exit sun interface 

 R1 (config)# interface gi0/0/1.20 

Configuration sub interface

 R1 (config-if)# description Connection-to-VLAN-20

Add a description on sub interface

 R1 (config-if)# encapsulation dot1Q 20

Set Sub-interface working with VLAN20

 R1 (config-if)# ip address 10.10.20.1 255.255.255.0

Set ip address for sub interface

 R1 (config-if)# no shutdown

Active sub interface

 R1 (config-if)# exit

Exit configuration

 R1 (config)# write

Save running-config to startup-config


tep 4: Verify configuration on R1

  • Type command “show ip int brief” and enter

  • Type command “show running-config” and enter

  • Type command “show running-config | include interface GigabitEthernet0/0/1” and enter


Step 5: Configuration for Switch:

Commands

Details

Switch> enable

moving to Privilege mode

Switch#

Privilege mode

Switch# configuration terminal

moving to global config

Switch(config)#no ip domain-lookup

tells the SW not to search any wrong words typed in the CLI.

Switch(config)#vlan 10

add vlan 10

Switch(config-vlan)#name Grp10

Set description

Switch (vlan)# exit

exit vlan mode

Switch(config)#vlan 20

add vlan 10

Switch(config-vlan)#name Grp20

Set description

Switch (vlan)# exit

exit vlan mode



Step 6: Verify VLAs: 

  • Type command “show vlan” and enter


Step 7: Configuration SW Uplink Port as a Trunk:

                       Commands 

                              Details 

Switch# configuration terminal

Moving to global config

Switch (config)# interface fa0/1

Configuration interface ethernet

Switch (config)# description Connection-to-Router

Add a description on interface

Switch(config-if)#switchport mode trunk

Set interface working with trunk mode

Switch(config-if)#switchport trunk allowed vlan 10,20

Set Vlans 10,20 into interface as a Trunk

 

 

 

  • Type command “show interfaces trunk” and enter


Step 8: Configuration SW Down Link as an Access for end device 

Commands

Details

Switch (config)# interface fa 0/2

Configuration interface ethernet

Switch (config-if)# description Connection-to-VLAN10

Add a description on interface

Switch (config-if)# switchport mode access

Set interface working with access mode

Switch (config-if)# switchport access vlan 10

Set Vlan 10 into interface

Switch (config-if)# exit

Exit config interface mode

Switch (config)# interface fa 0/3

Configuration interface ethernet

Switch (config-if)# description Connection-to-VLAN20

Add a description on interface

Switch (config-if)# switchport mode access

Set interface working with access mode

Switch (config-if)# switchport access vlan 20

Set Vlan 20 into interface

Switch (config-if)# exit

Exit config interface mode

Switch(config)#do write

Save running-config to startup-config

 

Step 9: Verify VLAN Port Access  

  • Type command “show vlan” and enter