VTP and STP Configuration

VTP&STP Setup

VTP and STP configuration

Configuration Command Line :

Switch-1:
Configure VTP Server:
Switch#
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#vtp mode server
Device mode already VTP SERVER.
S1(config)#vtp domain lab
Changing VTP domain name from NULL to lab
S1(config)#vtp password cisco
Setting device VLAN database password to cisco
S1(config)#

Configure DTP port:
S1(config)#int fa0/24
S1(config-if)#switchport mode trunk

S1(config-if)#exit
S1(config)#int g0/2
S1(config-if)#switchport mode trunk
S1(config-if)#exit
S1(config)#int g0/1
S1(config-if)#switchport mode trunk
S1(config-if)#exit
S1(config)#
Create VLAN:
S1>
S1>en
S1#config t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#vlan 10
S1(config-vlan)#exit
S1(config)#vlan 20
S1(config-vlan)#exit
S1(config)#
As we have already configure VTP server in our network so we don’t need to create VLAN on S2 or S3. We need only to associate VLAN with port.

Assign VLAN membership:

S1(config)#int fa0/1
S1(config-if)#switchport access vlan 10
S1(config-if)#int fa0/2
S1(config-if)#switchport access vlan 20
S1(config-if)#
S1(config-if)#exit
S1(config)#
Switch -2:
Configure VTP clients:

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S2
S2(config)#vtp mode client
Setting device to VTP CLIENT mode.
S2(config)#vtp domain lab
Changing VTP domain name from NULL to lab
S2(config)#vtp password cisco
Setting device VLAN database password to cisco
S2(config)#

As we have already configure VTP server in our network so we don’t need to create VLAN on S2 or S3. We need only to associate VLAN with port.

Assign VLAN membership:

S2#config t
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#int fa0/1
S2(config-if)#switchport access vlan 10
S2(config-if)#int fa0/2
S2(config-if)#switchport access vlan 20
S2(config-if)#exit
S2(config)#

Configure DTP port:
S2>
S2>en
S2#config t
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#int g0/2
S2(config-if)#switchport mode trunk
S2(config-if)#int g0/1
S2(config-if)#switchport mode trunk
S2(config-if)#exit
S2(config)#int fa0/23
S2(config-if)#switchport mode trunk
S2(config)#int fa0/24
S2(config-if)#switchport mode trunk
S2(config-if)#
S2(config-if)#exit
S2(config)#
Create VLAN:

Switch – 3:
Configure VTP clients:

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S3
S3(config)#vtp mode client
Setting device to VTP CLIENT mode.
S3(config)#vtp domain lab
Changing VTP domain name from NULL to lab
S3(config)#vtp password cisco
Setting device VLAN database password to cisco
S3(config)#

Configure DTP port:
S3>en
S3#config t
Enter configuration commands, one per line. End with CNTL/Z.
S3(config)#int g0/1
S3(config-if)#switchport mode trunk
S3(config-if)#

S3(config)#int fa0/24
S3(config-if)#switchport mode trunk
S3(config-if)#exit
S3(config)#

Create VLAN:
As we have already configure VTP server in our network so we don’t need to create VLAN on S2 or S3. We need only to associate VLAN with port.

Assign VLAN membership:
S3(config)#int fa0/1
S3(config-if)#switchport access vlan 10
S3(config-if)#int fa0/2
S3(config-if)#switchport access vlan 20
S3(config-if)#exit
S3(config)#

Now we have two working vlan. To test connectivity do ping form 10.0.0.2 to 10.0.0.3 and 10.0.0.4. if you get successfully replay then you have successfully created VLAN and VTP server.
Spanning-Tree Protocol:

In this configuration STP will block these ports F0/24 of S1 , F0/23 and F0/24 of S2 and F0/24 of S3 to avoid loop at layer to two. Verify those ports blocked due to STP functions.

Verify STP ports
Switch 2:

S2#show spanning-tree active
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.174D.7794
Cost 4
Port 26(GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.FF08.82E1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Fa0/23 Desg FWD 19 128.23 P2p
Fa0/24 Altn BLK 19 128.24 P2p
Gi0/1 Desg FWD 4 128.25 P2p
Gi0/2 Root FWD 4 128.26 P2p

VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address 0002.174D.7794
Cost 4
Port 26(GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
–More–

Router on Stick:

At this point of configuration you have two successfully running VLAN but they will not connect each other. To make intra VLAN communications we need to configure router . To do this double click on router and select CLI.

Configure intra VLAN:
Router:

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no ip address
Router(config-if)#no shutdown

Router(config)#int fa0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 10.0.0.1 255.0.0.0
Router(config-subif)#exit
Router(config)#
Router(config)#int fa0/0.20
Router(config-subif)#

Router(config-subif)#encap
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 20.0.0.1 255.0.0.0
Router(config-subif)#exit
Router(config)#

To test connectivity between different vlan do ping form any pc to all reaming pc. it should be ping successfully.

VLAN VTP Server STP DTP command reference sheet:

Switch(config)#vlan 10 Creates VLAN 10 and enters VLAN configuration mode for further definitions.
Switch(config-vlan)#name Sales Assigns a name to the VLAN. The length of the name can be from 1 to 32 characters.
Switch(config-vlan)#exit Applies changes, increases the revision number by 1, and returns to global configuration mode.
Switch(config)#interface fastethernet 0/1 Moves to interface configuration mode
Switch(config-if)#switchport mode access Sets the port to access mode
Switch(config-if)#switchport access vlan 10 Assigns this port to VLAN 10
Switch#show vlan Displays VLAN information
Switch#show vlan brief Displays VLAN information in brief
Switch#show vlan id 10 Displays information about VLAN 10 only
Switch#show vlan name sales Displays information about VLAN named sales only
Switch#show interfaces vlan x Displays interface characteristics for the specified VLAN
Switch#delete flash:vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
Switch#
Removes the entire VLAN database from flash.
Make sure there is no space between the colon (:) and the characters vlan.dat. You can potentially erase the entire contents of the flash with this command if the syntax is not correct. Make sure you read the output from the switch. If you need to cancel, press ctrl+cto escape back to privileged mode:
Switch(config)#interface fastethernet 0/5 Moves to interface configuration mode.
Switch(config-if)#no switchport access vlan 5 Removes port from VLAN 5 and reassigns it to VLAN 1—the default VLAN.
Switch(config-if)#exit Moves to global configuration mode.
Switch(config)#no vlan 5 Removes VLAN 5 from the VLAN database.
Switch#copy running-config startupconfig Saves the configuration in NVRAM
Switch(config-if) #switchport mode trunk Puts the interface into permanent trunking mode and negotiates to convert the link into a trunk link.
Switch(config)#vtp mode server Changes the switch to VTP server mode.
Switch(config)#vtp mode client Changes the switch to VTP client mode.
Switch(config)#vtp mode transparent Changes the switch to VTP transparent mode.
Switch(config)#no vtp mode Returns the switch to the default VTP server mode.
Switch(config)#vtp domain domain-name Configures the VTP domain name. The name can be from 1 to 32 characters long.
Switch(config)#vtp password password Configures a VTP password

.

Switch(config)#vtp pruning Enables VTP pruning
Switch#show vtp status Displays general information about VTP configuration
Switch#show vtp counters Displays the VTP counters for the switch

Thank you

Momataj Momo

Advertisements

Inter vlan Routing (router on a stick ) configuration

Ro

Router on a stick (inter vlan routing)

Inter Vlan Routing Configuration  :

I have showed here how to configure Inter vlan router on a stick with all command for switch and router .
Switch ()
1. Vlans , name
2. Ip address on interface management vlan
3.default gateway setup
4.trunk
5. native vlan
6.switchports + vlans
Router ()
1. Sub interfaces
2. encapsulation dot1q
3.native vlan

For Switch CL1 command line ():

Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.

Vlan Assign on Switch : 

Switch(config)#vlan 10
Switch(config-vlan)#name students
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#name faculty
Switch(config-vlan)#exit
Switch(config)#vlan 30
Switch(config-vlan)#name administration
Switch(config-vlan)#exit
Switch(config)#vlan 55
Switch(config-vlan)#name native
Switch(config-vlan)#exit
Switch(config)#vlan 77
Switch(config-vlan)#name mgt
Switch(config-vlan)#exit
Switch(config)#

Switch(config)#do 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
10 students active
20 faculty active
30 administration active
55 native active
77 mgt active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
–More–
Management Vlan setup and IP  address assign for remote access : 

Switch(config)#int fa0/5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 77
Switch(config-if)#int vlan 77
Switch(config-if)#ip address 192.168.77.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit

Switch# show run

interface Vlan77
ip address 192.168.77.2 255.255.255.0

Default gateway Setup:

Switch(config)#ip default-gateway 192.168.77.1

Trunk mode command on interface fa0/0: 
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan77, changed state to up

Switch(config-if)#switchport trunk allowed vlan 1-1005
Switch(config-if)#switchport trunk native vlan 55

Access mode command : 

Switch(config)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int fa0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#int fa0/4
Switch(config-if)#switchport access vlan 30
Switch(config-if)#
Switch(config-if)#int fa0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan 1,10,20,30,55,77
Switch(config-if)#switchport trunk native vlan 55

For Router command line CL1(): 
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#

Sub Interfaces IP address Configure Command: 

Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0.10
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state to up

Router(config-subif)#encapsulation ?
dot1Q IEEE 802.1Q Virtual LAN
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 192.168.10.1 255.255.255.0
Router(config-subif)#

Router(config-subif)#int fa0/0.20
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.20, changed state to up

Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 192.168.20.1 255.255.255.0
Router(config-subif)#

Router(config)#int fa0/0.30
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.30, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.30, changed state to up

Router(config-subif)#encapsulation dot1q 30
Router(config-subif)#ip address 192.168.30.1 255.255.255.0
Router(config-subif)#exit
Router(config)#int fa0/0.55
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.55, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.55, changed state to up

Router(config-subif)#encapsulation dot1q 55 native
Router(config-subif)#ip address 192.168.55.1 255.255.255.0
Router(config-subif)#

Router(config-subif)#int fa0/0.77
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.77, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.77, changed state to up

Router(config-subif)#encapsulation dot1q 77
Router(config-subif)#ip address 192.168.77.1 255.255.255.0
Router(config-subif)#

Router#show run
Building configuration…

interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
!
interface FastEthernet0/0.55
encapsulation dot1Q 55 native
ip address 192.168.55.1 255.255.255.0
!
interface FastEthernet0/0.77
encapsulation dot1Q 77
ip address 192.168.77.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
–More–

Router#show ip route
Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP
i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area
* – candidate default, U – per-user static route, o – ODR
P – periodic downloaded static route

Gateway of last resort is not set

C 192.168.10.0/24 is directly connected, FastEthernet0/0.10
C 192.168.20.0/24 is directly connected, FastEthernet0/0.20
C 192.168.30.0/24 is directly connected, FastEthernet0/0.30
C 192.168.55.0/24 is directly connected, FastEthernet0/0.55
C 192.168.77.0/24 is directly connected, FastEthernet0/0.77
Router#

Now go to  PC  command prompt and ping IP address, check connection.

PC> ping 192.168.77.2

 Important to know about configuring a Cisco IOS switch

#1: What’s the default VLAN?

The default VLAN on all switches is VLAN 1. By default, all ports on the switch are VLAN 1. With all ports in VLAN 1, all ports can communicate. As soon as you change the VLAN assignment for a switch port to another VLAN, that switch port won’t be able to communicate with the rest of the devices on other ports.

#2: Why do I need to configure interface “vlan 1”?

If you want to be able to manage your switch remotely over the network, your switch needs an IP address. If your switch has multiple VLANs configured, and you want to be able to manage the switch from each VLAN, the switch requires an IP address on a VLAN interface in each VLAN

#3: Why does my switch need a default gateway?

Actually, your switch doesn’t have to have a default gateway configured. However, if you want to be able to communicate with your switch from another subnet, you need to configure a default gateway on the switch so it knows how to get to its local LAN switch.

#4: How do I get switch ports up fast?

Cisco switches can do a lot of things besides just connect regular PCs to the network. That’s why you should use the switch ports optimally — they need a little extra configuration.

To bring up a switch port for use and tell the switch that there will always be “access devices” (such as PCs) on that switch port.

#5 How important are speed and duplex on switch ports?

Speed and duplex are very important on switch ports. That’s not to say that speed and duplex aren’t important on switch Ethernet ports (which they are).

However, switches are all about connecting a device to the LAN, and there are many devices that need connecting, so you’re much more likely to run into speed and duplex issues on switch ports. There are always old and slow devices somewhere on the network that aren’t quite compatible with your switch, and they don’t quite negotiate the speed and duplex correctly.

Thank you

Momataj momo

Skill Test : VLANs and Trunks configuration for Beginners

VOIP

Fig : VLans, trunk and VOIP setup

Configuration command for :

  • Default Vlan
  • Native Vlan
  • Data Vlan
  • Management Vlan
  • Voice Vlan

SWITCH 0 CL1:

Switch#show vlan
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 50
Switch(config-vlan)#name student                       (VLAN ASSIGN ON SWITCH 1)
Switch(config-vlan)#exit
Switch(config)#vlan 99
Switch(config-vlan)#name mgt
Switch(config-vlan)#exit
Switch#
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/10
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 50
Switch(config-if)#end
Switch#Switch#show run

For Display Configuration Setup: 

Switch#show running-config
interface FastEthernet0/10
switchport access vlan 50
switchport mode access
!

Management Vlan setup: 

Switch(config)#int fa0/24

Switch(config-if)#switchport access vlan 99

Switch#show vlan

Switch(config)#int vlan 99

Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan99, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan99, changed state to up

Switch(config-if)#ip address 192.168.99.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#exit
Switch#

For Remote access Switch o though management Vlan: 

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#line vty 0 15
Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config-line)#
SWITCH 1 on CL1:

Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 50
Switch(config-vlan)#name student
Switch(config-vlan)#exit
Switch(config)#int fa0/10
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 50
Switch(config-if)#exit
Switch(config)#
SWITCH 0 on CL1 for trunk mode allowed:
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk

Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch(config-if)#switchport trunk allowed vlan 1-99
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Check Running-configuration :

Switch#show run
Switch#show running-config
interface FastEthernet0/1
switchport trunk allowed vlan 1-99
switchport mode trunk

interface FastEthernet0/10
switchport access vlan 50
switchport mode access

interface Vlan99
ip address 192.168.99.2 255.255.255.0

line vty 5 15
password cisco
login

SWITCH 1 ON CL1 for trunk allowed:

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switch mode trunk
Switch(config-if)#switchport trunk allowed vlan 1-99
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console

For Check trunk Interface :

Switch#show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-99

Port Vlans allowed and active in management domain
Fa0/1 1,50

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,50
Switch#
SWITCH 1 ON CL1 for Native VLAN assign:
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 80
Switch(config-vlan)#name native
Switch(config-vlan)#exit
Switch(config)#

For Show interface fa0/1 switchport :
Switch#show interface fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)

For Native Vlan Configuration :

Switch#
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int fa0/1
Switch(config-if)#switchport trunk native vlan 80
Switch(config-if)#
Switch#

Switch#show interface fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 80 (native)
Voice VLAN: none
Switch#show interface trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 80

Port Vlans allowed on trunk
Fa0/1 1-99

Port Vlans allowed and active in management domain
Fa0/1 1,50,80

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,50,80
Switch#
Switch0 on CL1 comamand Line for setup native vlan 80 :

Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 80
Switch(config-vlan)#exit
Switch(config)#int fa 0/1
Switch(config-if)#switchport trunk native vlan 80
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/1 (1), with Switch FastEthernet0/1 (80).

Switch(config-if)#%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/1 on VLAN0080. Port consistency restored.

%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/1 on VLAN0001. Port consistency restored.

PC4 Testing connection :
C>ping 192.168.50.101

Pinging 192.168.50.101 with 32 bytes of data:

Reply from 192.168.50.101: bytes=32 time=1ms TTL=128
Reply from 192.168.50.101: bytes=32 time=5ms TTL=128
Reply from 192.168.50.101: bytes=32 time=0ms TTL=128
Reply from 192.168.50.101: bytes=32 time=0ms TTL=128

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

PC>

Connection Established : 

  • default vlan to default vlan  (192.168.1.100 – 192.168.1.101)
  • vlan 50 to vlan 50 (192.168.50.102- 192.168.50.101)

Switch 1 on CL1 for voice vlan 150 setup:

Switch>en
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 150
Switch(config-vlan)#name voice
Switch(config-vlan)#exit
Switch(config)#
Switch(config)#int fa0/20
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 150
Switch(config-if)#exit
Switch(config)#
Switch(config)#int fa0/2
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan 1-99,150
Switch(config-if)#switchport trunk native vlan 80
Switch(config-if)#

Router Configuration on CL1:

Encapsulation: Allows you to use a router interface as a trunk port to a switch. This is also known as “Router on a stick” because the switch uses the router to route between VLANs.

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#exit
Router(config)#
Router(config)#int fa0/0.1
Router(config-subif)#ip address 192.168.1.1 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that
subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
or ISL vLAN.
Router(config-subif)#encapsulation dot1q 1
Router(config-subif)#ip address 192.168.1.1 255.255.255.0
Router(config-subif)#int fa0/0.50
Router(config-subif)#encapsulation dot1q 50
Router(config-subif)#ip address 192.168.50.1 255.255.255.0
Router(config-subif)#
Router(config-subif)#int fa0/0.80
Router(config-subif)#encapsulation dot1q 80
Router(config-subif)#ip address 192.168.80.1 255.255.255.0
Router(config-subif)#
Router(config-subif)#int fa0/0.99
Router(config-subif)#encapsulation dot1q 99
Router(config-subif)#ip address 192.168.99.1 255.255.255.0
Router(config-subif)#
Router(config-subif)#int fa0/0.150
Router(config-subif)#encapsulation dot1q 150
Router(config-subif)#ip address 192.168.150.1 255.255.255.0
Router(config-subif)#
Router(config)#int fa0/0
Router(config-if)#no shutdown

DHCP IP Assign for VOIP : 
Router(config)#ip dhcp pool VOIP
Router(dhcp-config)#network 192.168.150.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.150.1
Router(dhcp-config)#?
Router(dhcp-config)#
Router(dhcp-config)#option 150 ip 192.168.150.1
Router(config)#telephony-service
Router(config-telephony)#max?
max-dn max-ephones
Router(config-telephony)#max-dn 10
Router(config-telephony)#max-ephones 10
Router(config-telephony)#
Router(config-telephony)#ip source-address 192.168.150.1 port 2000
Router(config-telephony)#
Router(config-telephony)#auto assign 1 to 9
Router(config-telephony)#
SWITCH 1 on CL1 for configure  voice vlan:
Switch(config-if)#int fa 0/20
Switch(config-if)#switchport mode access
Switch(config-if)#no switchport access vlan 150
Switch(config-if)#switchport voice vlan 150
Switch(config-if)#int fa0/21
Switch(config-if)#switchport mode access
Switch(config-if)#switchport voice vlan 150
Switch(config-if)#

Router 0 command line for telephone number assign:
Router(config)#ephone-dn 1
Router(config-ephone-dn)#%LINK-3-UPDOWN: Interface ephone_dsp DN 1.1, changed state to up

Router(config-ephone-dn)#number 62001
Router(config-ephone-dn)#
%IPPHONE-6-REGISTER: ephone-1 IP:192.168.150.3 Socket:2 DeviceType:Phone has registered.

Router(config-ephone-dn)#ephone-dn 2
Router(config-ephone-dn)#%LINK-3-UPDOWN: Interface ephone_dsp DN 2.1, changed state to up

Router(config-ephone-dn)#number 62002
Router(config-ephone-dn)#
%IPPHONE-6-REGISTER: ephone-2 IP:192.168.150.2 Socket:2 DeviceType:Phone has registered.

Router(config-ephone-dn)#exit
Router(config)#
Router(config)#

Thank you

Momataj momo

Skill Test: Basic VLans and Trunk Configurations

                                        basic vlan-trunk

For example : PC0 and PC1 connected through Vlan 10 and Vlan 20 with switches in network. Established connection between Vlan 10 and Vlan 20.

PC0: IP – 172.16.10.4
Subnetmask: 255.255.255.0
Default Gateway: 172.16.10.1

PC0 and Switch 0 : Vlan 20

PC1: PC1: IP – 172.16.11.7
Subnetmask: 255.255.255.0
Default Gateway: 172.16.11.1
PC1 and Switch 1 : Vlan 10

Switch 0 and Switch 2 : Trunk link (Native Vlan 99)

Switch 1 and Switch 2 : Trunk link (Native Vlan 99)

Router and switch 2 : Vlan 10 and Vlan 20
Router IP : 172.16.11.1 vlan 10
172.16.10.1 Vlan 20

Switch 0 command on CL1:

Switch>en

Switch#config t

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

Switch(config)#vlan 10

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

Switch(config)#vlan 99

Switch(config-vlan)#exit

Switch(config)#

Switch(config)#interface fa0/5

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 20

Switch(config-if)#end

Switch#show vlan br

Switch(config)#interface fa0/4

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

Switch(config-if)#switchport trunk native vlan 99

Switch(config-if)#exit

Switch(config)#

Switch 1 command on CL1:

Switch>

Switch>en

Switch#config t

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

Switch(config)#vlan 10

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

Switch(config)#vlan 99

Switch(config-vlan)#exit

Switch(config)#interface fa0/5

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit

Switch(config)#interface fa0/6

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to up

Switch(config-if)#switchport trunk native vlan 99

Switch(config-if)#exit

Switch(config)#

Switch#

Switch 2 command on CL1:

Switch>en

Switch#config t

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

Switch(config)#vlan 10

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

Switch(config)#vlan 99

Switch(config-vlan)#exit

Switch(config)#

Switch(config)#int fa 0/4

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk native vlan 99

Switch(config-if)#

Switch(config)#int fa0/6

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk native vlan 99

Switch(config-if)#e%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/6 on VLAN0099. Port consistency restored.

%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking FastEthernet0/6 on VLAN0001. Port consistency restored.

Switch(config)#exit

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#

Switch#

Switch#config t

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

Switch(config)#interface fa0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 20

Switch(config-if)#exit

Switch(config)#interface fa0/2

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit

Switch(config)#

Router 0 on CL1 command line:

Router(config)#int fa0/1

Router(config-if)#ip address 172.16.10.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#exit

Router(config)#

Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#config t

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

Router(config)#int fa0/0

Router(config-if)#ip address 172.16.11.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#

Packet Tracer PC Command Line 1.0:

PC>ping 172.16.10.4

Pinging 172.16.10.4 with 32 bytes of data:

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

Reply from 172.16.10.4: bytes=32 time=3ms TTL=127

Reply from 172.16.10.4: bytes=32 time=1ms TTL=127

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

Ping statistics for 172.16.10.4:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 3ms, Average = 1ms

PC>

Thank you

Momataj Momo

Virtual local area networks (Vlans) Concepts

A VLAN is a group of logically network devices. such as a set of networked computers and printers for a department or building floor.and can seperate networks “guests” and trusted users traffic. A logically separate subnetwork which device on vlan 20 and Vlan 30 can not communicate without a layer 3 device.

The term VLAN stands for ‘Virtual LAN’ and Cisco defines a VLAN as a broadcast domain. Basically, what that means is that you can segregate certain ports on a single physical switch into logical switches (VLANs).VLAN’s allow a network manager to logically segment a LAN into different broadcast domains. Since this is a logical segmentation and not a physical one, workstations do not have to be physically located together. Users on different floors of the same building, or even in different buildings can now belong to the same LAN.VLAN’s also allow broadcast domains to be defined without using routers. Bridging software is used instead to define which workstations are to be included in the broadcast domain. Routers would only have to be used to communicate between two VLAN’s.Moreover , Virtual LAN. Group of devices on one or more LANs that are configured (using management software) so that they can communicate as if they were attached to the same wire, when in fact they are located on a number of different LAN segments. Because VLANs are based on logical instead of physical connections, they are extremely flexible.

20070725_120904_image001_207817_1285_0 16751

VLAN can do :

-Create smaller broadcast domains, and therefore less wasted bandwidth.
-Increase security, as VLANS are not visible to outside traffice
-Decrease Costs: Building with multile companies can use a single network infrastructure.
-Effecient use of bandwidth (2 trunks for a high traffic VlAN)
-Simplify management
– VLANs can also be used to help route traffice. A seperate VLAN can used for VoIP phones.
-It is also possible to seperate Wireless traffic using Wireless VLANs
– Unsecured traffic could be on a ” guest” VLAN
– Secure traffic could be on nn”Staff” VLAN

Types of Connections : 

Devices on a VLAN can be connected in three ways based on whether the connected devices are VLAN-aware or VLAN-unaware. Recall that a VLAN-aware device is one which understands VLAN memberships (i.e. which users belong to a VLAN) and VLAN formats.

1) Trunk Link: All the devices connected to a trunk link, including workstations, must be VLAN-aware. All frames on a trunk link must have a special header attached. These special frames are called tagged frames.

pic3

2) Access Link

An access link connects a VLAN-unaware device to the port of a VLAN-aware bridge. All frames on access links must be implicitly tagged (untagged).The VLAN-unaware device can be a LAN segment with VLAN-unaware workstations or it can be a number of LAN segments containing VLAN-unaware devices

pic4

3) Hybrid Link

This is a combination of the previous two links. This is a link where both VLAN-aware and VLAN-unaware devices are attached. A hybrid link can have both tagged and untagged frames, but allthe frames for a specific VLAN must be either tagged or untagged.

pic5

How to Add VLAN TO network:
Using the CL1, we enter the following on Switch: Lets it CORE1 Switch
CORE1(config) # vlan 10
CORE1(config-vlan) # name student
CORE1(config-vlan) #exit
CORE1(config) #vlan 20
CORE1(config-vlan) # name Faculty
CORE1(config-vlan) #exit
CORE1(config) #vlan 30
CORE1(config-vlan) #name struff
CORE1(config-vlan) #exit
CORE1(config) #vlan40
CORE1(config-vlan) #name guest
CORE1(config-vlan) # exit

VLANs Configuring Ports:
On each switch, identify which device is supposed to be on which VLAN. Suppose,  Student_server_core needs to be on VLAN 10. It is connected to fast ethernet interface 0/2

SWITCH(config)# int fa0/2
SWITCH(config-if)# switchport mode access
SWITCH(config-if)# switchport access vlan 20
SWITCH(config-if)# exit

* Do the same on all switches , setting the correct ports to the correct VLAN. On the device end, the only note is that all devices on a VLAN must be on the same subnet.

Trunk Link: A trunk is a point to point link between the device and another networking device. Trunk carry the traffic of multiple VLANs over single link and allow user to extend VLAN access on entire network. By default, A trunk port send traffic to add receives from all VLANS. All VLAN IDs are allowed on each trunk.

Configuration syntax for Trunk link:

Switch(config)#vlan 99

Switch(config -vlan)#exit

Switch#config t

SWITCH(config) # Interface fa0/1

Switch(config -if)# switchport mode trunk

Switch(config -if)# Switchport access trunk native vlan 99

Native VLAN: A native vlan is the untagged vlan on an 802.1q trunked switchport.  The native vlan and management vlan could be the same, but it is better security practice that they aren’t.  Basically if a switch receives untagged frames on a trunkport, they are assumed to be part of the vlan that are designated on the switchport as the native vlan.  Frames egressing a switchport on the native vlan are not tagged.

Thank you

Momataj Momo