Layer 3 switches can be configured with a couple of different kinds of layer 3 interfaces: Switched Virtual Interfaces (SVIs), also called VLAN interfaces, as well as routed interfaces. Today’s lab gives you practice with both features, along with L3 EtherChannel. Make sure and check out the lab requirements first, and try to create your own answer, before checking out the answer here.
Answers
Image may be NSFW.
Clik here to view.
Figure 1: Switch Square w/L3 EtherChannel Topology
Example 5: Dist1 Config
vlan 10,20 ! interface Port-Channel10 no switchport ip address 100.1.2.1 255.255.255.240 ! interface GigabitEthernet0/1 no switchport channel-group 10 mode on ! interface GigabitEthernet0/2 no switchport channel-group 10 mode on ! interface Vlan10 ip address 10.100.100.1 255.255.255.224 no shutdown ! interface Vlan20 ip address 10.100.100.33 255.255.255.224 no shutdown
Example 6: Dist2 Config
vlan 10,20 ! interface Port-Channel10 no switchport ip address 100.1.2.14 255.255.255.240 ! interface GigabitEthernet0/1 no switchport channel-group 10 mode on ! interface GigabitEthernet0/2 no switchport channel-group 10 mode on ! interface Vlan10 ip address 10.100.100.65 255.255.255.224 no shutdown ! interface Vlan20 ip address 10.100.100.97 255.255.255.224 no shutdown
Commentary
It has become standard in most modern networks that layer 3 switches are typically preferred over their router counterparts in the LAN. Layer 3 switches often support much higher packet forwarding volumes than routers of a similar price-point. Also, performing layer 3 forwarding inside a switch, versus Router-on-a-Stick, removes the trip over a cable to a router and back over the same cable to the switch. In modern enterprise networks, routers often sit only at the edge of the WAN, with switches connecting all the devices in a campus or in a Data Center.
With this lab you were tasked with configuring two distribution switches to act as layer 3 switches. Two access layer switches, operating only with layer 2 features, were pre-configured with those features and VLANs. Two two distribution switches then act as the default gateway for the hosts in the VLANs shown in the figure.
First, looking at switch Dist1, it has three different interfaces. Two of its interfaces will be grouped together into a layer 3 EtherChannel link that connects to switch Dist2. Dist1’s other interface is the pre-configured trunk port that connects to switch Access1.
First, to configure the EtherChannel on the two links between the two distribution switches, you could start with the interface range gigabitethernet0/1 – 2 command so that upcoming interface subcommands would apply to both interfaces. Then add the no switchport command to convert the interfaces into a routed layer 3 interface, and the channel-group 10 mode on command to group them together into an EtherChannel. Note that the channel-group command automatically creates the Port-Channel 10 interface.
The PortChannel interface also needs to be configured as a routed port, and then it also needs an IPv4 address. To do so, use the interface port-channel 10 command to get into interface config mode, and configure the IP address using the ip address 100.1.2.1 255.255.255.240 command. Then add the no switchport command to make the portchannel interface a routed port.
The configuration of the L3 EtherChannel on switch Dist2 follows the same basic steps: configure the physical ports to be in the same channel-group (using the channel-group command), making the ports routed ports (no switchport), making the portchannel interface a routed port, and assigning the portchannel interface an IPv4 address.
To configure switch Dist1 to have a layer 3 interface connected to the subnets that reside in VLANs 10 and 20, switch Dist1 must then configure VLAN interfaces 10 and 20. To configure the interface for VLAN 10 use the interface vlan 10 command, with an IP address configured with the ip address 10.100.100.1 255.255.255.224 command to match the information in the figure. Similarly, use the interface vlan 20 command along with the ip address 10.100.100.33 255.255.255.224 command to configure the SVI for VLAN 20.
Switch Dist2 again follows a similar pattern, but for VLANs 30 and 40 in this case. To configure the interface for VLAN 30 use the interface vlan 30 command, to configure its IP address use the ip address 10.100.100.65 255.255.255.224 command. To configure the interface for VLAN 20 use the interface vlan 40 command, to configure its IP address use the ip address 10.100.100.97 255.255.255.224 command.