当前位置:文档之家› 07-VLAN配置命令

07-VLAN配置命令

07-VLAN配置命令
07-VLAN配置命令

VLAN配置命令

目录

目录

第1章 VLAN配置命令 (1)

1.1 VLAN配置命令 (1)

1.1.1 vlan (1)

1.1.2 name (2)

1.1.3 dot1q-tunnel (2)

1.1.4 switchport pvid (3)

1.1.5 switchport mode (4)

1.1.6 switchport trunk (5)

1.1.7 switchport dot1q-translating-tunnel (5)

1.1.8 show vlan (6)

1.1.9 interface supervlan (8)

1.1.10 subvlan (9)

第1章 VLAN配置命令

1.1 VLAN配置命令

VLAN配置命令有:

vlan

name

vlan access-map

action

match

vlan filter

dot1q-tunnel

switchport pvid

switchport mode

switchport trunk

switchport trunk

show vlan dot1q-translating-tunnel

1.1.1 vlan

[no] vlan vlan-id

添加或删除VLAN。

参数

参数参数说明

vlan-id 定义VLAN的ID。取值范围:1 – 4094。

缺省

命令模式

全局配置模式

使用说明

使用本命令后,可以进入到VLAN配置模式,进入该模式后可以更改该VLAN的一

些属性。

示例

下面的命令将添加ID为200的VLAN。

Switch_config#

Switch_config#vlan 2

Switch_config_vlan_2#

1.1.2 name

[no] name str

给VLAN命名。

参数

参数参数说明

str 定义VLAN的名称。取值范围:长度为1–32的字符串缺省

default的VLAN的名称为‘Default’,其它VLAN的名称为VLANxxxx(xxxx为VLAN

的4位对齐的ID)

命令模式

VLAN配置模式

使用说明

本命令可以根据特殊需求更改VLAN的名称以标志特殊的VLAN。

示例

下面的命令将vlan200的名称改为main405。

Switch_config#

Switch_config#

Switch_config#vlan 200

Switch_config_vlan_200#name ?

WORD The ascii name of VLAN(32bytes)

Switch_config_vlan_200#name main405

1.1.3 dot1q-tunnel

dot1q-tunnel tpid

no dot1q-tunnel

配置全局Dot1q Tunnel的开启和关闭。

参数

参数参数说明

tpid 报文从Dot1q Tunnel上连端口出来时所携带的SPVLAN tag的

TPID。取值范围:1至0xFFFF。

缺省

不启用全局Dot1q Tunnel特性。TPID默认值为802.1Q的TPID 0x8100。

命令模式

全局配置模式

使用说明

全局开启Dot1Q Tunnel后,对于S2108B、S2224D、S2228、S3424B、S3524交

换机、S8500高端交换机系列的LS24GE、LS48GE、LS2TE线卡,他们所有的端

口会默认成为Dot1Q Tunnel下连端口,对进入的报文强制加上SPVLAN tag。

示例

将交换机配置为全局开启Dot1q Tunnel,并设置全局TPID为0x9100。

Switch(config)#dot1q-tunnel 0x9100

1.1.4 switchport pvid

switchport pvid vlan-id

no switchport pvid

配置访问模式端口所属的VLAN。

参数

参数参数说明

vlan-id 该端口所从属的VLAN ID。取值范围:1至4094。

缺省

所有端口都从属于VLAN 1。

命令模式

端口配置模式

使用说明

在配置该命令前,pvid所属的vlan必须存在,而端口可以是访问模式或中继模式,。

示例

将FastEthernet 0/1配置为VLAN 10的访问端口。

Switch(config)#interface f0/1

Switch(config)#vlan10

Switch(config-f0/1)#switchport pvid 10

1.1.5 switchport mode

switchport mode{access | trunk | dot1q-tunnel tpid | dot1q-tunnel-uplink tpid |

dot1q-translating-tunnel}

no switchport mode

配置端口模式

参数

参数参数说明

access 访问模式

trunk 中继模式

dot1q-tunnel tpid VLAN隧道模式

dot1q-tunnel-uplink tpid VLAN隧道上连口模式

dot1q-translating-tunnel VLAN翻译型隧道模式

缺省

访问模式。

命令模式

端口配置模式

使用说明

交换机端口支持以下几种模式:访问模式、中继模式、VLAN隧道模式、VLAN翻译型隧道模式和VLAN隧道上连口模式。

访问模式表示该端口只从属于一个VLAN,并且只发送和接收无标签的以太网帧。

中继模式表示该端口与其它交换机相连,可以发送和接收带标签的以太网帧。

VLAN隧道模式是基于访问模式的子模式。该端口收到的报文无论是否带有VLAN tag,都认为其不带tag,并由交换芯片自动加上该端口的pvid作为新tag,有的机型还支持在下连口修改新tag的TPID值。交换机从而能够忽略接入网络中的不同vlan 划分,而将报文原样传递到同一客户在另外一个端口的另一个子网络中,实现透明传输。

VLAN翻译型隧道模式是基于中继模式的子模式。该端口根据收到报文的VLAN tag,查找VLAN翻译表得到对应的SPVLAN,并由交换芯片用SPVLAN替换原tag或者在原tag外层添加SPVLAN tag。报文从该端口出来时,会将SPVLAN替换为原tag 或者强制除去SPVLAN tag。交换机从而能够忽略接入网络中的不同vlan划分,而将报文原样传递到同一客户在另外一个端口的另一个子网络中,实现透明传输。

VLAN隧道上连口模式是基于中继模式的子模式。报文从该端口出去时,应该配置SPVLAN 不在untagged的范围,保证所有报文原封不动的出去。报文从该端口进来时,会对报文的TPID进行检查,如果发现不符,或者是untagged的报文,则会强制加上包含自己的TPID的SPVLAN tag作为报文的外层标签。

端口模式和802.1X协议有冲突。在中继模式(包括VLAN翻译型隧道模式和VLAN隧道上连口模式)上不能配置802.1X协议;在配置了802.1X协议的端口上不能配置为中继模式(包括VLAN翻译型隧道模式和VLAN隧道上连口模式)。就是说,802.1X协议只能在访问型的端口(包括VLAN隧道模式)上有效。

示例

将端口配置为VLAN隧道上连口模式并设置上连端口的TPID为0x9100。

Switch(config-f0/1)#switchport mode dot1q-tunnel-uplink 0x9100

1.1.6 switchport trunk

[no] switchport trunk {vlan-allowed vlan-list} | {vlan-untagged vlan-list }

配置中继端口特性。

参数

参数参数说明

vlan-allowed 该端口可以接收和发送的VLAN ID。取值范围:1-4094

vlan-untagged VLAN标签不需加就发送的帧。取值范围:1-4094 缺省

所有中继端口的native vlan ID为1,允许的VLAN为1至4094(所有VLAN)。

命令模式

端口配置模式

使用说明

不论端口是访问或中继模式,端口下都可以使用本命令,但要起作用时端口必须是

中继模式。

vlan-allowed参数用于控制端口所归属的VLAN范围;vlan-untagged参数用于控制

端口发送报文是那些VLAN的报文不用加上vlan标签。

在使用vlan list时可以对已有的VLAN的list进行添加删除(add、remove)、设置

(none、all、except)。输入的list以‘,’和‘-’作分隔,如‘1,3,5,7’表示vlan 1、

vlan 3、vlan 5、vlan7;‘1,3-5,7’表示vlan 1、vlan 3、vlan4、vlan 5、vlan7。

示例

将端口允许的VLAN范围定义为1-10。

Switch(config-f0/1)#switchport trunk vlan-allowed 1-10,20-30,55

Switch(config-f0/1)#switchport trunk vlan-untagged 2-1000

1.1.7 switchport dot1q-translating-tunnel

switchport dot1q-translating-tunnel {mode [flat | qinq] | translate

{oldvlanlist | oldvlanid} newvlanid [priority]}

no switchport dot1q-translating-tunnel {mode | translate oldvlanlist}

配置VLAN 翻译型隧道端口特性。

参数

参数

参数说明

mode [flat | qinq]

VLAN 翻译型隧道端口的VLAN 翻译模式

translate {oldvlanlist | oldvlanid} newvlanid [priority]

VLAN 翻译型隧道端口的VLAN 翻译表项,其中oldvlanlist | oldvlanid 和newvlanid 的VLAN 取值范围为1-4094,priority 的取值范围为0-7.

缺省

VLAN 翻译型隧道端口的VLAN 翻译模式为QinQ ,没有任何VLAN 翻译表项。

命令模式

端口配置模式

使用说明

对于S3424B 、

S3524交换机、S8500高端交换机系列的LS24GE 、LS48GE 、LS2TE 线卡,支持Dot1Q Tunnel VLAN 翻译。VLAN 翻译模式和VLAN 翻译表项配置后,

会在端口模式dot1q-translating-tunnel 下生效。翻译模式分为2种:

Flat 模式和QinQ 模式。

Flat 模式会将进入dot1q-translating-tunnel 下连端口的报文的CVLAN tag 作为索引,查找VLAN 翻译表,将查找到的SPVLAN 替换CVLAN ,报文从此端口出来时,会再进行SPVLAN 到CVAN 的转换。QinQ 模式会将进入dot1q-translating-tunnel 下连端口的报文的CVLAN tag 作为索引,查找VLAN 翻译表,将查找到的SPVLAN 形成SPVLAN tag 叠加在CVLAN tag 外层, 报文从此端口出来时,会除去SPVLAN tag 。端口下默认的VLAN 翻译模式为QinQ 。 在端口下配置VLAN 翻译表项时,Flat 模式仅可以配置CVLAN 与SPVLAN 的一一映射。QinQ 模式可以配置CVLAN 与SPVLAN 的多对一映射。

示例

设置端口F0/1的VLAN 翻译模式为Flat ,并且添加翻译表项,将CVLAN 1000翻译为SPVLAN 100。

Switch(config)#interface f0/1

Switch_config_f0/1#switchport dot1q-translating-tunnel mode flat

Switch_config_f0/1#switchport dot1q-translating-tunnel translate 1000 100

1.1.8 show vlan

show vlan [access-map | filter | id vlan-id | interface intf-id | dot1q-tunnel

[interface intf ]]

显示所有VLAN 相关信息。

参数

参数参数说明access-map 显示所有的VLAN访问列表。

filter 显示所有的VLAN过滤器。

id 显示给定的VLAN。取值范围:1-4094。

interface 显示给定的端口。

dot1q-tunnel [interface intf]显示Dot1Q Tunnel的全局信息和概要统计信息,或者显示给定端口的Dot1Q Tunnel详细信息。

缺省

命令模式

管理模式

使用说明

示例

显示所有VLAN信息。

Switch#sho vlan

VLAN Status Name Ports

---- ------- ---------------- -------------------------------------------------

1 Static Default F0/1, F0/2, F0/3, F0/4, F0/5, F0/6, F0/7, F0/8

F0/9, F0/10, F0/11, F0/12, F0/13, F0/14, F0/15

F0/16, F0/17, F0/18, F0/19, F0/20, F0/21, F0/22

F0/23, F0/24, G1/1, G2/1, P1

2 Static VLAN0002 F0/3

3 Static VLAN0003 F0/3

4 Static VLAN0004 F0/3

5 Static VLAN0005 F0/3

6 Static VLAN0006 F0/3

Status :表示VLAN的生成来源,Static表示该VLAN是通过配置生成的,而Dynamic 则表示该VLAN是通过GVRP协议动态产生的。

显示某一个VLAN的具体信息。

Switch> show vlan id 1

VLAN id: 1, Name: default, TotalPorts:11

Ports Atttributes

-----------------------------------------------------------------

F0/1 Trunk,Untagged

F0/2 Access

F0/5 Trunk,Untagged

F0/7 Trunk,Tagged

F0/8 Trunk,Tagged

F0/9 Trunk,Tagged

F0/11 Access

F0/12 Access

F0/14 Trunk,Tagged

F0/15 Trunk,Tagged

F0/16 Trunk,Untagged

显示某一个端口的VLAN的相关信息:

Switch#sho vlan int f0/6

Interface VLAN

Name Property PVID Vlan-Map uTagg-VLan-Map

-------------------- -------- ---- ---------------- ----------------

FastEthernet0/6 Trunk 1 3,5,7,9,11,13,15 none

17,19

Switch#sho vlan int f0/7

Interface VLAN

Name Property PVID Vlan-Map uTagg-VLan-Map

-------------------- -------- ---- ---------------- ----------------

FastEthernet0/7 Access 7 7 ----

显示VLAN访问列表。

Switch#show vlan access-map

Vlan access-map "map_1" 10

Match clauses:

ip address: ip1

Action:

drop

Vlan access-map "map_1" 20

Match clauses:

mac address: mac1

Action:

forward

Vlan access-map "map_1" 30

Match clauses:

Action:

Drop

显示VLAN的过滤表。

Switch#show vlan filter

VLAN Map map_1 is filtering VLANs:

20-22

1.1.9 interface supervlan

命令描述

[no] interface supervlan index

配置一个SuperVLAN接口。

参数

参数参数说明

index SuperVlan接口索引。取值范围:1~32。

缺省

说明

在全局配置模式下配置该命令,用于配置一个SuperVLAN接口并进入接口配置模

式;使用no命令删除该接口。

示例

见命令sub VLAN。

1.1.10 subvlan

命令描述

[no] subvlan [string] [add add-string][remove rem-string]

配置一个SuperVLAN接口的SubVLAN;no命令表示删除该SuperVlan接口下的

所有SubVlan;每次只能使用一个子命令。

只有三层交换机支持subvlan。

参数

参数参数说明

string 设置该SuperVlan接口下的SubVlan,原有的配置将被删除;string

是VLAN列表,例如2,4-6表示VLAN2、4、5、6。

add-string 在原有的SubVlan中增加VLAN列表add-string,格式同上。

rem-string 从原有的SubVlan中删除VLAN列表del-string,格式同上。

缺省

SuperVlan中的SubVlan却省为空。

说明

配置一个SuperVlan中的SubVlan列表。

示例

配置SuperVlan接口5,并为它设置SubVlan;设置结果为,SuperVlan接口5下

拥有SubVlan列表2,3,5-7,9,11-12,也就是Vlan2、3、5、6、7、9、11、12。

interface supervlan 5

subvlan 2,3,5-7

subvlan add 7,9-12 subvlan remove 10

HC交换机基本配置命令

H C交换机基本配置命令 IMB standardization office【IMB 5AB- IMBK 08- IMB 2C】

H3C交换机基本配置核心交换机——作为公司核心网络的主要中枢,合理的配置 1.认证方式为Scheme时的Telnet登录配置 discu查看当前配置 [h3c]telnetserverenable射端口方式 b.出端口方式 1)低端H3C交换机远程端口镜像的配置,如S3100、S5510、S5600: ◆充当源交换机时的配置 remote-probevlanenable//将当前VLAN配置为远程镜像VLAN mirroringstp-collaboration//(可选)开启端口镜像与STP联动功能,开启该功能后,设备将通过监测端口的STP状态来自动控制该端口上的镜像功能是否生效。 mirroring-group group-id remote-source//创建远程源镜像组 mirroring-group group-id mirroring-port mirroring-port-list{both|inbound|outbound}//配置远程端口镜像源端口 mirroring-group group-id reflector-port reflector-port//为远程镜像组配置反射端口mirroring-group group-id remote-probevlan remote-probe-vlan-id //为指定远程源镜像组配置远程镜像VLAN ◆充当中间交换机时的配置 remote-probevlanenable//定义当前VLAN配置为远程镜像VLAN ◆充当目的交换机的配置 remote-probevlanenable//定义当前VLAN配置为远程镜像VLAN

H3C 3100简单配置命令

H3C交换机简单配置命令 1、配置主机名 [H3C]systemname H3C 2、配置console口密码 # 进入系统视图。 system-view # 进入AUX用户界面视图。 [H3C] user-interface aux 0 # 设置通过Console口登录交换机的用户进行Password认证。[H3C-ui-aux0] authentication-mode password # 设置用户的认证口令为加密方式,口令为123456。 [H3C-ui-aux0] set authentication password cipher 123456 # 设置从AUX用户界面登录后可以访问的命令级别为2级。[H3C-ui-aux0] user privilege level 2 3、配置Telnet # 进入系统视图。 system-view # 进入VTY0用户界面视图。 [H3C] user-interface vty 0

# 设置通过VTY0口登录交换机的用户进行Password认证。 [H3C-ui-vty0] authentication-mode password # 设置用户的认证口令为密码方式,口令为123456。 [H3C-ui-vty0] set authentication password cipher 123456 # 设置从VTY0用户界面登录后可以访问的命令级别为2级。 [H3C-ui-vty0] user privilege level 2 # 设置VTY0用户界面支持Telnet协议。 [H3C-ui-vty0] protocol inbound telnet 4、配置交换机VLAN 1 管理地址 system-view [H3C] interface vlan-interface 1 [H3C-VLAN-interface1] ip address 192.168.0.129 255.255.255.0 5、配置交换机网关地址 [H3C]ip route-static 0.0.0.0 0.0.0.0 192.168.0.1 6、配置HTTP服务 [H3C] local-user admin #创建http 用户 [H3C-luser-admin] service-type telnet [H3C-luser-admin] authorization-attribute level 3

交换机配置命令

交换机配置命令 Prepared on 24 November 2020

配置命令 交换机之间用交叉线 1进入特权模式:Switch>enable 2配置模式 Switch#config 3配置主机名:Switch(config)#hostname S1 4.设置访问口令S1#configure terminal S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit 5.将使能加密口令设置为 class。 S1(config)#enable secret class S1(config)#配置默认网关 6.在虚拟接口vlan99设置交换机ip地址 S1(config)#interface vlan99 S1(config-if)# S1(config-if)#no shutdown S1(config-if)#exit 7.交换机 VLAN 分配端口 S1(config)#interface fa0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 99 S1(config-if)#exit 8.给vlan命名 S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff .本征vlan即分配端口连接s1 使用中继vlan S1中继vlan S1(config)#interface FastEthernet 0/1 S1(config-if)#switchport mode trunk S1(config-if)#switchport trunk native vlan 99 9..设置交换机默认网关

h3c常用命令

进入系统视图 system-view 配置设备名 sysname RouterA 查看FLASH目录下内容 dir 指定下次启动配置文件 startup saved-configuration main.cfg 保存配置 save 重启 reboot #置CONSOLE用户登陆的口令认证 system-view [H3C]user-interface aux 0 [H3C-ui-aux0]authentication-mode password [H3C-ui-aux0]set authenticaton password simple 123456 [H3C-ui-aux0]user privilege level 3

用户的命令控制级别设置 [H3C-ui-aux0]user privilege level 0 [H3C]super password level 1 simple 123456 [H3C]super password level 2 simple 123456 [H3C]super password level 3 simple 123456 # 设置super(明文)密码当低权限向高权限切换时使用![RouterA]super password simple quidway # 设置super(密文)密码 [RouterA]super password cipher quidway # 启用telnet 管理功能 [RouterA]user-interface vty 0 4 [RouterA-ui-vty0-4]authentication-mode password [RouterA-ui-vty0-4]set authentication password simple quidway [RouterA-ui-vty0-4]user privilege level 3 [RouterA-ui-vty0-4]quit [RouterA]telnet server enable

实验三 交换机配置方式及基本命令的熟悉文档

实验三交换机配置方式及基本命令的熟悉 【实验目的】 通过对交换机设备的几种配置手段、配置模式和基本配置命令的认识,获得交换机的基本使用能力。 【实验任务】 1、认识交换机的配置方式。 2、按照给出的参考拓扑图构建逻辑拓扑图。 3、按照给出的配置参数表配置各个设备。 4、练习交换机的一些基本命令。 建议实验学时:2学时。 【实验背景】 在前面的实验中我们已经接触了Cisco的路由器运行的Cisco互联网络操作系统(ISO,Internetwork Operating System),熟悉了Cisco IOS软件内置的命令行界面(CLI,command-line interface)。同样,交换机可以通过一个菜单驱动程序的界面,或者通过命令行界面(CLI),或者在交换机配置了IP地址后通过Telnet远程登录、web登录的方式对交换机来进行配置。 交换机除了可以通过Console端口与计算机直接连接外,还可以通过交换机的普通端口进行连接。如果是堆叠型的,也可以把几台交换机一起进行配置,因为实际上这个时候它们是一个整体,这时通过普通端口对交换机进行管理时,就不再使用超级终端了,而是以Telnet 虚拟终端或Web浏览器的方式实现与被管理交换机的通信。前提是在本地配置方式中已为交换机配置好了IP地址,我们可通过IP地址与交换机进行通信,不过要注意,只有是网管型的交换机才具有这种管理功能。实际上最常用的Catalyst交换机OS被称为Catalyst OS、CatOS,其最大的特点是基于set 命令。但我们常用的是与路由器的IOS相类似的基于IOS 的Catalyst OS。下面简单介绍交换机的各种命令模式以及各种常用的命令。 表4.1交换机的各种命令模式的访问方式、提示符、退出方法及其描述

H3C交换机配置命令

H3C交换机配置命令 创建汇聚组link-aggregation group mode{manual / static} 加入端口Port link-aggregation group 汇聚接口配置interface Bridge-Aggregation 1 description ==TO-IDF-1== port link-type trunk undo port trunk permit vlan 1 port trunk permit vlan 21 100 (1)采用手工聚合方式 # 创建汇聚组1。 [H3C] link-aggregation group 1 mode manual # 将以太网端口Ethernet2/1/1至Ethernet2/1/3加入聚合组1。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] port link-aggregation group 1 [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] port link-aggregation group 1 [H3C-Ethernet2/1/2] interface ethernet2/1/3

[H3C-Ethernet2/1/3] port link-aggregation group 1 # 当聚合组端口序号连续时,可以直接把多个端口聚成一组,组号由系统自行分 配。 [H3C] link-aggregation ethernet2/1/1 to ethernet2/1/3 both (2)采用静态LACP聚合方式 # 创建静态汇聚组1。 [H3C] link-aggregation group 1 mode static # 将以太网端口Ethernet2/1/1至Ethernet2/1/3加入聚合组1。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] port link-aggregation group 1 [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] port link-aggregation group 1 [H3C-Ethernet2/1/2] interface ethernet2/1/3 [H3C-Ethernet2/1/3] port link-aggregation group 1 (3)采用动态LACP聚合方式 # 开启以太网端口Ethernet2/1/1至Ethernet2/1/3的LACP协议。 [H3C] interface ethernet2/1/1 [H3C-Ethernet2/1/1] lacp enable [H3C-Ethernet2/1/1] interface ethernet2/1/2 [H3C-Ethernet2/1/2] lacp enable [H3C-Ethernet2/1/2] interface ethernet2/1/3 [H3C-Ethernet2/1/3] lacp enable 设置以太网端口的速率speed { 10 | 100 | 1000 | 10000 | auto } 设置以太网端口连接的网线的类型mdi { across | auto | normal }

h3c系统基本配置命令

第1章系统基本配置命令 1、1 系统基本配置命令 1、1、1 clock datetime 【命令】 clock datetime time date 【视图】 用户视图 【参数】 time:当前时间,格式为HH:MM:SS(小时:分钟:秒),HH取值范围为0~23,MM与SS取值范围为0~59。 date:为当前日期,格式为MM/DD/YYYY(月/日/年)或者YYYY/MM/DD(年/月/日),MM得取值范围为1~12,DD得取值范围与月份有关,YYYY得取值范围为2000~2035。 【描述】 clock datetime命令用来设置系统时间与日期。 在需要严格获取绝对时间得应用环境中,必须设定设备当前日期与时钟。在输入时间参数时,可以不输入秒。 设置完成后,可以使用display clock命令进行查瞧。 【举例】 # 设置设备当前日期为2005年8月1日14时10分20秒。 clock datetime 14:10:20 08/01/2005 1、1、2 clock summer-time 【命令】 clock summer-time zone-name one-off start-time start-date end-time end-date offset-time clock summer-time zone-name repeating { start-time start-date end-time end-date | start-time start-year start-month start-week start-day end-time end-year end-month end-week end-day } offset-time undo clock summer-time 【视图】 用户视图 【参数】 zone-name:夏令时名称,为1~32个字符得字符串,区分大小写。one-off:表示仅对某一年得夏令时时间进行设置。

VLAN透传配置举例

目录1 介绍 特性简介 特性关键技术点 2 特性使用指南 使用场合 配置指南 配置混合模式桥组 注意事项 3 配置举例 VLAN透传典型应用组网 组网需求 物理连接图 配置步骤 SecPath F100-A VLAN透传组网 组网需求 物理连接图 配置步骤 故障排除 故障排除命令 故障现象举例 4 关键命令 bridge enable bridge bridge-set enable

bridge vlanid-transparent-transmit enable insulate 5 相关资料 其它相关资料

1 介绍 特性简介 在混合模式下,桥支持VLAN ID透传特性是指:通过对加入桥组的设备出接口配置支持VLAN ID透传,可以使报文从该接口送出时,不对报文的VLAN ID做任何修改。 使能桥出接口VLAN ID透传,则报文从该接口发出时保留报文入桥时的VLAN ID,如果没有VLAN ID不增加VLAN ID。 特性关键技术点 配置了VLAN透传后,防火墙不会对报文的VLAN tag进行任何的修改和去除等操作。从而可以实现VLAN tag的透明传输,保证不同VLAN之间的隔离、同一VLAN 之间的互通。 2 特性使用指南 使用场合 当系统中存在VLAN部署,不同的VLAN之间需要进行隔离,而且所有VLAN的防火墙策略(比如配置在接口上的防火墙包过滤)是一样的。 配置指南 混合模式下桥接功能的配置步骤分为以下几步: 使能桥组功能 使能一个桥组。 将接口加入到桥组中 使能桥组下接口的VLAN透传功能 2.2.1 配置混合模式桥组

注意事项 当配置VLAN透传功能时,需要注意以下事项: 子接口不支持VLAN透传。 F100A设备的四个LAN接口需要执行undo insulate命令聚合成一个接口才能使用VLAN透传功能。 VLAN透传与交换机的Trunk功能并不相同,当与交换机互通时,如果希望SecPath 防火墙与交换机的管理VLAN 互通,需要借助子接口来实现。即将配置了与交换机管理VLAN ID相同的子接口加入到桥组,并创建相应的桥组虚接口(BVI接口),配置同一网段地址,则防火墙的桥组虚接口就可以与交换机管理VLAN接口互通。 3 配置举例 VLAN透传典型应用组网 3.1.1 组网需求 客户端PC,A、C属于VLAN100,客户端PC,B、D属于VLAN200,客户端PC,M 属于VLAN99,用来模拟属于不同VLAN的用户。在交换机1和交换机2与防火墙相连接口上都要配置成Trunk模式,保证带Tag标记的报文能够透传。交换机Switch1和Switch2的管理VLAN为VLAN99。 要求VLAN100和VLAN200能够互相隔离,交换机可以通过管理VLAN99与防火墙互通。 3.1.2 物理连接图

H3C交换机常用配置命令

H3C交换机常用配置命令 一、用户配置 system-view [H3C]super password H3C 设置用户分级密码 [H3C]undo super password 删除用户分级密码 [H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin [H3C]undo localuser bigheap 删除Web网管用户 [H3C]user-interface aux 0 只支持0 [H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-Aux]undo idle-timeout 恢复默认值 [H3C]user-interface vty 0 只支持0和1 [H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-vty]undo idle-timeout 恢复默认值 [H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码 [H3C]display users 显示用户 [H3C]display user-interface 显示用户界面状态 二、系统IP设置 [H3C]vlan 20 [H3C]management-vlan 20 [H3C]interface vlan-interface 20 创建并进入管理VLAN [H3C]undo interface vlan-interface 20 删除管理VLAN接口 [H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234) [H3C-Vlan-interface20]undo ip address 删除IP地址

交换机Vlan配置

实验三交换机的VLAN配置 一、实验目的 1. 理解理解Trunk链路的作用和VLAN的工作原理 2. 掌握交换机上创建VLAN、接口分配 3.掌握利用三层交换机实现VLAN间的路由的方法。 二、实验环境 本实验在实验室环境下进行操作,需要的设备有:配置网卡的PC机若干台,双绞线若干条,CONSOLE线缆若干条,思科交换机cisco 2960两台。 三、实验内容 1. 单一交换机的VLAN配置; 2. 跨交换机VLAN配置,设置Trunk端口; 3. 测试VLAN分配结果; 4.在三层交换机上实现VLAN的路由; 5.测试VLAN间的连通性 四、实验原理 1.什么是VLAN VLAN是建立在局域网交换机上的,以软件方式实现逻辑工作组的划分与管理,逻辑工作组的站点不受物理位置的限制,当一个站点从一个逻辑工作组移到另一个逻辑工作组时,只需要通过软件设定,而不需要改变它在网络中的物理位置;当一个站点从一个物理位置移动到另一个物理位置时,只要将该计算机连入另一台交换机,通过软件设定后该计算机可成为原工作组的一员。 相同VLAN内的主机可以相互直接通信,不同VLAN中的主机之间不能直接通信,需要借助于路由器或具有路由功能的第三层交换机进行转发。广播数据包只可以在本VLAN内进行广播,不能传输到其他VLAN中。 2.交换机的端口 以太网交换机的每个端口都可以分配给一个VLAN,分配给同一个VLAN的端口共享广播域,即一个站点发送广播信息,同一VLAN中的所有站点都可以接收到。 交换机一般都有三种类型的端口:TRUNK口、ACCESS口、CONSOLE口。 CONSOLE端口:它是专门用于对交换机进行配置和管理的。通过Console 端口连接并配置交换机,是配置和管理交换机必须经过的步骤。 ACCESS口(默认):ACCESS端口只能通过缺省VLAN ID的报文。

h3c系统基本配置命令

第1章系统基本配置命令 1.1 系统基本配置命令 1.1.1 clock datetime 【命令】 clock datetime time date 【视图】 用户视图 【参数】 time:当前时间,格式为HH:MM:SS(小时:分钟:秒),HH取值范围为0~23,MM和SS取值范围为0~59。 date:为当前日期,格式为MM/DD/YYYY(月/日/年)或者YYYY/MM/DD(年/月/日),MM的取值范围为1~12,DD的取值范围与月份有关,YYYY的取值范围为2000~2035。 【描述】

clock datetime命令用来设置系统时间和日期。 在需要严格获取绝对时间的应用环境中,必须设定设备当前日期和时钟。在输入时间参数时,可以不输入秒。 设置完成后,可以使用display clock命令进行查看。 【举例】 # 设置设备当前日期为2005年8月1日14时10分20秒。 clock datetime 14:10:20 08/01/2005 1.1.2 clock summer-time 【命令】 clock summer-time zone-name one-off start-time start-date end-time end-date offset-time clock summer-time zone-name repeating { start-time start-date end-time end-date | start-time start-year start-month start-week start-day end-time end-year

迈普路由器配置手册 系统基础

InfoExpress IOS InfoExpress l l l l 1.1 l console shell l 56/336modem LINE l Telnet l SNMP console 56/336modem LINE Telnet SNMP 1.2 InfoExpress IOS shell l l l Console Telnet l shell

InfoExpress IOS Shell l user EXEC l privileged EXEC l global configuration l interface configuration l router configuration l file system configuration l access list configuration l voice-port configuration l dial-peer configuration l crypto transform-set configuration l crypto map configuration l IKE isakmp configuration l pubkey-chain configuration l pubkey-key configuration l DHCP dhcp configuration 1-1 1-1 InfoExpress Lo en co in ro um

IP phone E1 filesystem router(config-fs)# exit ip access-list router(config-std-nacl)# cl)# voice-port ro rt) dial-peer router(config-dial-peer )# exit V oIP POTS crypto ipsec transform-set router(cfg-crypto-trans )# exit crypto map router(cfg-crypto-map) # exit IKE crypto isakmp router(config-isakmp)# crypto key pubkey-chain rsa router(config-pubkey-c hain)# exit RSA

H3C路由器配置命令

telnet 防火墙IP地址 用户名 密码 --进入普通用户权限-- --在此命令下可输入一般命令-- --可用?看有哪些命令和命令的作用-- system-view --进入超级管理员权限界面-- --此提示符下可输绝大部分命令-- --(极少数需要在com终端输入)-- quit --退出当前状态,返回上一级-- 一般命令(不一定要把命令写全) display current 展示当前配置 acl number 3050 进入访问控制列表3050号 rule 66 permit ip ........ 在当前访问控制表增加或修改规则66号 rule的具体用法可用rule ?一步步显示出来,亦可参考我原写的命令 我原配置需要涉及的部分 1.ip和mac绑定,绑定方法具体看一下参数文件你就可明白 2.策略号3050 在该条策略中如有permit就是允许你指定的ip或ip段上网 3.策略号3051和305作用是限流 在该策略号具体用法可参考其中的rule规则 最后是save 否则一重启这些改动就会无效 sH3C路由器 ##################################################################### 1、system-view 进入系统视图模式 2、sysname R1 为设备命名为R1 3、display ip routing-table 显示当前路由表 4、 language-mode Chinese|English 中英文切换 5、interface Ethernet 0/0 进入以太网端口视图

6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口 9、 quit 退出当前视图模式 10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由 11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由 H3C S3100 Switch H3C S3600 Switch H3C MSR 20-20 Router ##################################################################### 1、调整超级终端的显示字号; 2、捕获超级终端操作命令行,以备日后查对; 3、 language-mode Chinese|English 中英文切换; 4、复制命令到超级终端命令行,粘贴到主机; 5、交换机清除配置 :reset save ;reboot ; 6、路由器、交换机配置时不能掉电,连通测试前一定要 检查网络的连通性,不要犯最低级的错误。 7、192.168.1.1/24 等同 192.168.1.1 255.255.255.0;在配置交换机和路由器时, 192.168.1.1 255.255.255.0 可以写成: 192.168.1.1 24 8、设备命名规则:地名-设备名-系列号例:PingGu-R-S3600

H3C交换机配置命令大全

H3C 交换机配置命令大全 1、 system-view 进入系统视图模式 2、 sysname 为设备命名 3、 display current-configuration 当前配置情况 4、 language-mode Chinese|English 中英文切换 5、 interface Ethernet 1/0/1 进入以太网端口视图 6、 port link-type Access|Trunk|Hybrid 设置端口访问模式 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口 9、 quit 退出当前视图模式 10、 vlan 10 创建 VLAN 10 并进入 VLAN 10 的视图模式 13、 port trunk permit vlan all H3C 路由器 1、 system-view 进入系统视图模式 2、 sysname R1 为设备命名为 R1 3、 display ip routing-table 显示当前路由表 4、 language-mode Chinese|English 中英文切换 5、 interface Ethernet 0/0 进入以太网端口视图 6、 ip address 192.168.1.1 255.255.255.0 配置 IP 地址和子网掩码 7、 undo shutdown 打开以太网端口 8、 shutdown 关闭以太网端口 9、 quit 退出当前视图模式 10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 置 静态路由 11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 H3C S3100 Switch H3C S3600 Switch H3C MSR 20-20 Router 11、 port access vlan 10 12、 port E1/0/2 to E1/0/5 在端口模式下将当前端口加入到 vlan 10 中 在 VLAN 模式下将指定端口加入到当前 vlan 允许所有的 vlan 通过 配 配置默认的路

华为交换机基本配置命令29908

华为交换机基本配置命令 一、单交换机VLAN划分 命令命令解释 system 进入系统视图 system-view 进入系统视图 quit 退到系统视图 undo vlan 20 删除vlan 20 sysname 交换机命名 disp vlan 显示vlan vlan 20 创建vlan(也可进入vlan 20) port e1/0/1toe1/0/5 把端口1-5放入VLAN 20 中 5700系列 单个端口放入VLAN [Huawei]intg0/0/1 [Huawei]port link-typeaccess(注:接口类型access,hybrid、trunk) [Huawei]port default vlan 10 批量端口放入VLAN [Huawei]port-group 1 [Huawei-port-group-1]group-member ethernet G0/0/1 to ethernet G0/0/20 [Huawei-port-group-1]port hybrid untagged vlan 3 删除group(组)vlan 200内的15端口 [Huawei]intg0/0/15 [Huawei-GigabitEthernet0/0/15]undo port hybrid untagged vlan 200 通过group端口限速设置 [Huawei]Port-group 2 [Huawei]group-member g0/0/2 to g0/0/23 [Huawei]qos lr outbound cir 2000 cbs 20000 disp vlan 20 显示vlan里的端口20 int e1/0/24 进入端口24 undo port e1/0/10 表示删除当前VLAN端口10 disp curr 显示当前配置 return 返回 Save 保存 info-center source DS channel 0 log state off trap state off通过关闭日志信息命令改变DS模块来实现(关闭配置后的确认信息显示) info-center source DS channel 0 log state on trap state on 通过打开日志信息命令改变DS模块来实现(打开配置后的确认信息显示)

H3C交换机基础知识配置命令

一、基本配置 //用户直行模式提示符,用户视图 system-view //进入配置视图 [H3C] sysname xxx //设置主机名成为xxx这里使用修改特权用户密码 一、用户配置 system-view [H3C]super passwordH3C //设置用户分级密码 [H3C]undo superpassword //删除用户分级密码 [H3C]localuser bigheap 1234561 //Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin [H3C]undo localuserbigheap //删除Web网管用户 [H3C]user-interface aux0 //只支持0 [H3C-Aux]idle-timeout 250 //设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-Aux]undoidle-timeout //恢复默认值 [H3C]user-interface vty0 //只支持0和1 [H3C-vty]idle-timeout 250 //设置超时为2分50秒,若为0则表示不超时,默认为5分钟 [H3C-vty]undoidle-timeout //恢复默认值 [H3C-vty]set authentication password123456 //设置telnet密码,必须设置 [H3C-vty]undo set authenticationpassword //取消密码

[H3C]displayusers //显示用户 [H3C]displayuser-interface //用户界面状态 三、VLAN配置 [H3C]vlan 2 //创建VLAN2 [H3C]undo vlanall //删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除 [H3C-vlan2]port Ethernet 0/4 to Ethernet0/7 //将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolateenable //打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能 [H3C-Ethernet0/4]port-isolate uplink-portvlan 2 //设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置 [H3C]display vlanall //显示所有VLAN的详细信息 S1550E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属于多个user-group,不属于同一个user-group的端口不能互相通信 [H3C]user-group20 //创建user-group 20,默认只存在user-group 1 [H3C-UserGroup20]port Ethernet 0/4 toEthernet 0/7 //将4到7号端口加入到VLAN20中,初始时都属于user-group 1中 [H3C]display user-group20 //显示user-group 20的相关信息

交换机配置命令

配置命令 交换机之间用交叉线 1进入特权模式:Switch>enable 2配置模式Switch#config 3配置主机名:Switch(config)#hostname S1 4.设置访问口令S1#configure terminal S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit 5.将使能加密口令设置为class。 S1(config)#enable secret class S1(config)#配置默认网关 6.在虚拟接口vlan99设置交换机ip地址 S1(config)#interface vlan99 S1(config-if)# S1(config-if)#no shutdown S1(config-if)#exit 7.交换机VLAN 分配端口 S1(config)#interface fa0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 99 S1(config-if)#exit 8.给vlan命名 S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff S2.S3.本征vlan即分配端口 s2.s3连接s1 使用中继vlan S1中继vlan S1(config)#interface FastEthernet 0/1 S1(config-if)#switchport mode trunk S1(config-if)#switchport trunk native vlan 99 9..设置交换机默认网关 S1(config)# S1(config)#exit 10..配置快速以太网接口的端口速率和双工设置。 S1#configure terminal S1(config)#interface fastethernet 0/18 S1(config-if)#speed 100 S1(config-if)#duplex full S1(config-if)#end 11.清除mac地址表S1#clear mac-address-table dynamic 12.设置静态MAC 地址。

H3C系统及配置文件备份操作

系统及配置文件备份操作 实验任务一:使用系统操作及文件操作的基本命令 步骤一:进入系统视图 执行system-view命令进入系统视图。系统视图的提示符为[系统名]。执行quit命令可以从系统视图切换到用户视图。 步骤二:练习使用帮助特性和补全键 s? sysname ? 步骤三:更改系统名称 [H3C]sysname YourName [YourName] 步骤四:更改系统时间 [YourName]display clock 17:28:07 UTC Mon 09/08/2008 [YourName]quit clock datetime 10:20:30 10/01/2008 display clock 10:20:32 UTC Wed 10/01/2008 步骤五:显示系统运行配置 display current-configuration 步骤六:显示保存的配置 display saved-configuration 此时尚未保存配置,因此不存在saved-configuration

步骤七:保存配置 默认配置文件名通常为startup.cfg,某些版本为config.cfg。 save The current configuration will be written to the device. Are you sure? [Y/N]: Please input the file name(*.cfg)[cf:/startup.cfg] (To leave the existing filename unchanged, press the enter key): Validating file. Please wait... Now saving current configuration to the device. Saving configuration cf:/startup.cfg. Please wait... . Configuration is saved to cf successfully......... save The current configuration will be written to the device. Are you sure? [Y/N]:y Please input the file name(*.cfg)[cf:/startup.cfg] (To leave the existing filename unchanged, press the enter key): cf:/startup.cfg exists, overwrite? [Y/N]:y Validating file. Please wait... Now saving current configuration to the device. Saving configuration cf:/startup.cfg. Please wait... . Configuration is saved to cf successfully. 由于执行了save命令,保存配置与运行配置一致。 步骤八:删除和清空配置 [YourName]undo sysname reset saved-configuration The saved configuration file will be erased. Are you sure? [Y/N]:y Configuration file in cf is being cleared. Please wait ... ........ Configuration file in cf is cleared. reboot Start to check configuration with next startup configuration file, please wait ...... This command will reboot the device. Current configuration may be lost in next startup if you continue. Continue? [Y/N]:Y 步骤九:显示文件目录 pwd cf: dir Directory of cf:/ 0 drw- - Jan 19 2007 18:26:34 logfile 1 -rw- 16337860 Aug 03 2007 17:59:36 msr30-cmw520-r1206p01-si.bin 2 -rw- 739 Oct 01 2008 10:15:54 startup.cfg 249852 KB total (221648 KB free) File system type of cf: FAT32

相关主题
文本预览
相关文档 最新文档