3.3. Configuring Layer3 Interfaces

Overview

Function Introduction

3 types of Layer3 interface are supported:

  • VLAN interfaces: Logical interface with layer3 features. Connect different VLANs via IP address on the VLAN interface. VLAN interfaces can be created and deleted.

  • Routed Ports: Ports are physical ports configured to be in Layer 3 mode by using the no switchport in interface configuration command.

  • Layer 3 Link Aggregation Ports: Link Aggregation interfaces made up of routed ports.

A Layer 3 switch can have an IP address assigned to each routed port and VLAN interface. All Layer 3 interfaces require an IP address to route traffic. This section shows how to configure an interface as a Layer 3 interface and how to assign an IP address to an interface.

Principle Description

N/A

Configuration

Configuring Routed Port

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the interface configure mode and set IP address

Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 1.1.1.1/24

step 3 Exit the configure mode

Switch(config-if)# end

step 4 Validation

Use the following command to display the brief status of the interfaces:

Switch# show ip interface brief
Interface IP-Address Status Protocol
eth-0-1 1.1.1.1 up up
Switch# show ip interface
Interface eth-0-1
Interface current state: UP
Internet address(es):
1.1.1.1/24 broadcast 1.1.1.255
Joined group address(es):
224.0.0.1
The maximum transmit unit is 1500 bytes
ICMP error messages limited to one every 1000 milliseconds
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are always sent
ARP timeout 01:00:00, ARP retry interval 1s
VRRP master of: VRRP is not configured on this interface

Configuring VLAN Interfaces

This chapter describes configuring VLAN interfaces and using them.

Several Virtual LAN (VLAN) interfaces can be configured on a single Ethernet interface. Once created, a VLAN interface functions the same as any physical interface, and it can be configured and displayed like any physical interface. Routing protocols, such as, RIP, OSPF and BGP can run across networks using VLAN interfaces.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the vlan configure mode and create a vlan

Switch(config)# vlan database
Switch(config-vlan)# vlan 10
Switch(config-vlan)# exit

step 3 Enter the interface configure mode and set switch port attributes

Switch(config)# interface eth-0-2
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan all
Switch(config-if)# no shutdown
Switch(config-if)# exit

step 4 Enter the vlan interface configure mode and set IP address

Switch(config)# interface vlan10
Switch(config-if)# ip address 2.2.2.2/24

step 5 Exit the configure mode

Switch(config-if)# end

step 6 Validation

Use the following command to display the brief status of the interfaces:

Switch# show ip interface brief
Interface IP-Address Status Protocol
vlan10 2.2.2.2 up up
Switch# show ip interface
Interface vlan10
Interface current state: UP
Internet address(es):
2.2.2.2/24 broadcast 2.2.2.255
Joined group address(es):
224.0.0.1
The maximum transmit unit is 1500 bytes
ICMP error messages limited to one every 1000 milliseconds
ICMP redirects are always sent
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are always sent
ARP timeout 01:00:00, ARP retry interval 1s
VRRP master of : VRRP is not configured on this interface