Popular Posts

Share |
Showing posts with label VLAN. Show all posts
Showing posts with label VLAN. Show all posts

Saturday, March 13, 2010

Lab commands - VLAN configurations

Lab commands - VLAN configurations


Switch#enable "enter to privilage mode"


Switch#configure terminal  "Enter to Global configuration mode"


Enter configuration commands, one per line.  End with CNTL/Z.


Switch(config)#interface vlan 1 "Go to interface mode of VLAN 1"


Switch(config-if)#ip address 10.1.1.1 255.255.255.0 "Assign IP address for interface VLAN 1 with the subnet mask"


Switch(config-if)#no shutdown "make the interface up"


%LINK-5-CHANGED: Interface Vlan1, changed state to up
Switch(config-if)#
%SYS-5-CONFIG_I: Configured from console by console
Switch#




VIEW CONFIGURATIONS





Switch#show interfaces VLAN 1 "Show details of  interface VLAN 1"
Vlan1 is up, line protocol is down "Both vlan1 and line protocol must be up for working condition"


Hardware is CPU Interface, address is 0010.1116.ce76 (bia 0010.1116.ce76)
  Internet address is 10.1.1.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,
  reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 21:40:21, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1682 packets input, 530955 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicast)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     563859 packets output, 0 bytes, 0 underruns
     0 output errors, 23 interface resets
     0 output buffer failures, 0 output buffers swapped out



Switch#SHOW running-config "view running configurations of interface VLAN 1"

!
interface Vlan1
 ip address 10.1.1.1 255.255.255.0
!

Wednesday, March 10, 2010

What is a VLAN?


What is a VLAN?

A VLAN is a virtual LAN. In technical terms, a VLAN is a broadcast domain created by switches. Normally, it is a router creating that broadcast domain. With VLAN’s, a switch can create the broadcast domain.

This works by, you, the administrator, putting some switch ports in a VLAN other than 1, the default VLAN. All ports in a single VLAN are in a single broadcast domain.

Because switches can talk to each other, some ports on switch A can be in VLAN 10 and other ports on switch B can be in VLAN 10. Broadcasts between these devices will not be seen on any other port in any other VLAN, other than 10. However, these devices can all communicate because they are on the same VLAN. Without additional configuration, they would not be able to communicate with any other devices, not in their VLAN.

Are VLANs required?
It is important to point out that you don’t have to configure a VLAN until your network gets so large and has so much traffic that you need one. Many times, people are simply using VLAN’s because the network they are working on was already using them.
Another important fact is that, on a Cisco switch, VLAN’s are enabled by default and ALL devices are already in a VLAN. The VLAN that all devices are already in is VLAN 1. So, by default, you can just use all the ports on a switch and all devices will be able to talk to one another.

When do I need a VLAN?
You need to consider using VLAN’s in any of the following situations:
You have more than 200 devices on your LAN
You have a lot of broadcast traffic on your LAN
Groups of users need more security or are being slowed down by too many broadcasts?
Groups of users need to be on the same broadcast domain because they are running the same applications. An example would be a company that has VoIP phones. The users using the phone could be on a different VLAN, not with the regular users.
Or, just to make a single switch into multiple virtual switches.

How to Create a VLAN ?

Three methods to create a VLAN


Switch>enable "Enter to privilege mode"
Switch#configure terminal "Enter to Global Configuration mode"
Enter configuration commands, one per line.  End with CNTL/Z.


Method 1
Switch(config)#vlan 10 "Create VLAN 10"
Switch(config-vlan)#name admin "Name VLAN as admin"
Switch(config-vlan)#exit


Method 2
Switch(config)#interface vlan 20 


Method 3
Switch#vlan data "Enter to VLAN database"
% Warning: It is recommended to configure VLAN from config mode,
 as VLAN database mode is being deprecated. Please consult user
 documentation for configuring VTP/VLAN in config mode.


Switch(vlan)#?
VLAN database editing buffer manipulation commands:
exit  Apply changes, bump revision number, and exit mode
no    Negate a command or set its defaults
vlan  Add, delete, or modify values associated with a single VLAN
vtp   Perform VTP administrative functions.


Switch(vlan)#vlan 30 name accounts "Create VLAN 30 and name it as Accounts in VLAN database"
VLAN 30 added:
Name: accounts
Related Posts with Thumbnails