今天我来写写关于NA的点命令,给大家整理了一下以供一些对NA感兴趣的朋友参考学习,这是我认为一些大家常用的、有用的,那么多的命令,现在刚好学到这。。。闲话少说步入正题。 >用户模式 enable router# 特全模式 router#configure terminal router(config)# 全局模式 router(config)#interface serial 0/0 router(config-if)# 接口状态 router(config)#interface serial 0/0.1
router(config-subif)#
子接口状态 router(config)#line console 0
router(config-line)#
路由器控制状态 router#show version 检查操作系统版本号 router#show running-config查看正在运行的文件 router#copy running-config startup-config简写router#copy run star 或者router#write 保存设置 router#show startup-config 查看以保存的文件 router(config)#banner motd # 要写内容 # 开机时固定显示信息 router(config-if)#description 要写内容 端口描述 router(config)#line console 0
router(config-line)#password 要写密码
router(config-line)#login
设置控制台密码 router(config)#line vty 0 4
router(config-line)#password 要写密码
router(config-line)#login
设置虚拟终端密码 router(config)#enable password 要写密码 特权模式明文密码 router(config)#enable secret 要写密码 特权模式加密密码 router(config)#service password-encryption 对路由器明文密码加密 router(config)#line console 0
router(config-line)#exec-timeout 分钟 秒钟
禁止控制台会话自动退出 router(config)#line console 0
router(config-line)#logging synchronous
重显被打乱的控制台输入 router(config-if)#clock rate 64000
router(config-if)#
设置时钟频率 router#show int s0/0 查看端口信息 router(config-if)#no shut 手工开启路由器接口 router(config)#ip route 目标网段IP地址 目标网段网络掩码 直连接口IP地址
router(config)#ip route 目标网段IP地址 目标网段网络掩码 本地路由器的物理出口的接口名称
静态路由的配置 router(config)#router rip
router(config-router)#network 本地接口所在的网段信息
RIP的配置 router#sh ip protocols 查看RIP信息 router#sh ip route 查看路由表的信息 router(config)#router rip
router(config-router)#version 2
router(config-router)#network 接口所在网段的主网络信息
RIP V2的配置 router(config)#router eigrp {as-number}也就是在1—65535之间选取一个数值宣告直连主类网络号
router(config-router)#network 本地物理接口IP地址所在的有类网络地址
Eigrp的配置 router#show ip eigrp neighbors 显示运行eigrp路由协议的邻居关系 router#show ip eigrp topology 显示运行eigrp路由协议的网络拓扑关系 router#show ip route eigrp 显示运行eigrp路由协议的路由表 router#show ip potocols 显示运行eigrp路由协议 router#show ip eigrp traffic 显示运行eigrp路由协议的数据流量 router(config)#router ospf process-id
router(config-router)#network address wild card bits area area-id
配置单区域的OSPF router#show ip ospf interface 查看区域号与此相关的信息 router#show ip ospf neighbor 查看在每一个在接口上的邻居信息 sw#show vlan-switch brief 查看交换机上的VLAN信息配置 router(config)#access-list 1—99{permit/deny}源地址 通配符掩码(缺省下通配符掩码0.0.0.0)
router(config-if)#ip access-group 1—99{in/out}
标准访问控制列表配置 router(config)#access-list 100—199{permit/deny}{tcp/udp/icmp}原网络地址 原网络地址反掩码 目标网络地址 目标网络反掩码 指定协议端口
router(config-if)#ip access-group 100—199{in/out}
扩展访问控制列表配置 router#show access-lists 查看访问控制列表 router#show frame pvc 显示经过路由器所有PVC的状态 router#show frame lmi 显示本地管理接口,lmi为VC提供状态管理和广播 router#show frame map 查看当前映射项和DLCI映射表的相关信息 router#show interface 提供了相关路由器上的所有接口信息 router(config)#ip nat inside source static 本地私有IP 公网全局IP
router(config-if)#ip nat inside 在以太口下
router(config-if)#ip nat outside 在串口接口下
静态NAT的配置 router(config-if)#ip nat inside
router(config-if)#ip nat outside 定义接口IP地址及其方向
router(config)#ip nat pool 池名 全局IP地址范围 netmask 网络掩码 定义全局地址池
router(config)#access-list 1-99 permit 内部网络地址 内部网络反掩码 定义标准访问控制列表
router(config)#ip nat inside source list 1-99 pool IP地址池名 实现全局地址池和标准ACL间的映射
动态NAT的配置 router#clearing the NAT translation table
router#clear ip nat translation
清除NAT地址转换表 router#show ip nat translations 查看NAT地址转换表 router#show ip nat statistics 查看NAT地址转换状态 router#debug ip nat 查看NAT的状态 router#show flash 查看IOS文件 router#disconnect 关闭由自己建立当前会话 router#sh session 查看我对谁进行连接 router#sh user 查看谁对我进行连接 router#clear line vty 0 4 清除连接 router#sh cdp interface 接口下CDP是不是运行 router#sh cdp entry 查看CDP邻居 router#sh ip int brief 查看接口的逻辑地址和接口状态 router#erase start
router#reload
路由器或2950交换机清除NVRAM恢复出厂默认设置 router#show history 显示历史命令 router#show controller serial 0/0 查看串行线缆的物理接口类型是DTE还是DCE router#ip default-gateway 配置默认网关 router#show processes 路由器和交换机的进程状态 呵呵,我目前为止学到了这,学了什么我会重新编辑的。大家先看着。