Category Archives: CISCO

Reset Cisco switch port/interface to default then apply vlan

Reset interface (port) to default

สิทธิ์การใช้งาน Privilege level on Cisco

คำสั่ง Privilege ก็เป็นระดับที่ใช้สำหรับการกำหนดสิทธิในการเข้าใช้งานของแต่ละผู้ใช้ ว่าผู้ใช้ในแต่ละระดับนั้นสามารถที่จะใช้คำสั่งใดบนอุปกรณ์ได้บ้าง ซึ่งในการใช้งาน Cisco IOS Software โดยปกติจะมีโหมดในการทำงานอยู่สองระดับ คือ User Exec Mode กับ Privileged Exec Mode และสามารถที่จะกำหนดระดับการใช้งานของผู้ใช้ได้ถึง 16 ระดับ ตั้งแต่ระดับ 0 ซึ่งจะจำกัดการใช้งานไว้มากที่สุด จนถึงระดับ 15 ที่สามารถใช้งานได้ทุกอย่าง

โดย Default ระดับ Privilege level บนอุปกรณ์ Cisco IOS จะมีสิทธิการใช้งาน ดังนี้ Continue reading

Rogue DHCP Server DHCP Snooping Cisco Switch

การตั้งค่า DHCP Snooping บน Cisco Switch
  1. เปิดการทำงานของ DHCP Snooping บน Global
  2. เปิดการทำงานของ DHCP Snooping สำหรับ VLAN ที่ต้องการ
  3. กำหนดพอร์ต Trusted และ Untrusted
  4. ปิดการทำงาน Option 82

Continue reading

Cisco VLAN Range

 

Release

Modification

12.0(7)XE

The interface range command was introduced.

12.1(5)T

The interface range command was integrated into Cisco IOS Release 12.1(5)T.

12.2(2)DD

The interface range command was expanded to enable configuration of subinterfaces.

C

onfiguring a Range of VLAN Subinterfaces

 
 

Command

Purpose

Step 1

Router(config)# interface range {{ethernet | fastethernet | gigabitethernet | atmslot/interface.subinterface – {{ethernet | fastethernet | gigabitethernet | atm}slot/interface.subinterface}

Selects the range of subinterfaces to be configured.

Note The space before the dash is required. For example, the command interface range fastethernet 1 – 5 is valid; the command interface range fastethernet 1-5 is not valid.

Step 2

Router(config-int-range)# encapsulation dot1Q vlan-id

Applies a unique VLAN ID to each subinterface within the range.

vlan-id—Virtual LAN identifier. The allowed range is from 1 to 4095.

The VLAN ID specified by the vlan-id argument is applied to the first subinterface in the range. Each subsequent interface is assigned a VLAN ID which is the specified vlan-id plus the subinterface number minus the first subinterface number (VLAN ID + subinterface number – first subinterface number).

Single Range Configuration Example

The following example configures the Fast Ethernet subinterfaces within the range 5/1.1 and 5/1.4 and applies the following VLAN IDs to those subinterfaces:

Fast Ethernet5/1.1 = VLAN ID 301 (vlan-id)

Fast Ethernet5/1.2 = VLAN ID 302 (vlan-id=301 + 2 – 1=302)

Fast Ethernet5/1.3 = VLAN ID 303 (vlan-id=301 + 3 – 1=303)

Fast Ethernet5/1.4 = VLAN ID 304 (vlan-id=301 + 4 – 1=304)

Router(config)# interface range fastethernet5/1.1 - fastethernet5/1.4 

Router(config-if)# encapsulation dot1Q 301

Router(config-if)# no shutdown 

Router(config-if)#

Configuring the Allowed VLANs for Trunking Ports

configure the allowed VLAN for a trunk port, perform this task:

Command
Purpose

Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# interface { type slot / port | port-channel number }

Specifies an interface to configure, and enters interface configuration mode.

Step 3

switch(config-if)# switchport trunk allowed vlan { vlan-list all | none [ add |except | none | remove { vlan-list }]}

Sets allowed VLANs for the trunk interface. The default is to allow all VLANs on the trunk interface: 1 to 3967 and 4048 to 4094. VLANs 3968 to 4047 are the default VLANs reserved for internal use by default; this group of VLANs is configurable. By default, all VLANs are allowed on all trunk interfaces.

Note You cannot add internally allocated VLANs as allowed VLANs on trunk ports. The system returns a message if you attempt to list an internally allocated VLAN as an allowed VLAN.

This example shows how to add VLANs 15 to 20 to the list of allowed VLANs on the Ethernet 3/1 Ethernet trunk port:

switch# configure terminal
switch(config)# interface ethernet 3/1
switch(config-if)# switchport trunk allow vlan 15-20

Verifying Interface Configuration

To display access and trunk interface configuration information, perform one of these tasks:

Command
Purpose

switch# show interface

Displays the interface configuration

switch# show interface switchport

Displays information for all Ethernet interfaces, including access and trunk interfaces.

switch# show interface brief

Displays interface configuration information.