交换机与路由器的基本配置.doc
《交换机与路由器的基本配置.doc》由会员分享,可在线阅读,更多相关《交换机与路由器的基本配置.doc(5页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、专题一. 交换机与路由器的基本配置 交换机的基本配置 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的配置
2、模式 enable password cisco 设置enable password为cisco enable secret cisco1 设置enable secret为cisco1ip address 192.168.1.1 255.255.255.0 设置交换机IP地址 ip default-gateway 192.168.1.254 设置默认网关 ip domain-name 设置域名 ip name-server 200.0.0.1 设置域名服务器mac-address-table aging-time 100 设置超时是时间为100s mac-address-table perma
3、nent 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 进
4、入以太网口0子配置模式 no shutdown 激活接口 ip address 192.168.1.2 255.255.255.0 设置接口的IP地址 show running-config 检查配置结果 show sessions 查看终端服务器的会话 专题二 配置VTP和STP一. 配置VTP2950A #vlan database 进入VLAN配置子模式show vtp status 查看VTP设置信息show vlan 查看VLAN配置信息copy running-config startup-config 保存配置文件2950A(vlan)#vtp server/client 设置本
5、交换机为server/client模式vtp pruning 启动修剪功能vtp domain vtpserver 设置域名vlan 2 创建VLAN2,系统将自动命名vlan 3 name vlan3 创建VLAN3,并命名为vlan3Switch(config-if)#switchport mode trunk 设置当前端口为Trunk模式 switchport trunk allowed vlan all 设置允许从该端口交换数据的VLAN switchport mode access 设置端口为静态VLAN访问模式 switchport access vlan2 将端口9分配该VLAN
6、2二. 配置VTP spanning-tree vlan 1 port-priority 128 设置VLAN 1的端口的权值设为10 spanning-tree vlan 1 cost 19 设置VLAN 1生成树路径值为19专题三 配置路由协议A. 静态路由 ip route ip-addr subnet-mask gateway 加入静态路由B. 动态路由(1)配置RIP协议 no logging console 防止大量的端口状态变化信息和报警信息对配置过程的影响no ip routing 允许/不允许路由选择协议 router ri p 进入RIP协议配置模式 network 192
7、.168.1.0 说明192.168.1.0与路由器R1直接邻接 version 2 设置RIP协议的版本为2 neighbor ip-addr 说明邻接路由器,以使它们能够自动更新路由 passive interface 接口 阻止在指定的接口发送路由更新协议 show ip route 查看路由表信息 show ip route rip/igrp/ospf 查看RIP/IGRP/OSPF协议路由信息(2)配置IGRP协议 no keepalive 不监测keepalive信号,即不连接设备时可激活该接口 bandwidth x 设置带宽为x(Kb/s) clockrate x 设置时钟频率
8、为x(HZ) timer basic 更新时间 到期时间 抑制与否 清除时间 设置自定义的路由更新时间 no metric holddown 禁止抑制功能,路由信息删除后可立即接受新的 metric maximum-hop 50 当信息包穿过50个路由器时,删除信息包 router igrp/eigrp autonomous-system 进入IGRP协议配置子模式 (3)配置OSPF协议 router ospf 1 指定使用ospf选择协议,并运行在1号进程中 network 网络地址 掩码反码 area 区域号 说明与区域1的172.16.4.6邻接 area 区域号 stub 将区域x转
9、化为根区 show ip ospf neighbor 列出与本路由器是“邻接”关系的路由器 no ospf auto-cost-determination 使OSPF不自动根据每个接口的带宽,计算出其cost ip ospf cost 手动设置接口的cost area 1 range 172.16.4.0 255.255.255.0 说明区域一的范围是子网172.16.4.0/24 (4)配置EIGRP协议 no auto-summary 关闭EIGRP协议的路由自动汇总功能 network network-addr 掩码反码 专题四 广域网接入 一配置ISDN isdn switch-typ
10、e switch-type 设置交换机类型为 switch-type interface bri 0 进入ISDN的BRI接口配置模式 encapsulation ppp 设置封装协议为ppp ppp multilink 启动ppp多连接 dialer string 设置拨号串,R2的ISDN号码为 dialer-group 1 设置拨号组号为1,把BRI 0接口与拨号列表1相关联 dialer-list 1 protocol ip permit 设置拨号列表1,即当有IP包时将引起拨号 dialer load-threshold load 设置达到load后,启动第二个B通道. loggin
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 交换机 路由器 基本 配置
限制150内