To configure an IPv4 address on a Cisco IOS router, use the following commands:
Router>enable
Router#configure terminal
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
To configure an IPv6 address on a Cisco IOS router, use the following commands:
Router>enable
Router#configure terminal
Router(config)#ipv6 unicast-routing
Router(config)#interface gigabitEthernet 0/1
Router(config-if)#ipv6 address 2001:1234:4567:89AB::1/64
Router(config-if)#no shutdown