%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down Switch(config)# interface gigabitethernet 0/1 Switch# conf tĮnter configuration commands, one per line.
To configure the GigabitEthernet0/1 interface as a TRUNK port on the Cisco Switch, execute the switchport mode trunk command in the config mode of that interface. The reason the ping failed is that the Cisco Switch Gig0/1 interface that is connected to the Cisco Router is not configured as TRUNK. When you ping VLAN20 and VLAN30 member PCs from PC0, you will see that the operation failed. %SYS-5-CONFIG_I: Configured from console by consoleĪfter creating the Subinterface on the Cisco Router, check the status of the Subinterface by executing the show ip interface brief command at the CLI prompt.Ĭlick PC0 in the workspace and open Command Prompt from the pop-up window. Router(config-subif)# encapsulation dot1q 30 %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.30, changed state to up
%LINK-5-CHANGED: Interface GigabitEthernet0/0.30, changed state to up Router(config)# interface gigabitethernet0/0.30 Router(config-subif)# encapsulation dot1q 20 %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.20, changed state to up %LINK-5-CHANGED: Interface GigabitEthernet0/0.20, changed state to up Router(config)# interface gigabitethernet0/0.20 Router(config-subif)# encapsulation dot1q 10 %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.10, changed state to up %LINK-5-CHANGED: Interface GigabitEthernet0/0.10, changed state to up Router(config)# interface gigabitethernet0/0.10 %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up Router(config)# interface gigabitethernet0/0 For example gigabitethernet0/0.10 is a subinterface targeted to the VLAN10. When creating a subinterface, you can type the number of the VLAN ID to avoid confusion next to the port and slot number of the respective interface. VLAN Routing on Cisco SwitchĪfter creating a network topology like in the following image, click Router for Inter-VLAN Routing and open the CLI.Īt the CLI command prompt of the Cisco Router, execute the following commands to create Subinterface for the interface that connects to the Switch. After designing your network topology, create VLANs called VLAN10, VLAN20, and VLAN30 on Cisco Switch and add management IP addresses.įollow the steps below in order to enable routing between new VLANs you have created.
Now, create a network topology as in Step 1 on the Cisco simulator software. This method is not recommended as using more cables will result in both reducing the number of empty interfaces on the Router and increasing the cost of the cable. If there is a Layer 3 Switch in the network environment, all you need to do for routing to VLANs is to execute ip routing in config mode.Īnother way to enable VLAN routing is to plug in more cables from the Switch to the Router. The subinterface configured interface accepts traffic from all VLANs. In order to enable routing between VLANs, subinterfaces are created according to the IP addresses of the VLANs in the interface connected to the Switchport of the Router and routing is provided. The Switchport connected to the router is configured as a trunk port. Router-on-a-Stick is the second type of Inter-VLAN routing, and the Router is connected to the Switch with a single interface.
How to Configure Inter-VLAN with Router-on-a-Stick on Packet Tracer You must configure Inter-VLAN Routing to communicate with clients that are members of different VLANs on the Layer 2 Switch. After you create VLANs on a Switch using Cisco Packet Tracer, you must provide data communication between the VLANs.