![](/images/new-backgrounds/1121221/121221185x1.webp)
CLI Examples
The configuration commands used in the following example enable RIP on ports vlan 2 and vlan 3 as shown in the network illustrated in Figure
VLAN 3
Port 1/0/3
192192.130.130.3.3..1
Layer 3 Switch
acting as a router
Subnet 3
VLAN 5 192.64.4.1
Port 1/0/2 | Port 1/0/5 |
VLAN 2 | 192.64.4.1 |
192.150.2.2 | |
192.150.2.2 |
|
Subnet 2 |
|
Subnet 5
Figure 4-6. Port Routing Example Network Diagram
Example #1: Enable Routing for the Switch
The following sequence enables routing for the switch:
console#config ip routing exit
Example #2: Enable Routing for Ports
The following command sequence enables routing and assigns IP addresses for VLAN 2 and VLAN 3.
console#config interface vlan 2
routing
ip address 192.150.2.2 255.255.255.0 exit
interface vlan 3 routing
ip address 192.130.3.1 255.255.255.0 exit
exit
Routing Configuration
93