交换机实验总结_第1页
交换机实验总结_第2页
交换机实验总结_第3页
交换机实验总结_第4页
交换机实验总结_第5页
已阅读5页,还剩12页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

telnet

交换机上的设置

在哪个vlan中设地址就将计算机接到哪个vlan中

switch(Config)#inlerfacevlan1

%Jan0100:15:482001%LINK-5-CHANGED:InterfaceVlan1,changedstatetoUP

设IP地址

switch(Config-If-Vlanl)#ipaddress

登陆的用户名和密码

switch(Config)#telnel-userITimpassword0123

PC机的设置

“192.168.I.

文ft(l)«H(Z)>tdiWC)传塔①也助QP

。②Q6(ff

login:fhn

password:"••

switch>en

switch*

switchM

switchN

switchN

已尊襄0002?眄检豳TCt/ir

端口镜像

svvitch(Config)#monitorSession1SourceINterfaceethemet0/0/2both(被监视的端口)

switch(Config)#monitorsession1destinationinterfaceethemet0/0/1(镜像的端口)

FireU5tStatusSourceDestiMtionT78Coh

e.・CD分产>尸>尸>nq0Scenar»o0

|Routers|,Ml内皿"au3<***'||Delate

TogglePOULrttWindow

ielectaDevicetoDragandDroptotheWorkspacl

可称«3*毒u1-Zt♦19n

ethernet0/0/1捕获的数据

SnifferPortable-Local,Ethernet(Linespeedat100Ibps)(Snif1:Decode.1/24EtbernetFraaea)5<|

2Iil«*murQnplvlittleH・1》

1h|.|惟|阊留|DeM-,

^IQ型L0融国理Aioiai巨卷」

SCMCEA4>EIe

l9一-

216812192168ICMPEchoreply[74000000010001009

l9

9216813192168ICMPEcho74000010000998992

m921681.2192168ICKPEchoreply74000010010001010

2

91691.3192.168ICMPEcho740000200009990U

m216812192168ICMPEchorvply74000020010001007

92

l91681.3192168ICMPEcho74000030000999029

2:

l921691.2192168ICMPEchoreply74000030010001007

916813192168ICMPEcho74000040000999007

l2

921681.2192168XCUPEchoreply74000040010001006

l921691.3192168ICMP:Echo74000050000998992

900005001

l216812192168ICMPEchomply740001008

921681122400IGMPType2ZVerlMekbex4hipReport60000059510950S74

168XIIGXP7,xte2VerlMefciexzkiiDRorort60000059510.000059

•S3ICKP-------ICMPheader----------

DICKP

■ICMPType-8(£cho>

■ICKPCode-0

■ICMPChecksum-395c(correct)

昌ISPIdanlHier-512

7608004500

・80103cPa8

6263646s“

7273747576

fwXtlp,*<♦”Fl

FcctOleR♦2123

动态、静态链路聚合

神州数码

静态链路聚合

交换机A

switch(Config)#port-group1

switch(Config)#interfaceethernet0/0/1-2

switch(Config-Port-Range)#port-group1modeon

theportEthernelO/O/1successfullyaddedto(hegroup1asonmode

theportEthernetO/O/2successfullyaddedtothegroup1asonmode

交换机B的配置和A一样

动态链路聚合

交换机A

switch(Config)#port-group1

switch(Config)#interfaceethernet0/0/1-2

switch(Config-Port-Range)#port-group1modeactive

LACPsuccessfullyenabledonportEthernetO/O/1

LACPsuccessfullyenabledonportEthcrnctO/O/2

交换机B

switch(Config)#pori-group1

switch(Config)#interfaceethernet0/0/1-2

switch(Config-Port-Range)#port-group1modepassive

LACPsuccessfullyenabledonportEthcrnctO/O/1

LACPsuccessfullyenabledonportEthcrnctO/O/2

三层交换机VLAN兼路由

二层交换机A

(I)swiich(Config)#vlan10

switch(Config-VlanlO)#switchportinterfaceethernet0/0/1-5

SettheportEthernetO/O/1accessvlan10successfully

SettheportEthernetO/O/2accessvlan10successfully

SettheportEthcrnctG/0/3accessvlan10successfully

SettheportEthernetO/O/4accessvlan10successfully

SettheportEthcrnetC'/0/5accessvlan10successfully

(2)switch(Config-VlanlO)#vlan20

switch(Config-Vlan20)#switchportinterfaceethernet0/0/6-11

SettheportEthernetO/O/6accessvlan20successfully

SettheportEthcrnetG/0/7accessvlan20successfully

SettheportEthernetO/O/8accessvlan20successfully

SettheportEthcrnctG/0/9accessvlan20successfully

SettheportEthernetO/O/10accessvlan20successfully

SettheportEtheinetG/O/l1accessvlan20successfully

二层交换机B

(I)>(2)步相同

三层交换机

switch(Config)#vlan10

svvitch(Config)#vlan20

switch(Config)#interfacevlan10

02:29:11:%LINK-5-CHANGED:InterfaceVian10,changecstatetoUP

switch(Config-If-Vlan10)#ipaddress54

switch(Config)#interfacevlan20

02:29:53:%LINK-5-CHANGED:InterfaceVlan20,changedstatetoUP

switch(Config-If-Vlan20)#ipaddress54

switch(Config)#interfaceethernet0/0/1-2

switch(Config-Port-Rangc)#switchportmodetrunk

Set(heportElhernelO/O/1modeTRUNKsuccessfully

SettheportEthernet0/0/2modeTRUNKsuccessfully

switch(Config-Port-Range)#%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan10

,changedstatetoUP

%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceVlan2(),changedstatetoUP

允许一个VLAN通

交换机A

(1)switch(Config)#vlan10

switch(Config-Vlan10)#switchportinterfaceethemet0/0/1-5

SettheportEthcrnetO/O/laccessvlan10successfully

SettheportEthernetO/O/2accessvlan10successfully

SettheportEthernetG/0/3accessvlan10successfully

SettheportEthernetO/OMaccessvlan10successfully

SettheportEthernetG/0/5accessvlan10successfully

(2)switch(Config-Vlan10)#vlan20

switch(Config-Vlan20)#s\vitchportinterfaceethcrnct0/0/6-11

SettheportEthernetO/O/baccessvlan20successfully

SettheportEthernetO/O/7accessvlan20successfully

SettheportEthernetO/O/Saccessvlan20successfully

SettheportEtheinet0/0/9accessvlan20successfully

SettheportEthernetO/O/10accessvlan20successfully

SettheportEthernetG/0/11accessvlan20successfully

switch(Config)#interfaceethernet0/0/24

switch(Config-Ethernet0/0/24)#switchpoitmodetrunk

Set(heportEthernel0/0/24modeTRUNKsuccessfully

只允许vlan10通过

switch(Config-Ethernet0/0/24)#switchporttrunkallowedvlan10

settheportEthcrnet0/0/24allowedvlansuccessfully

交换机B

只要做(1)、(2)步

实验结果

Vlan10可以互相ping通

Vlan2()不可以ping通

交换机A

(1)switch(Config)#vlan10

swilch(Config-VlanIO)#switchporlinterfaceethemet0/0/1-5

SettheportEthernetG/O/laccessvlan10successfully

SettheportEthernetG/O/2accessvlan10successfully

SettheportEthernetO/O/3accessvlan10successfully

SettheportEthernet(j/0/4accessvlan10successfully

SettheportEthcrnctG/0/5accessvlan10successfully

(2)swilch(Config-VlanIO)#vlan20

switch(Config-Vlan20)#switchportinterfacecthernct0/0/6-1i

SettheportEthernetC'/O/baccessvlan20successfully

SettheportEthernetO/O/7accessvlan20successfully

SettheportEthcrnctO/O/8accessvlan20successfully

SettheportEthemetG/0/9accessvlan20successfully

SettheportEthcrnctO/0/10accessvlan20successfully

SettheportEihernetO/O/11accessvlan20successfully

switch(Config)#interfaceethemet0/0/24

switch(Config-Ethernet0/0/24)#switchpor(modetrunk

SettheportEthernet0/0/24modeTRUNKsuccessfully

只允许vlan10通过

svvitch(Config-E(hemet0/0/24)#switchpor(trunkallowedvlan10

settheportEthernet0/0/24allowedvlansuccessfully

交换机B

只要做(1)、(2)步

实验结果

Vlan10可以互相ping通

Vlan20不可以ping通

下载上传文件

上传文件

switch(Config>#inlerfacevlan1

switch(Config-If-Vian1)#ipaddress

将服务器上的文件上传到交换机上

switch#copyt/star-config(需要的文件)startup-config(文件保存的地方)

拷出文件

switch(Config)#interfacevlan1

switch(Config-lf-Vlan1)#ipaddress

确定能ping通

switch#copystartup-config(需要的文件)tftp://l/star-config(文件保存的地方)

无线AP

API:

修改名称

查看无线MAC地址

开启DHCP

开启桥接

(1)填入AP2的MAC地址

配置WAN口的IP地址

AP2

修改名称

行看无线MAC地址

关闭DHCP

开启桥接

(1)填入API的MAC地址

修改LAN1J的地址

注意API和AP2的LAN口地址不能一样

IP拨号

设置端口IP地址

Routcr_config_ro/O#ipaddress

配置POTS拨号对(本地)

Rouler_config#dial-peervoice1pots

Router_config_dialpeer_1#destination-pattern10001

Router_config_dialpeer_I#port1/0

对端

Routcr_config#dial-pccrvoice2voip

Router_config_dialpeer_2#destination-pattern10002

Routcr_config_dialpcer_2#scssiontargetipv4:

设置端口IP地址

Router_config_«)/O#ipaddress

配置POTS拨号对(本地)

Router_config#dial-peervoice1pots

Router_config_dialpeer_l#destination-pattern10002

Routcr_config_dialpcer_l#port1/0

对端

Router_config#dial-peervoice2voip

Router_config_dialpeer_2#destination-pattern100()1

Router_config_dialpeer_2#sessiontargetipv4:

单网段NAT

在内部和外部接口上配置iP地址

Router_config#interfaceFastEthernet0/0

Router_config_fl)/O#ipaddress54

Router_config#interfaceFastEthernet0/1

Router_config_f()/l#ipaddress3528

使用访问控制列表定义哪些内部的主机可以做NAT

Rouler_config#ipaccess-liststandardabc(名字)

Router_config_std_nacl#permit

确定什么公网地址池

Router_config#ipnatpool123(名字)353528

指定地址转换映射

Rouler_config#ipnatinsidesourcelistabcpool123overload

在内部和外部接口上启用NAT

Router_config#interfacefastEthernet0/0

Router_config_H)/0#ipnatinside

Routcr_config#intcrfaccfastEthernet0/1

Rouler_config_(D/l#ipnatoutside

配置默认路由

Rouler_config#iproute58.1922.65.254

多网段NAT

[Root]Ne*Ouster

三层sw:

switch#

switch#config

switch(Config)#

1,划分VLAN10,20,30;

switch(Config)#vlan10

switch(Config-Vlan10)#exit

switch(Config)#vlan20

switch(Config-Vlan20)#exil

switch(Config)#vlan30

switch(Config-Vlan30)#exil

switch(Config)#

2,给VLAN配置地址:

switch(Config)#interfacevlan1()

switch(Config-If-Vlan10)#ipaddress192.i68.10.254

switch(Config-If-Vlan10)#cxit

switch(Config)#

switch(Config)#interfacevlan20

switch(Config-If-Vlan20)#ipaddress54

switch(Config-If-Vlan20)#exit

switch(Config)#intcrfaccvlan30

switch(Config-If-Vlan30)#ipaddress

switch(Config-If-Vlan30)#exit

switch(Config)#

3,加端口进VLAN:

switch(Config)#interfacee0/0/l-10

switch(Config-Port-Range)#switchportaccessvlan1()

svvitch(Config-Port-Range)#exit

switch(Config)#

svvitch(Config)#interfaceeO/0/11-20

switch(Config-Port-Range)#switchportaccessvlan20

switch(Config-Port-Range)#exit

switch(Config)#

switch(Config)#interfaceeO/O/24

switch(Config-Ethemet0/0/24)#switchportaccessvlan30

switch(Config-Ethernet0/0/24)#

switch(Config-E(hemet0/0/24)#exil

switch(Config)#

4,配置默认路由

switch(Config)#iproute().().().()

switch(Config)#

R:

配置静态路由:

Router_config#iproute

Routcr_config#iproute

1,配置内部接口上的IP地址

Rouler_config#interface代)/0

Router_config_fWO#ipaddress

Router_config_f()/()#exit

Router_config#

配置外部接口上的IP地址

Routcr_config#intcrfaccf0/l

Router_config_fO/l#ipaddress3328

Router_config_H)/l#exit

Router_config#

2,使用标准ACL,配置允许使用NAT的主机地址网段

Routcr_config#ipaccess-liststandardS-LAN//S-LAN是ACL的名字

Router_config_std_nacl#permit〃超网(或者可以打两次peimil

命令)

Router_config_s(d_nacl#exit

Router_config#

3,采用的公网

Router_config#ipnatpoolP-WAN3358.192.65,23328

4,指定地址转换映射

Router_config#ipnatinsidesourcelistS-LANpoolP-WANoverload

5,在内部接口上启用NAT

Router_config#interfacef0/0

Router_config_f0/0#ipnatinside

Rouler_config_ro/O#exit

Router_config#

在外部接口上启用NAT

Router_config#interfacef0d

Router_config_fO/1#ipnatoutside

Router_config_fO/1#cxit

Router_config#

6,配置默认路由

Router_config#iproute54

NAT成功的验证

switch3

interfaceVian10

ipaddress54

interfaceVian20

ipaddress54

interfaceVlan30

ipaddress

将24号口放入VLAN30中

将1-5放入vlanlO中

将6-H放入vlan20中

设置静态路由

iprouteO.O.O.OO.O.O.O

设置计算机的默认网关

Router1

设置端口IP地址

NAT

ipaccess-liststandardfhm

ipnatpoolabcnetmask

ipnatinsidesourcelistfhmpoolabcoverload

ipaccess-liststandardfilm

permit55

permit55

设置静态路由

iproute

iproute

iprouteO.O.O.O().().().()35

iproute

Rouler2

设置端口IP地址

PAP双向认证

思科

A

A(config)#aaanew-model

Router(config)#hostnameA

A(config)#aaaauthenticationpppfhmlocal

A(config)#uscrnamcBpassword456

A(config)#interfaceserial0H/0

A(config-iQ#ipaddress

A(config-if)#encapsulationppp

A(config-if)#pppauthenticationpap

A(config-if)#ppppapsent-usernameApassword123

A(config-if)#clockrate9600

%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceSerialO/l/O,changedstatetoup

A#ping

B

B(config)#aaanew-model

Rouler(config)#hostnaineB

B(config)#aaaauthenticationpppfhmlocal

B(config)#uscrnamcApassword123

B(config)#interfaceserial0/2/0

B(config-if)#ipaddress

B(config-if)#encapsulationppp

B(config-if)#pppauthenticationpap

B(config-if)#ppppapseni-usemameBpassword456

%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceSerial0/2/0,changedstatetoup

B#ping

神马

RouterA

Router_config#aaaauthenticationppptestlocal

Router_config#usernamerouterBpassword456

Routcr_config#inlerfaceserial0/2

Router_config_s0/2#ipaddress

Router_config_s0/2#encapsulationppp

Router_config_s0/2#Jan100:02:03LineonInterfaceSerial0/2,changedstateto

up

Router_config_s0/2#ppppapsent-usernamerouterApassword123

Routcr_config_s0/2#noshutdown

Rouler_config_s0/2#Jan100:05:09LineprotocolonInterfaceSerialO/2,changed

statetoup

RouterB

Router_config#aaaauthenticationppptestlocal

Rouler_config#usernamerouterApassw

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论