Create Inter-VLAN Routing
The last stage of our journey is configuring the core network. But actually, configuring a layer 3 switch is not so different from configuring a layer 2 switch. You’ll go through the same steps as we did previously, in other words:
Create VLANs in the layer 3 switch
Assign VLANs to different interfaces
Create trunk links and authorize the VLANs to these trunk links
Here's the solution:
SwitchL3(config)# vlan 20 SwitchL3(config-vlan)# name Executive SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 21 SwitchL3(config-vlan)# name Sales SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 22 SwitchL3(config-vlan)# name HR SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 23 SwitchL3(config-vlan)# name Accounting SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 24 SwitchL3(config-vlan)# name Operations SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 25 SwitchL3(config-vlan)# name Marketing SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 27 SwitchL3(config-vlan)# name IT SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 30 SwitchL3(config-vlan)# name Servers SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 40 SwitchL3(config-vlan)# name Printing SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 50 SwitchL3(config-vlan)# name Telephony SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 60 SwitchL3(config-vlan)# name Wifi SwitchL3(config-vlan)# exit SwitchL3(config)# vlan 100 SwitchL3(config-vlan)# name Administration SwitchL3(config-vlan)# exit SwitchL3(config)# interface g1/0/2 SwitchL3(config-if)# switchport trunk encapsulation dot1q SwitchL3(config-if)# switchport mode trunk SwitchL3(config-if)# switchport trunk native vlan 100 SwitchL3(config-if)# switchport trunk allowed vlan 20,21,40,50,100 SwitchL3(config-if)# exit SwitchL3(config)# interface g1/0/3 SwitchL3(config-if)# switchport trunk encapsulation dot1q SwitchL3(config-if)# switchport mode trunk SwitchL3(config-if)# switchport trunk native vlan 100 SwitchL3(config-if)# switchport trunk allowed vlan 22,23,40,50,100 SwitchL3(config-if)# exit SwitchL3(config)# interface g1/0/4 SwitchL3(config-if)# switchport trunk encapsulation dot1q SwitchL3(config-if)# switchport mode trunk SwitchL3(config-if)# switchport trunk native vlan 100 SwitchL3(config-if)# switchport trunk allowed vlan 24,25,40,50,100 SwitchL3(config-if)# exit SwitchL3(config)# int g1/0/5 SwitchL3(config-if)# switchport trunk encapsulation dot1q SwitchL3(config-if)# switchport mode trunk SwitchL3(config-if)# switchport trunk native vlan 100 SwitchL3(config-if)# switchport trunk allowed vlan 27,40,50,100 SwitchL3(config-if)# exit SwitchL3(config)# int g1/0/6 SwitchL3(config-if)# switchport mode access SwitchL3(config-if)# switchport access vlan 30 SwitchL3(config-if)# exit SwitchL3(config)# int g1/0/7 SwitchL3(config-if)# switchport mode access SwitchL3(config-if)# switchport access vlan 30 SwitchL3(config-if)# exit SwitchL3(config)# int g1/0/8 SwitchL3(config-if)# switchport mode access SwitchL3(config-if)# switchport access vlan 30 SwitchL3(config-if)# exit SwitchL3(config)# int g1/0/9 SwitchL3(config-if)# switchport mode access SwitchL3(config-if)# switchport access vlan 60 SwitchL3(config-if)# exit
Well, that's all well and good, but the whole point of a layer 3 switch is to act as a router, isn’t it?
Definitely! You’ve previously configured your routing table, but there’s still one important thing to configure. You need to create a gateway for all of the VLANs so that they can communicate with each other.
You can proceed as you did for the layer 2 switches. So, you will create virtual interfaces (SVI). As you’ve already done this before, I’ll give you the commands to enter to create all of the gateways on the virtual interfaces (SVIs):
SwitchL3(config)# interface vlan 20 SwitchL3(config-if)# description Executive SVI Gateway SwitchL3(config-if)# ip address 192.168.20.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:20::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 21 SwitchL3(config-if)# description Sales SVI Gateway SwitchL3(config-if)# ip address 192.168.21.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:21::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 22 SwitchL3(config-if)# description HR SVI Gateway SwitchL3(config-if)# ip address 192.168.22.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:22::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 23 SwitchL3(config-if)# description Accounting SVI Gateway SwitchL3(config-if)# ip address 192.168.23.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:23::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 24 SwitchL3(config-if)# description Operations SVI Gateway SwitchL3(config-if)# ip address 192.168.24.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:24::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 25 SwitchL3(config-if)# description Marketing SVI Gateway SwitchL3(config-if)# ip address 192.168.25.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:25::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 27 SwitchL3(config-if)# description IT SVI Gateway SwitchL3(config-if)# ip address 192.168.27.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:27::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 30 SwitchL3(config-if)# description Servers SVI Gateway SwitchL3(config-if)# ip address 192.168.30.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:30::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 40 SwitchL3(config-if)# description Printing SVI Gateway SwitchL3(config-if)# ip address 192.168.40.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:40::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 50 SwitchL3(config-if)# description Telephony SVI Gateway SwitchL3(config-if)# ip address 192.168.50.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:50::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# interface vlan 60 SwitchL3(config-if)# description Wifi SVI Gateway SwitchL3(config-if)# ip address 192.168.60.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:60::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit SwitchL3(config)# int vlan 100 SwitchL3(config-if)# description Administration SVI Gateway SwitchL3(config-if)# ip address 192.168.100.254 255.255.255.0 SwitchL3(config-if)# ipv6 address 2001:db8:acad:100::254/64 SwitchL3(config-if)# no shutdown SwitchL3(config-if)# exit
Okay, your model in Cisco Packet Tracer should now be fully functional. To find out, we’ll need to do some tests. I’ll explain everything in this video:
Okay, here’s a little video to test SSH access on a Cisco Catalyst 2960 switch:
Configure Your Network With IPv6
You’ve configured all of your connectivity devices with IPv6 addressing, which is great, but it would be even better to actually use it. So now you need to configure all the end devices using the IPv6 protocol. We’ll need to configure the end devices as follows:
IPv6 address2001: db8:acad:Subnet_Number::WorkstationNumber.
IPv6 prefix: This corresponds to the IPv4 subnet mask. You’ll always use the same value: /64.
IPv6 gateway: This corresponds to the IPv6 default gateway.
I’m going to be kind and show you the full IP configuration for PC1-Exec. You’ll need to configure the other workstations on your own.
For the Prn-Exec printer, as with IPv4, configuration is done via two different menus:
Once you've configured all of your workstations (and all WiFi end devices), all servers, and all printers, you can carry out your IPv6 communication tests. I’ll explain how to do this in the video below:
Let's Recap!
In this chapter, you’ve seen:
how to route between VLANs by:
creating VLANs in the layer 3 switch.
assigning VLANs in the layer 3 switch.
creating trunk links and authorizing the VLANs to these trunk links.
how to configure IPv6 addressing in different IT end devices and printers (IPv6 address, IPv6 prefix and IPv6 gateway).
Your configuration is now completely operational. Have a play and test communication between all of your devices. What would be really handy right now would be to save all these configurations. Don’t worry, you’ll find out how in the next chapter!