Answers: Layer 3 Switching 1

certskills
By certskills July 20, 2016 09:10

This lab asks you to configure layer 3 switching, a little trunking, and some VLANs. The lab is long enough to forget all the requirements before you finish, so I would suggest keeping the lab post open in a tab while looking through the answer here. As usual, this answer post lists my opinion about the answer, plus some comments as to why. Enjoy!

Answers

Figure 1: Switch Square Topology

 

Example 1: Dist1 Config

 

Example 2: Dist2 Config

 

Example 3: Access1 Config

 

Example 4: Access2 Config

 

Commentary

Layer 3 switching has become the preferred method for layer 3 forwarding in LANs as compared with using routers. Layer 3 switching relies of LAN switching hardware that often performs both layer 2 and layer 3 forwarding at higher capacities (more messages per second) than comparable routers. Also, using layer 3 switches instead of routers avoids having to use the Router-on-a-Stick method required for routers, which sends packets over a link to a router and then back out that same physical link. As a result, many campus and data center networks are built with switches only, with routers sitting only at the edge of the WAN.

With this lab you were tasked with configuring switches as both layer 2 and layer 3. The access switches will utilize only their layer 2 features while their distribution counterparts will use both their layer 2 and layer 3 features. In this case, the layer 3 distribution switches could act as gateways for PCs attached to the access switch interfaces.

Begin by looking at the configuration of the Access1 switch and the two access VLANs. Two interfaces will be access ports that connect to two different LANs. To create the two VLANs use the vlan 10 and vlan 20 commands. (Note that you could configure both in one command with the vlan 10,20 command as shown in Example 3.) To configure interface GigabitEthernet0/2 into VLAN 10 use the switchport access vlan 10, to configure interface GigabiEthernet0/3 into VLAN 20 use the switchport access vlan 20 command.

Similarly, switch Access2 switch has two access VLANs, 30 and 40, and would be configured with similar commands: vlan 30,  vlan 40 and on the respective interfaces, switchport access vlan 30 and switchport access vlan 40.

To create trunks between Access1 and Dist1, plus Acces2 and Dist2, the requirements asked for a manually configured trunk. Basically that means to use the switchport mode trunk interface subcommand on the interfaces on both ends of the trunk.

The distribution switch configuration is a bit more complex as it uses trunks, access ports and layer 3 VLAN interfaces.

At the distribution layer of the design, first consider switch Dist1 and its three VLANs: 10, 20, and 50. Dist1 will need to route for the subnets defined on those three VLANs. First, Dist1 must know about the three VLANs (not VLAN interfaces), so the configuration includes the vlan 10,20,50 command, which defines all three VLANs as if you had typed the vlan 10, vlan 20 and vlan 50 commands separately.

Next, you need to configure a matching VLAN interface for each VLAN with the associated interface subcommands. In each case, you need to configure the IP address as shown in the figure. Also, some switches start with VLAN interfaces in a shutdown state, so to make sure the interface comes up, use the no shutdown command. Example 1 lists the details.

Each of the two distribution switches must also enable layer 3 switching. On some models of switches, the switch first requires that the switching ASIC be enabled to support IPv4 routing with a command like the sdm prefer command, followed by a reload exec command. (This lab does not show that part of the configuration). The switch also needs to have IPv4 routing enabled, which requires the ip routing global configuration command. (That command is listed in the configuration in both Example 1 and Example 2.)

The final part of the configuration on Dist1 calls for the Dist1 to Dist2 link to be an access link in VLAN 50. So, configure Dist1 interface GigabitEthernet0/1 into VLAN 50 use the switchport access vlan 50 command.

Moving on to switch Dist2, it uses similar logic to Dist1, but with different details. Dist2 routes for the subnets sitting on VLANs 30, 40 and 50. As a result, you need to create the VLANs by using the the vlan 30, vlan 40 and vlan 50 commands. Then, as on Dist1, you would enable IPv4 routing (ip routing), create a VLAN interface corresponding to each VLAN (for instance, interface vlan 30), then configure an IP address (for instance, ip address 10.10.30.1 255.255.255.0), and enable the interface (no shutdown).

PPP over Ethernet 2
Answers: PPP over Ethernet 2
certskills
By certskills July 20, 2016 09:10
Write a comment

8 Comments

  1. Mika June 26, 17:55

    I keep doing this exercise and when I input vlan 50 to the two layer 3 switches on the router I keep getting a native vlan mismatch. What am I doing wrong?

    Reply to this comment
    • CCENTSkills July 5, 09:17

      Mika,
      It could be that you didn’t configure the “switchport access plan 50” command on both Dist1 and Dist2 per the sample answers. I just repeated the exercise with the VIRL file on the site. When I copied the Dist1 config in, I get the same message, until the point at which I copy the Dist2 config in, at which point the message quits happening. FYI.

      Reply to this comment
      • Mika July 10, 20:43

        Thanks for the response. No. I did the exact answers on Packet Tracer twice with the same result. I had to use switchport trunk native vlan to get the message to stop. Maybe it’s an error in the programming on this edition of packet tracer. Weird.

        Though my new question is was it alright to use that command to to get the message to stop? Could anything bad happen as a result?

        Reply to this comment
        • Bav August 12, 14:33

          Mika – I’m assuming no as one of the requirements was to make that link between the 2 distribution switches an access link.

          Wendell – I have tried this in packet tracer and have the same native vlan mismatch logging message. It’s a bit annoying as my config matches what’s above.

          Why am I getting this error?

          Reply to this comment
          • CCENTSkills August 15, 16:33

            Hi Bav,
            I can only assume it’s an issue with PT. It doesn’t happen on real gear in this scenario.

            On real switches, CDP is required for that message to appear – if you find it annoying, maybe also disable CDP – that might at least make the message go away. At least that would mask the incorrect behavior.
            Wendell

  2. Gjorgi November 19, 22:10

    Great exercise in configuring SVIs, I tried this in Packet Tracer and it works just fine- maybe if one has the interface for VLAN 50 shut down first, does the configuration on both sides of the link and then brings those interfaces back up, one could avoid those messages about mismatch.
    Note to self, i had to create actual VLANs not just their SVIs, connectivity between hosts was not there without creating actual VLANs.

    Reply to this comment
  3. Tristan July 14, 05:48

    Hi Wendell !

    In this lab, for the layer 3 switches Dist1 & Dist2’s interfaces G0/1, could it be possible to use one set with the dynamic auto/desirable command while the other is set with the trunk command ?

    Reply to this comment
    • CCENTSkills July 25, 10:24

      Hi Tristan,
      Yep, that’ll work as well! The instructions mention “manual” trunk, which was code to not rely on dynamic protocols, but to make the trunks work in real life, any combination that results in a trunk is valid.

      Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories