关于LAN网内VLAN与Trunk的详细配置

王朝学院·作者佚名  2016-08-07
窄屏简体版  字體: 小  |  中  |  大  |  超大  

此实验过程是在Boson NetSim for CCNP version 6.0 BETA 1软件下做的。其中使用2台C2905switch和4台PC机。 实验内容:1、 配置控制端口和虚拟线路2、设置VLAN两个,分别为:VLAN100 Pcontrol和VLAN200 Accout3、分别将接口加入到VLAN100和VLAN200后配置Trunk线路,保证VLAN间的通信4、最后进行测试是否成功 关于LAN网内VLAN与Trunk的详细配置 SW1(C2950)交换机测试详细步骤及结果: CLIsessionwith the switch is open. To end the CLI session, enter [Exit]. Switch>%LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down%LINK-3-UPDOWN: Interface FastEthernet0/12, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to downSwitch>enableSwitch#show version BosonOperating Simulation SoftwareBOSS (tm) C2900 Software (C2900-Enterprise), Version 12.1, RELEASE SOFTWARECopyright (c) 1998-2003 by Boson Software, Inc. BOSS ROM: System Bootstrap, Version 12.2, RELEASE SOFTWARESwitch Uptime Is 0 days, 0 hours, 0 minutesSystem restarted by power-onSystem image file is ""Flash:c2900-enterprise.12.1.boss"", booted via flashBoson 2900 (BOSS) processor (revision 5.0)12 FastEthernet/IEEE 802.3 interface(s) 32K bytes of simulated non-volatile configuration memory.8192K bytes of simulated System flash (Read/Write) Switch#Switch#Switch#show runn!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service passWord-encryption!hostname Switch!!!ipsubnet-zerospanning-tree extend system-id!!!!!!!!interface FastEthernet0/1!interface FastEthernet0/2! Switch#show runn!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Switch!!!ip subnet-zerospanning-tree extend system-id!!!!!!!!interface FastEthernet0/1!interface FastEthernet0/2!interface FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12! vtp domain bigdomain!interface Vlan 1 no ip address no ip route-cache!!ip classlessno ip http server!!!!line con 0 transport input noneline aux 0line vty 0 15!no scheduler allocateend Switch#Switch#Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname SW1SW1(config)#line console 0SW1(config-line)#exec-timeout 20 0SW1(config-line)#logging synchronousSW1(config-line)#password dsfengSW1(config-line)#loginSW1(config-line)#line vty 0 15SW1(config-line)#exec-timeout 15 0SW1(config-line)#logging synchronousSW1(config-line)#password dsfengSW1(config-line)#loginSW1(config-line)#enable secret ciscoSW1(config)#exitSW1#SW1#SW1#vlan databaseSW1(vlan)#vlan 100 name PcontrolVLAN 100 added: Name:PcontrolSW1(vlan)#vlan 200 name AccoutVLAN 200 added: Name:AccoutSW1(vlan)#exitAPPLY completed.Exiting....SW1#SW1#SW1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.SW1(config)#interface fastethernet 0/2SW1(config-if)#switchport modeaccessSW1(config-if)#switchport access vlan 100SW1(config-if)#exitSW1(config)#interface fastethernet 0/3SW1(config-if)#switchport mode accessSW1(config-if)#switchport access vlan 200SW1(config-if)#exitSW1(config)#interface fasteterhent 0/10SW1(config-if)#switchport mode trunkSW1(config-if)#switchport trunk encapsulation dot1qSW1(config-if)#endSW1#SW1#SW1#show interface fastethernet 0/2FastEthernet0/2 is up, line protocol is up Hardware is Fast Ethernet, address is000C.6542.9093 (bia000C.6542.9093) MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Auto-duplex, Auto-speed Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00 Last input 02:29:44, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue :0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 269 packets input, 71059 bytes, 0 no buffer Received 6 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 7290 packets output, 429075 bytes, 0 underruns 0 output errors, 3 interface resets 0 output buffer failures, 0 output buffers swapped out SW1#SW1#SW1#show interface fastethernet 0/3FastEthernet0/3 is up, line protocol is up Hardware is Fast Ethernet, address is000C.3849.2796 (bia000C.3849.2796) MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Auto-duplex, Auto-speed Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00 Last input 02:29:44, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue :0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 269 packets input, 71059 bytes, 0 no buffer Received 6 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 7290 packets output, 429075 bytes, 0 underruns 0 output errors, 3 interface resets 0 output buffer failures, 0 output buffers swapped out SW1#SW1#SW1#show interface fastethernet 0/10FastEthernet0/10 is up, line protocol is up Hardware is Fast Ethernet, address is000C.3878.9745 (bia000C.3878.9745) MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Auto-duplex, Auto-speed Encapsulation ARPA, loopback not set ARP type: ARPA, ARP Timeout 04:00:00 Last input 02:29:44, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue :0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 269 packets input, 71059 bytes, 0 no buffer Received 6 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 7290 packets output, 429075 bytes, 0 underruns 0 output errors, 3 interface resets 0 output buffer failures, 0 output buffers swapped out SW1#SW1#SW1#show vlan VLAN Name Status Ports---- -------------------------------- --------- -------------------------------1 default active Fa0/1, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12100 Pcontrol active Fa0/2200 Accout active Fa0/31002 fddi-default active1003 token-ring-default active1004 fddinet-default active1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------1 enet 100001 1500 - - - - - 0 0100 enet 100100 1500 - - - - - 0 0200 enet 100200 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 01003 tr 101003 1500 - - - - - 0 01004 fdnet 101004 1500 - - - ieee - 0 01005 trnet 101005 1500 - - - ibm - 0 0 SW1#SW1#SW1#show cdp neighborsCapability Codes: R - Router, T -Trans

Bridge, B -SourceRoute

BridgeS -Switch, H - Host, i - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability Platform Port IDSW2 Fas0/10 167 T S 2950 Fas 0/10 SW1#SW1#SW1#show mac-address-tableCapability Codes: R - Router, T -Trans

Bridge, B -SourceRoute

BridgeS -Switch, H - Host, i - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability Platform Port IDSW2 Fas0/10 167 T S 2950 Fas 0/10 Mac Address Table------------------------------------------Vlan Mac Address Type Ports---- ----------- ---- ----- 200 000C.9631.1997 DYNAMIC Fa0/3 100 000C.7036.8702 DYNAMIC Fa0/2 1 000C.3817.8412 DYNAMIC Fa0/10 1 000C.9623.5011 DYNAMIC Fa0/10 1 000C.1738.3819 DYNAMIC Fa0/10 Total Mac Addresses for this criterion: 5 SW1#SW1#SW1#show run!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname SW1enable secret 5 $sdf$6978yhg$jnb76sd!!!ip subnet-zerospanning-tree extend system-id!!!!!!!!interface FastEthernet0/1!interface FastEthernet0/2 switchport mode access switchport access vlan 100!interface FastEthernet0/3 switchport mode access switchport access vlan 200!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10 switchport mode trunk switchport trunk encapsulation dot1q!interface FastEthernet0/11!interface FastEthernet0/12! vtp domain bigdomain!interface Vlan 1 no ip address no ip route-cache!vlan 100 name Pcontrolvlan 200 name Accout!ip classlessno ip http server!!!!line con 0 login transport input none password dsfeng exec-timeout 15 0 logging synchronousline aux 0line vty 0 15 login password dsfeng!no scheduler allocateend SW1#SW1#SW1#copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK] SW1#SW1#

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航