Virtual LAN

All posts tagged Virtual LAN

AEtherchannel is the port link aggregation technology invented by a company named Kalpana. This company was acquired by Cisco systems in 1994.  Etherchannel allows us to group several ( practically eight ) physical Ethernet links on a Cisco switch into one logical link. Advantages of etherchannel include increased bandwidth and fault tolerance. For example, when we group eight physical ports into one logical port, considering bandwidth of each port is 100 Mbps, the combined bandwidth is 800 Mbps. What if one of the port fails?. Well the rest of the ports take over thus preventing any failure. Let’ see it a little bit practically.

Imagine we have a network as shown below. There are two separate departments named Sales and Engg  in a company which are connected through a router.

etherchannel1

 

There comes a time when the traffic between these two significant departments becomes so intense that the network administrator decides to interconnect the two switches of the respective departments as shown below so that the traffice doesn’t disturb the router. ( CCNA guys, always remember that  switches are interconnected using crossover cables only ).

etherchannel2

 

Considering the importance of the two departments, the network administrator decides not only to provide additional bandwidth but also provide fault tolerance between the departments. Etherchannel satisfies both these requirements.

Now let’s see how to configure etherchannel.  To configure etherchannel, login to SWITCH1. Enter global configuration mode by typing command “config t”. Type the command “interface port-channel 1″ to create etherchannel port trunk. Type command “interface range fastethernet 0/1-8″ to select eight interfaces to assign to our etherchannel port trunk. Type command “channel-group 1 mode on” to assign the interfaces to the etherchannel port trunk.

etherchannel3

 

We can see below that we have successfully configured  etherchannel  on our switch.

etherchannel4

 

Now let’s configure VLAN trunk over the etherchannel logical port trunk. Type command “interface port-channel 1″ to select the etherchannel port. Type command “switchport mode trunk” to  set etherchannel port as trunk port.

etherchannel5

 

Hope this was helpful.

According to Wikipedia, “In computer networking, a single layer-2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them via one or more routers; such a domain is referred to as a Virtual Local Area NetworkVirtual LAN or VLAN.”

VLAN’s simplify network management, limit the size of a broadcast domain and improve network efficiency. VLANs are of two types.

  • Static VLAN
  • Dynamic VLAN

In a static VLAN, we assign specific ports to a specific VLAN. whereas in dynamic VLAN we assign MAC addresses to a specific VLAN. In this article we are going to see how to create and configure a static VLAN. We are going to create three VLANs and assign ports to them. For this example, we will create three VLANs named Java, SAP and HR.

vlan1

 

We need to be in global configuration mode to create VLANs. The command “vlan 2″ assigns number 2 to the VLAN we are going to create. We can assign any number from 2 to 4094 to the vlan. The command “name java” names our vlan as java. Similarly we can create the vlans SAP and HR.  Before assigning ports to the VLAN let’s see the port states in our switch.

vlan2

 

We can see above that all the ports of the switch are members of VLAN 1. VLAN 1 is a special purpose VLAN used for administration. It is the only precreated VLAN on the Cisco switch. All ports are members of this VLAN by default. So when you are assigning a port to a specific VLAN, you are just changing the port from VLAN1 to that VLAN.

Now let’s assign ports to the VLANs we just created. First,  let’s assign three ports to the VLAN java.

vlan3

 

The “interface fastethernet 0/1″ command selects the fastethernet port 1. The “switchport access vlan2″ command assigns this port to VLAN java. Similarly we can add the fastethernet ports 2 and 3 to the vlan 2. Now let’s see the port states once again.

vlan4

 

We can see that the first three fastethernet ports have been assigned to the VLAN java. Now we will assign fastethernet ports 4 and 5 to VLANs SAP and HR respectively.

vlan5

 

This is how our network  will look like if we connect the host devices.

vlan6

 

And our port states will look like this.

vlan7

 

Basic configuration of a Cisco switch can be done  in three ways, using Cisco Device manager web tool, using Cisco Networking Assistant(CNA) and Cisco IOS setup mode. The first two are GUI tools and the latter is a CLI option. Since Cisco IOS plays a very important part in CCNA exam,  we are going to see how to configure a switch using Cisco IOS setup mode commands.

In this tut, we are going to configure the name of the switch, set management ip address to the switch, configure console and telnet passwords and lastly configure message of the day banner for the switch. To configure a Cisco switch using Cisco IOS, we must connect a computer to the console part of the switch using a rollover cable. For this article however, I am going to use Cisco Packet Tracer software.

bcos1

Naming the switch: 

Naming the switch can ease management and identification of the switch. Run the following commands for naming the switch. A switch can be named using “hostname” command.

bcos3

 

The first two commands allow us to access the global configuration of the switch. If you are not aware of different modes of a Cisco switch, see here. The “hostname” command renames the switch. The rest of the commands are used to exit from global configuration mode.

Configure management IP address:

Configuring management IP address to the switch allows us to connect to the switch from remote locations using either Telnet or HTTP. To configure management IP address on the switch, run the folllowing commands.

bcos4

 

The first two commands (“en” and “conf t”) set the IOS in privileged global configuration mode. This mode enables us to run commands that configure switch settings that apply to the whole switch.

The “interface vlan1″ command selects an interface to work with.  VLAN 1, is  called the management VLAN and is reserved for management of the switch.  We set IP address and the management default IP gateway on this Vlan.

“ip address 10.10.10.3 255.0.0.0” command sets the ip address and the subnet mask of the switch on interface vlan1. The no shutdown command turns on the interface vlan1. The exit command brings us back into global configuration mode from specific configuration mode.

The “ip default-gateway 10.10.10.1″ command sets the default gateway of the switch to 10.10.10.1 . We can see that we first exit from the interface configuration mode ((config-if)# exit) because the default gateway applies to the whole switch, not just to an interface.

Configuring Console password:

To set up a console password on the switch, run the following commands.

bcos5

 

The “line console 0″ command selects the console line. There is only one console line on a cisco switch. The “password 123456″ command sets the password of the console line to 123456. The “login” command instructs the IOS to prompt for authentication when somebody logs into console line.

Configuring telnet password:

To configure telnet password on the switch, run the following commands.

bcos6

 

The “line vty 0 ?” command shows the number of vty lines available on the switch. The response <1-15>  shows that 15 VTY lines are available, which means we can have 15 simultaneous sessions on this switch.  We will configure telnet password on line 1. The “line vty 1″ command selects the line 1. The “password telnet” command sets the telnet password of the line to telnet. The “login” command instructs the IOS to prompt for authentication.

Configuring banners:

Banners can be used to display a brief message about the switch when someone logs in. It helps identifying the switch we log into and its configuration and usage guidelines. We can also add a security warning in the banner message to warn users against unauthorized access to the switch. We should run the following commands to configure banners on the switch.

bcos7

 

We will configure message of the day on the switch. The “banner motd -“ command ( note that there is a space between motd and – ) is used to configure the message of the day banner on the switch. When we run this command, it prompts us to enter the message whcich should be ended by .

This is the basic configuration of he switch. Hope this was hepful.