IETF has developed protocols, procedures & events in the form of RFC (Request for Comments) to standardize the way devices communicate with each other. Currently there are two versions of protocols for IP connectivity between network devices i.e., IPv4 & IPv6. Using either version requires an IP address assignment to a router interface or a multilayer switch to route traffic. In this post we shall configure Routed sub-interfaces, SVI (Switched Virtual Interfaces) & routed switchports.
Whenever an IP address is assigned on an interface and interface is in UP state, its direct / connected route appears in routers routing table or RIB (routing Information Base). These routes have zero administrative distance (AD). IP address are assigned by issuing below command from configuration mode.
R1(config)#interface fa0/1 R1(config-if)ip address <IP-Address> <Subnet-Mask>
Similarly, in case the need arises to assign secondary IP address over the same interface, we can do so by following below command.
R1(config-if)ip address <IP-Address> <Subnet-Mask> secondary
When a switch is connected with a router interface via a trunk port & to allow communication between different VLANs, logical sub-interfaces are configured on router port associated with each VLAN. Logical Sub-interfaces are configured by appending a dot & numeric value (usually matching the vlan tag for better management). Then the vlan needs to be associated with the sub-interface with the command below.
R1(config)interface g0/0/1.10 R1(config-if)encapsulation dot1q 10 R1(config-if)ip address 192.168.10.1 255.255.255.0 R1(config-if)interface g0/0/1.20 R1(config-if)encapsulation dot1q 20 R1(config-if)ip address 192.168.20.1 255.255.255.0
Switched Virtual Interfaces
SVI is logical layer 3 interface for VLAN also known as VLAN interface, with Cisco Catalyst Switches it is possible assign an IP address on switched virtual interface. For an SVI to be in UP state it is must to have an interface (in UP State) assigned to that VLAN. If you are using multilayer switch like Cisco 3560, the SVIs can be used for routing packets between VLANs without the need of router on a stick.
An SVI is configured by defining the VLAN on the switch and then defining the VLAN interface with the command interface vlan vlan-id.
Configuration template for creating Switch Virtual interface.
Switch# Configure terminal Switch(config)#interface vlan 10 Switch(config-if)#ip address 192.168.10.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#interface vlan 20 Switch(config-if)#ip address 192.168.20.1 255.255.255.0 Switch(config-if)#no shutdown
In an SVI we create a VLAN interface assign ip address to it and associate VLAN, however if the network design requires point to point link between router and switch, there is potential that the VLAN associated with SVI might exist somewhere else in layer2 domain or spanning tree could impact the topology.
In this scenario, multilayer switch port can be converted from layer2 to layer3 routed switch port by command no switchport. Now that it is layer3 interface we can assign IP address to it.
Switch# Configure terminal Switch(config)#interface gi0/0/24 Switch(config-if)no switchport Switch(config-if)#ip address 192.168.10.1 255.255.255.0 Switch(config-if)#no shutdown
Verification of IP addresses
Configured IP address can be viewed by issuing command ” show ip interface brief”. Output of this commnad shows details of all interfaces configured on the device their administrative status / physical port status & IP address assignment (Manual / DHCP). If any interface has not been assigned any IP address, it will appear as “unassigned”.
That’s all for now, In this post we learnt about Routed sub-interfaces, SVI (Switched Virtual Interfaces) & routed switchports, hope you have enjoyed it. If you have not yet visited our post regarding VLANs, Access Ports & Trunk Ports Configuration, Kindly do visit and provide your valuable feedback.