Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Switching Black Book - Sean Odom, Hanson Nottingham.pdf
Скачиваний:
87
Добавлен:
24.05.2014
Размер:
2.89 Mб
Скачать

Figure 5.4: An example of an external router routing interVLAN traffic.

Configuring a Static VLAN on a Catalyst 5000 Series Switch

The Cisco Catalyst 2900G series, 5000 family, and 6000 family of switches use the Cisco Set/Clear−based CLI. It is important to understand the difference between the Catalyst 5000 series VLAN configuration and the Enterprise IOS edition that runs on the other series of Cisco switches, which use an IOS−based VLAN configuration.

The command used to configure a VLAN on a Catalyst 5000 switch is as follows:

set vlan [vlan number] [slot/port(s)]

By default, all VLANs are in VLAN 1. Let’s place the module in slot 2 with a port number of 3 in VLAN 2:

Catalyst5002> (enable) set vlan 2 2/3 VLAN 3 modified.

VLAN 1 modified. VLAN Mod/Ports

—— ———————————

2 2/3

You should notice that although only one port was placed in VLAN 3, the port was in VLAN 1 to begin with, so both VLANs are updated.

Configuring Multiple VLANs on a Catalyst 5000 Series Switch

You can configure multiple consecutive ports on a module at one time. You do this by using the same command as in the previous section (set vlan) but identifying the beginning and ending port numbers, separated by a hyphen:

Catalyst5002> (enable) set vlan 2 2/1−3 VLAN 3 modified.

VLAN 2 modified. VLAN 1 modified. VLAN Mod/Ports

—— ———————————

2 2/1−3

Tip The set vlan command allows you create both the VLAN and the ports assigned to the VLAN at the same time.

Creating VLANs on a Catalyst 1900EN Series

When you first turn on the Cisco 1912 or 1924EN series switch, you will see a screen asking you to choose an interface. Choose K from the initial user interface menu to get into IOS configuration:

1 user(s) now active on Management Console.

103

User Interface Menu

[M] Menus

[K] Command Line

[I] IP Configuration

Enter Selection: K

Once a CLI session on the switch is open, you must create a VLAN number and name. The command used to do this is as follows:

vlan [vlan#] name [vlan name] command

To use this command, you must be in Global Configuration mode on the switch. To enter Global Configuration mode and create VLANs, take a look at the following example:

>enable

#config terminal

Enter configuration commands, one per line. End with CNTL/Z 1912EN(config)#vlan 2 name sales

1912EN(config)#vlan 3 name marketing 1912EN(config)#exit

Warning A created VLAN is unused until it is assigned to a switch port or ports. By default, all ports remain in VLAN 1 until the port is assigned to another VLAN.

Assigning a Static VLAN to an Interface on a 1900EN Series

You can assign each port on an interface to a VLAN by using the vlan−membership command. Unlike the Set/Clear interface, which allows you to assign and configure a VLAN to multiple ports with one command, you must configure VLANs port by port on the 1900EN series. To configure VLANs on the 1900EN series, follow these steps:

1. First you need to enter Interface Configuration mode, as shown here:

1912EN#config terminal

Enter configuration commands, one per line. End with CNTL/Z 1912EN(config)#interface e0/2

2.Next, you need to issue the vlan−membership command. There are two options for this command:

dynamic—Allows the port to be set to a specific MAC address based on the MAC address of the end user.

static—The port number you as the administrator selects will remain the same regardless of the MAC address used by the end user of that port.

3.In the following examples we will be using static VLANs. To see how many VLANs are available to assign to an interface, use the following command:

1912EN(config−if)#vlan−membership static ? <1−1005> ISL VLAN index

4.Next, take the VLANs created in the previous two steps and assign them to Ethernet ports 4 and 5. You can only assign one VLAN per port, as shown here:

1912EN(config−if)#vlan−membership static 2 1912EN(config−if)#interface e0/4 1912EN(config−if)#vlan−membership static 3 1912EN(config−if)#interface e0/5

104

Viewing the VLAN Configuration on a 1900 Series

Now that we have created the VLANs we want, we can use the show vlan command to see the configured VLANs. Notice that all unconfigured ports on the switch are in VLAN 1. The command is used from the Privileged mode prompt, as follows:

1912#show vlan

The results are shown here:

VLAN Name

Status

Ports

——————————————————————————————————————

1

default

Enabled

1, 3, 6−12, AUI, A, B

2

sales

Enabled

2

3

marketing

Enabled

4

1002

fddi−default

Suspended

 

1003

token−ring−defau Suspended

 

1004

fddinet−default

Suspended

 

1005

trnet−default

Suspended

 

——————————————————————————————————————

VLAN Type

SAID MTU

Parent RingNo BridgeNo Stp Trans1 Trans2

——————————————————————————————————————————————————————————————————————————

1

Ethernet

100001 1500

0

0

0

Unkn 1002

1003

2

Ethernet

100002 1500

0

1

1

Unkn 0

0

3

Ethernet

100003 1500

0

1

1

Unkn 0

0

1002

FDDI

101002 1500

0

0

0

Unkn 1

1003

1003

Token−Ring

101003 1500

1005

1

0

Unkn 1

1002

1004

FDDI−Net

101004 1500

0

0

1

IEEE 0

0

1005

Token−Ring−Net 101005 1500

0

0

1

IEEE 0

0

——————————————————————————————————————————————————————————————————————————

Viewing an Individual VLAN Configuration on a 1900 Series

To view an individual VLAN on a 1900EN series switch, you use the show vlan command followed by the VLAN number, as shown here:

1912#show vlan 2

 

 

VLAN Name

S tatus

Ports

——————————————————————————————

3

sales

Enabled

4

——————————————————————————————

VLAN Type

SAID

MTU Parent RingNo BridgeNo Stp Trans1 Trans2

—————————————————————————————————————————————————————————————————————

3

Ethernet

100002 1500 0

1

1

Unkn 0

0

—————————————————————————————————————————————————————————————————————

1912#

Configuring a Trunk Port on a Cisco 5000 Series

To configure a trunk on a 5000 series switch, you use the set trunk command. You can see the command and its syntaxes by typing “set trunk ?”:

5000> (enable) set trunk ?

Usage: set trunk <mod_num/port_num> [on|off|desirable|auto|nonegotiate] [vlans] [trunk_type]

105

(vlans = 1..1005 An example of vlans is 2−10,1005) (trunk_type = isl,dot1q,dot10,lane,negotiate)

The different port negotiation types are described in Table 5.1, and the different trunk encapsulation types are described in Table 5.2.

Table 5.1: Port negotiation syntaxes for configuring VLAN trunks.

Variable

Description

auto

This trunking mode is used if the port uses DISL to

 

initiate trunking. This is the default mode for Fast

 

Ethernet and mimics plug−and−play. You cannot

 

configure a trunk when both ends’ switch ports are

 

configured for auto mode. One switch must be set to

 

on or desirable mode.

desirable

This trunking mode, if using DISL, actively tries to

 

configure itself as a trunk link. The other end of the

 

trunk link must be configured to on or desirable to

 

complete the trunk initiation.

off

This option disables the port from becoming a trunk.

 

It is typically used when the device on the other end

 

does not support ISL or IEEE 802.1Q. The port on the

 

other end might be a 10Mbps Ether port or FDDI

 

interface.

on

This option basically makes the port a trunk port,

 

whether the other end is configured to be or cannot

 

become a trunk. Use this option when the port on the

 

other end does not understand DTP, such as a

 

third−party adapter.

nonegotiate

Use this option when DISL negotiation that takes

 

place on ISL trunks is not supported. When using

 

dot1q as the final parameter, this option tells the

 

switch that ISL will not be used for trunking the ports.

Table 5.2: Encapsulation type syntaxes that can be used when configuring VLAN trunk links.

 

 

Variable

Description

isl

Applies the ISL protocol encapsulation to an Ethernet

 

trunk.

dot1q

Used for Ethernet trunks using the IEEE 802.1Q

 

standard.

dot10

Used when assigning a FDDI trunk link to the port.

lane

Used when applying ATM to a trunk link port.

negotiate

Puts the port into permanent trunking mode. This

 

option disallows the port from generating DTP

 

frames. Typically, this command is used with

 

switch−to−router trunks.

Let’s set port 2/1 as a trunk link using ISL with the following command:

5000> (enable) set trunk 2/1 on isl Port(s) 2/1 trunk mode set to on. Port(s) 2/1 trunk type set to isl.

5000> (enable) 2000 Dec 21 05:12:01 %DTP−5−TRUNKPORTON:Port 2/1 has become trunked.

106

Соседние файлы в предмете Программирование