• <output id="aynwq"><form id="aynwq"><code id="aynwq"></code></form></output>

    <mark id="aynwq"><option id="aynwq"></option></mark>
  • <mark id="aynwq"><option id="aynwq"></option></mark><label id="aynwq"><dl id="aynwq"></dl></label>
  • 學習啦 > 學習電腦 > 網絡知識 > 路由器 > 路由器設置 > cisco思科 > Cisco常用的路由器交換機配置命令

    Cisco常用的路由器交換機配置命令

    時間: 權威724 分享

    Cisco常用的路由器交換機配置命令

      cisco制造的路由器設備、交換機和其他設備承載了全世界80%的互聯網通信,成為硅谷中新經濟的傳奇,那么你了解Cisco常用的路由器交換機配置命令嗎?下面是學習啦小編整理的一些關于Cisco常用的路由器交換機配置命令的相關資料,供你參考。

      Cisco常用的路由器支持的命令:

      路由器顯示命令:

      router#show run ;顯示配置信息

      router#show interface ;顯示接口信息

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

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

      router#reload ;重新起動

      路由器口令設置:

      router>enable ;進入特權模式

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

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

      router(config)#enable secret xxx ;設置特權加密口令

      router(config)#enable password xxb ;設置特權非密口令

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

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

      router(config-line)#login ;要求口令驗證

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

      router(config)#(Ctrl+z) ; 返回特權模式

      router#exit ;返回命令

      路由器配置:

      router(config)#int s0/0 ;進入Serail接口

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

      router(config-if)#clock rate 64000 ;設置同步時鐘

      router(config-if)#ip address ;設置IP地址

      router(config-if)#ip address second ;設置第二個IP

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

      router(config-subif.1)#ip address ;設置子接口IP

      router(config-subif.1)#encapsulation dot1q ;綁定vlan中繼協議

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

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

      router#reload ;重新引導

      路由器文件操作:

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

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

      router#copy startup-config tftp ;開機配置存到tftp

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

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

      ROM狀態:

      Ctrl+Break ;進入ROM監控狀態

      rommon>confreg 0x2142 ;跳過配置文件

      rommon>confreg 0x2102 ;恢復配置文件

      rommon>reset ;重新引導

      rommon>copy xmodem: flash: ;從console傳輸文件

      rommon>IP_ADDRESS=10.65.1.2 ;設置路由器IP

      rommon>IP_SUBNET_MASK=255.255.0.0 ;設置路由器掩碼

      rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服務器IP

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

      rommon>tftpdnld ;從tftp下載

      rommon>dir flash: ;查看閃存內容

      rommon>boot ;引導IOS

      靜態路由:

      ip route ;命令格式

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

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

      動態路由:

      router(config)#ip routing ;啟動路由轉發

      router(config)#router rip ;啟動RIP路由協議。

      router(config-router)#network ;設置發布路由

      router(config-router)#negihbor ;點對點幀中繼用。

      幀中繼命令:

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

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

      router(config-s0)#fram-relay lmi-type cisco ;設置管理類型

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

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

      router(config-s0)#frame-relay local-dlci 20 ;設置虛電路號

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

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

      router(config)#int s0/0.1 point-to-point ;設置子接口點對點

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

      router#show frame map ;顯示映射

      基本訪問控制列表:

      router(config)#access-list permit|deny

      router(config)#interface ;default:deny any

      router(config-if)#ip access-group in|out ;defaultut

      例1:

      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/0

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

      擴展訪問控制列表:

      access-list permit|deny icmp [type]

      access-list permit|deny tcp [port]

      例3:

      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

      例3:

      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

      刪除訪問控制例表:

      router(config)#no access-list 102

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

      路由器的nat配置

      Router(config-if)#ip nat inside ;當前接口指定為內部接口

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

      Router(config)#ip nat inside source static [p] [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 參數是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。

      overload參數用于PAT 將內部IP映射到一個公網IP不同的端口上。

      外部網關協議配置

      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驗證:

      RouterA(config)#username password

      RouterA(config)#int s0

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

      3.PIX防火墻命令

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

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

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

      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 ;定義公網IP區間

      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 ;去掉設置

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

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

      內網所有主機(0代表0.0.0.0)可以訪問global 1指定的外網。

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

      內網172.16.5.0/16網段的主機可以訪問global 1指定的外網。

      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

      表示內部ip地址192.168.0.8,訪問外部時被翻譯成133.0.0.1全局地址。

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

      中間區域ip地址172.16.0.8,訪問外部時被翻譯成133.0.0.1全局地址。

      Cisco常用的交換機支持的命令:

      交換機基本狀態:

      switch: ;ROM狀態, 路由器是rommon>

      hostname> ;用戶模式

      hostname# ;特權模式

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

      hostname(config-if)# ;接口狀態

      交換機口令設置:

      switch>enable ;進入特權模式

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

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

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

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

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

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

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

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

      switch#exit ;返回命令

      交換機VLAN設置:

      switch#vlan database ;進入VLAN設置

      switch(vlan)#vlan 2 ;建VLAN 2

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

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

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

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

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

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

      switch(config)#vtp domain ;設置發vtp域名

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

      switch(config)#vtp mode server ;設置發vtp模式

      switch(config)#vtp mode client ;設置發vtp模式

      交換機設置IP地址:

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

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

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

      switch#dir flash: ;查看閃存

      交換機顯示命令:

      switch#write ;保存配置信息

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

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

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

      switch#show interface ;查看端口信息

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

      看過文章“Cisco常用的路由器交換機配置命令”的人還看了:

      1.思科路由器基本配置教程

      2.cisco思科路由器設置

      3.如何查看Cisco路由器的配置信息

      4.思科路由器配置特點詳細介紹

      5.思科Cisco路由器的基礎配置知識

      6.思科如何配置ACE

      7.cisco思科怎么配置無線AP

      8.思科路由器配置命令大全

      9.思科路由器配置命令

      10.思科路由器怎么進入 思科路由器怎么設置

    565463 主站蜘蛛池模板: 国产精品入口麻豆电影网| 欧美理论在线观看| 我的娇妻acome| 国产一级毛片大陆| 中文精品无码中文字幕无码专区| 香港aa三级久久三级不卡| 日韩欧美二区在线观看| 国产在线观看无码免费视频| 久久精品乱子伦免费| 香蕉视频在线播放| 日本videos18高清hd下| 四虎影院一级片| 一级做a爰片毛片| 男人桶进女人p无遮挡小频| 在线观看免费av网站| 亚洲熟妇无码AV不卡在线播放 | 亚洲欧美18v中文字幕高清| 欧美―第一页―浮力影院| 国产成人AV三级在线观看按摩| 久久国产精品免费一区二区三区| 蜜臀色欲AV在线播放国产日韩| 攵女yin乱合集高h文| 动漫精品一区二区3d| 99视频精品全国在线观看| 欧美日韩一区二区不卡三区| 国产熟女乱子视频正在播放| 久久国产精品自由自在| 美团外卖chinesegayvideos| 天天爽夜夜爽夜夜爽| 亚洲日本人成中文字幕| 国产精品真实对白精彩久久| 日本一区二区三区精品视频| 动漫成人在线观看| 99久久99久久免费精品小说| 欧美3p大片在线观看完整版| 国产在线a免费观看| 三上悠亚精品一区二区久久| 波多野结衣系列痴女| 国产欧美另类久久精品蜜芽| 久久66热这里只会有精品| 男人j捅进女人p|