A模块,构建大型网络:命令大全
第一章:
ip address +ip地址 +子网掩码 secondary   配置辅助地址
第二章:
vlan database  ----进入VLAN配置状态 
vlan vlan-id[name vlan-name] ---创建Vlan号及Vlan名(可选)
exit ---保存并退出
config terminal  ---进入配置状态
vlan vlan-id  输入一个vlan号,进入vlan配置状态
name vlan-name  输入一个vlan名
exit或end  保存并退出(小凡实现不了)
no vlan vlan-id   删除某个vlan
config terminal   进入配置状态
interface interface-id  进入要分配的端口
switchport mode access 定义二层端口的模式
switchport access vlan vlan-id  把端口分配给某个vlan
exit或end  保存并退出
show vlan brief     插烂vlan信息(小凡实现不了,小凡实现的是show vlan-s brief)
show vlan id vlan-id   查看某个vlan
range   可以让多个端口一起成为某个valn
例:interface range F0/0 - 15  switchport mode access  switchport access vlan 2
interface   进入接口模式
switchport trunk encapsulation {is1 dot1q negotiate}    选择封装类型(小凡上只能使用dot1q)
switchport mode {dynamic {desirable(企望模式) auto(自动模式) trunk(干道模式)} 将接口配置为trunk链路  (在小凡上只能配置trunk链路)
switchport trunk native vlan   通道中不打标记
switchport trunk allowed vlan remove vlan-id  移除某个vlan
switchport trunk allowed vlan add vlan-id     添加某个vlan
show interface interface-id switchport   验证接口模式
interface 进入接口模式
channel-protocol pagp (小凡上不能用)
channel-group 1 mode on (在小凡上只能使用主动模式)
show etherchannel summary 查看以太网通道状态
show etherchannel port    查看通道协商模式

第三章:
ip routing   启动路由功能
interface vlan vlan-id
ip address ip_address netmask
no shutdown    配置vlan的ip地址
no switchport   开启路由接口
ip helper-address +ip地址   配置DHCP中继 (在没有DHCP服务器的vlan上配置实现的)
vlan database
vtp domain +名称
vtp mode server/client/transparent (小凡上使用不加mode)
vtp password +密码
vtp pruning 配置VTP修剪
vtp version 2 配置vtp版本
show vtp password   查看配置vtp的口令
show vtp status  查看其他vtp配置信息 (以上是配置Vtp的命令)

第四章:
show spanning-tree brief  查看生成树(在小凡上使用需要加brief)
show spanning-tree vlan vlan-id detail   查看某个vlan的生成树详细信息(在小凡上不能使用)
spanning-tree vlan vlan-list    启用生成树命令
spanning-tree vlan vlan-list priority bridge-priority   指定根网桥(bridge-priority是优先级,vlan-list是编号)
spanning-tree vlan vlan-list root primary secondary  不改变优先级就可以将某个vlan设置为跟网桥,则优先级会变为4096的倍数
spanning-tree vlan vlan-list cost cost   修改端口成本(一般不做修改)
spanning-tree vlan vlan-list port-priority priority   修改端口优先级(一般不做修改)
spanning-tree portfast    配置速端口(直接进入转发端口,一般连接的是PC机)

第五章:
spanning-tree link-type point-to-point  配置点到点链路
spanning-tree mode rapid-pvst   启用快速生成树
show spanning-tree vlan vlan-id   查看RPVST+S的状态
spanning-tree mode mst   启用MST模式
spanning-tree mst configuration  进入MST配置模式
name name    配置MST区域名
revision version  配置区域配置修订号
instance instance-id vlan vlan-list   将vlan映射到MST实例  如:instance 1 vlan 1-10,20,30  (中间用逗号隔开)
spanning-tree mst instance-id priority bridge-priority 或spanning-tree mst instance-id root primary secondary   设置MST实例的优先级
show spanning-tree mst instance-id   查看MST实例信息(以上在小凡上不能实现)
standby group-number ip +ip地址   配置虚拟IP地址
standby group-number priority +优先级   配置优先级(范围0-255 默认是100)
standby group-number  preempt  配置占先权
standby group-number track fastethernet +端口号 +降低多少的优先级   配置端口跟踪
traceroute +ip地址  跟踪那个端口(那个ip地址走那个端口)
clear arp-cache   clear mac-address  清楚缓存
ip default-gateway   配置网关

第六章:
access-list +编号 permit/deny  创建ACL(标准)编号1-99
no access-list +编号   删除已建立的标准ACL
ip access-group +编号 in/out   将ACL应用于端口
no ip access-group +编号 in/out   删除在接口上的ACL应用
access-list +编号 permit/deny +协议 +源地址 +目的地址 it(小于)/gt(大于)/eq(等于)/neq(不等于) +端口   创建ACL(扩展) 编号100-199
no access-list +编号   删除已建立的ACL
ip access-group +编号 in/out   将ACL应用于端口
no ip access-group +编号 in/out   删除在接口上的ACL应用
ip access-list standard(标准)/extended +编号   创建标准/扩展的(命名访问控制列表)
[sequence-number] permit/deny source +反掩码   插入一个标准的命名ACL
[sequence-number] permit/deny +协议 +源地址 +目的地址   插入一个扩展的命名ACL
show access-lists  查看访问控制列表
no ip access-lists  standard/extended +编号  删除已建立的命名ACL
ip access-group +名字 in/out  将ACL应用于接口
no ip access-group +名字 in/out  取消在接口上应用的ACL
time-range +名字  定义时间范围的名字(定时访问控制列表)
periodic +时间 to +时间  定义一个时间周期
absolute start +时间 end +时间   定义一个绝对时间
username +账户 password +密码  配置实现网络设备  通过telnet登陆设置的账户和密码
第八章
ip nat inside source static +内布局部地址 +内部全局地址 [extendable] --后面那个是可扩展的,一个内部局部地址对应多个内部全局地址的时候用到(后面跟的端口号不一样即可)
in nat inside/outside 运用到接口上的进方向或者出方向。
ip nat inside source static +协议 +内部局部地址 +端口号 +内部全局地址 ++端口号 extendable 这是将NAT映射到端口上(多个内部对应一个外部或者一个内部对应多个外部地址的时候运用到)
ip nat pool +名称 开始IP地址 结束IP地址 +子网掩码 配置动态NAT的时候用到这个,起一个地址池
ip nat  inside source +列表 编号 pool +名称 [overload]  实现地址转换的时候用到这个, overload 是配置Pat的时候用到,(复用路由器接口)需要根据访问控制列表相互配合
show ip nat translations 查看PAT的转换状况
ip nat translations [dns-timeout] [icmp-timeout | tcp-timeout |udp-timeout |finrst-timeout |syn-timeout ] seconds|never  设置超时的时间
clear ip nat translations *  清楚NAT转换表中的所有条目
第九章
router rip  启动rip进程
network +ip地址   宣告主网络号(有类地址)
show ip route   查看路由表
show ip protocol   查看路由协议配置(以上是动态路由协议中的rip配置的命令)
router rip
version 2   配置RIP协议,使用版本2
no auto-summary    关闭路由汇总功能(以上是rip协议的版本2,它支持可变长子网掩码,也就是支持无类地址)
router ospf +编号(1-65535)   启动OSPF路由进程
router-id +loopback接口地址 (或物理地址最高的IP地址)    配置routerID号
network +ip地址 +反掩码  area +区域编号  宣告主网络号属于哪个区域(进入接口  ip ospf +进程编号 +区域编号)
ip ospf cost +大小   修改端口的cost值(使用16位的无符号整数表示)一般不做修改
show ip route 查看路由表
show ip ospf 查看OSPF的配置
show ip ospf interface type number  查看OSPF接口的数据结构(以上是动态路由协议中的OSPF的配置命令)
show ip ospf interface +端口 查看某个端口的数据结构
show ip ospf process-id  显示指定进程的信息
第十章
debug ip ospf adj   显示了邻接关系正在创建(调试命令)【为了便于查看邻接认证过程,不必要的调试信息已经删除】
show interface +端口号    来查看端口状态
show ip ospf database router   可以查看数据库中列出的所有路由器LSA通告
show ip ospf database network   可以查看一条网络LSA通告的信息
show ip ospf database summary    可以显示链路状态数据库中的网络汇总LSA信息
ip ospf hello-interval +时间(范围1-65535s,默认10s) 修改hello时间(进入接口模式)
ip ospf dead-interval  +时间(范围1-65535s,默认40s) 修改死亡时间(进入接口模式)
ip ospf priority +数值(范围0-255,默认1)  修改OSPF接口的优先级配置
show ip ospf neighbor  查看邻居列表及其状态
show ip ospf interface +接口  查看OSPF接口数据
show ip route ospf  查看OSPF学习到的路由
show ip protocol  查看OSPF协议配置信息
show ip ospf    查看再路由器上OSPF是如何配置的以及ABR的信息
show ip ospf database  查看LSDB内的所有LSA数据信息
show ip ospf interface  查看接口上OSPF配置的信息(进程ID,routeID,COST,priority,邻居的数量)
show ip ospf neighbor detail  查看OSPF邻居的详细信息(包括DR/BDR)
show ip ospf adj 查看路由器“邻接”的整个过程
debug ip ospf packet  查看每个OSPF数据包的信息(包含OSPF版本,routeID,AreaID)
clear ip route  清空路由表
第十一章
show ip ospf database asbr-summary  查看ASBR汇总LSA的信息
show ip ospf database external    查看AS外部LSA的信息
show ip ospf database nssa-external  显示NSSA外部LSA通告的信息
area +区域号 stub 【no-summary】   将某个区域改为末梢区域或完全末梢区域
redistribute +自治系统区域 +编号 metric +度量值 【subnets】   将某个自治系统重分发到另一个自治系统区域之中(rip度量值是跳数,ospf度量值是成本)
redistribute static subnets  +类型  将静态路由重分发到某个区域内使用类型几(进去进程配置此命令)
default-information originate   将默认路由重分发到某个区域内(进入进程配置此命令)
redistribute connection subnets  将直连路由重分发到某个区域内(进入进程配置此命令)
area +区域号 nssa 【no-summary】   将某个区域改为非纯末梢区域或完全非纯末梢区域
area +区域号 range +ip地址  子网掩码   配置区域间路由汇总(进入进程配置此命令)(ABR上汇总)
summary-address +ip地址 子网掩码  配置外部区域间路由汇总(进入进程配置此命令)(ASBR上汇总)
area +要穿过的区域号 virtual-link +对端的端口号  配置虚链路(进入进程配置此命令)(在ABR上配置此命令)
show ip ospf virtual-links    查看虚链路
第十二章
traffic-shape  rate +CIP(小b为单位) +BE(小b为单位) +BC (小b为单位)buffer-limit(缓存)  配置基本流量×××配置(在接口模式)
traffic-shape group +ACL组号 +CIP(小b为单位) +BE(小b为单位) +BC (小b为单位) 基于ACL的流量×××配置
show traffic-shape +端口号  查看GTS配置信息
show traffic-shape  statistics +端口号    查看GTS流量统计信息
show traffic-shape  queue   查看GTS队列信息(以上是配置GTS的信息,只能运用在output出口)
rate-limit input|output +CIP +普通突发量(BE) +最大突发量(BE+BC)+合规流量(conform-action) +状态  +违规流量(exceed-action) +状态  基于承诺访问速率(在接口上配置)
rate-limit input|output  +access-group +ACL编号 +CIP +普通突发量(BE) +最大突发量(BE+BC)+合规流量(conform-action) +状态  +违规流量(exceed-action) +状态  扩展的承诺访问速率(在接口上配置)
show interface +端口号 +rate-limit  查看端口限速信息 (以上的配置是CAR配置信息,进入出口都能运用)
class-map 【match-all(匹配)|match-any(至少一个)】+名字   定义匹配策略
match access-group +编号  配置匹配的ACL
match +协议      配置匹配的协议
policy-map +名称  定义流量控制策略
class +名称  调用某个class-map
set ip dscp/precedence  标记优先级
police +CIP +BC +BE conform-action【小于BC(包含CIP流量)的流量采取动作,默认转发】 exceed-action 【对于BC和BC-BE之间的流量采取行动,默认转发】 violate-action 【大于BC+BE的流量采取动作,默认丢弃】
shape average +CIP +BC +BE  配置GTS
shape max-buffers +报文数(默认1000) 配置缓存区
service-policy +进|出 方向 +policy-map名称(GTS只能用在output方向上)
show policy-map +名称  查看策略配置
show policy-map interface +端口号   查看端口策略应用和流量信息
bandwidth +最小带宽速率【bandwidth-kbps(小b为单位)】 |最小带宽端口带宽的百分比【percent percentage(小b为单位)】   配置CBWFQ策略
queue-limit +队列数值(范围1-4096)  配置队列中数据包的个数
class class-default   配置默认类
priority 【bandwidth-kbps】 |【percent percentage】   配置LLQ队列的最大带宽
第十三章
snmp-server community +共同体名 +权限(RO/RW)
snmp-server enable traps +想设置的那个陷阱