2022年2022年交换机配置解释

上传人:ni****g 文档编号:567375502 上传时间:2024-07-20 格式:PDF 页数:32 大小:512.99KB
返回 下载 相关 举报
2022年2022年交换机配置解释_第1页
第1页 / 共32页
2022年2022年交换机配置解释_第2页
第2页 / 共32页
2022年2022年交换机配置解释_第3页
第3页 / 共32页
2022年2022年交换机配置解释_第4页
第4页 / 共32页
2022年2022年交换机配置解释_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《2022年2022年交换机配置解释》由会员分享,可在线阅读,更多相关《2022年2022年交换机配置解释(32页珍藏版)》请在金锄头文库上搜索。

1、Switch 命令大全cisco 命令大全解释、注释案例实战 : 交换机 Trunk 隧道技术应用switch 命令大全1. 在基于 IOS 的交换机上设置 主机名 / 系统名 : switch(config)# hostname hostname 在基于 CLI 的交换机上设置主机名 / 系统名 : switch(enable) set system name name-string 2. 在基于 IOS 的交换机上 设置登录口令 : switch(config)# enable password level 1 password 在基于 CLI 的交换机上设置登录口令 : switch(e

2、nable) set password switch(enable) set enalbepass 3. 在基于 IOS 的交换机上 设置远程访问 :switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于 CLI 的交换机上设置远程访问 : switch(enable) set interface sc0 ip-address netmask broadcast-address sw

3、itch(enable) set interface sc0 vlan 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 32 页 - - - - - - - - - switch(enable) set ip route default gateway 4. 在基于 IOS 的交换机上 启用和浏览 CDP 信息:switch(config-if)# cdp enable switch(config-if)# no cdp enable 为了查看 Cisco 邻接设备的 C

4、DP 通告信息 : switch# show cdp interface type modle/port switch# show cdp neighbors type module/port detail 在基于 CLI 的交换机上启用和浏览CDP 信息: switch(enable) set cdp enable|disable module/port 为了查看 Cisco 邻接设备的 CDP 通告信息 : switch(enable) show cdp neighborsmodule/port vlan|duplex|capabilities|detail 5. 基于 IOS 的交换机的

5、 端口描述 :switch(config-if)# description description-string 基于 CLI 的交换机的端口描述 : switch(enable)set port name module/ number description-string 6. 在基于 IOS 的交换机上 设置端口速度 : switch(config-if)# speed10|100|auto 在基于 CLI 的交换机上设置端口速度 : switch(enable) set port speed moudle/ number 10|100|auto switch(enable) set po

6、rt speed moudle/ 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 32 页 - - - - - - - - - number 4|16|auto 7. 在基于 IOS 的交换机上 设置以太网的链路模式 : switch(config-if)# duplex auto|full|half 在基于 CLI 的交换机上设置以太网的链路模式: switch(enable) set port duplex module/number full|half 8. 在基于

7、 IOS 的交换机上 配置静态 VLAN:switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end 在基于 CLI

8、 的交换机上配置静态VLAN: switch(enable) set vlan vlan-num name name switch(enable) set vlan vlan-num mod-num/port-list 9. 在基于 IOS 的交换机上 配置 VLAN 中继线 : switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk 名师资料总结 - - -精品资料欢迎下载 - - - - - - - -

9、- - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 32 页 - - - - - - - - - encapsulation isl|dotlq switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于 CLI 的交换机上配置 VLAN 中继线 : switch(enable) set trunk module/port on|off|desi

10、rable|auto|nonegotiate Vlan-range isl|dotlq|dotl0|lane|negotiate 10. 在基于 IOS 的交换机上配置 VTP管理域 : switch# vlan database switch(vlan)# vtp domain domain-name 在基于 CLI 的交换机上配置 VTP管理域 : switch(enable) set vtp domain domain-name 11. 在基于 IOS 的交换机上配置 VTP 模式 : switch# vlan database switch(vlan)# vtp domain doma

11、in-name switch(vlan)# vtp sever|cilent|transparent switch(vlan)# vtp password password 在基于 CLI 的交换机上配置 VTP 模式: switch(enable) set vtp domain domain-name mode sever|cilent|transparent password password 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 32 页 - - - -

12、- - - - - 12. 在基于 IOS 的交换机上配置 VTP版本 : switch# vlan database switch(vlan)# vtp v2-mode 在基于 CLI 的交换机上配置 VTP版本: switch(enable) set vtp v2 enable 13. 在基于 IOS 的交换机上启动 VTP剪裁 : switch# vlan database switch(vlan)# vtp pruning 在基于 CL I 的交换机上启动 VTP剪裁: switch(enable) set vtp pruning enable 14. 在基于 IOS 的交换机上配置以

13、太信道 : switch(config-if)# port group group-number distribution source|destination 在基于 CLI 的交换机上配置以太信道 : switch(enable) set port channel moudle/port-range modeon|off|desirable|auto 15. 在基于 IOS 的交换机上调整根路径成本: switch(config-if)# spanning-tree vlan vlan-list cost cost 在基于 CLI 的交换机上调整根路径成本: switch(enable)

14、set spantree portcost moudle/port cost switch(enable) set spantree portvlancost moudle/ port cost costvlan-list 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 32 页 - - - - - - - - - 16. 在基于 IOS 的交换机上调整端口ID: switch(config-if)# spanning-tree vlan vlan-listport-pr

15、iority port-priority 在基于 CLI 的交换机上调整端口ID: switch(enable) set spantree portpri mldule/portpriority switch(enable) set spantree portvlanpri module/portpriority vlans 17. 在基于 IOS 的交换机上修改 STP时钟 : switch(config)# spanning-tree vlan vlan-list hello-time seconds switch(config)# spanning-tree vlan vlan-list

16、 forward-time seconds switch(config)# spanning-tree vlan vlan-list max-age seconds 在基于 CLI 的交换机上修改 STP时钟: switch(enable) set spantree hello intervalvlan switch(enable) set spantree fwddelay delay vlan switch(enable) set spantree maxage agingtiamevlan 18. 在基于 IOS 的交换机端口上启用或禁用 Port Fast 特征: 名师资料总结 - -

17、 -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 32 页 - - - - - - - - - switch(config-if)#spanning-tree portfast 在基于 CLI 的交换机端口上启用或禁用 Port Fast 特征: switch(enable) set spantree portfast module/portenable|disable 19. 在基于 IOS 的交换机端口上启用或禁用 UplinkFast 特征: switch(config)# spanni

18、ng-tree uplinkfast max-update-rate pkts-per-second 在基于 CLI 的交换机端口上启用或禁用 UplinkFast 特征: switch(enable) set spantree uplinkfast enable|disablerate update-rate all-protocols off|on 20. 为了将交换机配置成一个集群的命令交换机 , 首先要给管理接口分配一个 IP 地址, 然后使用下列命令 : switch(config)# cluster enable cluster-name 21. 为了从一条中继链路上删除VLAN,

19、可使用下列命令 : switch(enable) clear trunk module/port vlan-range 22. 用 show vtp domain 显示管理域的 VTP参数. 23. 用 show vtp statistics显示管理域的 VTP参数. 24. 在 Catalyst交换机上定义 TrBRF的命令如下 : switch(enable) set vlan vlan-name name name type trbrf bridge bridge-numstp ieee|ibm 25. 在 Catalyst交换机上定义 TrCRF的命令如下: switch (enabl

20、e) set vlan vlan-num 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 32 页 - - - - - - - - - name name type trcrf ring hex-ring-num|decring decimal-ring-num parent vlan-num 26. 在创建好 TrBRF VLAN 之后, 就可以给它分配交换机端口. 对于以太网交换 , 可以采用如下命令给VLAN分配端口 : switch(enable) set vla

21、n vlan-num mod-num/port-num 27. 命令 show spantree显示一个交换机端口的STP状态. 28. 配置一个 ELAN的 LES和 BUS,可以使用下列命令 : ATM (config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29. 配置 LECS: ATM(config)# lane database database-name ATM(lane-config-databade)# name elan1-na

22、me server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name ,30. 创建完数据库后 , 必须在主接口上启动LECS. 命令如下 : ATM(config)# interface atm number ATM(config-if)# lane config database database-name ATM(config-if)# lane confi

23、g auto-config-atm-address 31. 将每个 LEC配置到一个不同的ATM子接口上 . 命令如下 : ATM(config)# interface atm number.subint multipoint 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 8 页,共 32 页 - - - - - - - - - ATM(config)# lane client ethernet vlan-num elan-num 32. 用 show lane server 显示

24、 LES的状态 . 33. 用 show lane bus显示 bus 的状态 . 34. 用 show lane database显示 LECS 数据库可内容 . 35. 用 show lane client显示 LEC的状态 . 36. 用 show module 显示已安装的模块列表 . 37. 用物理接口建立与VLAN 的连接 : router# configure terminal router(config)# interface media module/port router(config-if)# description description-string router(c

25、onfig-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown 38. 用中继链路来建立与VLAN 的连接 : router(config)# interface module/port.subinterface router(config-ig)# encapsulationisl|dotlq vlan-number router(config-if)# ip address ip-address subnet-mask 39. 用 LANE 来建立与 VLAN 的连接 : router(config)# in

26、terface atm module/port router(config-if)# no ip address router(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilni 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 9 页,共 32 页 - - - - - - - - - router(config-if)# interface atm module/ port.subinterfa

27、ce multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-num router(config-if)# interface atm module/ port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(conf

28、ig-if)# ,40. 为了在路由处理器上进行动态路由配置, 可以用下列 IOS 命令来进行 : router(config)# ip routing router(config)# router ip-routing-protocol router(config-router)# network ip-network-number router(config-router)# network ip-network-number 41. 配置默认路由 : switch(enable) set ip route default gateway 42. 为一个路由处理器分配VLANID, 可在接

29、口模式下使用下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 10 页,共 32 页 - - - - - - - - - 43. 在路由处理器启用MLSP: router(config)# mls rp ip 44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: router(co

30、nfig)# interface interface number router(config-if)# mls rp vtp-domain domain-name 45. 查看指定的 VTP域的信息 : router# show mls rp vtp-domain vtp domain name 46. 要确定 RSM 或路由器上的管理接口 , 可以在接口模式下输入下列命令: router(config-if)#mls rp management-interface 47. 要检验 MLS-RP 的配置情况:router# show mls rp 48. 检验特定接口上的MLS 配置:rou

31、ter# show mls rp interface interface number 49. 为了在 MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow destination|destination-source|full 50. 为使 MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl 51. 当某个交换机的第 3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable 52. 若想改变老化时间的值,名师资料总结

32、- - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 11 页,共 32 页 - - - - - - - - - 可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime 53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold 54. 确定那些 MLS-RP 和 MLS-SE 参与了 MLS ,可先显示交换机引用列表中的内容再确定:switch(ena

33、ble) show mls include 55. 显示 MLS高速缓存记录:switch(enable) show mls entry 56. 用命令 show in arp显示 ARP高速缓存区的内容。57. 要把路由器配置为HSRP 备份组的成员,可以在接口配置模式下使用下面的命令:router(config-if)# standby group-number ip ip-address 58. 为了使一个路由器重新恢复转发路由器的角色,在接口配置模式下:router(config-if)# standy group-number preempt 59. 访问时间和保持时间参数是可配置的

34、:router(config-if)# standy group-number timers hellotime holdtime 60. 配置 HSRP 跟踪:router(config-if)# standy group-number track type-number interface-priority 61. 要显示 HSRP 路由器的状态:名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 12 页,共 32 页 - - - - - - - - - router# show

35、standby type-number group brief 62. 用命令 show ip igmp确定当选的查询器。63. 启动 IP 组播路由选择:router(config)# ip muticast-routing 64. 启动接口上的 PIM:dalllasr1(config-if)# ip pim dense-mode|sparse-mode|sparse-dense-mode 65. 启动稀疏 - 稠密模式下的 PIM:router# ip multicast-routing router# interface type number router# ip pim spars

36、e-dense-mode 66. 核实 PIM的配置:dallasr1# show ip pim interfacetype number count 67. 显示 PIM邻居:dallasr1# show ip neighbor type number 68. 为了配置 RP的地址,命令如下:dallasr1# ip pim rp-address ip-address group-access-list-numberoverride 69. 选择一个默认的RP :dallasr1# ip pim rp-address 通告 RP和它所服务的组范围:dallasr1# ip pim send-

37、rp-announce type number scope ttl group-list access-list-number 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 13 页,共 32 页 - - - - - - - - - 为管理范围组通告RP的地址:dallasr1# ip pim send-rp-announce ethernet0 scope 16 group-list1 dallasr1# access-list 1 permit 266.0.0.0 0.255.

38、255.255 设定一个 RP映像代理:dallasr1# ip pim send-rp-discovery scope ttl 核实组到 RP的映像:dallasr1# show ip pim rp mapping dallasr1# show ip pim rp group-name|group-address mapping 70. 在路由器接口上用命令ip multicast ttl-threshold ttl-value设定 TTL阀值:dallasr1(config-if)# ip multicast ttl-threshold ttl-value 71. 用 show ip pi

39、m neighbor显示 PIM邻居表。72. 显示组播通信路由表中的各条记录:dallasr1show ip mroute group-name|group-address scouresummarycountactive kbps 73. 要记录一个路由器接受和发送的全部IP 组播包:dallasr1 #debug ip mpacket detail access-listgroup 74. 要在 CISCO路由器上配置 CGMP:dallasr1(config-if)# ip cgmp 75. 配置一个组播路由器,使之加入某一个特定的组播组:dallasr1(config-if)# ip

40、 igmp join-group group-address 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 14 页,共 32 页 - - - - - - - - - 76. 关闭 CGMP :dallasr1(config-if)# no ip cgmp 77. 启动交换机上的CGMP:dallasr1(enable) set cgmp enable 78. 核实 Catalyst交换机上 CGMP 的配置情况:catalystla1(enable) show config se

41、t prompt catalystla1 set interface sc0 192.168.1.1 255.255.255.0 set cgmp enable 79. CGMP离开的设置:Dallas_SW(enable) set cgmp leave 80. 在 Cisco 设备上修改控制端口密码:R1(config)# line console 0 R1(config-line)# login R1(config-line)# password Lisbon R1(config)# enable password Lilbao R1(config)# login local R1(con

42、fig)# username student password cisco 81. 在 Cisco 设备上设置控制台及vty 端口的会话超时:R1(config)# line console 0 R1(config-line)# exec-timeout 5 10 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 15 页,共 32 页 - - - - - - - - - R1(config)# line vty 0 4 R1(config-line)# exec-timeout 5

43、2 82. 在 Cisco 设备上设定特权级:R1(config)# privilege configure level 3 username R1(config)# privilege configure level 3 copy run start R1(config)# privilege configure level 3 ping R1(config)# privilege configure level 3 show run R1(config)# enable secret level 3 cisco 83. 使用命令 privilege 可定义在该特权router(config

44、)# privilege mode level level command 84. 设定用户特权级:router(config)# enable secret level 3 dallas router(config)# enable secret san-fran router(config)# username student password cisco 85. 标志设置与显示:R1(config)# banner motd unauthorized accesswill be prosecuted!86. 设置 vty 访问:R1(config)# access-list 1 perm

45、it 192.168.2.5 R1(config)# line vty 0 4 R1(config)# access-class 1 in 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 16 页,共 32 页 - - - - - - - - - 87. 配置 HTTP访问:Router3(config)# access-list 1 permit 192.168.10.7 Router3(config)# ip http sever Router3(config)# ip http

46、 access-class 1 Router3(config)# ip http authentication local Router3(config)# username student password cisco 88. 要启用 HTTP访问,请键入以下命令:switch(config)# ip http sever 89. 在基于 set 命令的交换机上用setCL1 启动和核实端口安全:switch(enable) set port security mod_num/ port_num,enable mac addressswitch(enable) show port mod_n

47、um/port_num 在基于 CiscoIOS 命令的交换机上启动和核实端口安全:switch(config-if)# port secure mac-mac-count maximum-MAC-count switch# show mac-address-table security type module/port 90. 用命令 access-list在标准通信量过滤表中创建一条记录:Router(config)# access-list access-list-number permit|denysource-address source-address 91. 用命令 access

48、-list在扩展通信量过滤表中创建一条记录:Router(config)# access-list access-list-number permit|denyprotocol|protocol-keyword 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 17 页,共 32 页 - - - - - - - - - source source-wildcard|any destination destination-wildcard|any protocol-specific op

49、tionslog 92. 对于带内路由更新,配置路由更新的最基本的命令格式是:R1(config-router)#distribute-list access-list-number |name in type number 93. 对于带外路由更新,配置路由更新的最基本的命令格式是:R1(config-router)#distribute-list access-list-number|name out interface-name routing-process| autonomous-system-number 94. set snmp命令选项:set snmp community re

50、ad-only|ready-write |read-write-allcommunity_string 95. set snmp trap 命令格式如下:set snmp trap enable|disable all|moudle|classis|bridge|repeater | auth|vtp|ippermit|vmps|config|entity|stpx set snmp trap rvcr_addr rcvr_community 96. 启用 SNMP chassis 陷阱: Console(enable) set snmp trap enable chassis 97. 启用所

51、有 SNMP chassis 陷阱 : Console(enable) set snmp trap enable 98. 禁用 SNMP chassis 陷阱: Console(enable) set snmp trap disable chassis 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 18 页,共 32 页 - - - - - - - - - 99. 给 SNMP 陷阱接收表加一条记录:Console(enable) set snmp trap 192.122.173

52、.42 public 100. show snmp 输出结果。101. 命令 set snmp rmon enable 的输出结果。102. 显示 SPAN 信息:Consile show span :em24:em26:em25:em27:em21: cisco 命令大全解释、注释收录最常用的Cisco命令分类如下 : cisco命令大全1. switch配置命令(1) 模式转换命令用户模式 - 特权模式 ,使用命令 enable 特权模式 - 全局配置模式,使用命令 config t 全局配置模式 - 接口模式 ,使用命令 interface+接口类型 + 接口号 全局配置模式 - 线控模

53、式 ,使用命令 line+接口类型 + 接口号 注: 用户模式 :查看初始化的信息. 特权模式 :查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2 )配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置 IP 地址secondary+IP地址为接口配置第二个IP 地址show interface+接口类型 + 接口号查看接口管理性show con

54、trollers interface 查看接口是否有DCE 电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 19 页,共 32 页 - - - - - - - - - config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0 service password-encryptin 手工加密所有密

55、码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入 telnet接口password +密码配置 telnet密码line aux 0 进入 AUX接口password +密码配置密码line con 0 进入 CON 接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP 地址show startup config 查看 NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAM write 保存信息到NVRAM er

56、ase startup-config 清除 NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入 VLAN数据库模式vlan +vlan号 + 名称创建 VLAN switchport access vlan +vlan号 为 VLAN为配接口interface vlan +vlan号 进入 VLAN接口模式ip add +ip地址为 VLAN配置管理IP 地址vtp+service/tracsparent/cl

57、ient 配置 SW 的 VTP 工作模式vtp +domain+域名配置 SW 的 VTP 域名vtp +password +密码配置 SW 的密码switchport mode trunk 启用中继no vlan +vlan号 删除 VLAN show spamming-tree vlan +vlan号 查看 VLA 怕生成树议2. 路由器配置命令ip route+非直连网段 + 子网掩码 + 下一跳地址配置静态 / 默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路

58、由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活 RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型 + 接口号配置接口为被动模式debug ip +协议动态查看路由更新信息名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 20 页,共 32 页 - - - - - - - - - undebug all 关闭所有DEBUG信息router ei

59、grp +as号 激活 EIGRP路由协议network +网段 + 子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活 OSPF协议network+直连网段 +area+区域号发布直连网段show ip ospf 显示 OSPF的进程号和ROUTER-ID encapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启

60、用路由功能show user 查看 SW 的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range port-range 进入组配置状态配置三层端口configure terminal 进入配置状态interface fastethernet | gigabitethernet interface-id | vlan vlan-id | port-channel port-channel-number 进入端口配置状态no switchport 把物理端口变成三层口ip address

61、 ip_address subnet_mask 配置 IP 地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2 Switch(config-if)# no switchport Switch(config-if)# ip address 192.20.135.21 255.255.255.0 Switch(config-if)# no shutdown 配置 VLAN configure terminal 进入配置状态vlan vlan-id 输入一个VLAN号 , 然后进入 vlan配态,可以输入一个新的VL

62、AN号或旧的来进行修改。name vlan-name 可选 ) 输入一个 VLAN名,如果没有配置VLAN名,缺省的名字是VLAN号前面用0 填满的 4 位数,如VLAN0004是 VLAN4的缺省名字mtu mtu-size (可选 ) 改变 MTU 大小例Switch# configure terminal Switch(config)# vlan 20 Switch(config-vlan)# name test20 Switch(config-vlan)# end 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心

63、整理 - - - - - - - 第 21 页,共 32 页 - - - - - - - - - 或Switch# vlan database Switch(vlan)# vlan 20 name test20 Switch(vlan)# exit 将端口分配给一个VLAN configure terminal 进入配置状态interface interface-id 进入要分配的端口switchport mode access 定义二层口switchport access vlan vlan-id 把端口分配给某一VLAN 例Switch# configure terminal Enter

64、configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fastethernet0/1Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config-if)# end Switch#配置 VLAN trunk configure terminal 进入配置状态interface interface-Id 进入端口配置状态switchport trunk e

65、ncapsulation isl | dot1q | negotiate配置 trunk封装 ISL 或 802.1Q 或自动协商switchport mode dynamic auto | desirable | trunk 配置二层 trunk模式。dynamic auto自动协商是否成为trunk dynamic desirable把端口设置为trunk如果对方端口是trunk, desirable, 配置 Native VLAN (802.1q )或自动模式, trunk 设置端口为强制的trunk方式,而不理会对方端口是否为trunk switchport access vlan v

66、lan-id 可选 ) 指定一个缺省VLAN, 如果此端口不再是trunk switchport trunk native vlan vlan-id 指定 802.1Q native VLAN号例: Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fastethernet0/4 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport

67、 trunk encapsulation dot1q Switch(config-if)# end 定义 TRUNK 允许的 VLAN configure terminal子 进入配置状态interface interface-id 进入端口配置switchport mode trunk 配置二层口为trunk switchport trunk allowed vlan add | all | except | remove vlan-list可选 ) 配置 trunk允许的VLAN.使用 add, all, except, remove关健字no switchport trunk allow

68、ed vlan 允许所有 VLAN通过例名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 22 页,共 32 页 - - - - - - - - - Switch(config)# interface fastethernet0/1 Switch(config-if)# switchport trunk allowed vlan remove 2 Switch(config-if)# end 配置 Native VLAN (802.1q )configure terminal 进入配置

69、状态interface interface-id 进入配置成 802.1qtrunk的端口switchport trunk native vlan vlan-Id 配置 native VLAN号no switchport trunk native vlan 端口配置命令回到缺省的状态配置基于端口权值的负载均衡configure terminal 进入 Switch 1 配置状态vtp domain domain-name 配置 VTP域vtp mode server 将 Switch 1 配置成 VTP server. show vtp status 验证 VTP的配置show vlan 验证

70、 VLAN configure terminal 进入配置状态interface fastethernet 0/1 进入 F0/1 端口switchport trunk encapsulation isl | dot1q | negotiate配置 trunk封装switchport mode trunk 配置成 trunk show interfaces fastethernet0/1 switchport 验证 VLAN配置按以上步骤对想要负载均衡的接口进行配置在另一个交换机上进行此配置show vlan 当 trunk 已经起来,在switch2 上验证已经学到相的vlan 配置conf

71、igure terminal 在 Switch 1 上进入配置状态interface fastethernet0/1 进入要配置的端口spanning-tree vlan 8 port-priority 10 将端口权值 10赋与 VLAN 8. spanning-tree vlan 9 port-priority 10 将端口权值 10赋与 VLAN 9. spanning-tree vlan 10 port-priority 10 将端口权值 10赋与 VLAN 10. interface fastethernet0/2 进入 F0/2 spanning-tree vlan 3 port-

72、priority 10 将端口权值 10赋与 VLAN 3. spanning-tree vlan 4 port-priority 10 将端口权值 10赋与 VLAN 4 spanning-tree vlan 5 port-priority 10 将端口权值 10赋与 VLAN 5 spanning-tree vlan 6 port-priority 10 将端口权值 10赋与 VLAN 10 end 退出show running-config 验证配置copy running-config startup-config 保存配置配置 STP 路径值的负载均衡Trunk1走 VLAN810

73、, Trunk2走 VLAN24configure terminal 进入Switch 1配置状态名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 23 页,共 32 页 - - - - - - - - - interface fastethernet 0/1 进入 F0/1 switchport trunk encapsulation isl | dot1q | negotiate配置封装switchport mode trunk 配置 Trunk,缺省是ISL封装exit 退回在

74、F0/2口上重复 2 4 步骤exit 退回show running-config 验证配置show vlan验证 switch1 已经学到 Vlan configure terminal 进入配置状态interface fastethernet 0/1 进入 F0/1 spanning-tree vlan 2 cost 30 设置 Vlan2生成树路径值为30 spanning-tree vlan 3 cost 30 设置 Vlan3生成树路径值为30 spanning-tree vlan 4 cost 30 设置 Vlan4生成树路径值为30 end 退出在 switch1的 F0/2上重

75、复 9 11 步骤设置 VLAN8,9,10 生成树路径值为30 end 退出show running-config 验证配置copy running-config startup-config 保存配置补充 :CISCO命令集路由选择协议及排障 *ip route命令Router(config)# ip route 子网掩码 管理距离 0255,默认为 1(注:静态地址配置)*ip default-network命令Router(config)# ip default-network ( 注:配合路由协使用,用其中的一个动态路由号作默认路由配置) Router(config)# ip rou

76、te 0.0.0.0 0.0.0.0 ( 注:只有一个公网地址时,在出口路由器上的配置)* 内部路由选择协议* 使用 router和 network命令Router(config)# router 自主系统号 Router(config-router)# network Router(config-router)# network * 路由信息协议RIP名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 24 页,共 32 页 - - - - - - - - - Router(confi

77、g)# router rip Router(config-router)# network Router# show ip protocols Router# show ip route Router# debug ip rip* 内部网关路由协议IGRPRouter(config)# router igrp Router(config-router)# network Router# show ip interface Router# show ip protocols Router# show ip route Router# debug ip rip* 排除网络故障排除网络故障的一个总体

78、模型Router# ping Router# show ip route Router# show interface Router# show run*IP的故故障排除检查可用的路由Router# show ip route 27.4.4 跟踪路由 (Tracing the Route) SUN-A traceroute C:windows winipcfg C:windows ipconfig C:windows ipconfig / all C:windows tracert 使用扩展的ping来跟踪连接性Router# ping* 其它可能的故障一个地址解析(ARP )的故障Route

79、r# show arp Router# show interface 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 25 页,共 32 页 - - - - - - - - - C:windows arp -a SUN-A arp a验证终端系统的路由表C:windows netstat rn C:windows route f add 0.0.0.0 mask 0.0.0.0 C:windows route f print | add | delete | change desti

80、nation mask netmask gateway C:windows route add mask C:windows route delete mask C:windows nbtstat SUN-A netstat -rn路由器案例实战 : 交换机 Trunk 隧道技术应用【IT168 专稿】企业 网络 组建和改造项目中,很少有企业只采用一台交换机上实现吧?如果企业规模扩大了,在原来的交换机网络中,如果新添加一台交换机,很可能出来新的问题来,让我们来看看本小节的实际例子。场景描述 :VLAN 创建的问题某平面广告公司原有20多名员工,共有19个客户端计算机接入了公司的交换机。广告公司

81、公司规模较小,并且没有配网络管理员,公司的网络由集成商组建后一直比较稳定的运行着。由于业务的拓展,公司从平面广告业务发展到影视制作等多种媒介资源的为一体的企业。各个部门都招聘了员工,人员从20多名增加到 40多名,客户端计算机的数量也翻了一倍,原有的24口交换机已经不能满足现在的需求。公司新购置了一台24口交换机,一位网络技术相对较好的老员工被安排负责此项工作。这位老兄在之前的网络集成时就负责本公司和集成商的配合工作,此次他按照原来留下的配置文档再新交换机上也敲了一遍。第1步:创建 VLAN Switch2#vlan database Switch2(vlan)#vlan 2 name mei

82、jie /建立媒介部VLAN Switch2(vlan)#vlan 3 name shangwu /建立商务部VLAN Switch2(vlan)#vlan 4 name caiwu /建立财务部VLAN 第2步:把端口分配到VLAN Switch2(config)#interface range fastEthernet 0/5 8 Switch2(config-if)#Switchport access vlan 2 /将5至 8端口放入VLAN2 中名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - -

83、- - - - 第 26 页,共 32 页 - - - - - - - - - Switch2(config)#interface range fastEthernet 0/9 11 Switch2(config-if)#Switchport access vlan 3 /9至11端口放入VLAN3中, 后续步骤省略应该注意, interface range fastEthernet X/X X 是应用在Cisco IOS软件 12.1以上的版本,如果你使用的是Cisco IOS 软件 12.1 以前的发布的版本的话,应该用命令:Switchport access vlan vlanID,把端

84、口加入VLAN 。完成上述步骤后,将所有客户端从配线架上用跳线接入到交换机的不同端口,并用一条跳线连接了Switch1 的 fastEthernet 0/2和 Switch2 的 fastEthernet 0/1端口。本以为这项工作就这样顺利完成了,但不同交换机中同一部门的客户端就是无法通信 。起初以为是IP 地址配置的问题,但检查客户端之后,发现同一台交换机中(同一VLAN )的客户端通信一点问题也没有。在尝试了一切可能的办法之后,还无法解决问题,所以只能求助原理负责系统集成那家公司前来帮忙。工程师到达广告公司之后,首先在新交换机上检查了VLAN的配置,发现VLAN的配置没有问题。 在特权模

85、式下使用命令用show vlan 来检查是否将端口分配给正确的VLAN :VLAN Name Status Ports = = = = 1 default active Fa0/2, Fa0/4, Fa0/16, Fa0/17 Fa0/18, Fa0/19, Fa0/20, Fa0/22, Fa0/23, Fa0/24, Gi0/1 Gi0/2 2 meijie active Fa0/5, Fa0/6, Fa0/7, Fa0/8 3 shangwu active Fa0/9, Fa0/10, Fa0/11 4 caiwu active Fa0/12, Fa0/13, Fa0/14, Fa0/1

86、5 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active 既然已经分配了正确的VLAN名称和接口, 为什么在两台交换机之间无法通信呢?要得出新交换机的客户端和原有交换机不能通信的真正原因,还要从 VLAN工作的原理中找出答案。Trunking 技术的实现在“7.1.2 VLAN的实现原理”部分看到,要传输多个VLAN的通信,就需要用专门的协议封装或者加上标记(tag ) ,以便接收设备能区分数据所属的VLAN 。VLAN标识从逻辑

87、上定义了,数据包使用哪种协议进行封装。而最常用到的是IEEE 802.1Q 和 CISCO私有的 ISL 协议。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 27 页,共 32 页 - - - - - - - - - 除 IEEE 802.1Q、 ISL 协议外还有两种封装技术:IEEE 802.10 和 ATM LAN仿真(LANE ) 。IEEE 802.10 常用于光纤分布接口(FDDI)帧内传达VLAN的信息。而LANE则用于异步传输模式( ATM )网络 中传输 VLAN

88、 。下面介绍IEEE 802.1Q 和 ISL 协议,以替代ISL 的动态中继协议。1ISL (交换机间链路)是一种 CISCO专用的协议,用于连接多个CISCO交换机。使用ISL 后,每个数据帧头部都会被附加26字节的“ ISL 包头( ISL Header )”,并且在帧尾携带上包括ISL 包头在内的整个数据帧进行计算后得到的4字节 CRC值。换而言之, 就是总共增加了30字节的信息,如图 7-5 所示。在使用ISL 的环境下,当数据帧离开汇聚链路时,只要简单地去除 ISL 包头和新CRC就可以了。由于原先的数据帧及其CRC都被完整保留,因此无须重新计算 CRC 。ISL 有如用 ISL

89、包头和新 CRC将原数据帧整个包裹起来,因此也被称为“封装型 VLAN (Encapsulated VLAN )”。图 7-8 中显示了ISL 的数据帧。图7-8 ISL的数据帧2IEEE 802.1Q (虚拟桥接局域网标准)IEEE 802.1Q ,俗称“ Dot One Q”,正式名称是虚拟桥接局域网标准,用在不同的产家生产的交换机之间。一个IEEE 802.1Q 干道端口同时支持加标签和未加标签的流量。一个 802.1Q 干道端口被指派了一个默认的端口Vlan ID( PVID) ,并且所有的未加标签的流量在该端口的默认PVID上传输。一个带有和外出端口的默认PVID 相等的 Vlan

90、ID的包发送时不被加标签。所有其他的流量发送是被加上Vlan 标签的。IEEE 802.1Q 所附加的VLAN识别信息,位于数据帧中“发送源MAC 地址”与“类别域( Type Field)”之间。具体内容为2字节的 TPID 和2字节的 TCI,共计 4字节。在数据帧中添加了 4字节的内容, 那么 CRC值自然也会有所变化。这时数据帧上的CRC是插入TPID、TCI 后,对包括它们在内的整个数据帧重新计算后所得的值。而当数据帧离开汇聚链路时,TPID 和 TCI 会被去除,这时还会进行一次CRC的重新计算。 TPID 的值,固定为 0x8100。交换机通过TPID,来确定数据帧内附加了基于I

91、EEE 802.1Q 的 VLAN信息。基于IEEE 802.1Q 附加的 VLAN信息,就像在传递物品时附加的标签。因此,它也被称作“标签型VLAN (Tagging VLAN )”。图 7-9 中显示了IEEE 802.1Q的数据包。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 28 页,共 32 页 - - - - - - - - - 图7-9 IEEE 802.1Q的数据帧不论是 IEEE 802.1Q 的“Tagging VLAN ”,还是ISL 的“Encapsulat

92、ed VLAN ”,都不是很严密的称谓。不同的书籍与参考资料中,上述词语有可能被混合使用,因此需要大家在学习时格外注意。3动态中继协议动态中继协议DTP ,是 VLAN 组中思科的私有协议,主要用于协商两台设备间链路上的中继过程及中继封装 802.1Q 类型。DTP的用途是取代动态ISL (Dynamic ISL, DISL) 。下列是 DTP可以配置的几种不同的状态:* Access :使某个接口无条件进入Access 模式,无DTP功能。* Trunk :使某个接口无条件进入trunk模式并进行trunk链路协商,无论其邻居接口处于何种模式。* Nonegotiate:指定 DTP协商报文

93、不允许在二层接口上发送。非协商状态,使接口成为永久的中继接口。由于接口不使用DTP信息帧进行通信,因此不会有协商发生。如果与非交换机设备相连的交换机接口存在DTP问题,那么在使用trunk之后可以使用nonegotiate,使得接口可以继续中继,但不会发送任何DTP信息。* Dynamic desirable:使某个接口既主动发送DTP报文,也允许对DTP报文进行响应,这是以太网接口的默认状态。如果邻居接口是中继接口,并且被设置为on,desirable或 auto ,那么希望desirable状态下的这个接口成为中继接口。* Dynamic auto:使某个接口可以响应DTP报文,但不允许主

94、动发送DTP报文。只有在相邻接口要求该接口成为中继接口时才会成为中继接口。这是所有交换机接口的默认配置。 auto 接口不会主动要求对方,如果两个接口都被配置成auto 状态,那么这两个接口都不会成为中继端。* On :无论对端配置如何,该接口始终为中继接口。使用on 状态时,必须指明帧的标记方式,因为此状态下接口不与对端进行协商。* Off :该拉口永远是非中继接口。在前面已经出现了很多次Trunk 这个词汇,但并没有详细的进行解答。我们知道交换机的接口可以运行在接入模式(Access Mode )或者干道模式(Trunk Mode ) 。交换机接口所连接的链路也被相应地称为接入链路和tru

95、nk链路。在接入模式下,接口属于且仅属于一个VLAN 。而 Trunk(干道) 是一种封装技术,它是一条点到点的链路,主要功能就是仅通过一条链路就可以连接多个交换机从而扩展已配置的多个VLAN ,如图 7-10 所示。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 29 页,共 32 页 - - - - - - - - - 同时 trunk链路可以连接一台交换机或者路由器 或者服务器(特殊 网卡) ,还可以采用通过 trunk技术和上级交换机级联的方式来扩展接口的数量,可以达到近似堆

96、叠的功能,节省了 网络 硬件的成本。提示: trunk链路不属于任何一个VLAN ,它只是在网络中起到了管道的作用。Trunk承载的 VLAN范围,默认下是11005,可以修改,但必须有1个 Trunk 协议。使用Trunk时,两台交换机连接接口上的协议要一致。配置为Trunk 链路的接口,通常都是交换机上支持最大带宽的带宽口。表7-6 列出了和Trunk 操作有关的命令。表7-6 在基于 IOS 的交换机上配置trunk 步骤命令解释1 Switch#configure terminal 进入全局配置模式2 Switch(config)# interface interface-id 进入要

97、分配的接口3 Switch(config-if)#switchport mode trunk 将端口设置为trunk模式3(1)Switch(config-if)#switchport mode dynamic desirable 在仅支持 802.1Q 封装,但支持DTP功能的交换机上主动尝试转换为trunk模式3(2)Switch(config-if)#switchport mode dynamic auto 在仅支持 802.1Q 封装,但支持DTP功能的交换机上转换为trunk模式,由邻居接口决定3(3)Switch(config-if)#switchport nonegotiate

98、在仅支持 802.1Q 封装,但支持DTP功能的交换机上将接口永久设置为trunk模式,但禁止产生DTP帧4 Switch(config-if)#switchport trunk encapsulation isl | dot1q 配置接口是使用ISL 或者 802.1Q 封装,两端链路必须采用相同的封装格式5 Switch(config-if)#switchport trunk allowed vlan remove vlan-list 要限制 trunk传送的 VLAN ,从允许的VLAN 列表中去除某些VLAN 6 Switch(config-if)#end (Ctrl+Z )返回到特权

99、模式7 Switch#show interface interface-id Switchport 对配置进行检验。一定要加上Switchport关键字,否则会出现show interface输出结果8 Switch#copy running-config startup-config 保存配置名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 30 页,共 32 页 - - - - - - - - - 在默认状态下,Trunk 接口允许所有VLAN的发送和接口传输。当然,根据需要,我们

100、也可以将拒绝某些VLAN通过 Trunk 传输,从而将该VLAN限制与其他交换机的通信 ,或者拒绝某些VLAN对敏感数据的访问。需要注意的是, 不能从 Trunk 中移除默认的VLAN1 。Switch(config-if)# switchport trunk allowed vlan add | all | except | remove vlan-list要限制 trunk传送的 VLAN ,从允许的VLAN 列表中去除某些VLAN 。如执行Switch2 ( config-if) #switchport trunk allowed vlan remove 10 之后, VLAN 10的将

101、不被传递。配置 Trunk 上允许的VLAN列表。使用add(添加)、 all (所有)、except (除外)和 remove(移除)关键字,可以定义允许在Trunk 上传输的VLAN 。VLAN列表既可以是一个 VLAN ,也可以是一个VLAN组。当同时指定若干VLAN时,不要在“ , ”或“ - ”间使用空格。利用 Trunk 解决问题当多台交换机同时被划分为两个或两个以上VLAN时,需要创建Trunk ,使不同交换机之间的 VLAN能够借助于一链路进行通信 ,否则, VLAN将被限制在交换机内,无法与其他交换机进行通信。默认状态下,第二层接口自动处于动态的Switchport模式,当相

102、邻接口(即借助于双绞线或光纤连接在一起的两个接口)支持Trunk ,并且配置为Trunk或动态匹配模式,该链接将作为Trunk 。1建立 Trunk 隧道工程师在排除问题的过程中,对Switch1 的 fastEthernet 0/2和 Switch2 的fastEthernet 0/1接口分别设置为Trunk,并在每一个接口都采用dot1q 协议进行干道封装。下面是 Switch2 的配置:Switch2(config)# interface fastEthernet 0/1 Switch2(config-if)#Switchport mode trunk /设置接口为Trunk 模式Swi

103、tch2(config-if)#Switchport trunk encapsulation dot1q /设置封装的类型对于 Switch1 上的 fastEthernet 0/2接口,请和上面的Switch2 交换机配置相同的封装协议,这样可以避免很多Trunk 不匹配的问题。需要注意的是,Trunk 端口默认情况下会传送所有的VLAN的通信。 要查看 Trunk 接口的信息和允许通过此接口的VLAN ,可以使用命令:show interfas interface-id switchport输出结果:Name: Fa0/1 Switchport: Enabled Administrativ

104、e Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 31 页,共 32 页 - - - - - - - - - Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default)Trunking

105、 Native Mode VLAN: 1 (default)Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Protected: false Unknown unicast blocked: disabled Unknown multicast blocked: disabled Voice VLAN: none ( Inactive)Appliance trust: none 2测试连通性工程师在调试完两边的Trunk 封装之后,在 Switch2 交换机 VLAN2 中有一台主机Host A将 IP 地址设置为: 192.

106、168.0.1/24, 在 Switch1 交换机的VLAN2 中也有一台主机Host B其 IP 地址设置为: 192.168.0.2/24,如果在连接Host A 可以 Ping 通,对 Host B的话,就可以证明隧道配置没有问题,并已经起到了作用。但是如果在这两台交换机之中,两个工作站 分别在不同的VLAN之中,则相互Ping对方的话,是不能通信的。从而说明:不同交换机之间的工作站通过Trunk 相连接,只有这些工作站在同一个VLAN之中才可以相互通信,而不同VLAN中的工作站是不能通过Trunk 来通信的。 VLAN技术将一个大的局域网划分为若干个小的虚拟子网,从而使每一个子网都成为一个单独的广播域, 子网之间进行通信必须通过三层设备。当 VLAN在交换机上划分后,不同 VLAN间的设备就如同是被物理地分割。也就是说,连接到同一交换机、然而处于不同VLAN的设备,就如同被物理地连接到两个位于不同网段的交换机上一样,彼此之间的通信一定要经过路由设备;否则,他们之间将无法得知对方的存在,将无法进行任何通信。相关关键词trunk交换机VLAN名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 32 页,共 32 页 - - - - - - - - -

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号