导航:首页 > 程序命令 > 以太网通道命令

以太网通道命令

发布时间:2022-06-08 19:40:10

① 如何使用以太网

以太网是目前使用最广泛的局域网技术。由于其简单、成本低、可扩展性强、和IP网能够非常好地结合等特点,以太网技术的应用正从企业内部网络向公用电信网领域迈进。以太网接入是指将以太网技术和综合布线相结合,作为公用电信网的接入网,直接向用户提供基于IP的多种业务的传送通道。以太网技术的实质是一种二层的媒质访问控制技术,能在五类线上传送,也能和其他接入媒质相结合,形成多种宽带接入技术。以太网和电话铜缆上的VDSL相结合,形成EoVDSL技术;和无源光网络相结合,产生EPON技术;在无线环境中,发展为WLAN技术。

② 路由器设置中,以太网通道的作用是什么在线等答案。

以太网通道(EthernetChannel)
1.什么是以太网通道(EthernetChannel) 交换机之间如果存在物理环路,将会通过STP计算来阻塞一些端口,在逻辑上形成无环路网络。 在网络的核心交换机之间常常有这样的需要,希望两条链路能够负载均衡,提高链路带宽,并能够互相备份。STP实现的一主一备,虽然能起到备份作用,但是两条链路不能同时使用,并且恢复的时间也相对较长,不能满足需求。 而以太网通道(EthernetChannel)可以满足这样的需求。 以太网通道(EthernetChannel)通过捆绑多条以太网链路来提高链路带宽,并运行一种机制,将多个以太网端口捆绑成一条逻辑链路。以太网通道最多可以捆绑8条物理链路,其中物理链路可以是双绞线,也可以是光纤连接的。 2.以太网通道必须遵循的一些规则 ●参与捆绑的端口必须都处于同一个VLAN。 ●如果端口配置的是中继模式,那么,应该在链路两端将通道中的所有端口配置成相同的中继模式。 ●所有参与捆绑的端口的物理参数设置必须相同。应该有同样的速度和全双工或者半双工模式设置。也就是说,参与捆绑的链路,速率必须相同。
以太网通道(EthernetChannel)的配置

左边的交换机为交换机1,以下简称S1,右边的交换机为交换机2,以下简称S2 S1(config)#interface range fastEthernet 0/0 - 2 命令解释:进入交换机1的F0/0-F0/2接口 S1(config-if-range)#switchport mode trunk 命令解释:将接口封装为中继模式(trunk) S1(config-if-range)#channel-group 1 mode on 命令解释:将接口加入以太网通道组1. S2(config)#interface range fastEthernet 0/0 - 2 命令解释:进入交换机2的F0/0-F0/2接口 S2(config-if-range)#switchport mode trunk 命令解释:将接口封装为中继模式(trunk) S2(config-if-range)#channel-group 1 mode on 命令解释:将接口加入以太网通道组1. 可使用#show running-config命令来查看状态,或使用show etherchannel 1 summary来查看以太网通道1的配置,其中1为组号。 在配置了以太网通道后,链路速率将会增加,如2条100兆以太网捆绑在一起,那么其捆绑后的速率将为200兆。 注:配置以太网通道的接口不一定非得是中继模式。 我粘贴的

③ 以太网中之间的命令

首先主机A会广播发送ARP包,链路上的各主机都会收到这个广播包,但只有IP地址相符的主机会响应处理,其他主机不予理会,这时主机B以单播方式把自己的物理地址发送给主机A
简单讲一下 广播包的主要内容大概是说198.162.1.6你的MAC地址是多少啊?链路上IP地址相符的主机就会处理
还有一般情况下,广播包还会把自己的MAC地址也放在里面,方便以后主机B与主机A之间的通信,在B同样也不知道A的物理地址时

④ 普通交换机常用配置命令

a、更改远程TELNNET密码
Switch#configure terminal
Switch(config)#line vty 0 4
Switch(config-line)#password qycx123
Switch(config-line)#login
Switch(config-line)#exit
b、更改进入全局配置模式时的密码
Switch#configure terminal
Switch(config)#enable secret qycx123
思科交换机常用命令——创建并划分VLAN
a、创建VLAN
Switch#vlan database
Switch(vlan)#vlan 99 name office (创建vlan 99 并命名为office)
b、将端口划分至vlan
Switch(config)#interface fastEthernet 0/8
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 99 (将8号快速以太口划分至vlan 99)
思科交换机常用命令——调试命令
a、显示所有配置命令:Switch#show run
b、显示所有接口状态:Switch#show ip int brief
c、显示所有VLAN的信息:Switch#show vlan brief
cisco交换机还是比较常用的,于是我研究了一下Cisco交换机命令的大总结,在这里拿出来和大家分享一下,希望对大家有用。我所针对的都是Cisco的设备而言的,华为的可以跟据手册来查,配置都是差不多的,这里华子就不多写华为的设备了,了解的也不是很多。
Cisco交换机命令之使用Telnet远程式管理
switch(config)#interface vlan 1 进入vlan 1
switch(config-if)#ip address 设置IP地址
switch(config-if)#ip default-gateway 设置默认网关
switch(config)#line vty 0 4 进入虚拟终端
switch(config-line)#login 允许登录
switch(config-line)#password xx 设置登录口令
switch#exit 返回命令
Cisco交换机命令之控制台口令
switch(config)#line console 0 进入控制台口
switch(config-line)#login 允许登录
switch(config-line)#password xx 设置登录口令
switch#exit 返回命令
Cisco交换机命令之基本接口配置
switch(config)#interface f0/1 进入f0/1接口
switch(config-if)#plex full 配置全双工模式
switch(config-if)#speed 100 配置速率
switch(config-if)#description to ***** 接口描述
switch(config)#ip domain-name ***.com 设置或名服务器
switch(config)#mac-address-table aging-time 设置mac表超时时间
switch#write 保存配置信息
switch# running-config startup-config 保存当前配置nvram
switch#erase startup-config 清除配置文件
Cisco交换机命令之交换机VLAN设置:
switch#vlan database 进入VLAN设置
switch(vlan)#vlan 2 建VLAN 2
switch(vlan)#name 名字 建VLAN 2的名称
switch(vlan)#no vlan 2 删vlan 2
注:删除vlan时原属于此vlan的端口处于非激活状态,直到重新分配为止。
switch(config)#int f0/1 进入端口1
switch(config-if)#switchport mode access 当前端口工作莫试
switch(config-if)#switchport access vlan 2 当前端口加入vlan 2
switch(config-if)#switchport mode trunk 设置为干线
switch(config-if)#switchport trunk encapsulation dot1q 设置vlan 中继协议
switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干线
switch(config-if)#switchport trunk allowed vlan add 1,2 ; 从Trunk中添加vlans
switch(config-if)#switchport trunk allowed vlan remove 1,2 ;从Trunk中删除vlans
switch(config-if)#switchport trunk pruning vlan remove 1,2 ;从Trunk中关闭局部修剪
Cisco交换机命令之以太网通道配置
switch(config)#interface range fasternet0/1 - 2 将fasternet0/1和0/2 口捆绑
switch(config-if)#channel-group 1 mode on 配置以太通道模式
switch(config-if)#port-channel load-balance {dst-mac | src-mac}在链路间实现负载均衡
switch#show etherchannel 1 summary 查看通道信息
switch#show etherchannel load-balance 查看通道信息
Cisco交换机命令之vtp配置
switch(config)#vtp domain 设置vtp域名
switch(config)#vtp password 设置vtp密码
switch(config)#vtp mode server 设置vtp服务器模式
switch(config)#vtp mode client 设置vtp客户机模式
switch(config)#vtp mode transparent 设置vtp 透明模式
switch(config)#vtp version 设置vtp版本
switch(config)#vtp pruning 启用vtp修解
switch(config)#no vtp pruning 关闭vtp修解
注:要想从vtp中减少一台交换机只需将该交换机vtp 名更改
Cisco交换机命令之生成树stp:
switch(config)#spanning-tree vlan 启用stp生成树(基于vlan)
switch(config)#spanning-tree vlan root primary 指定根交换机(基于vlan)
switch(config)#spanning-tree vlan root secondary 指定备用根交换机(基于vlan)
switch(config)#spanning-tree vlan priority 指定交换机优先级(基于vlan)
switch(config)#no spanning-tree vlan priority 将交换机的优先级恢复默认值(基于vlan)
switch(config-if)#spanning-tree vlan cost 指定端口成本(起用trunk的端口模式下)
switch(config-if)#spanning-tree vlan port-prioty 指定交换机端口优先级(基于vlan)
switch(config-if)#spanning-tree portfast 配置速端口(连接终端设备的端口状态)如pc机
switch(config)#spanning-tree uplinkfast 配置上行速端口
switch(config)#spanning-tree vlan hello-time 配置交换机hello时间(基于vlan)
switch(config)#spanning-tree vlan forward-time 修改转发延迟计时器(基于vlan)
switch(config)#spanning-tree vlan max-time 修改最大老化时间(基于vlan)
switch#show spanning-tree summery 检测vlan生成树配置
switch#show spanning-tree vlan detail 浏览详细生成树配置信息
switch#show spanning-tree interface detail 浏览详细生成树端口配置信息
Cisco交换机命令之交换机显示命令:
switch#show vtp status 查看vtp配置信息
switch#show running-config 查看当前配置信息
switch#show vlan 查看vlan配置信息
switch#show interface 查看端口信息
switch#show int f0/0 查看指定端口信息
switch#dir flash: 查看闪存
switch#show version 查看当前版本信息
switch#show mac-address-table aging-time 查看mac超时时间
switch#show cdp cisco设备发现协议 (可以查看聆接设备)
switch#show cdp traffic 杳看接收和发送的cdp包统计信息
switch#show cdp neighbors 查看与该设备相邻的cisco设备
switch#show interface f0/1 switchport 查看有关switchport的配置
switch#show cdp neighbors 查看与该设备相邻的cisco设备

⑤ 交换机的常用配置命令

a、更改远程TELNNET密码
Switch#configure terminal

Switch(config)#line vty 0 4

Switch(config-line)#password qycx123

Switch(config-line)#login

Switch(config-line)#exit

b、更改进入全局配置模式时的密码

Switch#configure terminal

Switch(config)#enable secret qycx123

思科交换机常用命令——创建并划分VLAN

a、创建VLAN

Switch#vlan database

Switch(vlan)#vlan 99 name office (创建vlan 99 并命名为office)

b、将端口划分至vlan

Switch(config)#interface fastEthernet 0/8

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 99 (将8号快速以太口划分至vlan 99)

思科交换机常用命令——调试命令

a、显示所有配置命令:Switch#show run

b、显示所有接口状态:Switch#show ip int brief

c、显示所有VLAN的信息:Switch#show vlan brief

cisco交换机还是比较常用的,于是我研究了一下Cisco交换机命令的大总结,在这里拿出来和大家分享一下,希望对大家有用。我所针对的都是Cisco的设备而言的,华为的可以跟据手册来查,配置都是差不多的,这里华子就不多写华为的设备了,了解的也不是很多。

Cisco交换机命令之使用Telnet远程式管理

switch(config)#interface vlan 1 进入vlan 1

switch(config-if)#ip address 设置IP地址

switch(config-if)#ip default-gateway 设置默认网关

switch(config)#line vty 0 4 进入虚拟终端

switch(config-line)#login 允许登录

switch(config-line)#password xx 设置登录口令

switch#exit 返回命令

Cisco交换机命令之控制台口令

switch(config)#line console 0 进入控制台口

switch(config-line)#login 允许登录

switch(config-line)#password xx 设置登录口令

switch#exit 返回命令

Cisco交换机命令之基本接口配置

switch(config)#interface f0/1 进入f0/1接口

switch(config-if)#plex full 配置全双工模式

switch(config-if)#speed 100 配置速率

switch(config-if)#description to ***** 接口描述

switch(config)#ip domain-name ***.com 设置或名服务器

switch(config)#mac-address-table aging-time 设置mac表超时时间

switch#write 保存配置信息

switch# running-config startup-config 保存当前配置nvram

switch#erase startup-config 清除配置文件

Cisco交换机命令之交换机VLAN设置:

switch#vlan database 进入VLAN设置

switch(vlan)#vlan 2 建VLAN 2

switch(vlan)#name 名字 建VLAN 2的名称

switch(vlan)#no vlan 2 删vlan 2

注:删除vlan时原属于此vlan的端口处于非激活状态,直到重新分配为止。

switch(config)#int f0/1 进入端口1

switch(config-if)#switchport mode access 当前端口工作莫试

switch(config-if)#switchport access vlan 2 当前端口加入vlan 2

switch(config-if)#switchport mode trunk 设置为干线

switch(config-if)#switchport trunk encapsulation dot1q 设置vlan 中继协议

switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干线

switch(config-if)#switchport trunk allowed vlan add 1,2 ; 从Trunk中添加vlans

switch(config-if)#switchport trunk allowed vlan remove 1,2 ;从Trunk中删除vlans

switch(config-if)#switchport trunk pruning vlan remove 1,2 ;从Trunk中关闭局部修剪

Cisco交换机命令之以太网通道配置

switch(config)#interface range fasternet0/1 - 2 将fasternet0/1和0/2 口捆绑

switch(config-if)#channel-group 1 mode on 配置以太通道模式

switch(config-if)#port-channel load-balance {dst-mac | src-mac}在链路间实现负载均衡

switch#show etherchannel 1 summary 查看通道信息

switch#show etherchannel load-balance 查看通道信息

Cisco交换机命令之vtp配置

switch(config)#vtp domain 设置vtp域名

switch(config)#vtp password 设置vtp密码

switch(config)#vtp mode server 设置vtp服务器模式

switch(config)#vtp mode client 设置vtp客户机模式

switch(config)#vtp mode transparent 设置vtp 透明模式

switch(config)#vtp version 设置vtp版本

switch(config)#vtp pruning 启用vtp修解

switch(config)#no vtp pruning 关闭vtp修解

注:要想从vtp中减少一台交换机只需将该交换机vtp 名更改

Cisco交换机命令之生成树stp:

switch(config)#spanning-tree vlan 启用stp生成树(基于vlan)

switch(config)#spanning-tree vlan root primary 指定根交换机(基于vlan)

switch(config)#spanning-tree vlan root secondary 指定备用根交换机(基于vlan)

switch(config)#spanning-tree vlan priority 指定交换机优先级(基于vlan)

switch(config)#no spanning-tree vlan priority 将交换机的优先级恢复默认值(基于vlan)

switch(config-if)#spanning-tree vlan cost 指定端口成本(起用trunk的端口模式下)

switch(config-if)#spanning-tree vlan port-prioty 指定交换机端口优先级(基于vlan)

switch(config-if)#spanning-tree portfast 配置速端口(连接终端设备的端口状态)如pc机

switch(config)#spanning-tree uplinkfast 配置上行速端口

switch(config)#spanning-tree vlan hello-time 配置交换机hello时间(基于vlan)

switch(config)#spanning-tree vlan forward-time 修改转发延迟计时器(基于vlan)

switch(config)#spanning-tree vlan max-time 修改最大老化时间(基于vlan)

switch#show spanning-tree summery 检测vlan生成树配置

switch#show spanning-tree vlan detail 浏览详细生成树配置信息

switch#show spanning-tree interface detail 浏览详细生成树端口配置信息

Cisco交换机命令之交换机显示命令:

switch#show vtp status 查看vtp配置信息

switch#show running-config 查看当前配置信息

switch#show vlan 查看vlan配置信息

switch#show interface 查看端口信息

switch#show int f0/0 查看指定端口信息

switch#dir flash: 查看闪存

switch#show version 查看当前版本信息

switch#show mac-address-table aging-time 查看mac超时时间

switch#show cdp cisco设备发现协议 (可以查看聆接设备)

switch#show cdp traffic 杳看接收和发送的cdp包统计信息

switch#show cdp neighbors 查看与该设备相邻的cisco设备

switch#show interface f0/1 switchport 查看有关switchport的配置

switch#show cdp neighbors 查看与该设备相邻的cisco设备

⑥ 思科交换机中删除以太网通道中的端口的命令是什么

前面加个NO就行了
如果你说的是portchannl的话,你看有几个接口加入这个通道中,分别在那些接口下把通道的配置前面加个NO
再输入一边

⑦ 组网配置交换机IP和路由器的命令

很简单,需要划分vlan么?你的情况一般都要划分vlan的,但是你没说明啊,不需要的话,只要连上线就好了

还有,交换机是不能配IP的,只有3层的,接口启用no swichport,以后才能配IP,而且你接口地址范围也没有- -

告诉你连线过程就好了:1.每一层,共20台,用直连线,连到电井的二层交换机,一般是2950或2960,没有vlan的话只要配置一个管理IP就好
>en
#conf t
#in vlan 1
#ip add 10.0.0.254 255.0.0.0
#no sh
#exi
#line vty 0 4
#no login
#end
就Ok,你下10层的二层交换机,将f0/24口留出来,用交叉线连到第一个3层交换机3524,因为没有vlan ,所以什么都不用配置;你上10层的二层交换机,同样将f0/24口留出来,用交叉线连到第二个3层交换机3524

将两台3层的f0/1接口留出来,互接,当然f0/2也可以留出来,再互接,然后配置以太网通道,将两条线逻辑上捆绑。

3曾配置命令和二层一样,没什么要配置的,以太网通道的命令这里省略了,不影响的

最后将第二台3524的f0/24接口接到路由器的e0接口上,线就布好了

如果有别的问题,或者配置vlan的话,网络hi我

补充:

首先因为没有电脑区域功能限制,没有划分Vlan的必要,这样好了,既然一层楼20个房间,划分2个Vlan好了,前10个划入Vlan1,后10个划入Vlan2。既然建了Vlan,那么交换机IP地址就不用你的范围了。

按照上文连线完成后,下10楼的2层交换机即“每层电井里的交换机”,设为SW_2L_1
命令(辅助配置如改名等略):
>en
#conf t
#vlan 10
#vlan 20
#exi

#in ra f0/2 - 11 接口2-11接每层1号房到10号房
#sw ac vlan 10
#sw mo ac
#exi

#in ra f0/12 - 21 接口12-21接每层11号房到20号房
#sw ac vlan 20
#sw mo ac
#exi

#in f0/24
#sw mo tru
#no sh
#exi
同上配置,每层楼的交换机配置一样的内容,一直配到SW_2L_20

完成后,在每台电脑上配置静态IP地址,1楼每台vlan 10的电脑,IP范围是192.168.0.2 - 11,2楼每台vlan 10的电脑,IP范围是192.168.0.12 - 21,以此类推,20楼每台vlan 10的电脑,IP范围是192.168.0.192 - 201。1楼每台vlan 20的电脑,IP范围是192.168.1.2 - 11,2楼每台vlan 20的电脑,IP范围是192.168.1.12 - 21,以此类推,20楼每台vlan 20的电脑,IP范围是192.168.1.192 - 201。子网为划分,都是24位子网,即255.255.255.0,注意,1-10楼,Vlan 10的主机的网关,是192.168.0.254,Vlan 20的主机的网关,是192.168.1.254,11-20楼,Vlan 10的主机的网关,是192.168.0.253,Vlan 20的主机的网关,是192.168.1.253,这里填错就不通!因为配置的是静态IP,没有在3层开启dhcp功能

配3层交换机,一共2台,设为SW_3L_1和SW_3L_2
在SW_3L_1上配置:
>en
#conf t
#vlan 10
#vlan 20
#exit

#in ra f0/3 - 12 3-12接口接1楼到10楼2层交换机的f0/24
#sw mo tru
#no sh
#exi

#ip routing

#in vlan 10
#ip add 192.168.0.254 255.255.255.0
#in vlan 20
#ip add 192.168.1.254 255.255.255.0

#router rip
#network 192.168.0.0
#network 192.168.1.0

构建以太网通道(可选)
#in ra f0/1 - 2
#channel-g 1 mo on

SW_2L_20:
>en
#conf t
#vlan 10
#vlan 20
#exit

#in ra f0/3 - 12 3-12接口接1楼到10楼2层交换机的f0/24
#sw mo tru
#no sh
#exi

#ip routing

#in vlan 10
#ip add 192.168.0.253 255.255.255.0
#in vlan 20
#ip add 192.168.1.253 255.255.255.0

#in f0/24
#no sw
#ip add 10.1.1.1 255.255.255.0
#no sh
#exi

#router rip
#net 192.168.0.0
#net 192.168.1.0
#net 10.1.1.0

构建以太网通道(可选)
#in ra f0/1 - 2
#channel-g 1 mo on

配置路由器,Router:
>en
#conf t
#in e0(就是接SW_3L_2的f0/24接口的接口)一般是e0,f0/0等这里设为e0
#ip add 10.1.1.2 255.255.255.0
#no sh
#exi

#router rip
#net 10.1.1.0
#exi

#ip route 192.168.0.0 255.255.255.0 10.1.1.1
#ip route 192.168.1.0 255.255.255.0 10.1.1.1

到此完成,以上全网互通的最基本的配置
如果还有别的问题,网络hi我

⑧ 华为 Quidway S5328C-EI以太网交换机配置命令

记得给我分啊

----------------------------------------
交换机命令
~~~~~~~~~~
[Quidway]dis cur ;显示当前配置
[Quidway]display current-configuration ;显示当前配置
[Quidway]display interfaces ;显示接口信息
[Quidway]display vlan all ;显示路由信息
[Quidway]display version ;显示版本信息

[Quidway]super password ;修改特权用户密码
[Quidway]sysname ;交换机命名
[Quidway]interface ethernet 0/1 ;进入接口视图
[Quidway]interface vlan x ;进入接口视图
[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址

[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关
[Quidway]rip ;三层交换支持
[Quidway]local-user ftp

[Quidway]user-interface vty 0 4 ;进入虚拟终端
[S3026-ui-vty0-4]authentication-mode password ;设置口令模式
[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令
[S3026-ui-vty0-4]user privilege level 3 ;用户级别

[Quidway]interface ethernet 0/1 ;进入端口模式
[Quidway]int e0/1 ;进入端口模式
[Quidway-Ethernet0/1]plex {half|full|auto} ;配置端口工作状态
[Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率
[Quidway-Ethernet0/1]flow-control ;配置端口流控
[Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式
[Quidway-Ethernet0/1]port access vlan 3 ;当前端口加入到VLAN
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN
[Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的PVID
[Quidway-Ethernet0/1]undo shutdown ;激活端口
[Quidway-Ethernet0/1]shutdown ;关闭端口
[Quidway-Ethernet0/1]quit ;返回

[Quidway]vlan 3 ;创建VLAN
[Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口
[Quidway-vlan3]port e0/1 ;简写方式
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口
[Quidway-vlan3]port e0/1 to e0/4 ;简写方式

[Quidway]monitor-port <interface_type interface_num> ;指定镜像端口
[Quidway]port mirror <interface_type interface_num> ;指定被镜像端口
[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像

[Quidway]description string ;指定VLAN描述字符
[Quidway]description ;删除VLAN描述字符
[Quidway]display vlan [vlan_id] ;查看VLAN设置

[Quidway]stp {enable|disable} ;设置生成树,默认关闭
[Quidway]stp priority 4096 ;设置交换机的优先级
[Quidway]stp root {primary|secondary} ;设置为根或根的备份
[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费

[Quidway]link-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合
[Quidway]undo link-aggregation e0/1|all ; 始端口为通道号

[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan
[SwitchA]isolate-user-vlan <x> secondary <list> ;设置主vlan包括的子vlan
[Quidway-Ethernet0/2]port hybrid pvid vlan <id> ;设置vlan的pvid
[Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid
[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan
如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.
----------------------------------------

路由器命令
~~~~~~~~~~
[Quidway]display version ;显示版本信息
[Quidway]display current-configuration ;显示当前配置
[Quidway]display interfaces ;显示接口信息
[Quidway]display ip route ;显示路由信息

[Quidway]sysname aabbcc ;更改主机名
[Quidway]super passwrod 123456 ;设置口令
[Quidway]interface serial0 ;进入接口
[Quidway-serial0]ip address <ip> <mask|mask_len> ;配置端口IP地址
[Quidway-serial0]undo shutdown ;激活端口
[Quidway]link-protocol hdlc ;绑定hdlc协议
[Quidway]user-interface vty 0 4
[Quidway-ui-vty0-4]authentication-mode password
[Quidway-ui-vty0-4]set authentication-mode password simple 222
[Quidway-ui-vty0-4]user privilege level 3
[Quidway-ui-vty0-4]quit

[Quidway]debugging hdlc all serial0 ;显示所有信息
[Quidway]debugging hdlc event serial0 ;调试事件信息
[Quidway]debugging hdlc packet serial0 ;显示包的信息

静态路由:
[Quidway]ip route-static <ip><mask>{interface number|nexthop}[value][reject|blackhole]
例如:
[Quidway]ip route-static 129.1.0.0 16 10.0.0.2
[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2
[Quidway]ip route-static 129.1.0.0 16 Serial 2
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

动态路由:
[Quidway]rip ;设置动态路由
[Quidway]rip work ;设置工作允许
[Quidway]rip input ;设置入口允许
[Quidway]rip output ;设置出口允许
[Quidway-rip]network 1.0.0.0 ;设置交换路由网络
[Quidway-rip]network all ;设置与所有网络交换
[Quidway-rip]peer ip-address ;
[Quidway-rip]summary ;路由聚合
[Quidway]rip version 1 ;设置工作在版本1
[Quidway]rip version 2 multicast ;设版本2,多播方式
[Quidway-Ethernet0]rip split-horizon ;水平分隔

[Quidway]router id A.B.C.D ;配置路由器的ID
[Quidway]ospf enable ;启动OSPF协议
[Quidway-ospf]import-route direct ;引入直联路由
[Quidway-Serial0]ospf enable area <area_id> ;配置OSPF区域

标准访问列表命令格式如下:
acl <acl-number> [match-order config|auto] ;默认前者顺序匹配。
rule [normal|special]{permit|deny} [source source-addr source-wildcard|any]
例:
[Quidway]acl 10
[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255
[Quidway-acl-10]rule normal deny source any

扩展访问控制列表配置命令
配置TCP/UDP协议的扩展访问列表:
rule {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destination <ip wild>|any}
[operate]

配置ICMP协议的扩展访问列表:
rule {normal|special}{permit|deny}icmp source {<ip wild>|any]destination {<ip wild>|any]
[icmp-code] [logging]

扩展访问控制列表操作符的含义
equal portnumber ;等于
greater-than portnumber ;大于
less-than portnumber ;小于
not-equal portnumber ;不等
range portnumber1 portnumber2 ;区间

扩展访问控制列表举例
[Quidway]acl 101
[Quidway-acl-101]rule deny souce any destination any
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply

[Quidway]acl 102
[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0
[Quidway-acl-102]rule deny ip source any destination any

[Quidway]acl 103
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftp
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal www

[Quidway]firewall enable
[Quidway]firewall default permit|deny
[Quidway]int e0
[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound

地址转换配置举例
[Quidway]firewall enable
[Quidway]firewall default permit
[Quidway]acl 101 ;内部指定主机可以进入e0
[Quidway-acl-101]rule deny ip source any destination any
[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any
[Quidway-acl-101]quit
[Quidway]int e0
[Quidway-Ethernet0]firewall packet-filter 101 inbound

[Quidway]acl 102 ;外部特定主机和大于1024端口的数据包允许进入S0
[Quidway-acl-102]rule deny ip source any destination any
[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0
[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than
1024
[Quidway-acl-102]quit
[Quidway]int s0
[Quidway-Serial0]firewall packet-filter 102 inbound ;设202.38.160.1是路由器出口IP。

[Quidway-Serial0]nat outbound 101 interface ;是Easy ip,将acl 101允许的IP从本接口出时变换源地址。

内部服务器地址转换配置命令(静态nat):
nat server global <ip> [port] inside <ip> port [protocol] ;global_port不写时使用inside_port
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.1 ftp tcp
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.2 telnet tcp
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.3 www tcp

设有公网IP:202.38.160.101~202.38.160.103 可以使用。 ;对外访问(原例题)
[Quidway]nat address-group 202.38.160.101 202.38.160.103 pool1 ;建立地址池
[Quidway]acl 1
[Quidway-acl-1]rule permit source 10.110.10.0 0.0.0.255 ;指定允许的内部网络
[Quidway-acl-1]rule deny source any
[Quidway-acl-1]int serial 0
[Quidway-Serial0]nat outbound 1 address-group pool1 ;在s0口从地址池取出IP对外访问

[Quidway-Serial0]nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp
[Quidway-Serial0]nat server global 202.38.160.102 inside 10.110.10.2 www tcp
[Quidway-Serial0]nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcp
[Quidway-Serial0]nat server global 202.38.160.103 inside 10.110.10.4 smtp udp

PPP设置:
[Quidway-s0]link-protocol ppp ;默认的协议

PPP验证:
主验方:pap|chap
[Quidway]local-user q2 password {simple|cipher} hello ;路由器1
[Quidway]interface serial 0
[Quidway-serial0]ppp authentication-mode {pap|chap}
[Quidway-serial0]ppp chap user q1 ;pap时,没有此句

pap被验方:
[Quidway]interface serial 0 ;路由器2
[Quidway-serial0]ppp pap local-user q2 password {simple|cipher} hello

chap被验方:
[Quidway]interface serial 0 ;路由器2
[Quidway-serial0]ppp chap user q2 ;自己路由器名
[Quidway-serial0]local-user q1 password {simple|cipher} hello ;对方路由器名

帧中继frame-relay (二分册6-61)
[q1]fr switching
[q1]int s1
[q1-Serial1]ip address 192.168.34.51 255.255.255.0
[q1-Serial1]link-protocol fr ;封装帧中继协议
[q1-Serial1]fr interface-type dce
[q1-Serial1]fr dlci 100
[q1-Serial1]fr inarp
[q1-Serial1]fr map ip 192.168.34.52 dlci 100

[q2]int s1
[q2-Serial1]ip address 192.168.34.52 255.255.255.0
[q2-Serial1]link-protocol fr
[q2-Serial1]fr interface-type dte
[q2-Serial1]fr dlci 100
[q2-Serial1]fr inarp
[q2-Serial1]fr map ip 192.168.34.51 dlci 100

帧中继监测
[q1]display fr lmi-info[]interface type number]
[q1]display fr map
[q1]display fr pvc-info[serial interface-number][dlci dlci-number]
[q1]display fr dlci-switch
[q1]display fr interface
[q1]reset fr inarp-info
[q1]debugging fr all[interface type number]
[q1]debugging fr arp[interface type number]
[q1]debugging fr event[interface type number]
[q1]debugging fr lmi[interface type number]

⑨ 二层以太网通道和三层以太网通道的区别

三层交换器开启路由,如果你看得懂配置的话,可以找到一条IP routing 的命令,如果网闸设置在二层,那么三层交换器就不需要IP,反之就需要

⑩ 以太网交换机配置命令

交换机配置命令华为,思科,北电,迈普等配置命令各有不同,以下先以思科设备为例:

switch> 用户模式
1:进入特权模式 enable
switch> enable
switch#

2:进入全局配置模式 configure terminal
switch> enable
switch#configure terminal
switch(conf)#

3:交换机命名 hostname aptech2950 以aptech2950为例
switch> enable
switch#configure terminal
switch(conf)#hostname aptch-2950
aptech2950(conf)#

4:配置使能口令 enable password cisco 以cisco为例
switch> enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# enable password cisco

5:配置使能密码 enable secret ciscolab 以cicsolab为例
switch> enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# enable secret ciscolab

6:设置虚拟局域网vlan 1 interface vlan 1 和网关地址
switch> enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# interface vlan 1
aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码
aptech2950(conf-if)#no shut 是配置处于运行中
aptech2950(conf-if)#exit
aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址

7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例
switch> enable
switch#configure terminal
switch(conf)#hostname aptch2950
aptech2950(conf)# interface fastehernet 0/17
aptech2950(conf-if)#

8:查看命令 show
switch> enable
switch# show version 察看系统中的所有版本信息
show interface vlan 1 查看交换机有关ip 协议的配置信息
show running-configure 查看交换机当前起作用的配置信息
show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息
show mac-address-table 查看mac地址表
show mac-address-table aging-time 查看mac地址表自动老化时间

9:交换机恢复出厂默认恢复命令
switch> enable
switch# erase startup-configure
switch# reload

10:双工模式设置
switch> enable
switch#configure terminal
switch2950(conf)#hostname aptch-2950
aptech2950(conf)# interface fastehernet 0/17 以17端口为例
aptech2950(conf-if)#plex full/half/auto 有full , half, auto 三个可选项

11:cdp相关命令
switch> enable
switch# show cdp 查看设备的cdp全局配置信息
show cdp interface fastethernet 0/17 查看17端口的cdp配置信息
show cdp traffic 查看有关cdp包的统计信息
show cdp nerghbors 列出与设备相连的cisco设备

12:csico2950的密码恢复
拔下交换机电源线。
用手按着交换机的MODE键,插上电源线
在switch:后执行flash_ini命令:switch: flash_ini
查看flash中的文件: switch: dir flash:
把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old
执行boot: switch: boot
交换机进入是否进入配置的对话,执行no :
进入特权模式察看flash里的文件: show flash :
把“config.old”文件改名为 “config.text”: switch: rename flash: config.old flash: config.text
把“config.text”拷入系统的“running-configure”: flash: config.text system : running-configure
把配置模式重新设置密码存盘,密码恢复成功。

13:交换机telnet远程登录设置:
switch>en
switch#configure terminal
switch(conf)#hostname aptech-2950
aptech2950(conf)#enable password cisco 以cisco为特权模式密码
aptech2950(conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口
aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0
aptech2950(conf-if)#no shut
aptech2950(conf-if)#exit
aptech2950(conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆
aptech2950(conf-line)#login
aptech2950(conf-line)#password edge 以edge为远程登录的用户密码
主机设置:
ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段
netmask 255.255.255.0
gate-way 192.168.1.1 网关地址是交换机端口地址
运行:
telnet 192.168.1.1
进入telnet远程登录界面
password : edge
aptech2950>en
password: cisco
aptech#

14:交换机配置的重新载入和保存
设置完成交换机的配置后:
aptech2950(conf)#reload
是否保存(y/n) y: 保存设置信息 n:不保存设置信息

15:保存
aptech2950(conf)#wr

另外:思科是没有中文格式的,华为和迈普有,以下以华为改成中文模式为例:

<Quidway> language-mode chinese
Change language mode, confirm? [Y/N]y
改变到中文模式

阅读全文

与以太网通道命令相关的资料

热点内容
wbgt接触时间率的算法 浏览:758
服务器被关闭怎么取消 浏览:311
怎么用内网开服务器地址 浏览:561
电子商务filetypepdf 浏览:352
linuxsoap安装 浏览:497
c网络编程书籍推荐 浏览:846
win10自动关机命令 浏览:311
海康服务器怎么改硬盘模式 浏览:816
app后台运行android 浏览:348
对象存储算法 浏览:736
sql命令中条件子句的关键词 浏览:516
贵阳微乐麻将胡牌算法 浏览:708
光纤的服务器是什么意思 浏览:882
iphone终端命令 浏览:176
visualc教程pdf 浏览:521
ad适合练什么app 浏览:162
基于单片机的温度报警器的设计 浏览:119
androidview复制 浏览:427
东北最简单的挡光算法 浏览:86
为什么app都要获取你位置信息 浏览:156