Friday, May 15, 2015

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

No comments :

Post a Comment