中文字幕在线一区二区在线,久久久精品免费观看国产,无码日日模日日碰夜夜爽,天堂av在线最新版在线,日韩美精品无码一本二本三本,麻豆精品三级国产国语,精品无码AⅤ片,国产区在线观看视频

      思科交換機基本配置命令

      時間:2023-06-10 14:14:07 思科認證 我要投稿
      • 相關推薦

      思科交換機基本配置命令大全

        CISCO交換機有什么基本配置命令呢?下面yjbys小編為大家分享最新思科交換機配置命令大全,希望對大家學習思科認證有所幫助!

        CISCO交換機基本配置:Console端口連接

        用戶模式hostname# ;

        特權模式hostname(config)# ;

        全局配置模式hostname(config-if)# ;

        交換機口令設置:

        switch>enable ;進入特權模式

        switch#config terminal ;進入全局配置模式

        switch(config)#hostname csico ;設置交換機的主機名

        switch(config)#enable secret csico1 ;設置特權加密口令

        switch(config)#enable password csico8 ;設置特權非密口令

        switch(config)#line console 0 ;進入控制臺口

        switch(config-line)#line vty 0 4 ;進入虛擬終端

        switch(config-line)#login ;虛擬終端允許登錄

        switch(config-line)#password csico6 ;設置虛擬終端登錄口令csico6

        switch#exit ;返回命令

        交換機VLAN創建,刪除,端口屬性的設置,配置trunk端口,將某端口加入vlan中,配置VTP:

        switch#vlan database ;進入VLAN設置

        switch(vlan)#vlan 2 ;建VLAN 2

        switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名為vlan3

        switch(vlan)#no vlan 2 ;刪vlan 2

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

        switch(config)#speed ? 查看speed命令的子命令

        switch(config)#speed 100 設置該端口速率為100mb/s (10/auto)

        switch(config)#duplex ? 查看duplex的子命令

        switch(config)#duplex full 設置該端口為全雙工(auto/half)

        switch(config)#description TO_PC1 這是該端口描述為TO_PC1

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

        switch(config-if)#switchport mode trunk ;設置為trunk模式(access模式)

        switch(config-if)#switchport trunk allowed vlan 1,2 ;設置允許的vlan

        switch(config-if)#switchport trunk encap dot1q ;設置vlan 中繼

        switch(config)#vtp domain vtpserver ;設置vtp域名相同

        switch(config)#vtp password ;設置發vtp密碼

        switch(config)#vtp server ;設置vtp服務器模式

        switch(config)#vtp client ;設置vtp客戶機模式

        交換機設置IP地址,默認網關,域名,域名服務器,配置和查看MAC地址表:

        switch(config)#interface vlan 1 ;進入vlan 1

        switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;設置IP地址

        switch(config)#ip default-gateway 192.168.1.6 ;設置默認網關

        switch(config)#ip domain-name cisco.com 設置域名

        switch(config)#ip name-server 192.168.1.18 設置域名服務器

        switch(config)#mac-address-table? 查看mac-address-table的子命令

        switch(config)#mac-address-table aging-time 100 設置超時時間為100ms

        switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口

        switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入靜態地址目標端口f0/6源端口f0/7

        switch(config)#end

        switch#show mac-address-table 查看整個MAC地址表

        switch#clear mac-address-table restricted static 清除限制性靜態地址

        交換機顯示命令:

        switch#write ;保存配置信息

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

        switch#show run ;查看當前配置信息

        switch#show vlan ;查看vlan配置信息

        switch#show interface ;查看端口信息

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

        switch#show int f0/0 status;查看指定端口狀態

        switch#dir flash: ;查看閃存

        (1)模式轉換命令

        用戶模式----特權模式,使用命令"enable"

        特權模式----全局配置模式,使用命令"config t"

        全局配置模式----接口模式,使用命令"interface+接口類型+接口號"

        全局配置模式----線控模式,使用命令"line+接口類型+接口號"

        注:

        用戶模式:查看初始化的信息.

        特權模式:查看所有信息、調試、保存配置信息

        全局模式:配置所有信息、針對整個路由器或交換機的所有接口

        接口模式:針對某一個接口的配置

        線控模式:對路由器進行控制的接口配置

        (2)配置命令

        show running config 顯示所有的配置

        show versin 顯示版本號和寄存器值

        shut down 關閉接口

        no shutdown 打開接口

        ip add +ip地址 配置IP地址

        secondary+IP地址 為接口配置第二個IP地址

        show interface+接口類型+接口號 查看接口管理性

        show controllers interface 查看接口是否有DCE電纜

        show history 查看歷史記錄

        show terminal 查看終端記錄大小

        hostname+主機名 配置路由器或交換機的標識

        config memory 修改保存在NVRAM中的啟動配置

        exec timeout 0 0 設置控制臺會話超時為0

        service password-encryptin 手工加密所有密碼

        enable password +密碼 配置明文密碼

        ena sec +密碼 配置密文密碼

        line vty 0 4/15 進入telnet接口

        password +密碼 配置telnet密碼

        line aux 0 進入AUX接口

        password +密碼 配置密碼

        line con 0 進入CON接口

        password +密碼 配置密碼

        bandwidth+數字 配置帶寬

        no ip address 刪除已配置的IP地址

        show startup config 查看NVRAM中的配置信息

        copy run-config atartup config 保存信息到NVRAM

        write 保存信息到NVRAM

        erase startup-config 清除NVRAM中的配置信息

        show ip interface brief 查看接口的謫要信息

        banner motd # +信息 + # 配置路由器或交換機的描素信息

        description+信息 配置接口聽描素信息

        vlan database 進入VLAN數據庫模式

        vlan +vlan號+ 名稱 創建VLAN

        switchport access vlan +vlan號 為VLAN為配接口

        interface vlan +vlan號 進入VLAN接口模式

        ip add +ip地址 為VLAN配置管理IP地址

        vtp+service/tracsparent/client 配置SW的VTP工作模式

        vtp +domain+域名 配置SW的VTP域名

        vtp +password +密碼 配置SW的密碼

        switchport mode trunk 啟用中繼

        no vlan +vlan號 刪除VLAN

        show spamming-tree vlan +vlan號 查看VLA怕生成樹議

        2. 路由器配置命令

        ip route+非直連網段+子網掩碼+下一跳地址 配置靜態/默認路由

        show ip route 查看路由表

        show protocols 顯示出所有的被動路由協議和接口上哪些協議被設置

        show ip protocols 顯示了被配置在路由器上的路由選擇協議,同時給出了在路由選擇協議中使用的定時器等信息

        router rip 激活RIP協議

        network +直連網段 發布直連網段

        interface lookback 0 激活邏輯接口

        passive-interface +接口類型+接口號 配置接口為被動模式

        debug ip +協議 動態查看路由更新信息

        undebug all 關閉所有DEBUG信息

        router eigrp +as號 激活EIGRP路由協議

        network +網段+子網掩碼 發布直連網段

        show ip eigrp neighbors 查看鄰居表

        show ip eigrp topology 查看拓撲表

        show ip eigrp traffic 查看發送包數量

        router ospf +process-ID 激活OSPF協議

        network+直連網段+area+區域號 發布直連網段

        show ip ospf 顯示OSPF的進程號和ROUTER-ID

        encapsulation+封裝格式 更改封裝格式

        no ip admain-lookup 關閉路由器的域名查找

        ip routing 在三層交換機上啟用路由功能

        show user 查看SW的在線用戶

        clear line +線路號 清除線路

        3. 三層交換機配置命令

        配置一組二層端口

        configure terminal 進入配置狀態

        nterface range {port-range} 進入組配置狀態

        配置三層端口

        configure terminal 進入配置狀態

        interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-

        channel port-channel-number} 進入端口配置狀態

        no switchport 把物理端口變成三層口

        ip address ip_address subnet_mask 配置IP地址和掩碼

        no shutdown 激活端口

        例:

        Switch(config)# interface gigabitethernet0/2

        Switch(config-if)# no switchport

        Switch(config-if)# ip address 192.20.135.21 255.255.255.0

        Switch(config-if)# no shutdown

        配置VLAN

        configure terminal 進入配置狀態

        vlan vlan-id 輸入一個VLAN號, 然后進入vlan配態,可以輸入一個新的VLAN號或舊的來進行修改。

        name vlan-name 可選)輸入一個VLAN名,如果沒有配置VLAN名,缺省的名字是VLAN號前面用0填滿的4位數,如VLAN0004是VLAN4的缺省名字

        mtu mtu-size (可選) 改變MTU大小

        例

        Switch# configure terminal

        Switch(config)# vlan 20

        Switch(config-vlan)# name test20

        Switch(config-vlan)# end

        或

        Switch# vlan database

        Switch(vlan)# vlan 20 name test20

        Switch(vlan)# exit

        將端口分配給一個VLAN

        configure terminal 進入配置狀態

        interface interface-id 進入要分配的端口

        switchport mode access 定義二層口

        switchport access vlan vlan-id 把端口分配給某一VLAN

        例

        Switch# configure terminal

        Enter configuration commands, one per line. End with CNTL/Z.

        Switch(config)# interface fastethernet0/1

        Switch(config-if)# switchport mode access

        Switch(config-if)# switchport access vlan 2

        Switch(config-if)# end

        Switch#

        配置VLAN trunk

        configure terminal 進入配置狀態

        interface interface-Id 進入端口配置狀態

        switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封裝ISL 或 802.1Q 或自動協商

        switchport mode {dynamic {auto | desirable} | trunk} 配置二層trunk模式。

        dynamic auto—自動協商是否成為trunk

        dynamic desirable—把端口設置為trunk如果對方端口是trunk, desirable, 配置Native VLAN

        (802.1q)

        或自動模式,trunk—設置端口為強制的trunk方式,而不理會對方端口是否為trunk

        switchport access vlan vlan-id 可選) 指定一個缺省VLAN, 如果此端口不再是trunk

        switchport trunk native vlan vlan-id 指定802.1Q native VLAN號

        例:

        Switch# configure terminal

        Enter configuration commands, one per line. End with CNTL/Z.

        Switch(config)# interface fastethernet0/4

        Switch(config-if)# switchport mode trunk

        Switch(config-if)# switchport trunk encapsulation dot1q

        Switch(config-if)# end

        定義TRUNK允許的VLAN

        configure terminal子 進入配置狀態

        interface interface-id 進入端口配置

        switchport mode trunk 配置二層口為trunk

        switchport trunk allowed vlan {add | all | except | remove} vlan-list可選) 配置trunk允

        許的VLAN.使用add, all, except, remove關健字

        no switchport trunk allowed vlan 允許所有VLAN通過

        例

        Switch(config)# interface fastethernet0/1

        Switch(config-if)# switchport trunk allowed vlan remove 2

        Switch(config-if)# end

        配置Native VLAN(802.1q)

        configure terminal 進入配置狀態

        interface interface-id 進入配置成802.1qtrunk的端口

        switchport trunk native vlan vlan-Id 配置native VLAN號

        no switchport trunk native vlan 端口配置命令回到缺省的狀態

        配置基于端口權值的負載均衡

        configure terminal 進入Switch 1配置狀態

        vtp domain domain-name 配置VTP域

        vtp mode server 將Switch 1配置成VTP server.

        show vtp status 驗證VTP的配置

        show vlan 驗證VLAN

        configure terminal 進入配置狀態

        interface fastethernet 0/1 進入F0/1端口

        switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封裝

        switchport mode trunk 配置成trunk

        show interfaces fastethernet0/1 switchport 驗證VLAN配置

        按以上步驟對想要負載均衡的接口進行配置

        在另一個交換機上進行此配置

        show vlan 當trunk已經起來,在switch2上驗證已經學到相的vlan配置

        configure terminal 在Switch 1上進入配置狀態

        interface fastethernet0/1 進入要配置的端口

        spanning-tree vlan 8 port-priority 10 將端口權值10賦與VLAN 8.

        spanning-tree vlan 9 port-priority 10 將端口權值10賦與VLAN 9.

        spanning-tree vlan 10 port-priority 10 將端口權值10賦與VLAN 10.

        interface fastethernet0/2 進入F0/2

        spanning-tree vlan 3 port-priority 10 將端口權值10賦與VLAN 3.

        spanning-tree vlan 4 port-priority 10 將端口權值10賦與VLAN 4

        spanning-tree vlan 5 port-priority 10 將端口權值10賦與VLAN 5

        spanning-tree vlan 6 port-priority 10 將端口權值10賦與VLAN 10

        end 退出

        show running-config 驗證配置

        copy running-config startup-config 保存配置

        配置STP路徑值的負載均衡

        Trunk1走VLAN8-10,Trunk2走VLAN2-4

        configure terminal 進入 Switch 1配置狀態

        interface fastethernet 0/1 進入F0/1

        switchport trunk encapsulation {isl | dot1q | negotiate}配置封裝

        switchport mode trunk 配置Trunk,缺省是ISL封裝

        exit 退回

        在F0/2口上重復2-4步驟

        exit 退回

        show running-config 驗證配置

        show vlan驗證switch1 已經學到Vlan

        configure terminal 進入配置狀態

        interface fastethernet 0/1 進入F0/1

        spanning-tree vlan 2 cost 30 設置Vlan2生成樹路徑值為30

        spanning-tree vlan 3 cost 30 設置Vlan3生成樹路徑值為30

        spanning-tree vlan 4 cost 30 設置Vlan4生成樹路徑值為30

        end 退出

        在switch1的F0/2上重復9-11步驟設置VLAN8,9,10生成樹路徑值為30

        end 退出

        show running-config 驗證配置

        copy running-config startup-config 保存配置

        補充:CISCO命令集——路由選擇協議及排障

        *ip route命令

        Router(config)# ip route <目錄網絡或子網號> [子網掩碼] <下一路由器IP地址 | 從本地出口

        的地址> [管理距離0~255,默認為1]

        (注:靜態地址配置)

        *ip default-network命令

        Router(config)# ip default-network <目標網絡號>

        (注:配合路由協使用,用其中的一個動態路由號作默認路由配置)

        Router(config)# ip route 0.0.0.0 0.0.0.0 <下一路由器ip地址>

        (注:只有一個公網地址時,在出口路由器上的配置)

        *內部路由選擇協議

        *使用router和network命令

        Router(config)# router <路由協議rip igrp="" eigrp="" ospf=""> [自主系統號]

        Router(config-router)# network <直接相連的要用此路由協議的網絡號>

        Router(config-router)# network <直接相連的要用此路由協議的網絡號>

        *路由信息協議RIP

        Router(config)# router rip

        Router(config-router)# network <直接相連的要用rip協議的有類別網絡號>

        Router# show ip protocols

        Router# show ip route

        Router# debug ip rip

        *內部網關路由協議IGRP

        Router(config)# router igrp <自主系統號>

        Router(config-router)# network <直接相連的要用igrp協議的有類別網絡號>

        Router# show ip interface

        Router# show ip protocols

        Router# show ip route

        Router# debug ip rip

        *排除網絡故障

        排除網絡故障的一個總體模型

        Router# ping <有故障的主機>

        Router# show ip route

        Router# show interface <有故障的接口>

        Router# show run

        *IP的故故障排除

        檢查可用的路由

        Router# show ip route <有故障的ip地址>

        27.4.4 跟蹤路由(Tracing the Route)

        SUN-A> traceroute <有故障的主機>

        C:/windows/> winipcfg

        C:/windows/> ipconfig

        C:/windows/> ipconfig / all

        C:/windows/> tracert <有故障的主機>

        使用擴展的ping來跟蹤連接性

        Router# ping

        *其它可能的故障

        一個地址解析(ARP)的故障

        Router# show arp

        Router# show interface <有故障的接口>

        C:/windows/> arp -a

        SUN-A> arp –a

        驗證終端系統的路由表

        C:/windows/> netstat –rn

        C:/windows/> route –f add 0.0.0.0 mask 0.0.0.0 <需要添加入的網關地址>

        C:/windows/> route [–f ] [[print | add | | change] [destination] [mask

        netmask] [gateway]]

        C:/windows/> route add mask <網絡掩碼> <網關ip地址>

        C:/windows/> route mask <網絡掩碼> <網關ip地址>

        C:/windows/> nbtstat <相應的參數>

        SUN-A> netstat -rn路由器

        CISCO交換機配置命令大全2009-08-13 21:131.在基于IOS的交換機上設置主機名/系統名:

        switch(config)# hostname hostname

        在基于CLI的交換機上設置主機名/系統名:

        switch(enable) set system name name-string

        2.在基于IOS的交換機上設置登錄口令:

        switch(config)# enable password level 1 password

        在基于CLI的交換機上設置登錄口令:

        switch(enable) set password

        switch(enable) set enalbepass

        3.在基于IOS的交換機上設置遠程訪問:

        switch(config)# interface vlan 1

        switch(config-if)# ip address ip-address netmask

        switch(config-if)# ip default-gateway ip-address

        在基于CLI的交換機上設置遠程訪問:

        switch(enable) set interface sc0 ip-address netmask broadcast-address

        switch(enable) set interface sc0 vlan

        switch(enable) set ip route default gateway

        4.在基于IOS的交換機上啟用和瀏覽CDP信息:

        switch(config-if)# cdp enable

        switch(config-if)# no cdp enable

        為了查看Cisco鄰接設備的CDP通告信息:

        switch# show cdp interface [type modle/port]

        switch# show cdp neighbors [type module/port] [detail]

        在基于CLI的交換機上啟用和瀏覽CDP信息:

        switch(enable) set cdp {enable|disable} module/port

        為了查看Cisco鄰接設備的CDP通告信息:

        switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]

        5.基于IOS的交換機的端口描述:

        switch(config-if)# description description-string

        基于CLI的交換機的端口描述:

        switch(enable)set port name module/number description-string

        6.在基于IOS的交換機上設置端口速度:

        switch(config-if)# speed{10|100|auto}

        在基于CLI的交換機上設置端口速度:

        switch(enable) set port speed moudle/number {10|100|auto}

        switch(enable) set port speed moudle/number {4|16|auto}

        7.在基于IOS的交換機上設置以太網的鏈路模式:

        switch(config-if)# duplex {auto|full|half}

        在基于CLI的交換機上設置以太網的鏈路模式:

        switch(enable) set port duplex module/number {full|half}

        8.在基于IOS的交換機上配置靜態VLAN:

        switch# vlan database

        switch(vlan)# vlan vlan-num name vla

        switch(vlan)# exit

        switch# configure teriminal

        switch(config)# interface interface module/number  switch(config-if)# switchport mode access

        switch(config-if)# switchport access vlan vlan-num

        switch(config-if)# end

        在基于CLI的交換機上配置靜態VLAN:

        switch(enable) set vlan vlan-num [name name]

        switch(enable) set vlan vlan-num mod-num/port-list

        9. 在基于IOS的交換機上配置VLAN中繼線:

        switch(config)# interface interface mod/port

        switch(config-if)# switchport mode trunk

        switch(config-if)# switchport trunk encapsulation {isl|dotlq}

        switch(config-if)# switchport trunk allowed vlan remove vlan-list

        switch(config-if)# switchport trunk allowed vlan add vlan-list

        在基于CLI的交換機上配置VLAN中繼線:

        switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]

        Vlan-range [isl|dotlq|dotl0|lane|negotiate]

        10.在基于IOS的交換機上配置VTP管理域:

        switch# vlan database

        switch(vlan)# vtp domain domain-name

        在基于CLI的交換機上配置VTP管理域:

        switch(enable) set vtp [domain domain-name]

        11.在基于IOS的交換機上配置VTP 模式:

        switch# vlan database

        switch(vlan)# vtp domain domain-name

        switch(vlan)# vtp {sever|cilent|transparent}

        switch(vlan)# vtp password password

        在基于CLI的交換機上配置VTP 模式:

        switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]

        12. 在基于IOS的交換機上配置VTP版本:

        switch# vlan database

        switch(vlan)# vtp v2-mode

        在基于CLI的交換機上配置VTP版本:

        switch(enable) set vtp v2 enable

        13. 在基于IOS的交換機上啟動VTP剪裁:

        switch# vlan database

        switch(vlan)# vtp pruning

        在基于CL I 的交換機上啟動VTP剪裁:

        switch(enable) set vtp pruning enable

        14.在基于IOS的交換機上配置以太信道:

        switch(config-if)# port group group-number [distribution {source|destination}]

        在基于CLI的交換機上配置以太信道:

        switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}

        15.在基于IOS的交換機上調整根路徑成本:

        switch(config-if)# spanning-tree [vlan vlan-list] cost cost

        在基于CLI的交換機上調整根路徑成本:

        switch(enable) set spantree portcost moudle/port cost

        switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

        16.在基于IOS的交換機上調整端口ID:

        switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

        在基于CLI的交換機上調整端口ID:

        switch(enable) set spantree portpri {mldule/port}priority

        switch(enable) set spantree portvlanpri {module/port}priority [vlans]

        17. 在基于IOS的交換機上修改STP時鐘:

        switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

        switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

        ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds

        在基于CLI的交換機上修改STP時鐘:

        switch(enable) set spantree hello interval[vlan]

        switch(enable) set spantree fwddelay delay [vlan]

        switch(enable) set spantree maxage agingtiame[vlan]

        18. 在基于IOS的交換機端口上啟用或禁用Port Fast 特征:

        switch(config-if)#spanning-tree portfast

        在基于CLI的交換機端口上啟用或禁用Port Fast 特征:

        switch(enable) set spantree portfast {module/port}{enable|disable}

        19. 在基于IOS的交換機端口上啟用或禁用UplinkFast 特征:

        switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

        在基于CLI的交換機端口上啟用或禁用UplinkFast 特征:

        switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

        20. 為了將交換機配置成一個集群的命令交換機,首先要給管理接口分配一個IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name

        21. 為了從一條中繼鏈路上刪除VLAN,可使用下列命令:

        switch(enable) clear trunk module/port vlan-range

        22. 用show vtp domain 顯示管理域的VTP參數.

        23. 用show vtp statistics顯示管理域的VTP參數.

        24. 在Catalyst交換機上定義TrBRF的命令如下:

        switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]

        25. 在Catalyst交換機上定義TrCRF的命令如下:

        switch (enable) set vlan vlan-num [name name] type trcrf

        {ring hex-ring-num|decring decimal-ring-num} parent vlan-num

        26. 在創建好TrBRF VLAN之后,就可以給它分配交換機端口.對于以太網交換,可以采用如下命令給VLAN分配端口:

        switch(enable) set vlan vlan-num mod-num/port-num

        27. 命令show spantree顯示一個交換機端口的STP狀態.

        28. 配置一個ELAN的LES和BUS,可以使用下列命令:

        ATM (config)# interface atm number.subint multioint

        ATM(config-subif)# lane serber-bus ethernet elan-name

        29. 配置LECS:

        ATM(config)# lane database database-name

        ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address

        ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address

        ATM(lane-config-databade)# name …

        30. 創建完數據庫后,必須在主接口上啟動LECS.命令如下:

        ATM(config)# interface atm number

        ATM(config-if)# lane config database database-name

        ATM(config-if)# lane config auto-config-atm-address

        31. 將每個LEC配置到一個不同的ATM子接口上.命令如下:

        ATM(config)# interface atm number.subint multipoint

        ATM(config)# lane client ethernet vlan-num elan-num

        32. 用show lane server 顯示LES的狀態.

        33. 用show lane bus顯示bus的狀態.

        34. 用show lane database顯示LECS數據庫可內容.

        35. 用show lane client顯示LEC的狀態.

        36. 用show module顯示已安裝的模塊列表.

        37. 用物理接口建立與VLAN的連接:

        router# configure terminal

        router(config)# interface media module/port

        router(config-if)# description description-string

        router(config-if)# ip address ip-addr subnet-mask

        router(config-if)# no shutdown

        38. 用中繼鏈路來建立與VLAN的連接:

        router(config)# interface module/port.subinterface

        router(config-ig)# encapsulation[isl|dotlq] vlan-number

        router(config-if)# ip address ip-address subnet-mask

        39. 用LANE 來建立與VLAN的連接:

        router(config)# interface atm module/port

        router(config-if)# no ip address

        router(config-if)# atm pvc 1 0 5 qsaal

        router(config-if)# atm pvc 2 0 16 ilni

        router(config-if)# interface atm module/port.subinterface multipoint

        router(config-if)# ip address ip-address subnet-mask

        router(config-if)# lane client ethernet elan-num

        router(config-if)# interface atm module/port.subinterface multipoint

        router(config-if)# ip address ip-address subnet-name

        router(config-if)# lane client ethernet elan-name

        router(config-if)# …

        40. 為了在路由處理器上進行動態路由配置,可以用下列IOS命令來進行:

        router(config)# ip routing

        router(config)# router ip-routing-protocol

        router(config-router)# network ip-network-number

        router(config-router)# network ip-network-number

        41. 配置默認路由:

        switch(enable) set ip route default gateway

        42. 為一個路由處理器分配VLANID,可在接口模式下使用下列命令:

        router(config)# interface interface number

        router(config-if)# mls rp vlan-id vlan-id-num

        43. 在路由處理器啟用MLSP:

        router(config)# mls rp ip

        44. 為了把一個外置的路由處理器接口和交換機安置在同一個VTP域中:

        router(config)# interface interface number

        router(config-if)# mls rp vtp-domain domain-name

        45. 查看指定的VTP域的信息:

        router# show mls rp vtp-domain vtp domain name

        46. 要確定RSM或路由器上的管理接口,可以在接口模式下輸入下列命令:

        router(config-if)#mls rp management-interface

        47. 要檢驗MLS-RP的配置情況:

        router# show mls rp

        48. 檢驗特定接口上的MLS配置:

        router# show mls rp interface interface number

        49. 為了在MLS-SE上設置流掩碼而又不想在任一個路由處理器接口上設置訪問列表:

        set mls flow [destination|destination-source|full]

        50. 為使MLS和輸入訪問列表可以兼容,可以在全局模式下使用下列命令:

        router(config)# mls rp ip input-acl

        51. 當某個交換機的第3層交換失效時,可在交換機的特權模式下輸入下列命令:

        switch(enable) set mls enable

        52. 若想改變老化時間的值,可在特權模式下輸入以下命令:

        switch(enable) set mls agingtime agingtime

        53. 設置快速老化:

        switch(enable) set mls agingtime fast fastagingtime pkt_threshold

        54. 確定那些MLS-RP和MLS-SE參與了MLS,可先顯示交換機引用列表中的內容再確定:

        switch(enable) show mls include

        55. 顯示MLS高速緩存記錄:

        switch(enable) show mls entry

        56. 用命令show in arp顯示ARP高速緩存區的內容。

        57. 要把路由器配置為HSRP備份組的成員,可以在接口配置模式下使用下面的命令:

        router(config-if)# standby group-number ip ip-address

        58. 為了使一個路由器重新恢復轉發路由器的角色,在接口配置模式下:

        router(config-if)# standy group-number preempt

        59. 訪問時間和保持時間參數是可配置的:

        router(config-if)# standy group-number timers hellotime holdtime

        60. 配置HSRP跟蹤:

        router(config-if)# standy group-number track type-number interface-priority

        61. 要顯示HSRP路由器的狀態:

        router# show standby type-number group brief

        62. 用命令show ip igmp確定當選的查詢器。

        63. 啟動IP組播路由選擇:

        router(config)# ip muticast-routing

        64. 啟動接口上的PIM:

        dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode}

        65. 啟動稀疏-稠密模式下的PIM:

        router# ip multicast-routing

        router# interface type number

        router# ip pim sparse-dense-mode

        66. 核實PIM的配置:

        dallasr1># show ip pim interface[type number] [count]

        67. 顯示PIM鄰居:

        dallasr1># show ip neighbor type number

        68. 為了配置RP的地址,命令如下:

        dallasr1># ip pim rp-address ip-address [group-access-list-number][override]

        69. 選擇一個默認的RP:

        dallasr1># ip pim rp-address

        通告RP和它所服務的組范圍:

        dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number

        為管理范圍組通告RP的地址:

        dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1

        dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255

        設定一個RP映像代理:

        dallasr1># ip pim send-rp-discovery scope ttl

        核實組到RP的映像:

        dallasr1># show ip pim rp mapping

        dallasr1># show ip pim rp [group-name|group-address] [mapping]

        70. 在路由器接口上用命令ip multicast ttl-threshold ttl-value設定TTL閥值:

        dallasr1>(config-if)# ip multicast ttl-threshold ttl-value

        71. 用show ip pim neighbor顯示PIM鄰居表。

        72. 顯示組播通信路由表中的各條記錄:

        dallasr1>show ip mroute [group-name|group-address][scoure][summary][count][active kbps]

        73. 要記錄一個路由器接受和發送的全部IP組播包:

        dallasr1> #debug ip mpacket [detail] [access-list][group]

        74. 要在CISCO路由器上配置CGMP:

        dallasr1>(config-if)# ip cgmp

        75.配置一個組播路由器,使之加入某一個特定的組播組:

        dallasr1>(config-if)# ip igmp join-group group-address

        76. 關閉 CGMP:

        dallasr1>(config-if)# no ip cgmp

        77. 啟動交換機上的CGMP:

        dallasr1>(enable) set cgmp enable

        78. 核實Catalyst交換機上CGMP的配置情況:

        catalystla1>(enable) show config

        set prompt catalystla1>

        set interface sc0 192.168.1.1 255.255.255.0

        set cgmp enable

        79. CGMP離開的設置:

        Dallas_SW(enable) set cgmp leave

        80. 在Cisco設備上修改控制端口密碼:

        R1(config)# line console 0

        R1(config-line)# login

        R1(config-line)# password Lisbon

        R1(config)# enable password Lilbao

        R1(config)# login local

        R1(config)# username student password cisco

        81. 在Cisco設備上設置控制臺及vty端口的會話超時:

        R1(config)# line console 0

        R1(config-line)# exec-timeout 5 10

        R1(config)# line vty 0 4

        R1(config-line)# exec-timeout 5 2

        82. 在Cisco設備上設定特權級:

        R1(config)# privilege configure level 3 username

        R1(config)# privilege configure level 3 copy run start

        R1(config)# privilege configure level 3 ping

        R1(config)# privilege configure level 3 show run

        R1(config)# enable secret level 3 cisco

        83. 使用命令privilege 可定義在該特權級下使用的命令:

        router(config)# privilege mode level level command

        84. 設定用戶特權級:

        router(config)# enable secret level 3 dallas

        router(config)# enable secret san-fran

        router(config)# username student password cisco

        85. 標志設置與顯示:

        R1(config)# banner motd ‘unauthorized access will be prosecuted!’

        86. 設置vty訪問:

        R1(config)# access-list 1 permit 192.168.2.5

        R1(config)# line vty 0 4

        R1(config)# access-class 1 in

        87. 配置HTTP訪問:

        Router3(config)# access-list 1 permit 192.168.10.7

        Router3(config)# ip http sever

        Router3(config)# ip http access-class 1

        Router3(config)# ip http authentication local

        Router3(config)# username student password cisco

        88. 要啟用HTTP訪問,請鍵入以下命令:

        switch(config)# ip http sever

        89. 在基于set命令的交換機上用setCL1啟動和核實端口安全:

        switch(enable) set port security mod_num/port_num…enable mac address

        switch(enable) show port mod_num/port_num

        在基于CiscoIOS命令的交換機上啟動和核實端口安全:

        switch(config-if)# port secure [mac-mac-count maximum-MAC-count]

        switch# show mac-address-table security [type module/port]

        90. 用命令access-list在標準通信量過濾表中創建一條記錄:

        Router(config)# access-list access-list-number {permit|deny} source-address [source-address]

        91. 用命令access-list在擴展通信量過濾表中創建一條記錄:

        Router(config)# access-list access-list-number {permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log]

        92. 對于帶內路由更新,配置路由更新的最基本的命令格式是:

        R1(config-router)#distribute-list access-list-number|name in [type number]

        93. 對于帶外路由更新,配置路由更新的最基本的命令格式是:

        R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process| autonomous-system-number

        94. set snmp命令選項:

        set snmp community {read-only|ready-write|read-write-all}[community_string]

        95. set snmp trap 命令格式如下:

        set snmp trap {enable|disable}

        [all|moudle|classis|bridge|repeater| auth|vtp|ippermit|vmps|config|entity|stpx]

        set snmp trap rvcr_addr rcvr_community

        96. 啟用SNMP chassis 陷阱:

        Console>(enable) set snmp trap enable chassis 

        97. 啟用所有SNMP chassis 陷阱:

        Console>(enable) set snmp trap enable

        98. 禁用SNMP chassis 陷阱:

        Console>(enable) set snmp trap disable chassis

        99. 給SNMP陷阱接收表加一條記錄:

        Console>(enable) set snmp trap 192.122.173.42 public

        100. show snmp 輸出結果。

        101. 命令set snmp rmon enable 的輸出結果。

        102. 顯示SPAN信息:

        Consile> show span

        一些華為路由器命令:

        刪除設備配置

        reset saved-configuration

        重啟

        reboot

        看當前配置文件

        display current-configuration

        改設備名

        sysname

        保存配置

        save

        進入特權模式

        sysview

        華為只有2層模式 不像cisco enale之后還要conf t

        定義acl

        acl nubmere XXXX(3000以上)進入以后

        rule permit/deny IP/TCP/UDP等 source XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX(反向)

        destination XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX(反向) eq

        注意 華為默認沒有deny any any

        防火墻上端口加載ACL

        [Quidway-Ethernet0/0]firewall packet-filter 3000 inbound

        防火墻上新增加用戶

        local-user XXX(用戶名) password simple XXX(密碼)

        local-user XXX service-type ppp

        刪除某條命令

        undo(類似與cisco的no)

        靜態路由

        ip route-static 0.0.0.0 0.0.0.0 XXX.XXX.XXX.XXX

        對vpdn用戶設置acl的接口

        inte***ce Virtual-Template1

        查看路由表

        display ip routing-table

        設定telnet密碼

        user-inte***ce vty 0 4

        user privilege level 3

        set authentication password simple XXX

        啟動/關閉

        啟動 un shut

        關閉 shut

        動態nat設置

        acl number 3000

        rule 0 permit ip source XXX.XXX.XXX.XXX

        rule 1 permit ip source XXX.XXX.XXX.XXX

        rule 2 permit ip source XXX.XXX.XXX.XXX

        inte***ce Ethernet1/0

        des cription ====To-Internet(WAN)====

        ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX

        nat outbound 3000

        ipsec policy policy1

        利用acl來做 符合acl的IP地址可以出去(注意 此處的ACL隱含了deny any any)不符合的IP地址不可以出去

        創建vlan

        [shzb-crsw-s6506-1]vlan 100

        華為vlan不支持name

        將port放入vlan

        創建了vlan后 進入vlan模式

        [shzb-crsw-s6506-1-vlan100]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/8

        表示從G1/0/1 到1/0/8放入VLAN 100

        創建trunk

        inte***ce GigabitEthernet1/0/1

        duplex full

        speed 1000

        * port link-type trunk

        * port trunk permit vlan all

        port link-aggregation group 1

        帶*號的是創建trunk鏈路的語句

        vlan地址指定

        inte***ce Vlan-inte***ce2

        des cription server

        ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX

        vrrp vrid 2 virtual-ip XXX.XXX.XXX.XXX

        vrrp vrid 2 priority 120

        vrrp vrid 2 preempt-mode timer delay 10

        其中vrrp語句指定vrrp 類似與hsrp

        使用vrrp要注意的是華為不支持pvst

        只能一臺完全是主,一臺完全是備份

        在主vrrp設備上要指定

        stp instance 0 root primary

        stp TC-protection enable

        stp enable

        在從vrrp設備上要指定

        stp instance 0 root secondary

        stp TC-protection enable

        stp enable

        交換機下面綁acl

        首先進入接口模式,輸入qos命令

        [shzb-crsw-s6506-1-GigabitEthernet1/0/1]qos

        在輸入如下命令

        [shzb-crsw-s6506-1-qoss-GigabitEthernet1/0/1]packet-filter inbound ip-group 3000

        華為交換機只能指定inbound方向

        啟用ospf

        [shzb-crsw-s6506-1]ospf 100

        [shzb-crsw-s6506-1-ospf-100]area 0

        [shzb-crsw-s6506-1-ospf-100-area-0.0.0.0]network XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX

        配置ospf重發布

        [shzb-crsw-s6506-1-ospf-100-area-0.0.0.0]quit

        [shzb-crsw-s6506-1-ospf-100]import-route static

        建立link-group(類似與cisco的channel-group)

        link-aggregation group 1 mode manual

        然后進入接口

        port link-aggregation group 1

        啟用VRRP之前必須輸入

        vrrp ping-enable

        使得客戶能ping網關

        【拓展】

        產品簡介

        分類

        Cisco 的交換機產品以“Catalyst ”為商標,包含1900 、2800 、2900 、3500 、4000 、5000 、5500 、6000 、8500 等十多個系列。

        一類是固定配置交換機 ,包括3500 及以下的大部分型號,比如1924 是24 口10M 以太交換機,帶兩個100M 上行端口。除了有限的軟件升級之外,這些交換機不能擴展;

        另一類是模塊化交換機 ,主要指4000 及以上的機型,網絡設計者可以根據網絡需求,選擇不同數目和型號的接口板、電源模塊及相應的軟件。

        命名

        選擇設備時,許多人對長長的產品型號十分頭疼。其實,Cisco 對產品的命名有一定之規。就Catalyst 交換機來說,產品命名的格式如下:

        Catalyst NN XX [-C] [-M] [-A/-EN]

        其中,NN 是交換機的系列號,XX 對于固定配置的交換機來說是端口數,對于模塊化交換機來說是插槽數,有-C 標志表明帶光纖接口,-M 表示模塊化,-A 和-EN 分別是指交換機軟件是標準版或企業版。

      【思科交換機基本配置命令】相關文章:

      思科交換機的基本配置03-29

      交換機基本配置命令大全02-26

      華為交換機基本配置命令01-21

      思科三層交換機配置實例及命令03-04

      思科三層交換機配置命令大全02-28

      華為交換機基本配置命令匯總02-25

      華為交換機基本配置命令大全01-21

      思科配置命令詳細介紹01-23

      華為交換機基本配置命令明細盤點02-28

      主站蜘蛛池模板: 国产精品白浆在线观看| 日产精品一区二区三区| av狼人婷婷久久亚洲综合| 亚洲国产高清美女在线观看| 国产久热精品热线av| 亚洲男人在线无码视频| 久久久2019精品视频中文字幕 | 九月色婷婷免费| 国产成人精品cao在线| 亚洲蜜芽在线精品一区| 久久亚洲AV无码一区二区综合| 亚洲综合一| 铜鼓县| 女优免费中文字幕在线| 欧美综合自拍亚洲综合百度| 国产精品亚洲一区二区三区正片 | 中文字幕乱码第一二三区| 国产精品av在线一区二区三区| 日本一区三区高清视频| 国产九色蝌蚪91av在线观看| 鄢陵县| 中方县| 欧美日韩国产在线人成dvd| 亚欧免费无码AⅤ在线观看| 精品一区二区三区人妻久久| 亚洲一道一本快点视频| 丰满少妇人妻无码超清| 富裕县| 亚洲高清有码在线观看| 杭锦旗| 免费视频这里是精品视频| 少妇极品熟妇人妻高清| 日本理论在线免费观看| 91久久国产情侣真实对白| 国产女奸网站在线观看| 男女性搞视频网站免费| 国产99久久精品一区| 亚洲av国产成人精品区| 久久精品成人91一区二区| 9l久久午夜精品一区二区| 蜜桃视频色版在线观看 |