Saturday, 26 December 2015

COMPUTER NETWORKING SOLUTION FOR SMALL AND MEDIUM SIZE OFFICES WITH VIRTUAL LOCAL AREA NETWORKS (PART 2)



INTRODUCTION

Welcome to the second part of the VLAN network tutorial. Here am going to get our network up and running by walking you through some configurations. If you miss the first part please click here. Am actually doing this using a network simulator called cisco packet tracer but the configuration is pretty much the same on life routers. So sit back, relax and ignite your brain as I’m about to unveil one of the coolest networking secrets.


CONFIGURING VLAN IN OUR NETWORK

Before moving on to configuring VLAN in our network, I’ll like list out the basic steps that must be followed to make it work in a network of switches and routers installed with the cisco internetworking operating system (IOS).
To route between VLANs, one must go through four basic steps;

  • ·         Configure and name VLANs
  • ·         Assign switch ports to VLANs
  • ·         Subnet VLANs
  • ·         Configure trunk Ports (Port connecting the switch to the router)
  • ·         Configure inter-VLAN routing ( on the router) by:

    1.  Creating subinterfaces for each VLAN
    2.  Specifying the encapsulation method


Our case study network topology is composed of a router, switch and some hosts. The network has been subnetted using class C IP addresses with subnet mask 255.255.255.240 which will accommodate 14 valid host in each subnet (VLAN) as shown in the diagram below:


The subinterfaces are the default gateways to of the VLANs and take the first valid IP addresses in the subnets.

Switch Configuration
Switch>en
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vl
Switch(config)#vlan 10
Switch(config-vlan)#nam
Switch(config-vlan)#name admin
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#na
Switch(config-vlan)#name sales
Switch(config-vlan)#exit
Switch(config)#vl
Switch(config)#vlan 30
Switch(config-vlan)#na
Switch(config-vlan)#name marketing
Switch(config-vlan)#exi
Switch(config-vlan)#exit
Switch(config)#int
Switch(config)#interface f0/1
Switch(config-if)#no sh
Switch(config-if)#no shutdown
Switch(config-if)#swi
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode acc
Switch(config-if)#switchport mode tr
Switch(config-if)#switchport mode trunk
Switch(config-if)#sw
Switch(config-if)#switchport tr
Switch(config-if)#switchport trunk en
Switch(config-if)#switchport trunk ?
allowed Set allowed VLAN characteristics when interface is in trunking mode
native Set trunking native characteristics when interface is in trunking
mode
Switch(config-if)#exit
Switch(config)#interface f0/2
Switch(config-if)#switchport mode acc
Switch(config-if)#switchport mode access
Switch(config-if)#switchport acc
Switch(config-if)#switchport access vl
Switch(config-if)#switchport access ?
vlan Set VLAN when interface is in access mode
Switch(config-if)#switchport access v
Switch(config-if)#switchport access vlan 10
Switch(config-if)#interface f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#interface f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#exit
Switch(config)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#copy ru
Switch#copy running-config st
Switch#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#

Router Configuration
ROUTER>en
ROUTER#conf
ROUTER#configure
ROUTER#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ROUTER(config)#int
ROUTER(config)#interface f0/0
ROUTER(config-if)#no sh
ROUTER(config-if)#no shutdown

ROUTER(config-if)#
ROUTER(config-if)#en
ROUTER(config-if)#enca
ROUTER(config-if)#int
ROUTER(config-if)#int f0/0.10
ROUTER(config-subif)#

ROUTER(config-subif)#enc
ROUTER(config-subif)#encapsulation do
ROUTER(config-subif)#encapsulation dot1Q
% Incomplete command.
ROUTER(config-subif)#encapsulation dot1Q ?
<1-1005> IEEE 802.1Q VLAN ID
ROUTER(config-subif)#encapsulation dot1Q 10
ROUTER(config-subif)#ip add
ROUTER(config-subif)#ip address 192.168.10.1 255.255.255.240
ROUTER(config-subif)#int f0/0.20
ROUTER(config-subif)#

ROUTER(config-subif)#encapsulation dot1Q 20
ROUTER(config-subif)#ip address 192.168.10.17 255.255.255.240
ROUTER(config-subif)#int f0/0.30
ROUTER(config-subif)#

ROUTER(config-subif)#encapsulation dot1Q 30
ROUTER(config-subif)#ip address 192.168.10.33 255.255.255.240
ROUTER(config-subif)#^Z
ROUTER#
ROUTER#copy run
ROUTER#copy running-config st
ROUTER#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
ROUTER#

Configure your PCs using the scope of IP addresses in our network diagram and you’re good to go. As more and more hosts are added to the VLANs, all you need to do is assign them IP addresses in the subnet range indicated in the network diagram. But remember that in our case study only 14 valid IP addresses are available for each subnet(VLANs) since we are considering a medium-sized enterprise.


CONCLUSION: Well that’s all there is to the configuration. I hope this has been of help to your intellect and I’ll like to thank you for reading.

0 comments:

Post a Comment

Add a comment here

WhatsApp Dp