思科交换机配置组网

3,120次阅读
没有评论

共计 3820 个字符,预计需要花费 10 分钟才能阅读完成。

一、网络环境
1. 核心交换机 cisco 3560
2. 接入交换机 cisco 2960 *3
二、网络结构分配
1.3560 的 g0/ 1 为三层口,接入防火墙
2.3560 的 f0/4-24 划入 VLAN100,为机房服务器接入
3.3560 的 f0/ 1 接入 2960- 1 的 g1/2
4.3560 的 f0/ 2 接入 2960- 2 的 g1/2
5.3560 的 f0/ 3 接入 2960- 3 的 g1/2
6. 划分 VLAN
6.1 VLAN100 服务器
6.2 VLAN101 A 部门
6.2 VLAN102 B 部门
6.3 VLAN103 C 部门
6.4 VLAN104 D 部门
6.5 2960 交换机 F0/1- 6 为 VLAN101,F0/7-12 为 VLAN102,F0/13-18 为 VLAN103,F0/19-F0/24 为 VLAN104
PS:各部分交叉区域办公。
ABC 部门及服务器相互通信,D 部门完全隔离。
7.IP 分配
7.1 3560IP:10.1.1.1
7.2 2960-1IP:10.1.1.2
7.3 2960-2IP:10.1.1.3
7.4 2960-3IP:10.1.1.4
7.5 VLAN 100:172.16.100.1
7.6 VLAN 101:172.16.101.1
7.7 VLAN 102:172.16.102.1
7.8 VLAN 103:172.16.103.1
7.9 VLAN 104:172.16.104.1
8.DHCP,C、D 部门采用 DHCP,其它固定 IP。

二、交换机配置
1.3560 配置
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
配置 f0/1- 3 为 trunk 口
Switch(config)#int ran f0/1-3
Switch(config-if-range)#sw tr en do
Switch(config-if-range)#sw mo tr
Switch(config-if-range)#exit

配置 VLAN
Switch(config)#vl 100
Switch(config-vlan)#vl 101
Switch(config-vlan)#vl 102
Switch(config-vlan)#vl 103
Switch(config-vlan)#vl 104
Switch(config-vlan)#exit

Switch(config)#int vl 1
Switch(config-if)#no sh
Switch(config-if)#ip add 10.1.1.1 255.255.255.0
Switch(config-if)#int vl 100
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan100, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up

Switch(config-if)#no sh
Switch(config-if)#ip add 172.16.100.1 255.255.255.0
Switch(config-if)#int vl 101
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan101, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan101, changed state to up

Switch(config-if)#no sh
Switch(config-if)#ip add 172.16.101.1 255.255.255.0
Switch(config-if)#int vl 102
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan102, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan102, changed state to up

Switch(config-if)#no sh
Switch(config-if)#ip add 172.16.102.1 255.255.255.0
Switch(config-if)#int vl 103
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan103, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan103, changed state to up

Switch(config-if)#no sh
Switch(config-if)#ip add 172.16.103.1 255.255.255.0
Switch(config-if)#int vl 104
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan104, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan104, changed state to up

Switch(config-if)#no sh
Switch(config-if)#ip add 172.16.104.1 255.255.255.0
Switch(config-if)#exit

配置 VTP 服务器
Switch(config)#vtp mo ser
Device mode already VTP SERVER.
Switch(config)#vtp do ciscovtp
Changing VTP domain name from NULL to ciscovtp
Switch(config)#vtp pa vtppassword
Setting device VLAN database password to vtppassword

配置端口全局属性并加入 VLAN
Switch(config)#int ran f0/4-24
Switch(config-if-range)#sw mo ac
Switch(config-if-range)#spa po
Switch(config-if-range)#sw ac vl 100

配置三层端口及默认网关
Switch(config)#int g0/1
Switch(config-if)#no sw
Switch(config-if)#
Switch(config-if)#ip add 192.168.100.1 255.255.255.0
Switch(config-if)#exit
Switch(config)#ip def 192.168.100.254

配置 DHCP 服务器
Switch(config)#ip dhcp pool vlan103
Switch(dhcp-config)#net 172.16.103.0 255.255.255.0
Switch(dhcp-config)#def
Switch(dhcp-config)#def 172.16.103.1
Switch(dhcp-config)#exit
Switch(config)#ip dhcp pool vlan104
Switch(dhcp-config)#net 172.16.104.0 255.255.255.0
Switch(dhcp-config)#def 172.16.100.1

配置 IP Routing
Switch(config)#ip routing

三、2960 配置

配置管理 VLAN 管理 IP 及网关
Switch(config)#int vl 1
Switch(config-if)#no sh
Switch(config-if)#ip add 10.1.1.2 255.255.255.0
Switch(config)#ip def 10.1.1.1

配置 VTP 客户端
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vtp mo cl
Setting device to VTP CLIENT mode.
Switch(config)#vtp do ciscovtp
Domain name already set to ciscovtp.
Switch(config)#vtp pa vtppassword
Setting device VLAN database password to vtppassword

配置端口全局属性并加入 VLAN

Switch(config)#int ran F0/1-24
Switch(config-if-range)#sw mo ac
Switch(config-if-range)#spa po

Switch(config)#int ran f0/1-6
Switch(config-if-range)#sw ac vl 101
Switch(config-if-range)#int ran f0/7-12
Switch(config-if-range)#sw ac vl 102
Switch(config-if-range)#int ran f0/13-18
Switch(config-if-range)#sw ac vl 103
Switch(config-if-range)#int ran f0/19-24
Switch(config-if-range)#sw ac vl 104

正文完
 
Winter
版权声明:本站原创文章,由 Winter 2015-05-12发表,共计3820字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码