22-6
Cisco 7600 Series Router Cisco IOS Software Configuration Guide, Release 12.2SX
OL-4266-08
Chapter 22 Configuring Layer 3 Interfaces
Configuring IPv4 Routing and Addresses
To configure IPv4 routing and an IPv4 address on a Layer 3 interface, perform this task:
This example shows how to enable IPv4 Routing Information Protocol (RIP) routing:
Router#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
ip routing
Router(config)#
router rip
Router(config-router)#
network 10.0.0.0
Router(config-router)#
end
Router#
This example shows how to configure an IPv4 address on Fast Ethernet port 5/4:
Router#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
interface fastethernet 5/4
Router(config-if)#
ip address 172.20.52.106 255.255.255.248
Router(config-if)#
no shutdown
Router(config-if)#
end
Router#
This example uses the
show interfaces
command to display the interface IPv4 address configuration and
status of Fast Ethernet port 5/4:
Router#
show interfaces fastethernet 5/4
FastEthernet5/4 is up, line protocol is up
Hardware is Cat6K 100Mb Ethernet, address is 0050.f0ac.3058 (bia 0050.f0ac.3058)
Internet address is 172.20.52.106/29
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Command
Purpose
Step 1
Router(config)#
ip routing
Enables IPv4 routing. (Required only if IPv4 routing is
disabled.)
Step 2
Router(config)#
router
ip_routing_protocol
Specifies an IPv4 routing protocol.
Step 3
Router(config-router)#
ip_routing_protocol_commands
Configures the IPv4 routing protocol.
Step 4
Router(config-router)#
exit
Exists IPv4 routing protocol configuration mode.
Step 5
Router(config)#
interface
{
vlan
vlan_ID
} |
{
type
1
slot/port
} | {
port-channel
port_channel_number
}
1.
type
=
ethernet
,
fastethernet
,
gigabitethernet
,
tengigabitethernet
, or
ge-wan
Selects an interface to configure.
Step 6
Router(config-if)#
ip address
ip_address
subnet_mask
Configures the IPv4 address and IPv4 subnet.
Step 7
Router(config-if)#
no shutdown
Enables the interface.
Step 8
Router(config-if)#
end
Exits configuration mode.
Step 9
Router#
show interfaces
[{
vlan
vlan_ID
} |
{
type
1
slot/port
} | {
port-channel
port_channel_number
}]
Router#
show ip interfaces
[{
vlan
vlan_ID
} |
{
type
1
slot/port
} | {
port-channel
port_channel_number
}]
Router#
show running-config interfaces
[{
vlan
vlan_ID
} | {
type
1
slot/port
} | {
port-channel
port_channel_number
}]
Verifies the configuration.