Cisco Router and Switch Basics Configuration

 14 Cisco Router and Switch Basics - Lab Exercise


In this lab you will complete a basic configuration on a switch, verify Cisco Discovery Protocol CDP and analyse the effects of interface speed and duplex configuration.


Lab Topology:



Cisco Router and Switch Initial Configuration

1) Configure Router 1 with the hostname ‘R1’

Router(config)#hostname R1

R1(config)#


2) Configure Router 2 with the hostname ‘R2’

Router(config)#hostname R2

R2(config)#


3) Configure Switch 1 with the hostname ‘SW1’

Switch(config)#hostname SW1

SW1(config)#


4) Configure the IP address on R1 according to the topology diagram

R1(config)#int f0/0

R1(config-if)#ip add 10.10.10.1 255.255.255.0

R1(config-if)#no shut


5) Configure the IP address on R2 according to the topology diagram

R2(config)#int f0/0

R2(config-if)#ip add 10.10.10.2 255.255.255.0

R2(config-if)#no shut


6) Give SW1 the management IP address 10.10.10.10/24

SW1(config)#int vlan1

SW1(config-if)#ip add 10.10.10.10 255.255.255.0

SW1(config-if)#no shut

Note:

IP address management diaplikasikan pada interface vlan, tidak pada interface physical. Karena switch bekerja pada layer 2 (data link).


7) The switch should have connectivity to other IP subnets via R2

SW1(config)#ip default-gateway 10.10.10.2

Note:

SW1 dapat berfungsi untuk mengarahkan paket ke subnet lain melalui gateway default di subnet 


8) Verify the switch can ping its default gateway

SW1#ping 10.10.10.2


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.10.10.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms


9) Enter suitable descriptions on the interfaces connecting the devices

R1(config)#int f0/0

R1(config-if)#description Link to SW1


SW1(config)#int f0/1

SW1(config-if)#description Link to R1

SW1(config-if)#exit

SW1(config)#int f0/2

SW1(config-if)#description Link to R2


R2(config)#int f0/0

R2(config-if)#description Link to SW1


10) On SW1, verify that speed and duplex are automatically negotiated to 100 Mbps full duplex on the link to R1

SW1#sh int f0/1

FastEthernet0/1 is up, line protocol is up (connected)

  Hardware is Lance, address is 00e0.8fd6.8901 (bia 00e0.8fd6.8901)

  Description: Link to R1

 BW 100000 Kbit, DLY 1000 usec,

     reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation ARPA, loopback not set

  Keepalive set (10 sec)

  Full-duplex, 100Mb/s


11) Manually configure full duplex and FastEthernet speed on the link to R2

SW1(config)#int f0/2

SW1(config-if)#duplex full

SW1(config-if)#

%LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down


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


SW1(config-if)#speed ?

SW1(config-if)#speed 100


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

R2(config)#

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


R2(config)#int f0/0

R2(config-if)#no shut

R2(config-if)#speed 100

R2(config-if)#duplex full

R2(config-if)#

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

Note:
Device Switch dan Router bisa berkomunikasi apabila interface dirinya dan lawannya memiliki speed dan duplex yang sama. Apabila berbeda, maka Line protocol pada kedua interface secara otomatis mematikan koneksinya.
Untuk menghidupkannya kembali, tidak bisa dengan cara memasukkan command no shutdown, tetapi caranya adalah menyamakan konfigurasi speed dan duplex dari kedua interface tersebut.
Maka dari itu, pada konfigurasi di atas, setelah SW1 interface f0/2 diubah duplexnya menjadi full, selanjutnya adalah mengubah duplex dari R2 interface f0/0 menjadi full juga.
Dapat dilihat pada status interface di R2 yang awalnya down kemudian menjadi up kembali.


12) What version of IOS is the switch running?

SW1#show version

Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)


CDP Configuration

13) Verify the directly attached Cisco neighbors using Cisco Discovery Protocol

SW1#sh cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID

R1           Fas 0/1          133            R       C2800       Fas 0/0

R2           Fas 0/2          166            R       C2800       Fas 0/0


14) Prevent R1 from discovering information about Switch 1 via CDP

SW1(config)#int f0/1

SW1(config-if)#no cdp enable


15) Flush the CDP cache on R1 by entering the ‘no cdp run’ then ‘cdp run’ commands in global configuration mode

R1(config)#no cdp run

R1(config)#cdp run


16) Verify that R1 cannot see SW1 via CDP

 R1#show cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID

R1#


Switch Troubleshooting

17) Verify the status of the switch port connected to R2 with the show ip interface brief command. It should show status and protocol up/up.

SW1#show ip interface brief

Interface              IP-Address      OK? Method Status    Protocol 

FastEthernet0/1        unassigned      YES manual up        up 

FastEthernet0/2        unassigned      YES manual up        up


18) Shut down the interface connected to R2 and issue a show ip interface brief command again. The status and protocol should show administratively down/down.

SW1(config)#int f0/2

SW1(config-if)#shut


SW1(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down


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


SW1(config-if)#


SW1#show ip int

SW1#show ip interface brief

Interface              IP-Address      OK? Method Status    Protocol 

FastEthernet0/1        unassigned      YES manual up         up 

FastEthernet0/2        unassigned      YES manual admin-down down


19) Bring the interface up again. Verify the speed and duplex setting.

SW1(config)#int f0/2

SW1(config-if)#no shut


SW1(config-if)#

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


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


SW1(config-if)#exit

SW1(config)#exit

SW1#

%SYS-5-CONFIG_I: Configured from console by console


SW1#show interface f0/2

FastEthernet0/2 is up, line protocol is up (connected)

  Hardware is Lance, address is 00e0.8fd6.8902 (bia 00e0.8fd6.8902)

  Description: Link to R2

 BW 100000 Kbit, DLY 1000 usec,

     reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation ARPA, loopback not set

  Keepalive set (10 sec)

  Full-duplex, 100Mb/s


20) Set the duplex to half on Switch 1. Leave the settings as they are on R2.

SW1(config)#int f0/2

SW1(config-if)#duplex half

SW1(config-if)#

%LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down


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


SW1(config-if)#


21) Verify the state of the interface.

SW1#show ip interface brief

Interface              IP-Address      OK? Method Status  Protocol 

FastEthernet0/1        unassigned      YES manual up      up 

FastEthernet0/2        unassigned      YES manual down    down


22) Set the duplex back to full duplex.

SW1(config)#int f0/2

SW1(config-if)#duplex full

SW1(config-if)#

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


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


SW1(config-if)#


23) Set the speed to 10 Mbps.

SW1(config-if)#speed 10

SW1(config-if)#

%LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to down


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


SW1(config-if)#


24) Check if the interface is still operational.

SW1#show ip interface brief

Interface              IP-Address      OK? Method Status   Protocol 

FastEthernet0/1        unassigned      YES manual up       up 

FastEthernet0/2        unassigned      YES manual down     down


25) Check if the interface is operational on R2. What is the status of the interface?

R2#show ip interface brief

Interface              IP-Address      OK? Method Status   Protocol 

FastEthernet0/0        10.10.10.2      YES manual up       down


Comments

Popular posts from this blog

Configuring DHCP

Configuring OSPF + RIP + EIGRP

Configurating ACL