Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3060674
  • 博文数量: 131
  • 博客积分: 10013
  • 博客等级: 上将
  • 技术积分: 2375
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-21 02:01
文章存档

2013年(4)

2010年(18)

2009年(61)

2008年(48)

我的朋友

分类: WINDOWS

2009-02-21 18:16:05

复习性综合实验4.1.4.1.1

步骤一、交换机、路由器和PC机的基本配置

步骤二、关闭交换机的所有端口,然后启用接入端口

S1(config)#int range f0/1 - 24

S1(config-if-range)#shutdown

S1(config-if-range)#int range g1/1 - 2

S1(config-if-range)#shutdown

S1(config-if-range)#int range g1/1 – 2

S1(config-if-range)#no shut

S1(config-if-range)#int range f0/1 – 4

S1(config-if-range)#no shut

(交换机S2S3配置参考S1)

 

步骤三、配置路由器各接口或子接口使之启用

R1(config)#int s0/0/0

R1(config-if)#ip addr 10.1.1.1 255.255.255.252

R1(config-if)#clock rate 64000

R1(config-if)#no shut

R1(config-if)#int f0/1

R1(config-if)#no shut

R1(config-if)#int f0/1.10

R1(config-subif)#encapsulation dot1Q 10

R1(config-subif)#ip addr 192.168.10.1 255.255.255.0

R1(config-subif)#int f0/1.11

R1(config-subif)#encapsulation dot1Q 11

R1(config-subif)#ip addr 10.10.11.1 255.255.255.0

 

R2(config)#int lo0

R2(config-if)#ip addr 209.165.200.161 255.255.255.224

R2(config-if)#int s0/0/0

R2(config-if)# ip address 10.1.1.2 255.255.255.252

R2(config-if)#no shut

R2(config-if)#int s0/0/1

R2(config-if)#ip address 10.2.2.1 255.255.255.252

R2(config-if)#no shut

R2(config-if)#int f0/1

R2(config-if)#no shut

R2(config-if)#int f0/1.20

R2(config-subif)#encapsulation dot1Q 20

R2(config-subif)#ip addr 192.168.20.1 255.255.255.0

R2(config-subif)#int f0/1.21

R2(config-subif)#encapsulation dot1Q 21

R2(config-subif)#ip addr 10.10.21.1 255.255.255.0

R3(config)#int s0/0/1

R3(config-if)#ip addr 10.2.2.2 255.255.255.252

R3(config-if)#clock rate 64000

R3(config-if)#no shut

R3(config-if)#int f0/1

R3(config-if)#no shut

R3(config-if)#int f0/1.30

R3(config-subif)#encapsulation dot1Q 30

R3(config-subif)#ip addr 192.168.30.1 255.255.255.0

R3(config-subif)#int f0/1.31

R3(config-subif)#encapsulation dot1Q 31

R3(config-subif)#ip addr 10.10.31.1 255.255.255.0

 

步骤四、将S1配置为根桥以防止交换机环路产生

S1(config)#spanning-tree vlan 1,10,11,20,21,30,31,99 priority 4096

 

(默认VLANBID[VLAN ID + 32768],将所有VLAN的优先值都设置为4096,则STP会重新选举根桥即将S1置为所有VLAN的根桥)

 

步骤五、为交换机-交换机接口配置中继链路和本征VLAN

S1(config)#int range g1/1 – 2

S1(config-if-range)#switchport mode trunk

S1(config-if-range)#switchport trunk native vlan 99

S1(config-if-range)#no shut

 

S2(config)#int g1/1

S2(config-if)#switchport mode trunk

S2(config-if)#switchport trunk native vlan 99

S2(config-if)#no shut

 

S3(config)#int g1/1

S3(config-if)#switchport mode trunk

S3(config-if)#switchport trunk native vlan 99

S3(config-if)#no shut

 

步骤六、配置VTP

S1(config)#vtp mode server

Device mode already VTP SERVER.

S1(config)#vtp domain cisco

Changing VTP domain name from NULL to cisco

S1(config)#vtp password cisco

Setting device VLAN database password to cisco

(将S1设置为VTP 服务器,将S2S3设置为VTP 客户端)

 

步骤七、S1(VTP Server)上配置VLAN

S1(config)#vlan 10

S1(config-vlan)#vlan 11

S1(config-vlan)#vlan 20

S1(config-vlan)#vlan 21

S1(config-vlan)#vlan 30

S1(config-vlan)#vlan 31

S1(config-vlan)#vlan 99

S1(config-vlan)#name Management

(配置至此,用#sh vlan brief命令查看S2S3交换机的vlan配置,会看到VTP Server已经将VLAN信息传播至两个交换机)

 

步骤八、为各个VLAN分配接口

S1(config)#int range f0/2

S1(config-if)#switchport mode access

S1(config-if)#switchport access vlan 10

S1(config-if)#int range f0/3

S1(config-if)#switchport mode access

S1(config-if)#switchport access vlan 11

S1(config-if)#int range f0/4

S1(config-if)#switchport mode access

S1(config-if)#switchport access vlan 20

(交换机S2S3配置参考S1)

 

步骤九、为各交换机配置管理VLAN地址和默认网关

S1(config)#ip default-gateway 192.168.10.1

S1(config)#interface vlan 10

S1(config-if)#ip address 192.168.10.2 255.255.255.0

S1(config-if)#no shutdown

 

S2(config)#ip default-gateway 192.168.20.1

S2(config)#interface vlan 20

S2(config-if)#ip address 192.168.20.2 255.255.255.0

S2(config-if)#no shutdown

 

S3(config)#ip default-gateway 192.168.30.1

S3(config)#interface vlan 30

S3(config-if)#ip address 192.168.30.2 255.255.255.0

S3(config-if)#no shutdown 

 

步骤十、接入层交换机上配置端口安全功能

S1(config)#int f0/2

S1(config-if)#switchport port-security

S1(config-if)#switchport port-security maximum 1

S1(config-if)#switchport port-security mac-address sticky

S1(config-if)#switchport port-security mac-address sticky 0002.4A1A.3893

S1(config-if)#switchport port-security violation shutdown

1、交换机S1、的其它端口和S2S3配置参考S1的端口f0/2

2、第五行命令的运行以第四行命令运行为前提,否则系统返回“Sticky mac is not enabled”的错误信息。

 

步骤十一、为路由器配置Rip V2协议

R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#network 10.0.0.0

R1(config-router)#network 192.168.10.0

 

R2(config)#router rip

R2(config-router)#version 2

R2(config-router)#network 10.0.0.0

R2(config-router)#network 192.168.20.0

 

R3(config)#router rip

R3(config-router)#version 2

R3(config-router)#network 10.0.0.0

R3(config-router)#network 192.168.30.0

(在各路由器上用命令#sh ip route查看路由表,收敛状态下R1R3路由表都含8条路由,R2含有9条路由(包括loopback0接口的直连路由))

 

步骤十二、为交换机-路由器接口配置中继链路和本征VLAN

S1(config)#int f0/1

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk native vlan 99

S1(config-if)#no shut

 

S1(config)#int f0/1

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk native vlan 99

S1(config-if)#no shut

 

S1(config)#int f0/1

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk native vlan 99

S1(config-if)#no shut

阅读(6814) | 评论(2) | 转发(1) |
给主人留下些什么吧!~~

chinaunix网友2009-09-04 09:41:24

第十二步前面的交换机标识错了

chinaunix网友2009-05-28 14:49:57

啊,我现在就是需要好好实践下,多练习才能巩固,综合的再适合不过了,谢谢。