Lesson 20: Configuring IPv4 and IPv6
IPv4 Configuration
To assign an IPv4 address to a router interface, you must enter interface configuration mode and use the ip address command, including the subnet mask.
ios Router# configure terminal Router(config)# interface GigabitEthernet 0/0 Router(config-if)# ip address 192.168.1.1 255.255.255.0 Router(config-if)# no shutdown Router(config-if)# exit Router(config)# hostname R1
IPv6 Configuration
IPv6 requires enabling the feature globally before configuring interfaces.
-
Enable IPv6 Routing (Globally): ios Router(config)# ipv6 unicast-routing
-
Configure Interface Address: ios Router(config)# interface GigabitEthernet 0/1 Router(config-if)# ipv6 address 2001:DB8:ACAD::1/64 Router(config-if)# ipv6 address FE80::1 link-local Router(config-if)# no shutdown
Verification Commands
show ip interface brief: Quick summary of IPv4 interface status.show ipv6 interface brief: Quick summary of IPv6 interface status.show interface [interface_id]: Detailed interface statistics.