三层交换机与路由器的配置实例图解_第1页
三层交换机与路由器的配置实例图解_第2页
三层交换机与路由器的配置实例图解_第3页
三层交换机与路由器的配置实例图解_第4页
三层交换机与路由器的配置实例图解_第5页
全文预览已结束

下载本文档

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

文档简介

1、三层交换机与路由器的配置 实例(图解)目的:学会使用三层交换与路由器让处于不同网段的网络相互通信实验步骤:一:二层交换机的配置:在三个二层交换机上分别划出两vlan,并将二层交换机上与三层交换或路由器上的接线设置为trunk接口二:三层交换机的配置:1:首先在三层交换上划出两个vlan,并进入vlan为其配置ip,此ip将作为与他相连pc的网关。2:将与二层交换机相连的线同样设置为trunk接线,并将三层交换与路由器连接的线设置为路由接口(no switchsport)3:将路由器和下面的交换机进行单臂路由的配置实验最终结果:拓扑图下各个pc均能相互通信交换机的配置命令:sw 0:switch

2、switchenswitch#confconfiguring from terminal, memory, or network terminal? enter configuration commands, one per line. end with cntl/z.switch(config)#vlan 2switch(config-vlan)#exitswitch(config)#int f0/2switch(config-if)#switchport access vlan 2switch(config-if)#no shutswitch(config-if)#int f0/3swit

3、ch(config-if)#switchport mode trunk %lineproto-5-updown: line protocol on interface fastethernet0/3, changed state to down%lineproto-5-updown: line protocol on interface fastethernet0/3, changed state to upswitch(config-if)#exitswitch(config)#sw 1:switchen switch#confconfiguring from terminal, memor

4、y, or network terminal? enter configuration commands, one per line. end with cntl/z.switch(config)#int f0/2switch(config-if)#switchport access vlan 2% access vlan does not exist. creating vlan 2switch(config-if)#no shutswitch(config-if)#exitswitch(config)#int f0/3switch(config-if)#switchport mode tr

5、unk %lineproto-5-updown: line protocol on interface fastethernet0/3, changed state to down%lineproto-5-updown: line protocol on interface fastethernet0/3, changed state to upswitch(config-if)#sw 2:switchenswitch#confconfiguring from terminal, memory, or network terminal? enter configuration commands

6、, one per line. end with cntl/z.switch(config)#int f0/2switch(config-if)#switchport access vlan 2% access vlan does not exist. creating vlan 2switch(config-if)#exitswitch(config)#int f0/3switch(config-if)#switchport mode trunk switch(config-if)#三层交换的配置命令:switchenswitch#confconfiguring from terminal,

7、 memory, or network terminal? enter configuration commands, one per line. end with cntl/z.switch(config)#int f0/1switch(config-if)#switchport mode trunk %lineproto-5-updown: line protocol on interface fastethernet0/2, changed state to downswitch(config-if)#exitswitch(config)#int f0/2switch(config-if

8、)#switchport mode trunk switch(config-if)#exitswitch(config)#vlan 2switch(config-vlan)#exitswitch(config)#int vlan 1switch(config-if)#no shut%link-5-changed: interface vlan1, changed state to up%lineproto-5-updown: line protocol on interface vlan1, changed state to upswitch(config-if)#ip address 192

9、.168.1.168 255.255.255.0switch(config-if)#exitswitch(config)#int vlan 2%link-5-changed: interface vlan2, changed state to up%lineproto-5-updown: line protocol on interface vlan2, changed state to upswitch(config-if)#ip addswitch(config-if)#ip address 192.168.2.168 255.255.255.0switch(config-if)#%lin

10、k-5-changed: interface fastethernet0/3, changed state to up%lineproto-5-updown: line protocol on interface fastethernet0/3, changed state to upswitch(config-if)#exitswitch(config)#int f0/3switch(config-if)#no switchport %lineproto-5-updown: line protocol on interface fastethernet0/3, changed state t

11、o down%lineproto-5-updown: line protocol on interface fastethernet0/3, changed state to upswitch(config-if)#switch(config-if)#ip address 192.168.10.1 255.255.255.0switch(config-if)#no shutswitch(config-if)#exitswitch(config)#ip routingswitch(config-if)#exitswitch(config)#ip route 0.0.0.0 0.0.0.0 192

12、.168.10.2switch(config)#路由器的配置:routerenrouter#confconfiguring from terminal, memory, or network terminal? enter configuration commands, one per line. end with cntl/z.router(config)#int f0/0router(config-if)#no shut%link-5-changed: interface fastethernet0/0, changed state to uprouter(config-if)#exitr

13、outer(config)#int f0/1router(config-if)#no shut%link-5-changed: interface fastethernet0/1, changed state to up%lineproto-5-updown: line protocol on interface fastethernet0/1, changed state to uprouter(config-if)#exitrouter(config)#int f0/0router(config-if)#no shutrouter(config-if)#exitrouter(config)

14、#int f0/0.1router(config-subif)#encapsulation dot1q 1router(config-subif)#ip address 192.168.3.168 255.255.255.0router(config-subif)#exitrouter(config)#int f0/0.2router(config-subif)#encapsulation dot1q 2router(config-subif)#ip addrouter(config-subif)#ip address 192.168.4.168 255.255.255.0router(config-subif)#exitrouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1router(config)#exit%sys-5-config_i: configured from console by consolerouter#confconfigu

温馨提示

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

评论

0/150

提交评论