• 配置名称和明码

system-view 进入零碎视图配置

quit或return 退出零碎视图模式

sysname 名称 设置主机名

user-interface console 0 进入控制台

authentication-mode password

set authentication password cipher 明码 配置密文明码


  • 配置远程管理IP地址

interface vlanif 1 进入VLAN

ip add 192.168.1.254 24 配置IP

undo shutdown 开启接口

dns domain 域名 设置域名

dns server 192.168.254.254 设置域名IP

dis vlan 显示vlan

save 保留配置

dis curr 显示以后配置

reboot 重启设施

undo terminal monitor 勾销提示信息


  • 配置端口速率、双工、ARP:

int g0/0/1 进入接口

description 内容 端口形容

undo negotiation auto 勾销协商

duplex full 全双工

auto duplex full 主动协商速率

speed 10 速率10M

auto speed 100 主动协商速率

arp static 192.168.1.8 5489-99cf-2603 绑定MAC地址

dis arp 或 dis arp all 查看ARP


  • 配置接口IP和动态路由

int g0/0/1 进入接口

ip add 192.168.1.6 24 配IP地址

undo shutdown 开启

dis cur 或 dis cur 查看ARP

ip route-static 192.168.20.0 24 10.0.12.2 配置动态路由

ip route-static 192.168.10.0 24 serial 0/0/1 端口

ip route-static 0.0.0.0 0 192.168.1.5 默认路由8个0

display ip routing-table 查看路由表


  • 配置VLAN

vlan 10 创立vlan 10

description 内容 vlan形容

vlan batch 30 40 创立多个vlan 2 to 20

int g0/0/1 进入接口

port link-type access 拜访口

port default vlan 10 退出vlan

port link-type trunk 干道口

port trunk allow pass vlan 10 20 容许通过

potr turnk allow pass vlan all 所有通过

int e0/0/2 进入接口

port link-type hybrid 混合口模式

undo port default vlan 删除默认vlan

port hybrid untagged vlan 20 去标签

port hybrid pvid vlan 2 设置默认vlan

port trunk allow-pass vlan 10 to 100 容许通过不间断用空格(后面加undo不容许)

dis port vlan 查看vlan

display vlan 查看vlan


  • 配置VLAN一致性GVRP 双向注册

Normal模式(服务器模式)

gvrp 开启gvrp也是默认模式 Fixed模式(客户机模式)

gvrp registration fixed

Fobbidden模式(通明模式)

gvrp registration forbidden

dis vlan summary 查看vlan汇总

dis gvrp status 查看gvrp状态


  • 配置RIP协定

rip 启用RIP默认V1

network 192.168.1.0 公布直连网段

version 2 配置v2版本

dis rip 查看rip

dis rip database 查看rip数据库

dis ip routing-table 查看路由表

优先级:直连0、动态60、rip 100、ospf 10/150


  • 配置OSPF协定

ospf 1 启用OSPF默认是过程1

area 0 进入区域0

network 192.168.3.0 0.0.0.255 公布直连网段

sildent-interface g0/0/2 被动接口只能往外发路由

dis ospf interface 查看ospf通告

dis ospf peer 查看ospf街坊

dis ip routing-table 查看路由表

dis ospf routing 查看ospt路由表


  • 配置基于全局的DHCP协定

dhcp enable 开启dhcp

ip pool 名称 地址池名

network 192.168.1.0 地址池

lease day 2 租约默认为1

gateway-list 192.168.1.254 网关

excluded-ip-address 192.168.1.250 192.168.1.253 排除IP范畴

dns-list 8.8.8.8 DNS服务器

dhcp select global 基于全局


  • 配置基于接口的DHCP协定

dhcp enable 开启dhcp

int g0/0/1 进入接口

dhcp select interface 基于接口

dhcp server lease day 2 租约默认为1

dhcp server excluded-ip-address 192.168.1.1 192.168.1.10 排除IP范畴

dhcp server dns-list 8.8.8.8 DNS

dis ip pool 查看dhcp

客户机:主动获取 查看ipconfig/ifconfig


  • 配置根本ACL:2000-2999

acl 2000 配置根本acl

rule 5 permit source 1.1.1.1 0 容许源IP(留神反掩码0,默认步长5)

rule 10 deny any 回绝任意

user-interface vty 0 4 进入接口

acl 2000 inbound 利用acl

dis acl all 查看所有acl

dis acl 2000 查看acl 2000


  • 配置高级ACL: 3000-3999

acl 3000 配置高级acl

rule permit ip source 1.1.1.1 0 destination 4.4.4.4 0 容许拜访

user-interface vty 0 4 进入虚构接口

acl 3000 outbound 虚构利用acl

int g0/0/1 进入物理接口

traffic-filter inbound acl 3000 物理利用acl

dis acl all 查看所有acl


  • 配置动静NAT(多对少)

nat address-group 1 202.169.10.50 202.169.10.60 内部IP

acl 2001 配置ACL抓流量

rule 5 permit source 172.17.1.0 0.0.0.255 外部IP

int g0/0/01 进入接口

nat outbound 2001 address-group 1 no-pat 利用NAT不应用段数转换

dis nat outbound 查看NAT


  • 配置动态NAT(一对一)

int g0/0/1 进入接口

nat static global 202.169.10.5 inside 172.16.1.1 一对一转换用于服务器


  • 配置动静NAPT(多对一)

int g0/0/0 进入接口

nat outbound 2001 多对一转换

dis nat static 查看动态NAT


  • 配置三层交换机VLAN间路由

int vlanif 10 进入接口

ip add 192.168.1.254 24 配IP

int vlanif 20 进入接口

ip add 192.168.2.254 24 配IP

dis ip interface brief 接口简略信息

dis port vlan 接口vlan信息

dis vlan 查看vlan信息


  • 配置单臂路由VLAN间通信

ip add 192.168.1.254 24 配置IP

dot1q termination vid 10 封装

arp broadcast enable 开启arp

dis ip interface brief 查看接口

dis ip routing-table 查看路由表

display current-configuration 查看配置

戳这里收费下载试听课

关注咱们,轻松带你搞定网工知识点+优良待业内推机会!!!