交换机基本配置
来源:互联网 发布:three.js开发指南 编辑:程序博客网 时间:2024/05/29 19:51
实验环境
实验步骤
(1)配置主机名和IP地址
R1和R2的配置是为了测试。
Switch>en
Switch#conf t
Switch(config)#ho S1
Router>en
Router#conf t
Router(config)#ho R1
R1(config)#int f0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no sh
Router>en
Router#conf t
Router(config)#ho R2
R2(config)#int f0/0
R2(config-if)#ip add 192.168.1.2255.255.255.0
R2(config-if)#no sh
(2)配置基本安全措施
S1(config)#enable secret cisco
S1(config)#service password-encryption
S1(config)#line vty 0 15
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
(3)接口基本配置
默认交换机接口开启。交换机接口可以配置双工模式及速率。
S1(config)#int f0/1
S1(config-if)#duplex ?
auto Enable AUTO duplex configuration //自动检测双工的模式
full Force full duplex operation //全双工
half Force half-duplex operation //半双工
S1(config-if)#duplex full
S1(config-if)#speed ?
//配置接口速度。10-10Mbps,100-100Mbps,1000-1000Mbps,auto-自动检测接口速度
10 Force 10 Mbps operation
100 Force 100 Mbps operation
auto Enable AUTO speed configuration
S1(config-if)#speed 100
S1(config-if)#mdix auto
//启用介质检测功能
S1(config-if)#description ?
//在接口上配置描述,相当于注释
LINE Up to 240 characters describing this interface
S1(config-if)#description line ?
<cr>
S1(config-if)#description line toR1
(4)配置管理地址
交换机也可以Telnet。这时候需要在交换机上配置IP地址。配置到vlan接口上。该地址称为管理地址。接在vlan 1上的计算机可以直接Telnet该地址。为了其他网段的计算机也可以Telnet,在交换机上配置了默认网关。
S1(config)#int vlan 1
S1(config-if)#ip add 192.168.1.100 255.255.255.0
S1(config-if)#no sh
S1(config-if)#ip default-gateway192.168.1.254
(5)配置SSH
采用SSH提高Telnet安全性。
S1(config)#ip domain-name ccnpcisco.com
//配置域名,生成密匙时需要
S1(config)#crypto key generate
S1(config)#line vty 0 15
S1(config-line)#login local
//SSH需要用户名和密码。配置用户名和密码放在本地交换机的配置文件中
S1(config-line)#username testsecret cisco
//配置用户名和密码
(6)管理接口的错误条件
交换机的接口遇到错误,比如环路问题,默认关闭接口。管理员需要在故障原因排除后shutdown和no shutdown将接口重新打开。可以配置接口自动关闭的条件和在故障后的自动恢复。
实验调试
S1#show ip int b //查看接口信息
S1#show mac address-table //监控MAC地址
S1#clear mac address-table //清除MAC地址
S1#show int f0/1 switchport //查看接口
R1#ssh -l test 192.168.1.100
//从路由器Telnet交换机,需要安装支持SSH的软件,例如secureCRT
- 交换机配置基本命令
- 交换机vlan基本配置
- 交换机的基本配置
- 思科交换机基本配置
- 交换机基本配置
- 交换机基本配置
- 交换机的基本配置
- CISCO路由器、交换机基本配置
- h3c交换机基本ACL配置
- Cisco 交换机基本配置命令
- h3c交换机基本ACL配置
- 实验二:交换机基本配置
- 一、交换机的基本配置
- 华为交换机基本配置命令
- 华为交换机基本配置命令
- 实验 15 交换机基本配置
- 交换机的基本配置命令
- 交换机基本配置及VLAN配置
- HDOJ 1251 统计难题(map or 字典树)
- 第四次上机作业
- Android 什么是 Material Design
- DataServer代码整理-1
- LeakCanary的用法
- 交换机基本配置
- POJ2311 Cutting Game(博弈Multi-SG函数)
- Mininet 学习笔记
- SQL标准语句
- Java NIO与IO的详细区别(通俗篇)
- ASP.NET 自带对象 JSON字符串与实体类的转换
- 我的c51手机项目电路图
- c#设计模式==简单工厂模式
- Dialog详解及自定义对话框