三层路由配置.docx

上传人:b****2 文档编号:22783484 上传时间:2023-04-27 格式:DOCX 页数:11 大小:311.75KB
下载 相关 举报
三层路由配置.docx_第1页
第1页 / 共11页
三层路由配置.docx_第2页
第2页 / 共11页
三层路由配置.docx_第3页
第3页 / 共11页
三层路由配置.docx_第4页
第4页 / 共11页
三层路由配置.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

三层路由配置.docx

《三层路由配置.docx》由会员分享,可在线阅读,更多相关《三层路由配置.docx(11页珍藏版)》请在冰豆网上搜索。

三层路由配置.docx

三层路由配置

PacketTracer5.0构建CCNA攻略补充之VTP与VLAN配置

2008-12-1922:

19

  自从今年10月4日《PacketTracer5.0建构CCNA实验攻略》系列文章在我的XX博客发布以来,已经有一万多的访问量,也被一些网友在博客、论坛上转载或链接,这是我当初所没有想到的——有那么多人在学习思科的产品。

我主张无论是学习哪一家的网络产品或获取认证时,都不要急于求成,而应该是通过学习获得知识与实践经验,所以网络的基础理论知识是一定要认真去学习的,可以从网上下载IEEE802.1D、IEEE802.1Q及RFC文档作为参考,学习网络应该看这些项英文原版的标准文档,对以后的发展是很有好处的。

  

 许多网在看完的这些文章时,也不断地给我反馈,向我提出意见和建议,表示感谢!

有一些网友向我提出了一些问题,我会尽我所能,抽出时间为以前的文章做详细补充,给朋友们详细讲解,希望与大家一同进步!

  应网友maochunfei55的要求,本篇文章是对《PacketTracer5.0建构CCNA实验攻略(3)——CiscoVTP》的详细补充。

图一 实验拓扑图

  配置步骤:

  1、配置VTP协议

  Cisco3560交换机配置命令,Cisco3560交换机作为VTPServer,是局域网中的核心交换机。

3560(config)#vtpdomainsenya

ChangingVTPdomainnamefromNULLtosenya

3560(config)#vtpserver

3560(config)#vtpmodeserver

DevicemodealreadyVTPSERVER.

查看VTP的配置

3560#shvtpstatus

VTPVersion                    :

2

ConfigurationRevision         :

4

MaximumVLANssupportedlocally:

1005

NumberofexistingVLANs       :

7

VTPOperatingMode             :

Server

VTPDomainName                :

senya

VTPPruningMode               :

Disabled

VTPV2Mode                    :

Disabled

VTPTrapsGeneration           :

Disabled

MD5digest                     :

0x510x270x1E0xD30xC80x550xC10x58

Configurationlastmodifiedby0.0.0.0at3-1-9300:

19:

44

LocalupdaterIDis192.168.1.254oninterfaceVl2(lowestnumberedVLANinterfacefound)

  两个作为接入\汇聚层的2950的配置VTP的命令

2950A(config)#vtpdomainsenya

ChangingVTPdomainnamefromNULLtosenya

2950A(config)#vtpmodeclient

SettingdevicetoVTPCLIENTmode.

2950A(config)#

查看VTP的配置

2950A#shvtpstatus

VTPVersion                    :

2

ConfigurationRevision         :

4

MaximumVLANssupportedlocally:

255

NumberofexistingVLANs       :

7

VTPOperatingMode             :

Client

VTPDomainName                :

senya

VTPPruningMode               :

Disabled

VTPV2Mode                    :

Disabled

VTPTrapsGeneration           :

Disabled

MD5digest                     :

0x510x270x1E0xD30xC80x550xC10x58

Configurationlastmodifiedby0.0.0.0at3-1-9300:

19:

44

  2、配置trunk链路

  两个Cisco2950交换机使用fastthernet0/24端口分别与核心交换机的24、23端口相连,这两条链

路应为trunk,相连的每个端口为trunk类型,配置命令相同,如下:

2950B(config)#interfacefa0/24

2950B(config-if)#switchportmodetrunk

2950B(config-if)#switchporttrunkallowedvlanall

  3、在核心交换机Cisco3560上创建两个Vlan:

vlan2名称为math;vlan3名称为chinese。

3560(config)#vlan2

3560(config-vlan)#namemath

3560(config-vlan)#vlan3

3560(config-vlan)#namechinese

  在三个交换机上使用shvlan命令均可以查看到如下的vlan信息:

2950A#shvlan

VLANName                            Status   Ports

----------------------------------------------------------------------------

1   default                         active   Fa0/1,Fa0/2,Fa0/3,Fa0/4

                                               Fa0/5,Fa0/6,Fa0/7,Fa0/8

                                               Fa0/9,Fa0/10,Fa0/11,Fa0/12

                                               Fa0/13,Fa0/14,Fa0/15,Fa0/16

                                               Fa0/17,Fa0/18,Fa0/19,Fa0/20

                                               Fa0/21,Fa0/22,Fa0/23

2   math                            active   

3   chinese                         active   

1002fddi-default                    active   

1003token-ring-default              active   

1004fddinet-default                 active   

1005trnet-default                   active   

VLANTypeSAID      MTU  ParentRingNoBridgeNoStpBrdgModeTrans1Trans2

--------------------------------------------------------------------

1   enet100001    1500-     -     -       -   -       0     0

2   enet100002    1500-     -     -       -   -       0     0

3   enet100003    1500-     -     -       -   -       0     0

1002enet101002    1500-     -     -       -   -       0     0

1003enet101003    1500-     -     -       -   -       0     0

1004enet101004    1500-     -     -       -   -       0     0

1005enet101005    1500-     -     -       -   -       0     0

  4、把端口划分到相应的Vlan

2950A#conft

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

2950A(config)#interfacefa0/1

2950A(config-if)#switchportmodeaccess

2950A(config-if)#switchportaccessvlan2

2950A(config-if)#interfacefa0/2

2950A(config-if)#switchportmodeaccess

2950A(config-if)#switchportaccessvlan3

2950A(config-if)#quit

2950B#conft

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

2950B(config)#interfacefa0/1

2950B(config-if)#switchportmodeaccess

2950B(config-if)#switchportaccessvlan2

2950B(config-if)#interfacefa0/2

2950B(config-if)#switchportmodeaccess

2950B(config-if)#switchportaccessvlan3

2950B(config-if)#exit

  5、配置IP地址信息

  vlan2接口的IP地址:

3560(config)#interfacevlan2

%LINK-5-CHANGED:

InterfaceVlan2,changedstatetoup

%LINEPROTO-5-UPDOWN:

LineprotocolonInterfaceVlan2,changedstatetoup3560(config-if)

#ipaddress192.168.1.254255.255.255.0

  vlan3接口的IP地址:

3560(config-if)#interfacevlan3

%LINK-5-CHANGED:

InterfaceVlan3,changedstatetoup

%LINEPROTO-5-UPDOWN:

LineprotocolonInterfaceVlan3,changedstatetoup3560(config-if)

#ipaddress192.168.2.254255.255.255.0

3560(config-if)#quit

  在图一中pc0与pc2划入了vlan2,因此它们的网关应该为192.168.1.254,ip地址我分别配置为192.168.1.1、192.168.1.2;pc1与pc3属于vlan3,它们的网关应该为192.168.2.254,ip地址我分别配置为192.168.2.1与192.168.2.2。

  6、连通性测试

图二

  7、每个交换机的配置文件

  Cisco3560:

3560#shrun

Buildingconfiguration...

Currentconfiguration:

1144bytes

!

version12.2

noservicepassword-encryption

!

hostname3560

!

!

!

!

!

ipsshversion1

!

port-channelload-balancesrc-mac

!

interfaceFastEthernet0/1

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceFastEthernet0/16

!

interfaceFastEthernet0/17

!

interfaceFastEthernet0/18

!

interfaceFastEthernet0/19

!

interfaceFastEthernet0/20

!

interfaceFastEthernet0/21

!

interfaceFastEthernet0/22

!

interfaceFastEthernet0/23

switchportmodetrunk

!

interfaceFastEthernet0/24

switchportmodetrunk

!

interfaceGigabitEthernet0/1

!

interfaceGigabitEthernet0/2

!

interfaceVlan1

noipaddress

shutdown

!

interfaceVlan2

ipaddress192.168.1.254255.255.255.0

!

interfaceVlan3

ipaddress192.168.2.254255.255.255.0

!

ipclassless

!

!

!

!

!

linecon0

linevty04

login

!

!

end

第一个Cisco2950:

2950A#shrun

Buildingconfiguration...

Currentconfiguration:

985bytes

!

version12.1

noservicepassword-encryption

!

hostname2950A

!

!

!

interfaceFastEthernet0/1

switchportaccessvlan2

switchportmodeaccess

!

interfaceFastEthernet0/2

switchportaccessvlan3

switchportmodeaccess

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceFastEthernet0/16

!

interfaceFastEthernet0/17

!

interfaceFastEthernet0/18

!

interfaceFastEthernet0/19

!

interfaceFastEthernet0/20

!

interfaceFastEthernet0/21

!

interfaceFastEthernet0/22

!

interfaceFastEthernet0/23

!

interfaceFastEthernet0/24

switchportmodetrunk

!

interfaceVlan1

noipaddress

shutdown

!

linecon0

!

linevty04

login

linevty515

login

!

!

end

第二个Cisco2950:

2950B#shrun

Buildingconfiguration...

Currentconfiguration:

985bytes

!

version12.1

noservicepassword-encryption

!

hostname2950B

!

!

!

interfaceFastEthernet0/1

switchportaccessvlan2

switchportmodeaccess

!

interfaceFastEthernet0/2

switchportaccessvlan3

switchportmodeaccess

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceFastEthernet0/16

!

interfaceFastEthernet0/17

!

interfaceFastEthernet0/18

!

interfaceFastEthernet0/19

!

interfaceFastEthernet0/20

!

interfaceFastEthernet0/21

!

interfaceFastEthernet0/22

!

interfaceFastEthernet0/23

!

interfaceFastEthernet0/24

switchportmodetrunk

!

interfaceVlan1

noipaddress

shutdown

!

linecon0

!

linevty04

login

linevty515

login

!

!

end

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 职业教育 > 其它

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1