Showing posts with label Cisco. Show all posts
Showing posts with label Cisco. Show all posts

Aug 3, 2013

How to Configuring Point-to-Point Serial Interfaces

The point-to-point serial link is a little different than the Frame Relay serial link. As you recall, Frame Relay is used in many cases in a point-to-multipoint environment. To create a point-to-point connection between two routers, you can use other types of WAN encapsulations, such as HDLC, PPP, and SLIP. For a complete review of these encapsulations, refer to Chapter 11 of the ICDN book. We will use the default serial encapsulation, which is HDLC.
For two serial interfaces to communicate, you must provide the clock rate. The clock rate provides bit synchronization and has other uses that are beyond the scope of this chapter's purposes. The device that provides this clock rate is the data circuit-terminating equipment (DCE). The other device is denoted as the data terminal equipment (DTE). In the real world, the router is the DTE. The telecom equipment, such as the Frame Relay switch, is the DCE. Because the lab scenario bypasses the telecom equipment, you need to specify which router is the DTE and which one is the DCE; you also need to provide the clock rate. To bypass the telecom equipment, you need to directly connect the routers with a DTE–DCE crossover cable. Each end of this cable is labeled as DTE or DCE. Whichever router is plugged into the DCE end of the cable will need to provide the clock rate. In the Frame Relay network, the Frame Relay switch is the DCE, so none of the Frame Relay routers needs to provide clock rate. For more information on WAN serial cabling and signaling, refer to Chapter 2 of Interconnecting Cisco Network Devices from Cisco Press.
First, review the routers that you are going to use to configure a point-to-point serial connection. Figure 7-4 shows routers R3 and R5. This is the only point-to-point connection in the lab.



In the figure, you can see the R5 has been cabled as the DCE, so it will need to supply the clock rate.
Begin by configuring the serial link and assign IP addresses to the interfaces. Start with R5.
You last configured R2, so you need to go back to the terminal server and resume the connection to R5. When there, you need to go into global configuration mode and then into the appropriate interface configuration. For R5, that would be Serial 0. Example 7-26 walks you through these initial configuration steps.

Example 7-26. R5 Serial Configuration

R2#
R2#<crtl-shft-6-x>

    Termserver#5
[Resuming connection 5 to r5 ... ]

R5#config t
Enter configuration commands, one per line. End with CNTL/Z.
R5(config)#interface serial 0
R5(config-if)#
Now that you are in interface configuration mode for R5's Serial 0, you can execute the necessary configuration commands. The first thing to do is make the encapsulation type HDLC for the interface. Because HDLC is the default encapsulation method, you really don't need to execute the command. However, just for the sake of practice, and so that you understand that there is a data link layer configuration command for the serial link, specify HDLC as the encapsulation by entering it as a command option. This is the same command issued previously when specifying the encapsulation type for routers R2, R3, and R4; the only difference is that you specify the hdlc option instead of frame-relay.
This is the command for R2's S0, R3's S0, and R4's S0:
Router(config-if)#encapsulation frame-relay [cisco | ietf]
This is the command for R3's S1 and R5's S0:
Router(config-if)#encapsulation hdlc
Unlike Frame Relay, there aren't any different types of HDLC encapsulation. After you specify the encapsulation type as HDLC, you can assign the appropriate IP address to the interface.
Example 7-27 shows the commands executed on R5.

Example 7-27. R5 Configuration Commands

R5(config-if)#encapsulation hdlc
R5(config-if)#ip address 192.168.35.5 255.255.255.0
R5(config-if)#
Before removing the interface from shutdown mode, you need to provide the clock rate to R3 using the following command:
Router(config-if)#clock rate {300-8000000 bps}
The only option in this command is to give the speed of the link in bits per second. Because this is a T1 or E1 interface, you can specify an easy-to-remember value of 2,000,000. This is the equivalent of an E1 link, which will work for this lab environment. As mentioned earlier, in the real world, you will not have to configure this parameter. The telecom service provider will set this value on its equipment. After you set this value, give the interface a description and remove the interface from shutdown mode, as demonstrated in Example 7-28.

Example 7-28. clock rate Command

R5(config-if)#clock rate 2000000
R5(config-if)#description This interface connects to R3's S1 (DTE)
R5(config-if)#no shutdown
R5(config-if)#
%LINK-3-UPDOWN: Interface Serial0, changed state to down
R5(config-if)#
At first glance, you might get a little nervous that the interface did not come up, but that is normal. R3's serial interface has not been configured yet, so the R5 interface is not receiving any signaling from R3; thus, the interface will remain in the down state until R3 is configured and removed from shutdown mode. Before you get too far into this configuration, you should know about a very helpful show command:
Router#show interfaces [bri | null | serial | tokenring | accounting | crb | irb]
  {number}
This command is very useful in troubleshooting and verifying interface configuration. The first option is to choose which type of interface you would like to see; the second option is to select the number of the interface. If you do not select any type of interface, the command shows you all the interfaces that the router has. Example 7-29 demonstrates sample output of the command on R5.

Example 7-29. show interfaces serial 0 Command Output

R5#show interfaces serial 0
Serial0 is down, line protocol is down
  Hardware is HD64570
  Description: This interface connects to R3's S1 (DTE)
  Internet address is 192.168.35.5/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
  Encapsulation HDLC, loopback not set, keepalive set (10 sec)
  Last input never, output 2w5d, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     212 packets output, 18206 bytes, 0 underruns
     0 output errors, 0 collisions, 37557 interface resets
     0 output buffer failures, 0 output buffers swapped out
     111 carrier transitions
     DCD=up  DSR=up  DTR=down  RTS=down  CTS=up
The highlighted text reveals some important information regarding the interface Serial 0. The first thing that you see is the state in which the interface resides: "Serial0 is down, line protocol is down." The first "down" (this is referred to as interface or the physical layer state) tells you that there is a physical problem. A physical problem might result from a cable not being plugged in, or the connected device might not be receiving any electrical signaling, which is the case here. The "line protocol down" means that Layer 2 is not functional, meaning that HDLC is not operating correctly for some reason. It is important to note that the line protocol will never be up if the interface is in the down state. Next, the output shows the description placed on the Serial 0 interface. You see the IP address that you assigned earlier. This is a good place to review your configuration and make sure that what you typed in the interface configuration mode was correct. You also see the encapsulation type here. For a complete review of the output, refer to Chapter 3 of Interconnecting Cisco Network Devices. You will see this command again after configuring R3's serial interface to see what changes.
To configure R3, you need to go back to the terminal server and resume the session with R3, but don't forget to save the configuration before leaving. When at R3, you need to enter global configuration mode and then go into interface configuration mode for Serial 1. Remember, you will configure Serial 0 for Frame Relay. Serial 1 connects to R5's S0 interface. (Refer to your lab diagram.) See Example 7-30.

Example 7-30. R3 Interface Configuration Mode

R5#copy running-config startup-config
Building configuration...
[OK]
R5#<ctrl-shft-6><x>
    Termserver#3
[Resuming connection 3 to r3 ... ]
R3#
R3#config t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface serial 1
R3(config-if)#
Now you are in interface configuration mode for Serial 1 on R3, and you can assign the appropriate IP address and mask. After that, don't forget to remove the interface from shutdown mode. Example 7-31 illustrates the commands.

Example 7-31. R3 Serial 1 Configuration Commands

R3(config-if)#encapsulation hdlc
R3(config-if)#ip address 192.168.35.3 255.255.255.0
R3(config-if)#description This interface connects to R5's S0 (DCE)
R3(config-if)#no shutdown
R3(config-if)#
%LINK-3-UPDOWN: Interface Serial1, changed state to up
R3(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to up
R3(config-if)#
As you can see, the interface came up, and so did the line protocol. Return to R5 and see how the show interface command output has changed. Example 7-32 shows the changes in the output.

Example 7-32. R5 show interface serial 0 Command Output

R3(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
R3#copy running-config startup-config
Building configuration...
[OK]
R3#<ctrl-shft-6-x>
    Termserver#5
[Resuming connection 5 to r5 ... ]

R5#
R5#show interface serial 0
Serial0 is up, line protocol is up
  Hardware is HD64570
  Description: This interface connects to R3's S1 (DTE)
  Internet address is 192.168.35.5/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
  Encapsulation HDLC, loopback not set, keepalive set (10 sec)
  Last input 00:00:01, output 00:00:01, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     25 packets input, 1865 bytes, 0 no buffer
     Received 25 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     236 packets output, 20009 bytes, 0 underruns
     0 output errors, 0 collisions, 37629 interface resets
     0 output buffer failures, 0 output buffers swapped out
     112 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
R5#
Great! You now should be capable of pinging R3 from R5, as demonstrated in Example 7-33.

Example 7-33. R5 ping Result

R5#ping 192.168.35.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.35.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms
R5#
You got 100 percent success! R3 and R5 have full IP connectivity. Question: Should R5 be capable of pinging R3's Serial 0 IP address? Why not? Even though R5 can reach R3 through interface Serial 1, R5 cannot ping R3's Serial 0 interface. This is because you do not have any routing protocols configured to let R5 know about the 192.168.100.0 network, to which R3's Serial 0 interface belongs. When you have configured all the interfaces on all the routers, you will start configuring the routing protocols. Then you should be capable of pinging any interface on any router.

Jun 13, 2013

How to configure VTP Pruning

Introduction

As you would be aware a switched network creates one broadcast domain, similar to that of a VLAN powered network where all nodes belonging to the same VLAN are part of the same broadcast domain, receiving all broadcasts sent on their network.

The Broadcast And Unicast Problem In VLAN Networks

What we are about to see is how these broadcasts can actually create problems by flooding the VLAN network with unnecessary traffic, and depending on your network setup, this can prove to be a huge problem. The reason for this is because the trunk links interconecting your network switches will carry these broadcasts to every switch in the network, regardless of which VLAN the broadcast is intended for.



As shown and described, a host connected to a port configured for VLAN 2 on Switch 1 (first switch on the left), generates a network broadcast. Naturally, the switch will forward the broadcast out all ports assigned to the same VLAN it was received from, that is, VLAN 2.
In addition, the Catalyst switch will forward the broadcast out its trunk link, so it may reach all ports in the network assigned to VLAN 2. The Root switch receives the broadcast through one of it's trunks and immediately forwards it out the other two - towards Switch 2 & 3.
Switch 2 is delighted to receive the broadcast as it does in fact have one port assigned to VLAN 2. Switch 3 however, is a different case - it has no ports assigned to VLAN 2 and therefore will drop the broadcast packet it receives.
In this example, the bandwidth usage was ineffecient because one broadcast packet was sent over all possible trunk links, and was then dropped by Switch 3.
You might ask yourself 'So what's the big deal?'.
The problem here is small and can easily be ignored... but consider a network of fifteen or more 12 port switches (this translates to at least 210 nodes) and you can start to appreciate how serious the problem can get. To make things worse (and more realistic), consider you're using 24 port switches, then you're all of a sudden talking about more than 300 nodes!
To further help understand how serious the problem gets, let's take a look at our example network below:



Here we have a medium sized network powered by Cisco Catalyst switches. The two main switches up the top are the VTP servers and also perform 3rd layer switching by routing packets between the VLANs we've created.
Right below them you'll find our 2950's Catalyst switches which are connected to the core switches via redundant fiber trunk links. Directly below our 2950's are our 2948 Catalyst switches that connect all workstations to the network.
A workstation connected to a port assigned to VLAN 2 decided to send a network broadcast looking for a specific network resource. While the workstation is totally unaware of our network design and complexity, its broadcast is the reason all our trunks will flood with unwanted traffic, consuming valuable bandwidth!
Let's take a look at what happens:


We don't think describing the above is actually required as the diagram shows all the information we need and we're confident you will agree that we dealing with a big problem:)
So how do we fix this mess ?
Keep reading on as you're about to learn........

The Solution: Enabling VTP Pruning

VTP Pruning as you might have already guessed solves the above problem by reducing the unnecessary flooded traffic described previously. This is done by forwarding broadcasts and unknown unicast frames on a VLAN over trunk links only if the receiving end of the trunk has ports in that VLAN.


Support For VTP Pruning

The VTP Pruning service is supported by both VTP 1 and VTP 2 versions of the VTP protocol. With VTP 1, VTP pruning is possible with the use of additional VTP message types.
When a Cisco Catalyst switch has ports associated with a VLAN, it will send an advertisement to its neighboring switches informing them about the ports it has active on that VLAN. This information is then stored by the neighbors and used to decide if flooded traffic from a VLAN should be forwarded to the switch via the trunk port or not.
Note: VTP Pruning is disabled by default on all Cisco Catalyst switches and can be enabled by issuing the "set vtp pruning enable" command.
If this command is issued on the VTP Server(s) of your network, then pruning is enabled for the entire management domain.

When you enable VTP Pruning on your network, all VLANs become eligible for pruning on all trunk links. This default list of pruning eligibility can thankfully be modified to suite your needs but you must first clear all VLANs from the list using the "clear vtp prune-eligible vlan-range" command and then set the VLAN range you wish to add in the prune eligible list by issuing the following command: "set vtp prune-eligible vlan-range" where the 'vlan-range' is the actual inclusive range of VLANs e.g '2-20'.
By default, VLANs 2–1000 are eligible for pruning. VLAN 1 has a special meaning because it is normally used as a management VLAN and is never eligible for pruning, while VLANs 1001–1005 are also never eligible for pruning. If the VLANs are configured as pruning-ineligible, the flooding continues as illustrated in our examples.

Summary

VTP Pruning can in fact be an administrator's best friend in any Cisco powered network, increasing available bandwidth by restricting flooded traffic to those trunk links that the traffic must use to reach the destination devices.
At this point, we have also come to the end of the first part of our VLAN presentation. As we are still working on the second and final part of the VLAN topic, we hope these pages will keep you going until it is complete.

VLAN and VTP configuration

Lab instructions

The aim of this lab is to check your ability to configure VTP and VLAN on a small network of four switches. This lab will help you to prepare your ICND1 exam.
1.Configure the VTP-SERVER switch as a VTP server

2.Connect to the  3 other switches and configure them as VTP clients.
All links between swiches must be configured as trunk lines.

3.Configure VTP domain name as "TESTDOMAIN" and VTP password as "cisco"

4.Configure VLAN 10 with name "STUDENTS" and VLAN 50 with name "SERVERS"

5. Check propagation on all switches of the VTP domain.

Network diagram

Solution

Configure the VTP-SERVER switch as a VTP server
VTP-SERVER(config)#vtp mode server
Verify the VTP configuration using the "show vtp status command"
VTP-SERVER#show vtp status
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : TESTDOMAIN
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xAE 0x4F 0x3F 0xC5 0xD3 0x41 0x9C 0x11
Configuration last modified by 192.168.1.1 at 3-1-93 00:27:41
Local updater ID is 192.168.1.1 on interface Vl1 (lowest numbered VLAN interface found)


Connect to the  3 other switches and configure them as VTP clients.
All links between swiches must be configured as trunk lines.

VTP-CLIENT3(config)#vtp mode client
Verify the VTP configuration using the "show vtp status command"
VTP-CLIENT3#sh vtp status
VTP Version                     : 2
Configuration Revision          : 4
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Client
VTP Domain Name                 : TESTDOMAIN
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Disabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0xAE 0x4F 0x3F 0xC5 0xD3 0x41 0x9C 0x11
Configuration last modified by 192.168.1.1 at 3-1-93 00:27:41


Configure VTP domain name as "TESTDOMAIN" and VTP password as "cisco"
1. Configure each link between switches as a trunk line
interface GigabitEthernet1/1
switchport mode trunk

interface GigabitEthernet1/2
switchport mode trunk

2.On the server :
VTP-SERVER(config)#vtp domain TESTDOMAIN
VTP-SERVER(config)#vtp password cisco

3.On each client :
VTP-CLIENT1(config)#vtp password cisco
VTP-CLIENT1(config)#vtp domain TESTDOMAIN


Configure VLAN 10 with name "STUDENTS" and VLAN 50 with name "SERVERS"
On the VTP server switch, configure the following commands
VTP-SERVER(config)#vlan 10
VTP-SERVER(config-vlan)#name STUDENTS
VTP-SERVER(config)#vlan 50
VTP-SERVER(config-vlan)#name SERVERS

Check propagation on all switches of the VTP domain.
Use the "show vlan brief" on each switch to check propagation of the 2 VLANS.
VTP-SERVER#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4, [...]
10   STUDENTS                         active  
50   SERVERS                          active  
1002 fddi-default                     active  
1003 token-ring-default               active  
1004 fddinet-default                  active  
1005 trnet-default                    active


Cisco VTP VLAN Trunking Protocol


Cisco VTP VLAN Trunking Protocol


(VTP) is a Cisco Layer 2 messaging protocol that manages the addition, deletion, and renaming of VLANs on a network-wide basis. Virtual Local Area Network (VLAN) Trunk Protocol (VTP) reduces administration in a switched network. When you configure a new VLAN on one VTP server, the VLAN is distributed through all switches in the domain. This reduces the need to configure the same VLAN everywhere. VTP is a Cisco-proprietary protocol that is available on most of the Cisco Catalyst Family products. VTP ensures that all switches in the VTP domain are aware of all VLANs. There are occasions, however, when VTP can create unnecessary traffic. All unknown unicasts and broadcasts in a VLAN are flooded over the entire VLAN. All switches in the network receive all broadcasts, even in situations where few users are connected in that VLAN. VTP pruning is a feature used to eliminate (or prune) this unnecessary traffic. By default, all Cisco Catalyst switches are configured to be VTP servers. This is suitable for small-scale networks where the size of the VLAN information is small and easily stored in all switches (in NVRAM). In a large network, a judgment call must be made at some point when the NVRAM storage needed is wasted, because it is duplicated on every switch. At this point, the network administrator should choose a few well-equipped switches and keep them as VTP servers. Everything else participating in VTP can be turned into a client. The number of VTP servers should be chosen so as to provide the degree of redundancy desired in the network.

Modes of OperationServer

In VTP server mode, you can create, modify, and delete VLANs and specify other configuration parameters (such as VTP version and VTP pruning) for the entire VTP domain. VTP servers advertise their VLAN configuration to other switches in the same VTP domain and synchronize their VLAN configuration with other switches based on advertisements received over trunk links. VTP server is the default mode.

Transparent

VTP transparent switches do not participate in VTP. A VTP transparent switch does not advertise its VLAN configuration and does not synchronize its VLAN configuration based on received advertisements. However, in VTP version 2, transparent switches do forward VTP advertisements that they receive out their trunk ports.

Client

VTP clients behave the same way as VTP servers, but you cannot create, change, or delete VLANs on a VTP client.

Advertisements Summary Advertisements

When the switch receives a summary advertisement packet, it compares the VTP domainname to its own VTP domain name. If the name is different, the switch simply ignores the packet. If the name is the same, the switch then compares the configuration revision to its own revision. If its own configuration revision is higher or equal, the packet is ignored. If it is lower, an advertisement request is sent.

Subset Advertisements

When you add, delete, or change a VLAN in a switch, the server switch where the changes were made increments the configuration revision and issues a summary advertisement, followed by one or several subset advertisements. A subset advertisement contains a list of VLAN information. If there are several VLANS, more than one subset advertisement may be required in order to advertise them all.

Advertisement Requests

A switch needs a VTP advertisement request in the following situations:

The switch has been reset. The VTP domain name has been changed. The switch has received a VTP summary advertisement with a higher configuration revision than its own. Upon receipt of an advertisement request, a VTP device sends a summary advertisement, followed by one or more subset advertisements.

Configuration To configure an IOS based switch to be a VTP server, issue the following commands:

SwitchA# vlan database

SwitchA(vlan)# vtp domain CiscoKits

SwitchA(vlan)# vtp server

SwitchA(vlan)# exit


These commands configure the switch to be a VTP server in the VTP domain CiscoKits. The changes are saved and the revision number is incremented when the exit command is issued. To configure a VTP client, run the following commands:

SwitchB# vlan database

SwitchB(vlan)# vtp domain CiscoKits

SwitchB(vlan)# vtp client

SwitchB(vlan)# exit


To disable VTP, set the vtp mode to transparent as such:

SwitchC# vlan database

SwitchC(vlan)# vtp transparent

SwitchC(vlan)# exit


To monitor the VTP operation and status, use either:

SwitchA# show vtp status

or

SwitchA# show vtp counters.

Jun 11, 2013

How to configure Trunking between VLANs with ISL?

Trunking is a technique to carry different VLAN traffic using point to point link between two devices. ISL (InterSwitch Link) is a cisco proprietary protocol can work with Ethernet token ring and Fddi also. Trunking changes the formatting of the packets. The ports need to be in agreement as to which format is being use to transmit data on the trunk, if there is different trunking encapsulation on the two ends of the link they will not able to communicate. Similar situation will occur if one of your ports is configured in trunking mode and other one as in access mode.


First create multiple VLANs with name, assign multiple ports to them then create ISL trunk link between the two switches to allow communication between VLANs. 
To create a VLAN, first enter global configuration mode to run the following commands.
Configuration to create VLAN 2 and 3 on switch A 
SwitchA(config)#configure terminal               (enter in global configuration mode) 
SwitchA(config)#vlan 2                                        (defining the vlan 2) 
SwitchA(config)#vlan 2 name marketing       (assigning the name marketing to vlan 2) 
SwitchA(config)#vlan 3                                        (defining the vlan 3) 
SwitchA(config)#vlan 3 name management    (assigning the name management to vlan 3)
SwitchA(config)#exit                                            (exit from vlan 3) 

Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following commands to add port 2 and 3 to VLAN 2. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/2                     (select the Ethernet 0 of port 2) 
SwitchA(config-if)#switchport access vlan 2                  (allot the membership of vlan 2)
SwitchA(config-if)#exit                                                        (exit from interface 2) 
SwitchA(config)#interface fastethernet 0/3                     (select the Ethernet 0 of port 3) 
SwitchA(config-if)#switchport access vlan 2                  (allot the membership of vlan 2)
SwitchA(config-if)#exit                                                        (exit from interface 3)

 Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3. 
 SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/4                     (select the Ethernet 0 of port 4) 
SwitchA(config-if)#switchport access vlan 3                  (allot the membership of vlan 3)
SwitchA(config-if)#exit                                                        (exit from interface 4) 
SwitchA(config)#interface fastethernet 0/5                     (select the Ethernet 0 of port 5) 
SwitchA(config-if)#switchport access vlan 3                  (allot the membership of vlan 3)
SwitchA(config-if)#exit                                                        (exit from interface 5) 
  
Configuration to create VLAN 2 on switch B 
SwitchB(config)#configure terminal               (enter in global configuration mode) 
SwitchB(config)#vlan 2                                        (defining the vlan 2) 
SwitchB(config)#vlan 2 name marketing       (assigning the name marketing to vlan 2) 
SwitchB(config)#vlan 3                                        (defining the vlan 3) 
SwitchB(config)#vlan 3 name management    (assigning the name management to vlan 3)
SwitchB(config)#exit                                            (exit from vlan 3)

Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following commands to add port 2 and 3 to VLAN 2.
SwitchB(config)#configure terminal                                                (enter in global configuration mode) 
SwitchB(config)#interface fastethernet 0/2                    (select the Ethernet 0 of port 2) 
SwitchB(config-if)#switchport access vlan 2                 (allot the membership of vlan 2)
SwitchB(config-if)#exit                                                        (exit from interface 2) 
SwitchB(config)#interface fastethernet 0/3                    (select the Ethernet 0 of port 3) 
SwitchB(config-if)#switchport access vlan 2                 (allot the membership of vlan 2)
SwitchB(config-if)#exit                                                        (exit from interface 3) 

Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3. 
SwitchB(config)#configure terminal                                                (enter in global configuration mode) 
SwitchB(config)#interface fastethernet 0/4                    (select the Ethernet 0 of port 4) 
SwitchB(config-if)#switchport access vlan 3                 (allot the membership of vlan 3)
SwitchB(config-if)#exit                                                        (exit from interface 4) 
SwitchB(config)#interface fastethernet 0/5                    (select the Ethernet 0 of port 5) 
SwitchB(config-if)#switchport access vlan 3                 (allot the membership of vlan 3)
SwitchB(config-if)#exit                                                        (exit from interface 5) 

Trunking with ISL 
Now create ISL trunk link between the two switches to allow communication between VLANs. 
On both switches, SwitchA and SwitchB type the following command with ISL at the fastethernet 0/1 interface. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/1                     (select the Ethernet 0 of port 1) 
SwitchA(config-if)#switchport mode trunk                (set port 1 as trunk port) 
SwitchA(config-if)#switchport trunk encapsulation isl 
SwitchA(config-if)#end                                                       (exit from interface 1) 
SwitchB(config)#interface fastethernet 0/1                    (select the Ethernet 0 of port 1) 
SwitchB(config-if)#switchport mode trunk                (set port 1 as trunk port) 
SwitchB(config-if)#switchport trunk encapsulation isl 
SwitchB(config-if)#end                                                       (exit from interface 1) 

To verify that fastethernet 0/1 has been established as trunk port, type the show interface fastethernet 0/1 switchport at the privileged EXEC mode.

How to configure Trunking between VLANs with 802.1q?

Trunk link is used to carry the different VLANs traffic on a single link. There are two different protocols are used for Ethernet trunking, 802. 1q and ISL. Trunking change the formatting of the packets. The ports need to be in agreement as to which format is being use to transmit data on the trunk, if there is different trunking encapsulation on the two ends of the link they will not able to communicate. Similar situation will occur if one of your ports is configured in trunking mode and other one as in access mode.


First create multiple VLANs with name, assign multiple ports to them then create 802.1q trunk link between the two switches to allow communication between VLANs. 
To create a VLAN, first enter global configuration mode to run the following commands. 
Configuration to create VLAN 2 and 3 on switch A 
SwitchA(config)#configure terminal               (enter in global configuration mode) 
SwitchA(config)#vlan 2                                        (defining the vlan 2) 
SwitchA(config)#vlan 2 name marketing       (assigning the name marketing to vlan 2) 
SwitchA(config)#vlan 3                                        (defining the vlan 3) 
SwitchA(config)#vlan 3 name management    (assigning the name management to vlan 3)
SwitchA(config)#exit                                            (exit from vlan 3)

Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following commands to add port 2 and 3 to VLAN 2. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/2                     (select the Ethernet 0 of port 2) 
SwitchA(config-if)#switchport access vlan 2                  (allot the membership of vlan 2)
SwitchA(config-if)#exit                                                        (exit from interface 2) 
SwitchA(config)#interface fastethernet 0/3                     (select the Ethernet 0 of port 3) 
SwitchA(config-if)#switchport access vlan 2                  (allot the membership of vlan 2)
SwitchA(config-if)#exit                                                        (exit from interface 3) 
  
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/4                     (select the Ethernet 0 of port 4) 
SwitchA(config-if)#switchport access vlan 3                  (allot the membership of vlan 3)
SwitchA(config-if)#exit                                                        (exit from interface 4) 
SwitchA(config)#interface fastethernet 0/5                     (select the Ethernet 0 of port 5) 
SwitchA(config-if)#switchport access vlan 3                  (allot the membership of vlan 3)
SwitchA(config-if)#exit                                                        (exit from interface 5) 

Configuration to create VLAN 2 on switch B 
SwitchB(config)#configure terminal               (enter in global configuration mode) 
SwitchB(config)#vlan 2                                        (defining the vlan 2) 
SwitchB(config)#vlan 2 name marketing       (assigning the name marketing to vlan 2) 
SwitchB(config)#vlan 3                                        (defining the vlan 3) 
SwitchB(config)#vlan 3 name management    (assigning the name management to vlan 3)
SwitchB(config)#exit                                            (exit from vlan 3) 

Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following commands to add port 2 and 3 to VLAN 2.
 SwitchB(config)#configure terminal                                                (enter in global configuration mode) 
SwitchB(config)#interface fastethernet 0/2                    (select the Ethernet 0 of port 2) 
SwitchB(config-if)#switchport access vlan 2                 (allot the membership of vlan 2)
SwitchB(config-if)#exit                                                        (exit from interface 2) 
SwitchB(config)#interface fastethernet 0/3                    (select the Ethernet 0 of port 3) 
SwitchB(config-if)#switchport access vlan 2                 (allot the membership of vlan 2)
SwitchB(config-if)#exit                                                        (exit from interface 3) 

Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3. 
SwitchB(config)#configure terminal                                                (enter in global configuration mode) 
SwitchB(config)#interface fastethernet 0/4                    (select the Ethernet 0 of port 4) 
SwitchB(config-if)#switchport access vlan 3                 (allot the membership of vlan 3)
SwitchB(config-if)#exit                                                        (exit from interface 4) 
SwitchB(config)#interface fastethernet 0/5                    (select the Ethernet 0 of port 5) 
SwitchB(config-if)#switchport access vlan 3                 (allot the membership of vlan 3)
SwitchB(config-if)#exit                                                        (exit from interface 5) 

Trunking with 802.1q 
Now create 802.1q trunk link between the two switches to allow communication between VLANs. 
On both switches, SwitchA and SwitchB type the following command with 802.1q at the fastethernet 0/1 interface. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/1                     (select the Ethernet 0 of port 1) 
SwitchA(config-if)#switchport mode trunk                (set port 1 as trunk port) 
SwitchA(config-if)#switchport trunk encapsulation dot1q 
SwitchA(config-if)#end                                                       (exit from interface 1) 
SwitchB(config)#interface fastethernet 0/1                    (select the Ethernet 0 of port 1) 
SwitchB(config-if)#switchport mode trunk                (set port 1 as trunk port) 
SwitchA(config-if)#switchport trunk encapsulation dot1q 
SwitchB(config-if)#end                                                       (exit from interface 1) 
To verify that fastethernet 0/1 has been established as trunk port, type the show interface fastethernet 0/1 switchport at the privileged EXEC mode.

How to configure VTP Client and Server?

VTP (VLAN Trunking Protocol) is the protocol that propagates the information about which VLANs exist from one switch to another switch. If VTP did not provide this information, VLANs would have to be created on all switches individually in the network.

VTP is a Cisco proprietary protocol. The default mode of a switch is configured as VTP server. In any case, the server services are turned off, use the following command to turn it back on as VTP server.

    SwitchA#vlan database

    SwitchA(vlan)#vtp server

    SwitchA(vlan)#exit

First create multiple VLANs with name, assign multiple ports to them then create 802.1q trunk link between the two switches to allow communication between VLANs.

To create a VLAN, first enter global configuration mode to run the following commands. 
Configuration to create VLAN 2 and 3 on switch A (VTP server) 
SwitchA(config)#configure terminal               (enter in global configuration mode) 
SwitchA(config)#vlan 2                                        (defining the vlan 2) 
SwitchA(config)#vlan 2 name marketing       (assigning the name marketing to vlan 2) 
SwitchA(config)#vlan 3                                        (defining the vlan 3) 
SwitchA(config)#vlan 3 name management    (assigning the name management to vlan 3)
SwitchA(config)#exit                                            (exit from vlan 3) 

Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following commands to add port 2 and 3 to VLAN 2. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/2                     (select the Ethernet 0 of port 2) 
SwitchA(config-if)#switchport access vlan 2                  (allot the membership of vlan 2)
SwitchA(config-if)#exit                                                        (exit from interface 2) 
SwitchA(config)#interface fastethernet 0/3                     (select the Ethernet 0 of port 3) 
SwitchA(config-if)#switchport access vlan 2                  (allot the membership of vlan 2)
SwitchA(config-if)#exit                                                        (exit from interface 3) 
  
Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/4                     (select the Ethernet 0 of port 4) 
SwitchA(config-if)#switchport access vlan 3                  (allot the membership of vlan 3)
SwitchA(config-if)#exit                                                        (exit from interface 4) 
SwitchA(config)#interface fastethernet 0/5                     (select the Ethernet 0 of port 5) 
SwitchA(config-if)#switchport access vlan 3                  (allot the membership of vlan 3)
SwitchA(config-if)#exit                                                        (exit from interface 5) 

Configuration of VTP client on switch B 
SwitchB#vlan database 
SwitchB(vlan)#vtp client
SwitchB(vlan)#vtp domain group1
SwitchB(vlan)#exit 

Trunking with 802.1q 
Now create 802.1q trunk link between the two switches to allow communication between VLANs. 
On both switches, SwitchA and SwitchB type the following command with 802.1q at the fastethernet 0/1 interface. 
SwitchA(config)#configure terminal                                 (enter in global configuration mode) 
SwitchA(config)#interface fastethernet 0/1                     (select the Ethernet 0 of port 1) 
SwitchA(config-if)#switchport mode trunk                (set port 1 as trunk port) 
SwitchA(config-if)#switchport trunk encapsulation dot1q 
SwitchA(config-if)#end                                                       (exit from interface 1) 
SwitchB(config)#interface fastethernet 0/1                    (select the Ethernet 0 of port 1) 
SwitchB(config-if)#switchport mode trunk                (set port 1 as trunk port) 
SwitchA(config-if)#switchport trunk encapsulation dot1q 
SwitchB(config-if)#end                                                       (exit from interface 1) 

  • To verify that fastethernet 0/1 has been established as trunk port, type the show interface fastethernet 0/1 switchport at the privileged EXEC mode. 
  • Although the VLAN definitions have migrated to the switch B using VTP, but it is necessary to assign ports to these VLANs on switch B. 
  • Now assigning the ports 2 and 3 to VLAN 2, it must be done from the interface mode. Enter the following commands to add port 2 and 3 to VLAN 2.

SwitchB(config)#configure terminal                                                (enter in global configuration mode) 
SwitchB(config)#interface fastethernet 0/2                    (select the Ethernet 0 of port 2) 
SwitchB(config-if)#switchport access vlan 2                 (allot the membership of vlan 2)
SwitchB(config-if)#exit                                                        (exit from interface 2) 
SwitchB(config)#interface fastethernet 0/3                    (select the Ethernet 0 of port 3) 
SwitchB(config-if)#switchport access vlan 2                 (allot the membership of vlan 2)
SwitchB(config-if)#exit                                                        (exit from interface 3) 

Now assigning the ports 4 and 5 to VLAN 3, enter the following commands to add port 4 and 5 to VLAN 3. 
SwitchB(config)#configure terminal                                                (enter in global configuration mode) 
SwitchB(config)#interface fastethernet 0/4                    (select the Ethernet 0 of port 4) 
SwitchB(config-if)#switchport access vlan 3                 (allot the membership of vlan 3)
SwitchB(config-if)#exit                                                        (exit from interface 4) 
SwitchB(config)#interface fastethernet 0/5                    (select the Ethernet 0 of port 5) 
SwitchB(config-if)#switchport access vlan 3                 (allot the membership of vlan 3)
SwitchB(config-if)#exit                                                        (exit from interface 5)

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Computer Tricks and Tips