Friday, May 15, 2015

Lab 27 Routing between Access layer and Distribution Layer

Objective


  • To configure VLAN routing for a layer 3 switch.

Topology


Setting

PC0 and PC2 ar in VLAN1, and PC1 and PC3 are in VLAN2.
Gig1/1 on every access layer is connected to distribution layer.
Distribution layer switch has routing function
IPs for computers have been set up.

Requirments

  • Configure the link between switches as trunk
  • Configure distribution layer switch to enable routing between VLAN1 and VLAN2.

Steps

On Switch1

Switch>en
Switch#confi t
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int fastEthernet 0/2
Switch(config-if)#switchport access vlan 2
Switch(config)#int gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#

On Switch2

Switch>en
Switch#confi t
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int fastEthernet 0/2
Switch(config-if)#switchport access vlan 2
Switch(config)#int gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#

On Switch0

Switch>en
Switch#confi t
Switch(config)#vlan 2
Switch(config)#interface gigabitEthernet 0/1
Switch(config)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface gigabitEthernet 0/2
Switch(config)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.0.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#exit
Switch(config)#interface vlan 2
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#

On PC3, ping PC0

PC>ping 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.2: bytes=32 time=19ms TTL=127
Reply from 192.168.0.2: bytes=32 time=17ms TTL=127
Reply from 192.168.0.2: bytes=32 time=18ms TTL=127
Reply from 192.168.0.2: bytes=32 time=15ms TTL=127
Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 19ms, Average = 17ms
PC>

Lab 26 Routing For VLANs In A Building

Objective

  • Configure trunk to achieve routing among VLANs

Topology


Setting

For better safety and easy troubleshooting, 4 VLANS are set up based on departments. The VLAN 4 is used for servers, and all servers have 1000M Ethernet interface.
IPs for computers have been set up, and the gateway for each network segment is the first available IP.

Requirments

  • Three VLANs should be created on 3 access layer switches, and assign ports to VLANs as shown in the figure.
  • Configre trunk between distribution and access switches
  • Configure Routing between VLANs

Steps

On Switch7

Switch>en
Switch#config t
Switch(config)#vlan 2
Switch(config-vlan)#ex
Switch(config)#vlan 3
Switch(config-vlan)#ex
Switch(config)#interface fastEthernet 1/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#ex
Switch(config)#interface fastEthernet 2/1
Switch(config-if)#switchport access vlan 3
Switch(config)#interface gigabitEthernet 6/1
Switch(config-if)#switchport mode trunk

On Switch2

Switch>en
Switch#config t
Switch(config)#vlan 2
Switch(config-vlan)#ex
Switch(config)#vlan 3
Switch(config-vlan)#ex
Switch(config)#interface fastEthernet 1/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#ex
Switch(config)#interface fastEthernet 2/1
Switch(config-if)#switchport access vlan 3
Switch(config-if)#ex
Switch(config)#interface gigabitEthernet 6/1
Switch(config-if)#switchport mode trunk

On Switch1

Switch>en
Switch#config t
Switch(config)#vlan 3
Switch(config-vlan)#ex
Switch(config)#vlan 2
Switch(config)#interface gigabitEthernet 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#interface gigabitEthernet 0/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#ex
Switch(config)#interface fastEthernet 0/1
Switch(config-if)#switchport access vlan 4
Switch(config-if)#interface fastEthernet 0/2
Switch(config-if)#switchport access vlan 4
Switch(config-if)#ex

Set up VLAN interface for routing 

Switch(config)#interface vlan 1
Switch(config-if)#ip address 172.16.0.1 255.255.0.0
Switch(config-if)#no shut
Switch(config-if)#interface vlan 2
Switch(config-if)#ip address 172.17.0.1 255.255.0.0
Switch(config-if)#interface vlan 3
Switch(config-if)#ip address 172.18.0.1 255.255.0.0
Switch(config-if)#interface vlan 4
Switch(config-if)#ip address 172.19.0.1 255.255.0.0
Switch(config-if)#ex

Test

VLAN4 PC pings VLAN1 PC.

SERVER>ping 172.16.0.2

Pinging 172.16.0.2 with 32 bytes of data:

Reply from 172.16.0.2: bytes=32 time=1ms TTL=127
Reply from 172.16.0.2: bytes=32 time=0ms TTL=127
Reply from 172.16.0.2: bytes=32 time=0ms TTL=127
Reply from 172.16.0.2: bytes=32 time=0ms TTL=127

Ping statistics for 172.16.0.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms

SERVER>

VLAN4 PC pings VLAN2 PC.

SERVER>ping 172.17.0.2

Pinging 172.17.0.2 with 32 bytes of data:

Reply from 172.17.0.2: bytes=32 time=0ms TTL=127
Reply from 172.17.0.2: bytes=32 time=0ms TTL=127
Reply from 172.17.0.2: bytes=32 time=0ms TTL=127
Reply from 172.17.0.2: bytes=32 time=0ms TTL=127

Ping statistics for 172.17.0.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

VLAN4 PC ping VLAN3 PC.

SERVER>ping 172.18.0.2

Pinging 172.18.0.2 with 32 bytes of data:

Reply from 172.18.0.2: bytes=32 time=0ms TTL=127
Reply from 172.18.0.2: bytes=32 time=0ms TTL=127
Reply from 172.18.0.2: bytes=32 time=0ms TTL=127
Reply from 172.18.0.2: bytes=32 time=0ms TTL=127

Ping statistics for 172.18.0.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Lab 25 VTP

Objective

  • To learn how to configure VTP domain on switches
  • To understand the function of VTP domain.

Topology


Setting

PC0 and PC2 are in VLAN1, and PC1 and PC3 are in VLAN2.
The two Gig1/1 ports  on access layer switches are connected to the distribution layer switch.
The distribution layer switch has routing function.
IPs for computers have been configured.

Requirements

  • Configure a VTP Domain
  • Configure VTP Clients
  • Configure the VTP server
  • Configure VTP password

Steps

On Switch1

Switch(config)#interface gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#vtp domain office1
Changing VTP domain name from NULL to office1
Switch(config)#vtp password aaa
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#

On Switch2

Switch#confi t
Switch(config)#interface gigabitEthernet 1/1
Switch(config-if)#switchport mode trunk
Switch(config)#vtp domain office1
Changing VTP domain name from NULL to office1
Switch(config)#vtp mode client
Setting device to VTP CLIENT mode.
Switch(config)#vtp password aaa
Setting device VLAN database password to aaa
Switch(config) #

On Switch0

Switch#confi t
Switch(config)#interface gigabitEthernet 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#interface gigabitEthernet 0/2
Switch(config-if)#switchport mode trunk
Switch(config)#vtp domain office1
Changing VTP domain name from NULL to office1
Switch(config)#vtp password aaa
Switch(config)#vtp mode server
Device mode already VTP SERVER.
Switch(config)#

Test VTP

On Switch0

Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#

On Switch

Switch#show vlan
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
Gig1/2
2 VLAN0002 active
3 VLAN0003 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

Lab 24 Spanning Tree

Objective


  • To understand spanning tree protocol11

Topology


Basic Setting

This is a LAN for a building, and two distribution layer switches are used for redundancy.

Requirements

  • Check current root bridge
  • Manually assign root switch.

Steps

On Switch10

Switch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
   Address 0002.4A63.C9B6
   This bridge is the root
   Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
   Address 0002.4A63.C9B6
   Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
   Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa1/1 Desg FWD 19 128.2 P2p
Fa2/1 Desg FWD 19 128.3 P2p
Gi5/1 Desg FWD 4 128.6 P2p
Gi6/1 Desg FWD 4 128.7 P2p
Gi7/1 Desg FWD 4 128.8 P2p
Gi8/1 Desg FWD 4 128.9 P2p
Switch#

On Switch11

Switch(config)#spanning-tree vlan 1 priority 4096

Check network status again


On Switch11

Switch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
     Address 00E0.F780.208C
     This bridge is the root
     Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
     Address 00E0.F780.208C
     Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
     Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi8/1 Desg FWD 4 128.9 P2p
Gi7/1 Desg FWD 4 128.8 P2p
Gi6/1 Desg FWD 4 128.7 P2p
Gi5/1 Desg FWD 4 128.6 P2p
Switch#

Lab 23 Layer 3 switch

Objective

  • To configure routing between VLANS on a layer 3 switch

Topology


Basic setting

Layer 3 switch

Requirments

  • Configure routing between VLANs
  • Set Fa0/2 to VLAN2
  • Set up VLAN1
  • Set up VLAN2

Steps

ON Multilayer Switch0

Switch(config)#ip routing  // enable routing
Switch(config)#vlan 2
Switch(config)#interface fastEthernet 0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#
Switch(config-vlan)#exit
Switch(config)#interface vlan 1
Switch(config-if)#ip address 10.0.0.1 255.0.0.0
Switch(config-if)#int vlan 2
Switch(config-if)#ip address 11.0.0.1 255.0.0.0

On PC1, test connectivity to PC0

PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Request timed out.
Reply from 10.0.0.2: bytes=32 time=8ms TTL=127
Reply from 10.0.0.2: bytes=32 time=10ms TTL=127
Reply from 10.0.0.2: bytes=32 time=5ms TTL=127
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 5ms, Maximum = 10ms, Average = 7ms
PC>


Lab 22 Routing between Vlans

Objective

  • To configure routing between VLANs

Topology


Basic setting

  • PC0 is connected to Fa0/1 on the switch
  • PC1 is connected to Fa0/2 on the switch
  • IPs have been set up
  • The router's Fa0/0 is connected to Fa0/10 on the switch , and the Fa0/10 on the switch is in VLAN 1.
  • The router's Fa1/0 is connected to Fa0/4 on switch, and the Fa0/4 on the switch is in VLAN 2.

Requirments

Configure the router's F0/0 with the Ip 192.168.0.1 255.255.255.0
Configure the router's F1/0 with the Ip 192.168.1.1 255.255.255.0
Con figure the PC1 with IP 192.168.1.2 255.255.255.0 and the default gateway 192.168.1.1

Steps

On PC1


On the Router0

Router>en
Router#confi t
Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#int f1/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no sh

PC1 pings PC0

PC>ping 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
Request timed out.
Reply from 192.168.0.2: bytes=32 time=16ms TTL=127
Reply from 192.168.0.2: bytes=32 time=16ms TTL=127
Reply from 192.168.0.2: bytes=32 time=17ms TTL=127
Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 16ms, Maximum = 17ms, Average = 16ms
PC>

Thursday, May 14, 2015

Lab 21 Check Mac Table

Objective

To understand the mapping between MACs and ports

Topology


Basic Setting

A HUB and a switch are connected in IP segment of 192.168.0.0/24 and IPs for computers are assigned by DHCP.

Requirement

Check Mac table on the switch.

Steps

On Switch0

Switch#show mac-address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
: Mac table is empty.At the beginning, the switch does not have the mapping between ports and MACs.

On PC2

PC>ping 192.168.0.11
Pinging 192.168.0.11 with 32 bytes of data:
Reply from 192.168.0.11: bytes=32 time=8ms TTL=128
Reply from 192.168.0.11: bytes=32 time=9ms TTL=128
Reply from 192.168.0.11: bytes=32 time=9ms TTL=128
Reply from 192.168.0.11: bytes=32 time=8ms TTL=128
Ping statistics for 192.168.0.11:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 8ms, Maximum = 9ms, Average = 8ms

PC>ping 192.168.0.12
Pinging 192.168.0.12 with 32 bytes of data:
Reply from 192.168.0.12: bytes=32 time=7ms TTL=128
Reply from 192.168.0.12: bytes=32 time=8ms TTL=128
Reply from 192.168.0.12: bytes=32 time=9ms TTL=128
Reply from 192.168.0.12: bytes=32 time=10ms TTL=128
Ping statistics for 192.168.0.12:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 7ms, Maximum = 10ms, Average = 8ms

PC>ping 192.168.0.13
Pinging 192.168.0.13 with 32 bytes of data:
Reply from 192.168.0.13: bytes=32 time=21ms TTL=128
Reply from 192.168.0.13: bytes=32 time=10ms TTL=128
Reply from 192.168.0.13: bytes=32 time=11ms TTL=128
Reply from 192.168.0.13: bytes=32 time=9ms TTL=128
Ping statistics for 192.168.0.13:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 9ms, Maximum = 21ms, Average = 12ms

PC>ping 192.168.0.14
Pinging 192.168.0.14 with 32 bytes of data:
Reply from 192.168.0.14: bytes=32 time=20ms TTL=128
Reply from 192.168.0.14: bytes=32 time=11ms TTL=128
Reply from 192.168.0.14: bytes=32 time=11ms TTL=128
Reply from 192.168.0.14: bytes=32 time=10ms TTL=128
Ping statistics for 192.168.0.14:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 20ms, Average = 13ms
PC>
After these pings, the switch learnt the MACs.
Check MAC table again on the Switch0
Switch#show mac-address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
1 0000.0c7c.7e49 DYNAMIC Fa0/1
1 0001.63c6.e338 DYNAMIC Fa0/5
1 0030.a336.362b DYNAMIC Fa0/4
1 0030.a3e4.e4c6 DYNAMIC Fa0/4
1 0090.0cd7.65c8 DYNAMIC Fa0/2
1 00d0.ffce.0eb4 DYNAMIC Fa0/3
Note: you can find that Fa02/4 has 2 MACs, because this port is connected to a HUB which is connected to 2 PCs.