三层交换机组建vlan入门手册.doc_第1页
三层交换机组建vlan入门手册.doc_第2页
三层交换机组建vlan入门手册.doc_第3页
三层交换机组建vlan入门手册.doc_第4页
三层交换机组建vlan入门手册.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

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

文档简介

三层交换机组建vlan入门1.交换机的ip如何配置一般vlan 1的ip就是交换机的管理ip,交换机的ip配置,可以理解为vlan 1配置ip,当然选择其它vlan也可以。2.vlan在哪里划分三层交换机上先创建域,然后划分vlan x,并为vlan x 分配ip (这个ip 就是vlan x内所有pc的网关) ,二层交换机只要加入到域,并将端口分配到相应的vlan就可以了3.如何telnet远端管理交换机在三层交换机上配置vlan 1 的ip并启动vlan 1,设置特权密码,开启虚拟终端vty,设置访问密码,然后在二层交换机上配置vlan 1 的ip并启动vlan 1,设置特权密码,开启虚拟终端vty,设置访问密码,并在二层交换机上配置默认网关为三层交换机vlan 1 的ip.网络拓扑图如下 三层交换机:3560 Switch1 f0/24-二成交换机:2950T Switch2:f0/24三层交换机:3560 Switch1 f0/23-二成交换机:2950T Switch3:f0/24二成交换机:2950T Switch3:f0/1-pc 192.168.10.12二成交换机:2950T Switch3:f0/2-pc 192.168.20.12二成交换机:2950T Switch2:f0/1-pc 192.168.10.11二成交换机:2950T Switch2:f0/2-pc 192.168.20.11分两部分来讲解如何在三层交换机上实现vlan的划分和不同vlan间的相互访问 如何实现不同vlan的PC可以telnet来远程管理交换机如何在三层交换机上实现vlan的划分和不同vlan间的相互访问全局配置思路1. 在三层交换机上配置域(server)2. 在三层交换机上创建vlan3. 在三层交换机上为每个vlan配置ip4. 在三层交换机上配置trunk口5. 在二层交换机上配置域(client)6. 在二层交换机上配置trunk口7. 在二层交换机上将端口分配到vlan以下为实际配置全过程,黑色部分为系统文字,蓝色部分为我输入命令或提示Switchenable 进入特权模式Switch#config 进入全局模式Configuring from terminal, memory, or network terminal? Terminal 进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vtp domain ichia 创建域,名为ichiaChanging VTP domain name from NULL to ichiaSwitch(config)#vtp mode server 设置为域服务器Device mode already VTP SERVER.Switch(config)#exit 退出全局模式Switch#vlan database 进入vlan模式% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 10 创建vlan 10VLAN 10 added: Name: VLAN0010 系统默认为这个vlan分配了一个名字Switch(vlan)#vlan 20 创建vlan 20VLAN 20 added: Name: VLAN0020Switch(vlan)#exit APPLY completed.Exiting.Switch#config 进入全局模式Configuring from terminal, memory, or network terminal? Terminal 进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int vlan 10 进入vlan 10%LINK-5-CHANGED: Interface Vlan10, changed state to upSwitch(config-if)#ip add 192.168.10.1 255.255.255.0 为vlan 10分配 ip地址,这个地址也是这个vlan的网关Switch(config-if)#exitSwitch(config)#int vlan 20%LINK-5-CHANGED: Interface Vlan20, changed state to upSwitch(config-if)#ip add 192.168.20.1 255.255.255.0Switch(config-if)#exitSwitch(config)#int f0/24 三层交换机上的24 ,23端口被用来做trunk口 Switch(config-if)#switchport mode trunkCommand rejected: An interface whose trunk encapsulation is Auto can not be configured to trunk mode.这个地方提示错误,因为需要先配置协议:dot1q 为802.1Q协议,ISL 为思科专用vlan协议Switch(config-if)#switchport trunk encapsulation dot1qSwitch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to upSwitch(config-if)#exitSwitch(config)#int f0/23Switch(config-if)#switchport trunk encapsulation dot1q 设置802.1Q网络协议Switch(config-if)#switchport mode trunk 设置为trunk口%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23, changed state to upSwitch(config-if)#exitSwitch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#exitSwitch con0 is now available三层交换机部分就算设置好了下面进入到二层交换机部分SwitchenableSwitch#configConfiguring from terminal, memory, or network terminal? terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vtp domain ichia 加入到 ichia 域Domain name already set to ichia.Switch(config)#vtp mode client 在域中扮演用户端的角色Setting device to VTP CLIENT mode.Switch(config)#int f0/24 进入端口24Switch(config-if)#switchport mode trunk 设置端口为trunk口Switch(config-if)#exitSwitch(config)#int f0/1 进入端口1Switch(config-if)#switchport access vlan 10 将端口分配给vlan 10Switch(config-if)#exitSwitch(config)#int f0/2 进入端口2Switch(config-if)#switchport access vlan 20 将端口分配给 vlan 20Switch(config-if)#exitSwitch(config)#exit以上为二层交换机的配置内容交换机Switch3的配置和Switch2 基本一样配置完成后我们直接在pc上测试从图上可以看到:192.168.20.11 ping 192.168.10.11 成功192.168.20.11 ping 192.168.20.12 成功如何实现不同vlan的PC可以telnet来远程管理交换机配置思路1. 三层交换机配置vlan 1 的ip,开启vlan 1,配置特权密码,开启VTY和访问密码2. 二层交换机配置vlan 1 的ip,开启 vlan 1 ,设置网关为三层交换机vlan 1的ip地址,配置特权密码,开启vty和访问密码。先配置三层交换机Switchenable 进入特权模式Switch#vlan database 进入vlan设置% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 1 创建vlan 1VLAN 1 modified:Switch(vlan)#exitAPPLY completed.Exiting.Switch#config t 进入全局模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int vlan 1 进入vlan 1Switch(config-if)#ip add 192.168.128.1 255.255.255.0 配置vlan 1 的ip地址,子网掩码Switch(config-if)#no shutdown 开启vlan 1%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upSwitch(config-if)#exitSwitch(config)#line console 0 进入控制台口Switch(config-line)#line vty 0 4 进入虚拟终端,这里0 4 表示开启01234五个连接Switch(config-line)#login 允许登录Switch(config-line)#password 123456 登录密码123456Switch(config-line)#exitSwitch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#Switch#show vlan二层交换机的配置(switch2)SwitchenSwitch#vlan database 进入vlan设置% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. 这里可以看到其实系统已经开始警告了Switch(vlan)#vlan 1VTP VLAN configuration not allowed when device is in CLIENT mode. 对于上面的警告,这里给出了解释Switch(vlan)#exit 在域里面只有server可以创建,修改vlanAPPLY completed. 而二层交换机充当的角色是clientExiting.Switch#config t 进入特权模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#enable password 123456 设置特权模式密码:123456 /*这里下面会有一个小测试*/Switch(config)#int vlan 1 进入vlan 1Switch(config-if)#ip add 192.168.128.2 255.255.255.0 配置ip,子网掩码Switch(config-if)#exitSwitch(config)#ip default-gateway 192.168.128.1 在全局模式下配置网关,为三层交换机的ip地址Switch(config)#int vlan 1Switch(config-if)#no shutdown 开启vlan 1%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upSwitch(config-if)#exitSwitch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#line console 0 进入控制端口Switch(config-line)#line vty 0 4 开通01234五个端口S

温馨提示

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

评论

0/150

提交评论