网络工程师 交换机和路由器基本配置总结

本文总结了网络工程师在交换机和路由器配置中的常见操作,包括配置enable口令、主机名、IP地址、VLAN、STP、静态路由、RIP、OSPF等,是网络基础配置的实用指南。
摘要由CSDN通过智能技术生成

交换机的基本配置:

1、配置enable口令和主机名

         Switch>                         用户执行模式提示符

         Switch>enable                进入特权模式                                    

         Switch#                         特权模式提示符

         Switch#config terminal    进入配置模式

         Switch(config)#              配置模式提示符

         Switch(config)#enable password cisio     设置enable password为cisio

         Switch(config)#enable secret cisco1        设置enable secret 为cisio

         Switch(config)#hostname C2950            设置主机名为C2950

         C2950(config)#end          退回到特权模式

         C2950#

        

2、配置交换机IP地址、默认网关,域名、域名服务器

         C2950(config)#ip address 192.168.1.1 255.255.255.0   设置交换机IP地址

         C2950(config)#ip default-gateway 192.168.1.254          设置默认网关

         C2950(config)#ip domain-name cisio.com                      设置域名

         C2950(config)#ip domain-server 200.0.0.1                    设置域名服务器

         C2950(config)#end 

        

3、设置交换机的端口属性

         C2950(config)#interface fastethernet0/1进入接口0/1的配置模式

         C2950(config-if)# speed ?                          查看speed命令的子命令

         ……(省略)

         C2950(config-if)#speed 100                       设置该端口速率为100Mbps

         C2950(config-if)#deplex  ?                        查看deplex命令的子命令

         ……(省略)

         C2950(config-if)#deplex full                       设置端口为全双工

         C2950(config-if)#description TO_PC1          设置端口描述为TO_PC1

         C2950(config-if)#end (或^Z)                       返回特权模式

         C2950#show interface fastethernet0/1 查看端口0/1的配置结果

        ……(结果省略)

         C2950#show interface fastethernet0/1 status 查看端口0/1的状态

         ……(结果省略)

        

4、配置和查看MAC地址表

         C2950(config)#mac-address-table ?      查看mac-address-table的子命令

        ……(省略)

         C2950(config)#mac-address-table aging-time 100                   设置超时时间为100s

         C2950(config)#mac-address-table permanent 0000.0c01.bbcc f0/3        加入永久地址

         C2950(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址

         C2950(config)#end

         C2950#show mac-address-table                  查看整个MAC地址表

         ……

         C2950#clear mac-address-table restricted static  清除限制性地址

 

5、配置VTP协议(VLAN Trunking Protocal)

         配置2950A交换机为服务器模式

         Switch>enable                       进入特权模式

         Switch#config terminal       进入配置子模式

         Switch(config)#hostname 2950A    修改主机名为2950A

         2950A(config)#end

         2950A#

         2950A#vlan dataBase          进入VLAN配置子模式

         2950A(vlan)#vtp ?                查看和VTP配合使用的命令

         2950A(vlan)#vtp server      配置本交换机为Server模式

         Setting device to VTP SERVER mode

   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值