ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

cisco网络设备基本命令

2020-01-20 11:03:36  阅读:260  来源: 互联网

标签:配置 cisco name show ip vlan 命令 nat 网络设备


部署与网络规划 命令
三层交换  
开启路由功能 ip routing
开启路由接口 no switchport
生成树STP  
开启生成树 spanning-tree vlan vlan-list
指定根网桥 spanning-tree vlan vlan-list root {primary/secondary}
指定根网桥(优先级) spanning-tree vlan vlan-list priority 0-65535
修改端口成本 spanning-tree vlan vlan-list cost cost
修改端口优先级 spanning-tree vlan vlan-list port-priority 0-255
配置速端口 spanning-tree portfast
热备份路由HSRP  
配置为HSRP组成员 standby group-number ip 虚拟ip
配置HSRP优先级 standby group-number priority 0-255
配置HSRP占先权 standby group-number preempt
配置HSRP端口跟踪 standby group-number track f0/0 interface-priority
IP地址跟踪 tracert ip
ACL  
标准acl access-list 表号 permit/deny 源ip 反码
扩展acl access-list 表号 permit/deny 协议 源ip 反码 目的ip 反码 eq 端口号
应用到接口 ip access-group 表号 in/out
删除acl no access-list 表号;no ip access-group 表号;no 序列号;;no acl语句
命名acl ip access-list standard/extended access-list-name
  命名标准 【序列号】permit/deny 源ip 反码
  命名扩展 【序列号】permit/deny 协议 源ip 反码 目的ip 反码 eq 端口号
acl 应用到vty                                             line vty 0 4
                                        access-class 表号 In/out
acl应用到虚接口                                              int vlan vlan-id
                                      ip access-group 表号 in/out
NAT  
创建静态NAT ip nat inside source static 内部局部ip 内部全局ip
NAT端口映射 ip nat inside source static 协议 内部局部ip 端口号 内部全局ip 端口号 【extendable】
创建动态NAT 1.定义合法ip地址池  ip nat pool pool-name start-ip end-ip netmask mask
  2.实现地址转换  ip nat inside source list acl表号 pool pool-name
创建PAT 1.定义合法ip地址池  ip nat pool pool-name start-ip end-ip netmask mask
  2.设置PAT地址转换 ip nat inside source list acl表号 pool pool-name overload
     设置端口复用PAT地址转换 ip nat inside source list acl表号 int f0/0 overload
接口启用NAT ip nat inside/outside
部署所有查看命令  
查看stp配置 show spanning-tree 
查看某个vlan生成树配置 show spanning-tree vlan vlan-id detail
查看hsrp配置 show standby (brief)
查看acl show access-lists
显示当前存在的转换 show ip nat translations
显示nat统计信息 show ip nat statistics
删除nat所有条目 clear ip nat tanslation *
调试nat debug ip nat 
   
   
路由进阶与安全 命令
动态路协议  
配置RIPv1 router rip
  network 直连网段
配置RIPv2 router rip
  version 2
  network 直连网段
  no auto-summary
OSPF路由协议  
配置ospf router ospf 进程号
  network 直连网段 反码 area area-id
修改接口优先级 ip ospf priority 0-255
修改接口cost值 ip ospf cost 1-65535
OSPF多区域原理与配置  
末梢区域配置 area area-id stub
完全末梢区域配置 area area-id stub no-summary
OSPF高级配置  
路由重分发 redistribute 协议 metric 度量值 metric-type 1or2 subnets
默认路由重分发 default-information originate metric 度量值 metric-type 1or2
nssa区域配置 area area-id nssa (no-summary)
区域间路由汇总 area area-id range 汇总后ip 子网掩码
外部路由汇总 summary-address 汇总后ip 子网掩码
虚链路配置 area area-id virtual-link 目的routerid
QOS  
GTS基本配置 traffic-shape rate cir,bc,be buffer-limit
GTS基于acl的配置 traffic-shape group 组号  cir,bc,be 
GTS的第二种配置 class-map 名字
  match access-group 组号
  policy-map 名字
  class  名字
  shape average cir,bc,be
CAR基本配置 rate-limit output/input cir,bc,be conform-action {transmit,drop} exceed-action {transmit,drop}
CAR基于acl的配置 rate-limit output/input access-group 组号 cir,bc,be conform-action {transmit,drop} exceed-action {transmit,drop}
CAR的第二种配置 class-map 名字
  match access-group 组号
  policy-map 名字
  class  名字
  police cir bc be  conform-action {transmit,drop} exceed-action {transmit,drop} violate-action {transmit,drop}
接口上应用协议 service-policy input/output policy-name
SNMP  
启用snmp,设置共同体名 snmp-server community public ro
  snmp-server community private rw
指定管理主机 snmp-server host ip public
启用trap消息 snmo-server enable traps 
cisco asa 基础  
配置ASA主机名 hostname 名字
配置特权密码 enable password 密码
配置远程密码 passwd 密码
配置接口 nameif {dmz,inside,outside}
  security-level 0-100
保存配置 write memory
清空running-config配置 clear configure all
清空running-config指定配置 clear configure 要清空的配置
清空startup-config配置 write erase
telnet接入 telnet ip 子网 inside
  telnet timetout minutes
ssh接入 crypto key generate rsa modulus 1024
  ssh ip 子网 outside/inside
  ssh timeout minutes
  ssh version 1or2
  domian-name 域名
配置静态路由 route interface-name 未知网段 子网掩码 下一跳
标准acl access-list acl-name [standard] permit/deny ip 子网掩码
扩展acl access-list acl-name [extended] permit/deny 协议 源ip 子网掩码 目的ip 子网掩码 
acl应用到接口 access-group acl-name in/out int interface-name
cisco ASA 应用NAT  
动态NAT nat (interface-name) nat-id ip mask
  global (interface-name) nat-id 地址池
为该接口任何网段实施动态NAT nat (interface-name) nat-id 0 0
动态PAT nat (interface-name) nat-id ip mask
  global (interface-name) nat-id 映射地址
动态PAT映射接口ip global (interface-name) nat-id interface
静态NAT static (local-if-name,global-if-name)global-ip locla-ip
静态PAT static (local-if-name,global-if-name)协议 global-ip global-port local-ip local-port
开启nat控制 nat-control
nat豁免 nat (interface-name) 0 access-list acl-name
cisco asa 高级配置  
开启透明模式 firewall transparent
禁止ip分片 fragment chain 1
管理ip ip address ip 子网
路由进阶与安全所有查看命令  
查看路由表 show ip route
只查看ospf学到的路由 show ip route ospf
查看路由协议配置 show ip protocol
查看ospf配置 show ip ospf
查看LSDB内所有LSA show ip ospf datebase
查看接口上ospf配置 show ip ospf interface
查看ospf的邻居信息 show ip ospf neighbor 
查看路由器整个邻接过程 debug ip ospf adj
查看每个ospf数据包信息 debug ip ospf packet
清空路由表 clear ip route
查看策略配置 show policy-map
查看GTS配置信息 show traffic-shape f0/0
查看CAR配置信息 show int f0/0 rate-limit
查看conn表 show conn detail
查看nat表 show xlate detail
清空nat表 clear xlate
查看当前工作模式 show firewall 
   
   
网络TCP/IP 命令
交换机的基本原理与配置  
配置主机名 hostname 
修改双工模式 depulex{full/half/auto}
修改速率 speed {10/100/1000/auto}
从特权返回用户 disable
从接口返回特权 end、ctrl+z
ip地址概述与应用  
查看ip地址 ipconfig
测试网络连通性 ping
常规配置 en 
  conf t
  no ip domain-lookup
  line con 0
  logg sync
  exec-t 0 0
给路由器配ip int f0/0
  ip address ip 子网掩码
  no shutdown
给交换机配ip int vlan 1
  ip addresss ip 子网掩码
  no shutdown
网络层协议与应用  
ping后可加的参数 ping -l(ping包大小)/-a(返回主机名)/-n(发从次数)/-t(一直ping )
windows 10 中查看你arp arp -a
windows 10 中清楚arp arp -d
windows 10 中绑定arp arp -s ip mac
cisco中查看arp show arp
cisco中清除arp clear arp-cache
cisco中绑定arp arp ip mac arpa
静态路由  
配置静态路由 ip route 未知网段 子网掩码 下一跳
配置默认路由 ip route 0.0.0.0 0.0.0.0 下一跳
删除静态路由 no ip route 未知网段 子网掩码 下一跳
设备管理  
保存配置 write;copy running-config startup-config
删除配置 erase nvram
配置特权密码明文 enable password
配置特权密码密文 enable secret
加密明文密码 service password-encryption
配置con口密码 line con 0
  password 密码
  login
配置vty密码 line vty 0 4
  password 密码
  login
路由器密码恢复 重启ctrl+pause break
  conferg 0x2142
  reset
  copy startup-config running-config
  修改密码
  config-register 0x2102
  write
交换机密码恢复 按住mode键
  flash_init
  rename flash:config.text flash:config.old
  boot
  rename flash:config.old flash:config.text
  copy flash:config.text system:running-config
  修改密码并保存
交换机配置默认网关 ip default-gateway 网关ip
远程设备 telnet ip
虚拟局域网  
全局模式下创建vlan vlan vlan-id
  name
数据库模式下创建vlan vlan database
  vlan vlan-id name
将交换机的端口加入vlan switchport mode access
  switchport access vlan vlan-id
选择封装类型 switchport trunk encapsulation {isl/dot1q/auto}
选择封装模式 switchport mode {trunk/access}
指定native vlan switchport trunk native vlan vlan-id
从trunk中删除vlan switchport trunk allowed vlan remove vlan-id
在trunk中添加vlan switchport trunk allowed vlan add vlan-id
trunk扩展及单臂路由  
配置子接口ip int f0/0.1
  ip address ip 子网掩码
配置vlan标识的封装结构  encapsulation dot1q vlan-id
定义地址池 ip dhcp pool pool-name
动态分配ip地址段 network 网段 子网
设置网关 default-router 网关 
配置dns dns-server dns-ip
设置地址租期 lease days
预留静态分配ip ip dhcp excluded-address low-add high-add
VTP技术  
以太网通道配置 channel-group 1 mode on
创建vtp域名 vtp domain domain-name
配置vtp模式 vtp mode {server、client、transparent}
配置vtp口令 vtp password
配置vtp修建 vtp pruning
配置vtp版本 vtp version 1or2
网络tcp/ip所有查看命令  
查看ios名称及版本信息 show version
查看mac地址表 show mac-address-table
查看接口状态 show int f0/24
查看接口ip show ip int brief
更改接口ip default int f0/0
查看路由表 show ip route
查看当前配置 show running-config
查看已保存配置 show startup-config
查看指定mac地址 show mac-address-table 指定的mac
查看vlan show vlan brief
查看接口模式 show int f0/0 swtichport
查看以太网通道配置 show entherchannel 1 summary
查看vtp配置信息 show vtp status

标签:配置,cisco,name,show,ip,vlan,命令,nat,网络设备
来源: https://www.cnblogs.com/hzlzxt/p/12217045.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有