How to Connect a Multilayer Switch to a Router in Packet Tracer

network topology

In my previous post, I showed you how to configure a multilayer switch with the network topology shown above. In that post, I showed you the process of creating SVI, creating trunk links between the Layer 3 switch and each of the Layer 2 switches, and also the process of creating access ports on each of the Layer 2 switches. After the configuration, we could achieve inter-VLAN routing with a multilayer switch.

In this post, I will be showing how to connect a multilayer switch to a router. I will be adding a router to the network topology shown above and then showing how to configure a routed port on the multilayer switch so that traffic can route between host devices attached to the layer 3 switch and the host devices attached to the router.

Network Topology

Just like I said before, I will be adopting the network topology I used in the previous post.

As shown below, I have added a router, connected it with a cross-over cable to the layer 3 switch, and attached a PC to the router.

ALSO READ:  How to Configure Native VLAN on Cisco Switch Packet Tracer

an image showing router connected to the layer 3 switch

 

Configuration Objectives

Our configuration objectives for this post include:

  1. Configuring a routed port on the layer 3 switch.
  2. Configuring OSPF as the routing protocol on both the layer 3 switch and the router.
  3. Testing the network to ensure successful routing.

Configuration

Below are the configurations needed on the multilayer switch and the router to connect both of them;

Multilayer Switch Configuration

Interface Configuration

Enter the following commands to the configure the interface of the layer 3 switch that is connected to the router;

SWI>en
SWI#conf ter
SWI(config)#int fa0/4
SWI(config)#no switchport
SWI(config-if)#ip address 192.168.3.3 255.255.255.0
SWI(config-if)#no shut

OSPF Configuration

Enter the following command to configure OSPF IP routing protocol on the layer 3 switch;

SWI(config)#router ospf 10
SWI(config-router)#network 192.168.2.0 0.0.0.255 area 0
SWI(config-router)#network 192.168.1.0 0.0.0.255 area 0
SWI(config-router)#network 192.168.3.0 0.0.0.255 area 0
SWI(config-router)#network 192.168.4.0 0.0.0.255 area 0
SWI(config-router)#exit
SWI(config)#ip route 0.0.0.0 0.0.0.0  192.168.3.1
SWI(config)#do write

Here is a brief explanation of each of the above commands;

  1. The first command above enter the ospf configuration mode with a process number of 10.
  2. Line 2, 3, 4,  5 Identifies the networks that should participate in the OSPF routing
  3. SWI(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1: This command configures a default route on the multilayer switch. It tells the switch that any traffic with a destination not matching any specific route should be forwarded to the next-hop IP address 192.168.3.1. This is often used to route traffic to an external gateway, such as a router or firewall for further routing
ALSO READ:  Standard Numbered ACL Configuration in Packet Tracer

Router 0 Configuration

Interface Configuration

Enter the following commands to configure the interfaces of the router;

Router>en
Router#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int g0/0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#int g0/0/1
Router(config-if)#ip address 192.168.4.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#do write

OSPF Configuration

Enter the following commands to configure OSPF on router 0;

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#router ospf 10
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-router)#network 192.168.4.0 0.0.0.255 area 0
Router(config-router)#exit

Verify the Configuration

To verify that that the connection between the layer 3 switch and the router 0 is successful,  I have pinged from PC3 to PC4 and the result is as shown in the image below;

ALSO READ:  How to Configure Trunk Port on Cisco Switch Packet Tracer

an image showing a succeeded ping from PC3 to PC4

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top