计算机三级网络技术之交换机配置

小型:

  1. Switch-3548>enable
    Password:*********
    Switch-3548#
    Switch-3548#configure terminal
    Switch-3548(config)#hostname Switch-lib
    Switch-lib(config)#
    Switch-lib(config)#interface vlan 1
    Switch-lib(config-if)#no shutdown
    Switch-lib(config-if)#ip address 167.11.45.2 255.255.255.0  配置交换机的管理地址
    Switch-lib(config-if)#exit
    Switch-lib(config)#ip default-gateway 167.11.45.1
    Switch-lib(config)#vtp domain lib
    Switch-lib(config)#vtp mode transparent
    Switch-lib(config)#exit
    Switch-lib#vlan data
    Switch-lib(vlan)#vlan【vlan 10 name vlan10】建立VLAN10
             ……                         建立VLAN11(省略)
     Switch-lib(vlan)#exit
     Switch-lib#configure terminal
     Switch-lib(config)#interface f0/1
     Switch-lib(config-if)#no shutdown
     Switch-lib(config-if)#switchport【access vlan 10】  为端口f0/1分配VLAN
     Switch-lib(config-if)#exit
     Switch-lib(config)#interface f0/6
             ……                    为端口f0/6分配VLAN(省略)
     Switch-lib(config-if)#exit
     Switch-lib(config)#interface g0/1
     Switch-lib(config-if)#switchport【mode trunk】          设置VLAN trunk 模式
     Switch-lib(config-if)#switchport trunk encapsulation dotlq
     Switch-lib(config-if)#switchport trunk【allowed vlan 10,11】   配置允许中继的VLAN
     Switch-lib(config-if)#exit
     Switch-lib(config)#exit
     Switch-lib#

 

②大型

  1. ①Catalyst-6500交换机配置时间的格式是:set time 星期几 月/日/年 小时:分钟:秒。
    ②Catalyst-6500交换机配置设备管理地址:set interface sc0 IP地址 子网掩码。
    ③Catalyst-6500交换机配置缺省路由的格式是:set ip route 0.0.0.0   路由地址。

Switch-6500>(enable)set time thursday 3/13/2014 10:37:50
Switch-6500>(enable)set interface sc0 219.75.208.254 255.255.255.0 219.75.208.255

Switch-6500>(enable)set ip route 0.0.0.0 219.75.208.1

④进入配置模式 Switch-6500>【enable】.

⑤设置域名 Switch-6500>(enable)set vtp 【domain pku】 设置VTP域名为pku
Switch-6500>【enable】.
Switch-6500>(enable)set vtp 【domain pku】 设置VTP域名为pku
Switch-6500>(enable)set vtp 【mode server】 设置VTP工作模式
Switch-6500>(enable)set vlan 50 name jszx50
Switch-6500>(enable)set vlan 100 name lib100
Switch-6500>(enable)set vlan 50 5/6
Switch-6500>(enable)set vlan 100 5/10
Switch-6500>(enable)set trunk 3/8 【on dot1q】 封装VLAN协议
Switch-6500>(enable)set trunk 3/8 【vlan 50,100】 设置允许中继的VLAN

  1. 如下图所示,有2台计算机连接在一台Cisco 3524交换机上,它们分别被划分在ID号为100,VLAN名为VLAN10和ID号为200,VLAN名为VLAN11中,交换机的g0/1端口连接一台路由器,使用的VLAN协议是IEEE标准协议。
    http://115.28.168.160/CourseFile/WLJSBGB/SJKJS_Z_11_6_4-1.png
                                  网络结构图 
    请阅读以下交换机的部分配置信息,并补充空白处的配置命令或参数,按题目要求完成交换机的配置。
    Switch-3524#vlan data
    Switch-3524(vlan)#
    …………… 建立vlan11(省略)
    Switch-3524(vlan)#【vlan 100 name vlan10】.
    Switch-3524#configure terminal
    Switch-3524(config)#interface f0/1
    Switch-3524(config-if)#no shutdown
    Switch-3524(config-if)#switchport【access vlan 100】.
    Switch-3524(config-if)#exit
    Switch-3524(config)#interface f0/6
    Switch-3524(config-if)#no shutdown
    …………… 为端口f0/6分配vlan(省略)
    Switch-3524(config-if)#exit
    Switch-3524(config)#interface g0/1
    Switch-3524(config-if)#switchport【mode trunk】.
    Switch-3524(config-if)#switchport trunk encapsulation【dot1 q】.
    Switch-3524(config-if)#switchport trunk【allowed vlan 100,200】.
    Switch-3524(config-if)#exit
    Switch-3524(config)#exit
    Switch-3524 #
  2. 如图所示,在一台Catalyst 6500交换机上连接2台计算机,分别划分在VLAN ID号为130,VLAN名为jszx130和VLAN ID号为222,VLAN名为lib222中,交换机的3/8连接一台路由器,使用IEEE802.1Q协议,交换机和路由器之间允许传输jszx130和lib222的VLAN信息。
    http://websvc.weilaijiaoyu.cn/CourseFile/WLJSBGB/WLJS25-42-1.png
    请阅读以下Catalyst 6500的部分配置信息,并补充空白处的配置命令或参数,按题目要求完成交换机的配置。
    Switch-6500>【enable】.
    Switch-6500>(enable)set vtp domain pku
    Switch-6500>(enable)set vtp mode server
    Switch-6500>(enable)set vlan 130 name jszx130
    Switch-6500>(enable)set vlan 222 name lib222
    Switch-6500>(enable)set vlan【130 5/2】.
    Switch-6500>(enable)set vlan【222 5/8】.
    Switch-6500>(enable)set trunk【3/8 on dot1q】.
    Switch-6500>(enable)set trunk【3/8 vlan 130,222】.
  • 4
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值