3

I'm studying networking and GNS3. In every example I see that before configuring an IP (IPv4 or IPv6) address of an interface, there is always the command "no ip address". Why they write this command? I mean, when I set a new IP the old IP will be lost so I don't understand the reason of writing "no ip address". I also do not understand why sometimes before an IPv6 address there is "no ip address" and other times there is "no ipv6 address" (same device, same function, just different examples). Can someone explain it?

Thank you.

1

Actually, with IPv6, you can have multiple IPv6 addresses on an interface. You will certainly have a link-local IPv6 address, and one or more other IPv6 addresses. An IPv6 interface will use all the IPv6 addresses assigned, without needing to use secondary addressing.

There could be other reasons for doing this with IPv4. For example, removing the IPv4 address first will stop any protocols using that address before you add a different address. In other words, it is a good practice, although it may not make any difference, depending on the circumstances and other configurations.

  • Thank you for the answer. I don't understand only a thing: why when they add an IPv6 address they don't write "no ip address" AND "no ipv6 address"? (or sometimes they write only "no ip address" and other times "no ipv6 address", what it depends from?) – Uzareth Jan 21 '18 at 18:54
  • We can't really answer that. It would depend on the specific circumstances. You may have both IPv4 and IPv6 addresses, and adding an IPv6 address, you don't want to remove the IPv4 address. – Ron Maupin Jan 21 '18 at 18:57
  • What you are seeing are the results of showing the configuration. If you show the configuration of an interface with no IPv4 address configured on it, it will have no ip address. That is not necessarily a command that was entered, it is the default for an interface. If you wipe the configuration of a router, and show the configuration, all the interfaces will have that. – Ron Maupin Jan 21 '18 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.