一.交换机的基本配置<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
C2950#
config terminal 进入全局配置模式
show interface fastethernet0/1 查看端口0/1的配置结果
show interface fastethernet0/1 status 查看端口0/1的状态
show mac-address-table 查看整个MAC地址表
clear mac-address-table restricted static 清除限定性地址
C2950(config)#
hostname 2950A 设置主机名为2950A
interface f0/23 进入端口23的配置模式
enable password cisco 设置enable password为cisco
enable secret cisco1 设置enable secret为cisco1
ip address 192.168.1.1 255.255.255.0 设置交换机IP地址
ip default-gateway 192.168.1.254 设置默认网关
ip domain-name cisco.com 设置域名
ip name-server 200.0.0.1 设置域名服务器
mac-address-table aging-time 100 设置超时是时间为100s
mac-address-table permanent 0000.0c01.cc f0/3 加入永久地址
mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址
C2950(config-if)#speed ? 查看speed命令的子命令
speed 100 设置该端口速率为100Mb/s
dulplex full/half/auto 设置该端口为全双工
description TO_PC1 设置该端口描述为TO_PC1
二.路由器的基本配置
interface fastethernet0/1 进入接口F0/1子配置模式
interface Ethernet0 进入以太网口0子配置模式
no shutdown 激活接口
ip address 192.168.1.2 255.255.255.0 设置接口的IP地址
show running-config 检查配置结果
show sessions 查看终端服务器的会话转载于:https://blog.51cto.com/xueyang2008/235390