
In This CCNA Case Study, We'll Take Some Basic Switching And Trunking Theory And Put It Into Action. We Have Two Routers (R2 And R3) Along With Two Switches (SW1 And SW2). R2 Is Connected To SW1 At Fast 02, And R3 Is Connected To SW2 At Fast 03. Both Routers Have IP Addresses On The 172.12.23.0 24 Network.For These Routers To Be Able To Ping Each Other, The Switches Must Be Able To Communicate. These Are Two 2950 Switches, And They're Connected Via Two Crossover Cables. Before We Worry About The Router Connectivity, Let's Make Sure The Trunk Link Is Up Between The Switches With The "show Interface Trunk" Command.SW2show Interface TrunkPort Mode Encapsulation Status Native VlanFa011 Desirable 802.1q Trunking 1Fa012 Desirable 802.1q Trunking 1 Output Truncated For Clarity The Default Mode Of These Switches Is For The Ports To Run In Dynamic Desirable Trunking Mode, So We Didn't Even Need To Write A Configuration To Have The Trunk Form - It's Already There!Show Vlan Brief Reinforces The Theory That By Default, All Switch Ports Are Placed Into VLAN 1 (except The Trunk Ports).R2 And R3s Ethernet Addresses Have Already Been Configured, The Trunk Line Is Operational, And Both Ports Are In VLAN 1. We'll Ping R2s Ethernet Interface From R3, And Then R3s Ethernet Interface From R2 To Verify IP Connectivity.R2ping 172.23.23.3Type Escape Sequence To Abort.Sending 5, 100-byte ICMP Echos To 172.23.23.3, Timeout Is 2 Seconds:!!!!!Success Rate Is 100 Percent (55), Round-trip Minavgmax 448 MsR3ping 172.23.23.2Type Escape Sequence To Abort.Sending 5, 100-byte ICMP Echos To 172.23.23.2, Timeout Is 2 Seconds:!!!!!Success Rate Is 100 Percent (55), Round-trip Minavgmax 448 MsWith Pings, Exclamation Points Indicate IP Connectivity, And Periods Indicate No Connectivity.So We've Got Connectivity! Now Let's See If We Still Have That Connectivity When The Ports Are Placed Into Different VLANs. Cisco CCNA Theory States That Devices In Different VLANs Can't Communicate Without The Intervention Of A Layer 3 Device, But Let's See If That's True By Placing R2 Into VLAN 23. (VTP Is Already Running On These Switches.)SW1conf TEnter Configuration Commands, One Per Line. End With CNTLZ.SW1(config)int Fast 02SW1(config-if)switchport Mode AccessSW1(config-if)switchport Access Vlan 23SW1(config-if)ZNow That R2 And R3 Are In Separate VLANs, Can They Still Send Pings Back And Forth?R2ping 172.23.23.3Type Escape Sequence To Abort.Sending 5, 100-byte ICMP Echos To 172.23.23.3, Timeout Is 2 Seconds:.....Success Rate Is 0 Percent (05)R3ping 172.23.23.2Type Escape Sequence To Abort.Sending 5, 100-byte ICMP Echos To 172.23.23.2, Timeout Is 2 Seconds:.....No, They Cant. The Difference Is That Theyre Now In Separate VLANs, And Devices In Different VLANs Cant Communicate Unless Routing Is Taking Place Somewhere. Here, No Routing Is Taking Place, So The Pings Dont Go Through.Put R3s Switch Port Into VLAN 23, And Try The Ping Again.SW2conf TEnter Configuration Commands, One Per Line. End With CNTLZ.SW2(config)interface Fast03SW2(config-if)switchport Mode AccessSW2(config-if)switchport Access Vlan 23R3ping 172.23.23.2Type Escape Sequence To Abort.Sending 5, 100-byte ICMP Echos To 172.23.23.2, Timeout Is 2 Seconds:!!!!!Success Rate Is 100 Percent (55), Round-trip Minavgmax 448 MsR2ping 172.23.23.3Type Escape Sequence To Abort.Sending 5, 100-byte ICMP Echos To 172.23.23.3, Timeout Is 2 Seconds:!!!!!Now That R2 And R3 Are In The Same VLAN, Pings Can Go Through. This Just Proves The Theory - That Inter-VLAN Communicate Requires A Layer 3 Device. Layer 3 Switches Are Becoming More And More Popular, But Router-on-a-stick Is Still Around - And We'll See How To Configure That In Our Next Tutorial!