How to Assign IPv4 and IPv6 Addresses to Router Interfaces

Configuring IP addresses on router interfaces is a fundamental task for network administrators. Whether you’re setting up a new network or expanding an existing one, assigning both IPv4 and IPv6 addresses ensures compatibility with modern devices and future-proofs your infrastructure. In this guide, we’ll walk you through the steps to assign IPv4 and IPv6 addresses to router interfaces on a Cisco router.


Why Assign Both IPv4 and IPv6 Addresses?

  • IPv4: Still widely used, but its address space is limited.
  • IPv6: Provides a vastly larger address space and is essential for the growing number of internet-connected devices.
  • Dual-Stack Configuration: Running both IPv4 and IPv6 on your router ensures compatibility with all devices and applications.

Step 1: Access the Router’s CLI

  1. Connect to your router via console cable, Telnet, or SSH.
  2. Enter privileged EXEC mode:
    Router> enable
    Router#

Step 2: Enter Interface Configuration Mode

  1. Enter global configuration mode:
    Router# configure terminal
    Router(config)#
  2. Select the interface you want to configure (e.g., GigabitEthernet0/0):
    Router(config)# interface GigabitEthernet0/0
    Router(config-if)#

Step 3: Assign an IPv4 Address

  1. Assign an IPv4 address and subnet mask:CopyRouter(config-if)# ip address 192.168.1.1 255.255.255.0
    • Replace 192.168.1.1 with your desired IPv4 address and 255.255.255.0 with the appropriate subnet mask.
  2. Enable the interface:CopyRouter(config-if)# no shutdown

Step 4: Assign an IPv6 Address

  1. Enable IPv6 on the interface:CopyRouter(config-if)# ipv6 enable
  2. Assign an IPv6 address and prefix length:
    Router(config-if)# ipv6 address 2001:db8::1/64
    • Replace 2001:db8::1/64 with your desired IPv6 address and prefix length.
  3. Enable the interface for IPv6:
    Router(config-if)# no shutdown

Step 5: Verify the Configuration

  1. Exit configuration mode:
    Router(config-if)# exit
    Router(config)# exit
    Router#
  2. Verify the IPv4 configuration:
    Router# show ip interface brief
  3. Verify the IPv6 configuration:
    Router# show ipv6 interface brief

Step 6: Save the Configuration

To ensure your changes persist after a reboot:

Router# write memory

or

Router# copy running-config startup-config

Conclusion

Assigning both IPv4 and IPv6 addresses to your router interfaces is a straightforward process that ensures your network is ready for today’s demands and future growth. By following the steps outlined in this guide, you can configure your router to support dual-stack networking, providing seamless connectivity for all devices.

If you found this guide helpful, feel free to share it with your peers or leave a comment below with your thoughts or questions. Happy networking!

About the Author:

Ali Asad is a network engineer and tech enthusiast with a passion for sharing knowledge about networking, cybersecurity, and IT infrastructure. Follow [Your Blog/Social Media] for more tips and tutorials!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *