交换机 的 端口 工作 模式 一般可以分为三种:Access,Multi,Trunk。 cisco网络中, 交换机 在局域网中最终稳定状态的接口类型主要有四种:access、trunk、 multi、dot1q-tunnel。 1、access: 主要用来接入终端设备,如PC机、服务器、打印服务器等。 2、tru
交换机的端口工作模式一般可以分为三种:Access,Multi,Trunk。
cisco网络中,交换机在局域网中最终稳定状态的接口类型主要有四种:access、trunk、 multi、dot1q-tunnel。
1、access: 主要用来接入终端设备,如PC机、服务器、打印服务器等。
2、trunk: 主要用在连接其它交换机,以便在线路上承载多个vlan。
-----------------------------------------------------------------------------------------------------------
Cisco支持多种Trunk方式(即对VLAN帧标识):
2.1. ISL――Cisco专有封装协议,也是默认的。前面加26字节,后面加4字节FCS。 帧长度1518/1548。可支持的VLAN数为1-1046。
2.2. IEEE 802.1Q――IEEE标准方法,在帧头写入VLAN信息,后面只增加4字节FCS。
帧长度为1518/1522。有12位的vlan标识,它可以支持到4096个VLAN。
802.1Q- trunk为转发未被标记的frame而定义了native VLAN(本地VLAN)。交换机能够从未被标记的trunk上的nativeVLAN转发2层frame,接受方将把所有的未标记frame转发到 native VLAN中 。VLAN1是默认的本地VLAN,也可以把其他的VLAN更改为本地VLAN。如果是ISL,则没被封装的frame将会丢弃,包括 nativeVLAN,所有的数据将被封装
2.3. 802.10――FDDI上传输VLAN信息的Cisco专有协议,把VLAN信息写入SAID安全关联标识符部分
2.4. LANE――基于ATM上传输VLAN信息的一种IEEE标准方法。
-------------------------------------------------------------------------------------------------------------
3、multi: 在一个线路中承载多个vlan,但不像trunk,它不对承载的数据打标签。主要用于接入支持多vlan的服务器或者一些网络分析设备。现在基本不使用此类接口,在cisco的网络设备中,也基本不支持此类接口了。
4、dot1q-tunnel: 用在Q-in-Q隧道配置中。
Cisco 网络设备支持动态协商端口的工作状态,这为网络设备的实施提供了一定的方便(但不建议使用动态方式)。cisco动态协商协议从最初的 DISL(Cisco私有协议)发展到DTP(公有协议)。根据动态协议的实现方式,Cisco网络设备接口主要分为下面几种模式:
1、switchport mode access: 强制接口成为access接口,并且可以与对方主动进行协商,诱使对方成为access模式。
2、 switchport mode dynamic desirable: 主动与对方协商成为Trunk接口的可能性,如果邻居接口模式为Trunk/desirable/auto之一,则接口将变成trunk接口工作。如果不 能形成trunk模式,则工作在access模式。这种模式是现在交换机的默认模式。
3、 switchport mode dynamic auto: 只有邻居交换机主动与自己协商时才会变成Trunk接口,所以它是一种被动模式,当邻居接口为Trunk/desirable之一时,才会成为 Trunk。如果不能形成trunk模式,则工作在access模式。
4、switchport mode trunk: 强制接口成为Trunk接口,并且主动诱使对方成为Trunk模式,所以当邻居交换机接口为trunk/desirable/auto时会成为Trunk接口。
5、 switchport nonegotiate: 严格的说,这不算是种接口模式,它的作用只是阻止交换机接口发出DTP数据包,即禁止端口向对方发送协商包,它必须与switchport mode trunk或者switchport mode access一起使用。
6、switchport mode dot1q-tunnel: 配置交换机接口为隧道接口(非Trunk),以便与用户交换机的Trunk接口形成不对称链路。
在思科4507交换机上查看端口的模式
cisco4507(config-if)#switchport ?
access Set access mode characteristics of the interface
block Disable forwarding of unknown uni/multi cast addresses
host Set port host
mode Set trunking mode of the interface
nonegotiate Device will not engage in negotiation protocol on this
interface
port-security Security related command
priority Set appliance 802.1p priority
private-vlan Set the private VLAN configuration
trunk Set trunking characteristics of the interface
voice Voice appliance attributes
cisco4507(config-if)#switchport mode access ?
cisco4507(config-if)#switchport mode trunk ?
cisco4507(config-if)#switchport mode ?
access Set trunking mode to ACCESS unconditionally
dot1q-tunnel set trunking mode to TUNNEL unconditionally
dynamic Set trunking mode to dynamically negotiate access or trunk mode
private-vlan Set the mode to private-vlan host or promiscuous
trunk Set trunking mode to TRUNK unconditionally
cisco4507(config-if)#switchport mode dynamic ?
auto Set trunking mode dynamic negotiation parameter to AUTO
desirable Set trunking mode dynamic negotiation parameter to DESIRABLE
配置交换机模式举例1
SW1:
interface FastEthernet0/1
switchport mode dynamic desirable
SW1#show interface fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
如果两个相连的交换机端口都配置为switchport mode dynamic desirable,首先会协商为trunk,并且封装为ISL
配置举例说明2:(假定SW1的f0/13 连接到SW2的F0/13上)
SW1(f0/13)--------(f0/13)SW2
SW1
interface FastEthernet0/13
switchport mode dynamic desirable
SW2
interface FastEthernet0/13
switchport mode dynamic desirable
SW1#show interface status | include (Port|Fa0/13)
Port Name Status Vlan Duplex Speed Type
Fa0/13 connected trunk a-full a-100 10/100BaseTX
注意加粗部分,最终协商的模式为trunk,并且封装的协议为ISL
SW1#show interface fa0/13 switchport
Name: Fa0/13
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: isl
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor