最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

思科模擬器配置命令大全

2018-10-07 15:27 作者:薈呀薈學(xué)習(xí)  | 我要投稿

1. 計(jì)算機(jī)命令

PCA login: root ?????????????????????????????????;使用root用戶

password: linux ?????????????????????????????????;口令是linux

# shutdown -h now ??????????????????????????????;同init 0 關(guān)機(jī)

# logout

# login

# ifconfig ???????????????????????????????????????;顯示IP地址

# ifconfig eth0 <ip address> netmask <netmask> ???;設(shè)置IP地址

# ifconfig eht0 <ip address> netmask <netmask> down ; 刪除IP地址

# route add 0.0.0.0 gw <ip>

# route del 0.0.0.0 gw <ip>

# route add default gw <ip> ?????????????????????;設(shè)置網(wǎng)關(guān)

# route del default gw <ip> ?????????????????????;刪除網(wǎng)關(guān)

# route ???????????????????????????????????????????;顯示網(wǎng)關(guān)

# ping <ip>

# telnet <ip>

?

2. 交換機(jī)支持的命令

交換機(jī)基本狀態(tài):

switch: ???????????????????????????????????????????;交換機(jī)的ROM狀態(tài)

rommon> ???????????????????????????????????????????;路由器的ROM狀態(tài)

hostname> ???????????????????????????????????????;用戶模式

hostname# ???????????????????????????????????????;特權(quán)模式

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

hostname(config-if)# ???????????????????????????????;接口狀態(tài)

?

交換機(jī)口令設(shè)置:

switch>enable ?????????????????????????????????????;進(jìn)入特權(quán)模式

switch#config terminal ???????????????????????????;進(jìn)入全局配置模式

switch(config)#hostname <hostname> ???????????????;設(shè)置交換機(jī)的主機(jī)名

switch(config)#enable secret xxx ???????????????????;設(shè)置特權(quán)加密口令

switch(config)#enable password xxa ???????????????;設(shè)置特權(quán)非密口令

switch(config)#line console 0 ??????????????????;進(jìn)入控制臺(tái)口

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

switch(config-line)#login ?????????????????????????;允許登錄

switch(config-line)#password xx ???????????????????;設(shè)置登錄口令xx

switch#exit ????????????????????????????????????;返回命令

?

交換機(jī)VLAN設(shè)置:

switch#vlan database ???????????????????????????????;進(jìn)入VLAN設(shè)置

switch(vlan)#vlan 2 ???????????????????????????????;建VLAN 2

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

switch(config)#int f0/1 ????????????????????????;進(jìn)入端口1

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

switch(config-if)#switchport mode trunk ?????????;設(shè)置為干線

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

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

switch(config)#vtp domain <name> ???????????????????;設(shè)置發(fā)vtp域名

switch(config)#vtp password <word> ???????????????;設(shè)置發(fā)vtp密碼

switch(config)#vtp mode server ??????????????????;設(shè)置發(fā)vtp模式

switch(config)#vtp mode client ??????????????????;設(shè)置發(fā)vtp模式

?

交換機(jī)設(shè)置IP地址:

switch(config)#interface vlan 1 ???????????????????;進(jìn)入vlan 1

switch(config-if)#ip address <IP> <mask> ?????????;設(shè)置IP地址

switch(config)#ip default-gateway <IP> ?????????????;設(shè)置默認(rèn)網(wǎng)關(guān)

switch#dir flash: ??????????????????????????????;查看閃存

?

交換機(jī)顯示命令:

switch#write ????????????????????????????????????;保存配置信息

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

switch#show run ?????????????????????????????????;查看當(dāng)前配置信息

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

switch#show interface ???????????????????????????;查看端口信息

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

?

?

3. 路由器支持的命令:

路由器顯示命令:

router#show run ?????????????????????????????????;顯示配置信息

router#show interface ???????????????????????????;顯示接口信息

router#show ip route ???????????????????????????????;顯示路由信息

router#show cdp nei ???????????????????????????????;顯示鄰居信息

router#reload ?????????????  ??  ???????????????;重新起動(dòng)

?

路由器口令設(shè)置:

router>enable ?????????????????????????????????????;進(jìn)入特權(quán)模式

router#config terminal ???????????????????????????;進(jìn)入全局配置模式

router(config)#hostname <hostname> ???????????????;設(shè)置交換機(jī)的主機(jī)名

router(config)#enable secret xxx ???????????????????;設(shè)置特權(quán)加密口令

router(config)#enable password xxb ???????????????;設(shè)置特權(quán)非密口令

router(config)#line console 0 ??????????????????;進(jìn)入控制臺(tái)口

router(config-line)#line vty 0 4 ???????????????????;進(jìn)入虛擬終端

router(config-line)#login??????????????????????????;要求口令驗(yàn)證

router(config-line)#password xx ???????????????????;設(shè)置登錄口令xx

router(config)#(Ctrl+z) ????????????????????????; 返回特權(quán)模式

router#exit ????????????????????????????????????;返回命令

?

路由器配置:

router(config)#int s0/0 ????????????????????????;進(jìn)入Serail接口

router(config-if)#no shutdown ??????????????????;激活當(dāng)前接口

router(config-if)#clock rate 64000 ???????????????;設(shè)置時(shí)鐘頻率

router(config-if)#ip address <ip> <netmask> ???????;設(shè)置IP地址

router(config-if)#ip address <ip> <netmask> second ??;設(shè)置第二個(gè)IP

router(config-if)#int f0/0.1 ?????????????????????;進(jìn)入子接口

router(config-subif.1)#ip address <ip> <netmask> ;設(shè)置子接口IP

router(config-subif.1)#encapsulation dot1q <n> ???;綁定vlan中繼協(xié)議

router(config)#config-register 0x2142 ?????????????;跳過(guò)配置文件

router(config)#config-register 0x2102 ?????????????;正常使用配置文件

router#reload ?????????????????????????????????????;重新引導(dǎo)

?

路由器文件操作:

router#copy running-config startup-config ??????;保存配置

router#copy running-config tftp ???????????????????;保存配置到tftp

router#copy startup-config tftp ???????????????????;開(kāi)機(jī)配置存到tftp

router#copy tftp flash: ????????????????????????;下傳文件到flash

router#copy tftp startup-config ???????????????????;下載配置文件

?

ROM狀態(tài):

Ctrl+Break ???????????????????????????????????????;進(jìn)入ROM監(jiān)控狀態(tài)

rommon>confreg 0x2142 ???????????????????????????;跳過(guò)配置文件

rommon>confreg 0x2102 ???????????????????????????;恢復(fù)配置文件

rommon>reset ????????????????????????????????????;重新引導(dǎo)

rommon>copy xmodem:<sname> flash:<dname> ?????????;從console傳輸文件

?

rommon>IP_ADDRESS=10.65.1.2 ?????????????????????;設(shè)置路由器IP

rommon>IP_SUBNET_MASK=255.255.0.0 ???????????????;設(shè)置路由器掩碼

rommon>TFTP_SERVER=10.65.1.1 ?????????????????????;指定TFTP服務(wù)器IP

rommon>TFTP_FILE=c2600.bin ?????????????????????????;指定下載的文件

rommon>tftpdnld ?????????????????????????????????;從tftp下載

rommon>dir flash: ??????????????????????????????;查看閃存內(nèi)容

rommon>boot ????????????????????????????????????;引導(dǎo)IOS

?

靜態(tài)路由:

ip route <ip-address> <subnet-mask> <gateway> ???;命令格式

router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ??;靜態(tài)路由舉例

router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默認(rèn)路由舉例

?

動(dòng)態(tài)路由:

router(config)#ip routing ?????????????????????????;啟動(dòng)路由轉(zhuǎn)發(fā)

router(config)#router rip ?????????????????????????;啟動(dòng)RIP路由協(xié)議。

router(config-router)#network <netid> ?????????????;設(shè)置發(fā)布路由

router(config-router)#negihbor <ip> ????????????;點(diǎn)對(duì)點(diǎn)幀中繼用。

?

幀中繼命令:

router(config)#frame-relay switching ????????????;使能幀中繼交換

router(config-s0)#encapsulation frame-relay ???????;使能幀中繼

router(config-s0)#fram-relay lmi-type cisco ???????;設(shè)置管理類(lèi)型

router(config-s0)#frame-relay intf-type DCE ???????;設(shè)置為DCE

router(config-s0)#frame-relay dlci 16 ?????????????;

router(config-s0)#frame-relay local-dlci 20 ???????;設(shè)置虛電路號(hào)

router(config-s0)#frame-relay interface-dlci 16 ;

router(config)#log-adjacency-changes ????????????;記錄鄰接變化

router(config)#int s0/0.1 point-to-point ?????????;設(shè)置子接口點(diǎn)對(duì)點(diǎn)

router#show frame pvc ???????????????????????????;顯示永久虛電路

router#show frame map ???????????????????????????;顯示映射

?

基本訪問(wèn)控制列表:

router(config)#access-list <number> permit|deny <source_ip> <wild|any>

router(config)#interface <interface> ????????????;default:deny any

router(config-if)#ip access-group <number> in|out ??;defaultut

?

例1:

router(config)#access-list 1 deny host 10.65.1.1

router(config)#access-list 1 permit any

router(config)#int f0/0

router(config-if)#ip access-group 4 in

?

例2:

router(config)#access-list 4 permit 10.8.1.1

router(config)#access-list 4 deny 10.8.1.0 0.0.0.255

router(config)#access-list 4 permit 10.8.0.0 0.0.255.255

router(config)#access-list 4 deny 10.0.0.0 0.255.255.255

router(config)#access-list 4 permit any

router(config)#int f0/1

router(config-if)#ip access-group 4 in

?

擴(kuò)展訪問(wèn)控制列表:

access-list <number> permit|deny icmp <S_IP wild> <D_IP wild>[type]

access-list <number> permit|deny tcp <S_IP wild> <D_IP wild>[port]

?

例1:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo

router(config)#access-list 101 permit ip any any

router(config)#int s0/0

router(config-if)#ip access-group 101 in

?

例2:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80

router(config)#access-list 102 permit ip any any

router(config)#interface s0/1

router(config-if)#ip access-group 102 out

?

刪除訪問(wèn)控制例表:

router(config)#no access-list 102

router(config-if)#no ip access-group 101 in

?

路由器的nat配置

Router(config-if)#ip nat inside ?????????????;當(dāng)前接口指定為內(nèi)部接口

Router(config-if)#ip nat outside ?????????????;當(dāng)前接口指定為外部接口

Router(config)#ip nat inside source static [p] <私有IP><公網(wǎng)IP> [port]

Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1

Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80

Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0

Router(config)#ip nat inside source list 1 pool p1

Router(config)#ip nat inside destination list 2 pool p2

Router(config)#ip nat inside source list 2 interface s0/0 overload

Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary

Router#show ip nat translation

rotary 參數(shù)是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。

overload參數(shù)用于PAT 將內(nèi)部IP映射到一個(gè)公網(wǎng)IP不同的端口上。

?

外部網(wǎng)關(guān)協(xié)議配置

routerA(config)#router bgp 100

routerA(config-router)#network 19.0.0.0

routerA(config-router)#neighbor 8.1.1.2 remote-as 200

?

配置PPP驗(yàn)證:

RouterA(config)#username <RouterB> password <word>

RouterA(config)#int s0

RouterA(config-if)#ppp authentication {chap|pap}

?

?

4.PIX防火墻命令

Pix525(config)#nameif ethernet0 outside security0 ???;命名接口和級(jí)別

Pix525(config)#interface ethernet0 auto ????????????;設(shè)置接口方式

Pix525(config)#interface ethernet1 100full ?????????????;設(shè)置接口方式

Pix525(config)#interface ethernet1 100full shutdown

Pix525(config)#ip address inside 192.168.0.1 255.255.255.0

Pix525(config)#ip address outside 133.0.0.1 255.255.255.252

?

Pix525(config)#global (if_name) natid ip-ip ?????????;定義公網(wǎng)IP區(qū)間

Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ???;例句

Pix525(config)#global (outside) 1 133.0.0.1 ?????????;例句

Pix525(config)#no global (outside) 1 133.0.0.1 ??????;去掉設(shè)置

?

Pix525(config)#nat (if_name) nat_id local_ip [netmark]

Pix525(config)#nat (inside) 1 0 0

內(nèi)網(wǎng)所有主機(jī)(0代表0.0.0.0)可以訪問(wèn)global 1指定的外網(wǎng)。

Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0

內(nèi)網(wǎng)172.16.5.0/16網(wǎng)段的主機(jī)可以訪問(wèn)global 1指定的外網(wǎng)。

?

Pix525(config)#route if_name 0 0 gateway_ip [metric] ???????;命令格式

Pix525(config)#route outside 0 0 133.0.0.1 1 ????????????;例句

Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句

?

Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8

表示內(nèi)部ip地址192.168.0.8,訪問(wèn)外部時(shí)被翻譯成133.0.0.1全局地址。

?

Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8

中間區(qū)域ip地址172.16.0.8,訪問(wèn)外部時(shí)被翻譯成133.0.0.1全局地址。

?

?

1. switch配置命令

(1)模式轉(zhuǎn)換命令

用戶模式----特權(quán)模式,使用命令"enable"

特權(quán)模式----全局配置模式,使用命令"config t"

全局配置模式----接口模式,使用命令"interface+接口類(lèi)型+接口號(hào)"

全局配置模式----線控模式,使用命令"line+接口類(lèi)型+接口號(hào)"

注:

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

特權(quán)模式:查看所有信息、調(diào)試、保存配置信息

全局模式:配置所有信息、針對(duì)整個(gè)路由器或交換機(jī)的所有接口

接口模式:針對(duì)某一個(gè)接口的配置

線控模式:對(duì)路由器進(jìn)行控制的接口配置

(2)配置命令

show running config 顯示所有的配置

show versin 顯示版本號(hào)和寄存器值

shut down 關(guān)閉接口

no shutdown 打開(kāi)接口

ip add +ip地址 配置IP地址

secondary+IP地址 為接口配置第二個(gè)IP地址

show interface+接口類(lèi)型+接口號(hào) 查看接口管理性

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

show history 查看歷史記錄

show terminal 查看終端記錄大小

hostname+主機(jī)名 配置路由器或交換機(jī)的標(biāo)識(shí)

config memory 修改保存在NVRAM中的啟動(dòng)配置

exec timeout 0 0 設(shè)置控制臺(tái)會(huì)話超時(shí)為0

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

enable password +密碼 配置明文密碼

ena sec +密碼 配置密文密碼

line vty 0 4/15 進(jìn)入telnet接口

password +密碼 配置telnet密碼

line aux 0 進(jìn)入AUX接口

password +密碼 配置密碼

line con 0 進(jìn)入CON接口

password +密碼 配置密碼

bandwidth+數(shù)字 配置帶寬

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

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

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

write 保存信息到NVRAM

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

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

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

description+信息 配置接口聽(tīng)描素信息

vlan database 進(jìn)入VLAN數(shù)據(jù)庫(kù)模式

vlan +vlan號(hào)+ 名稱 創(chuàng)建VLAN

switchport access vlan +vlan號(hào) 為VLAN為配接口

interface vlan +vlan號(hào) 進(jìn)入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號(hào) 刪除VLAN

show spamming-tree vlan +vlan號(hào) 查看VLA怕生成樹(shù)議

2. 路由器配置命令

ip route+非直連網(wǎng)段+子網(wǎng)掩碼+下一跳地址 配置靜態(tài)/默認(rèn)路由

show ip route 查看路由表

show protocols 顯示出所有的被動(dòng)路由協(xié)議和接口上哪些協(xié)議被設(shè)置

show ip protocols 顯示了被配置在路由器上的路由選擇協(xié)議,同時(shí)給出了在路由選擇協(xié)議中使用

的定時(shí)器

???????????????????????????????????等信息

router rip 激活RIP協(xié)議

network +直連網(wǎng)段 發(fā)布直連網(wǎng)段

interface lookback 0 激活邏輯接口

passive-interface +接口類(lèi)型+接口號(hào) 配置接口為被動(dòng)模式

debug ip +協(xié)議 動(dòng)態(tài)查看路由更新信息

undebug all 關(guān)閉所有DEBUG信息

router eigrp +as號(hào) 激活EIGRP路由協(xié)議

network +網(wǎng)段+子網(wǎng)掩碼 發(fā)布直連網(wǎng)段

show ip eigrp neighbors 查看鄰居表

show ip eigrp topology 查看拓?fù)浔?/span>

show ip eigrp traffic 查看發(fā)送包數(shù)量

router ospf +process-ID 激活OSPF協(xié)議

network+直連網(wǎng)段+area+區(qū)域號(hào) 發(fā)布直連網(wǎng)段

show ip ospf 顯示OSPF的進(jìn)程號(hào)和ROUTER-ID

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

no ip admain-lookup 關(guān)閉路由器的域名查找

ip routing 在三層交換機(jī)上啟用路由功能

show user 查看SW的在線用戶

clear line +線路號(hào) 清除線路

3. 三層交換機(jī)配置命令

配置一組二層端口

configure terminal 進(jìn)入配置狀態(tài)

nterface range {port-range} 進(jìn)入組配置狀態(tài)

配置三層端口

configure terminal 進(jìn)入配置狀態(tài)

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

channel port-channel-number} 進(jìn)入端口配置狀態(tài)

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 進(jìn)入配置狀態(tài)

vlan vlan-id 輸入一個(gè)VLAN號(hào), 然后進(jìn)入vlan配態(tài),可以輸入一個(gè)新的VLAN號(hào)或舊的來(lái)進(jìn)行修改

name vlan-name 可選)輸入一個(gè)VLAN名,如果沒(méi)有配置VLAN名,缺省的名字是VLAN號(hào)前面用0填滿

的4位數(shù),如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

將端口分配給一個(gè)VLAN

configure terminal 進(jìn)入配置狀態(tài)

interface interface-id 進(jìn)入要分配的端口

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 進(jìn)入配置狀態(tài)

interface interface-Id 進(jìn)入端口配置狀態(tài)

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

自動(dòng)協(xié)商

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

dynamic auto—自動(dòng)協(xié)商是否成為trunk

dynamic desirable—把端口設(shè)置為trunk如果對(duì)方端口是trunk, desirable, 配置Native VLAN

(802.1q)

或自動(dòng)模式,trunk—設(shè)置端口為強(qiáng)制的trunk方式,而不理會(huì)對(duì)方端口是否為trunk

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

switchport trunk native vlan vlan-id 指定802.1Q native VLAN號(hào)

?????例:

?????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子 進(jìn)入配置狀態(tài)

interface interface-id 進(jìn)入端口配置

switchport mode trunk 配置二層口為trunk

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

許的VLAN.使用add, all, except, remove關(guān)健字

no switchport trunk allowed vlan 允許所有VLAN通過(guò)

?????例

?????Switch(config)# interface fastethernet0/1

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

?????Switch(config-if)# end

配置Native VLAN(802.1q)

configure terminal 進(jìn)入配置狀態(tài)

interface interface-id 進(jìn)入配置成802.1qtrunk的端口

switchport trunk native vlan vlan-Id 配置native VLAN號(hào)

no switchport trunk native vlan 端口配置命令回到缺省的狀態(tài)

配置基于端口權(quán)值的負(fù)載均衡

configure terminal 進(jìn)入Switch 1配置狀態(tài)

vtp domain domain-name 配置VTP域

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

show vtp status 驗(yàn)證VTP的配置

show vlan 驗(yàn)證VLAN

configure terminal 進(jìn)入配置狀態(tài)

interface fastethernet 0/1 進(jìn)入F0/1端口

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

switchport mode trunk 配置成trunk

show interfaces fastethernet0/1 switchport 驗(yàn)證VLAN配置

按以上步驟對(duì)想要負(fù)載均衡的接口進(jìn)行配置

在另一個(gè)交換機(jī)上進(jìn)行此配置

show vlan 當(dāng)trunk已經(jīng)起來(lái),在switch2上驗(yàn)證已經(jīng)學(xué)到相的vlan配置

configure terminal 在Switch 1上進(jìn)入配置狀態(tài)

interface fastethernet0/1 進(jìn)入要配置的端口

spanning-tree vlan 8 port-priority 10 將端口權(quán)值10賦與VLAN 8.

spanning-tree vlan 9 port-priority 10 將端口權(quán)值10賦與VLAN 9.

spanning-tree vlan 10 port-priority 10 將端口權(quán)值10賦與VLAN 10.

interface fastethernet0/2 進(jìn)入F0/2

spanning-tree vlan 3 port-priority 10 將端口權(quán)值10賦與VLAN 3.

spanning-tree vlan 4 port-priority 10 將端口權(quán)值10賦與VLAN 4

spanning-tree vlan 5 port-priority 10 將端口權(quán)值10賦與VLAN 5

spanning-tree vlan 6 port-priority 10 將端口權(quán)值10賦與VLAN 10

end 退出

show running-config 驗(yàn)證配置

copy running-config startup-config 保存配置

配置STP路徑值的負(fù)載均衡

Trunk1走VLAN8-10,Trunk2走VLAN2-4

configure terminal 進(jìn)入 Switch 1配置狀態(tài)

interface fastethernet 0/1 進(jìn)入F0/1

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

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

exit 退回

在F0/2口上重復(fù)2-4步驟

exit 退回

show running-config 驗(yàn)證配置

show vlan驗(yàn)證switch1 已經(jīng)學(xué)到Vlan

configure terminal 進(jìn)入配置狀態(tài)

interface fastethernet 0/1 進(jìn)入F0/1

spanning-tree vlan 2 cost 30 設(shè)置Vlan2生成樹(shù)路徑值為30

spanning-tree vlan 3 cost 30 設(shè)置Vlan3生成樹(shù)路徑值為30

spanning-tree vlan 4 cost 30 設(shè)置Vlan4生成樹(shù)路徑值為30

end 退出

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

end 退出

show running-config 驗(yàn)證配置

copy running-config startup-config 保存配置

補(bǔ)充:CISCO命令集——路由選擇協(xié)議及排障

?????*ip route命令

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

的地址> [管理距離0~255,默認(rèn)為1]

?????(注:靜態(tài)地址配置)

?????*ip default-network命令

Router(config)# ip default-network <目標(biāo)網(wǎng)絡(luò)號(hào)>

?????(注:配合路由協(xié)使用,用其中的一個(gè)動(dòng)態(tài)路由號(hào)作默認(rèn)路由配置)

Router(config)# ip route 0.0.0.0 0.0.0.0 <下一路由器IP地址 | 從本地出口的地址>

?????(注:只有一個(gè)公網(wǎng)地址時(shí),在出口路由器上的配置)

?????*內(nèi)部路由選擇協(xié)議

?????*使用router和network命令

Router(config)# router <路由協(xié)議rip | igrp | eigrp | ospf | is-is等> [自主系統(tǒng)號(hào)]

Router(config-router)# network <直接相連的要用此路由協(xié)議的網(wǎng)絡(luò)號(hào)>

Router(config-router)# network <直接相連的要用此路由協(xié)議的網(wǎng)絡(luò)號(hào)>

?????*路由信息協(xié)議RIP

Router(config)# router rip

Router(config-router)# network <直接相連的要用rip協(xié)議的有類(lèi)別網(wǎng)絡(luò)號(hào)>

Router# show ip protocols

Router# show ip route

Router# debug ip rip

?????*內(nèi)部網(wǎng)關(guān)路由協(xié)議IGRP

Router(config)# router igrp <自主系統(tǒng)號(hào)>

Router(config-router)# network <直接相連的要用igrp協(xié)議的有類(lèi)別網(wǎng)絡(luò)號(hào)>

Router# show ip interface

Router# show ip protocols

Router# show ip route

Router# debug ip rip

?????*排除網(wǎng)絡(luò)故障

?????排除網(wǎng)絡(luò)故障的一個(gè)總體模型

Router# ping <有故障的主機(jī) | 有故障的IP地址>

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 <有故障的主機(jī) | 有故障的IP地址>

C:\windows\> winipcfg

C:\windows\> ipconfig

C:\windows\> ipconfig / all

C:\windows\> tracert <有故障的主機(jī) | 有故障的IP地址>

?????使用擴(kuò)展的ping來(lái)跟蹤連接性

Router# ping

?????*其它可能的故障

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

Router# show arp

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

C:\windows\> arp -a

SUN-A> arp –a

?????驗(yàn)證終端系統(tǒng)的路由表

C:\windows\> netstat –rn

C:\windows\> route –f add 0.0.0.0 mask 0.0.0.0 <需要添加入的網(wǎng)關(guān)地址>

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

netmask] [gateway]]

C:\windows\> route add mask <網(wǎng)絡(luò)掩碼> <網(wǎng)關(guān)ip地址>

C:\windows\> route delete mask <網(wǎng)絡(luò)掩碼> <網(wǎng)關(guān)ip地址>

C:\windows\> nbtstat <相應(yīng)的參數(shù)>

SUN-A> netstat -rn路由器



?

思科模擬器配置命令大全的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
房山区| 华容县| 石景山区| 渑池县| 蒙自县| 卓尼县| 同德县| 金华市| 洪洞县| 贺兰县| 内丘县| 哈尔滨市| 洮南市| 汕尾市| 若尔盖县| 五家渠市| 海阳市| 平定县| 深水埗区| 义马市| 探索| 鄄城县| 专栏| 灵石县| 闻喜县| 邮箱| 通州区| 潮州市| 云安县| 柳江县| 东乌珠穆沁旗| 茌平县| 综艺| 无为县| 安阳市| 河源市| 南木林县| 合江县| 达孜县| 安平县| 乾安县|