InterVlan and Trunking

 Inter-VLAN routing and trunking are essential aspects of network configuration, especially in environments where multiple VLANs need to communicate with each other. Below are some common Cisco commands and their descriptions for configuring inter-VLAN routing and trunking:

1. Create VLANs and Assign Them to Ports:

  • Description: Before configuring inter-VLAN routing and trunking, you need to create the VLANs and assign them to the appropriate switch ports.

  • Commands:

    bash
    Switch(config)# vlan 10 Switch(config-vlan)# name VLAN10 Switch(config-vlan)# exit Switch(config)# interface GigabitEthernet0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 10
  • Description: In the above commands, we create VLAN 10 and assign it to GigabitEthernet0/1 as an access port.

2. Configure Inter-VLAN Routing with a Layer 3 Switch:

  • Description: Inter-VLAN routing can be achieved with a Layer 3 switch. You configure an SVI (Switched Virtual Interface) for each VLAN to route traffic between them.

  • Commands:

    bash
    Switch(config)# interface Vlan10 Switch(config-if)# ip address 192.168.10.1 255.255.255.0 Switch(config-if)# no shutdown Switch(config)# interface Vlan20 Switch(config-if)# ip address 192.168.20.1 255.255.255.0 Switch(config-if)# no shutdown
  • Description: In this example, we configure SVIs for VLANs 10 and 20 with their respective IP addresses.

3. Enable Routing on the Layer 3 Switch:

  • Description: You need to enable routing on the Layer 3 switch to allow it to route traffic between VLANs.

  • Commands:

    bash
    Switch(config)# ip routing
  • Description: This command globally enables routing on the switch.

4. Configure Trunk Ports:

  • Description: To allow multiple VLANs to traverse a single link between switches or between a switch and a router, you configure trunk ports.

  • Commands:

    bash
    Switch(config)# interface GigabitEthernet0/24 Switch(config-if)# switchport mode trunk
  • Description: In this example, GigabitEthernet0/24 is configured as a trunk port.

5. Allow VLANs on Trunk Ports:

  • Description: Specify which VLANs are allowed to pass over a trunk link. This is useful for controlling which VLANs can communicate over the trunk.

  • Commands:

    bash
    Switch(config-if)# switchport trunk allowed vlan 10,20
  • Description: This command allows VLANs 10 and 20 to traverse the trunk.

6. Verify Inter-VLAN Routing and Trunking:

  • Description: You can use various show commands to verify your inter-VLAN routing and trunking configuration, such as show vlan, show ip route, and show interfaces trunk.

  • Commands:

    bash
    Switch# show vlan Switch# show ip route Switch# show interfaces trunk
  • Description: These commands provide information about VLANs, routing tables, and trunk ports for verification.

  • ============================================================


Comments

Popular posts from this blog

CCNA Router and Catalyst Switch IOS Command Reference

Network Technologies

About myself