導航:首頁 > 程序命令 > 乙太網通道命令

乙太網通道命令

發布時間: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
改變到中文模式

閱讀全文

與乙太網通道命令相關的資料

熱點內容
對象存儲演算法 瀏覽:734
sql命令中條件子句的關鍵詞 瀏覽:514
貴陽微樂麻將胡牌演算法 瀏覽:706
光纖的伺服器是什麼意思 瀏覽:880
iphone終端命令 瀏覽:176
visualc教程pdf 瀏覽:521
ad適合練什麼app 瀏覽:162
基於單片機的溫度報警器的設計 瀏覽:119
androidview復制 瀏覽:427
東北最簡單的擋光演算法 瀏覽:86
為什麼app都要獲取你位置信息 瀏覽:156
app維護的人是干什麼的 瀏覽:964
埃及雲伺服器怎麼租 瀏覽:342
醫療電子憑證是什麼app 瀏覽:16
javanat穿透 瀏覽:337
java數組索引值 瀏覽:92
程序員的數學21邏輯 瀏覽:918
程序員搞足球 瀏覽:36
發送文件加密了怎麼辦 瀏覽:424
程序員幫忙解決問題的有趣圖片 瀏覽:280