4 Replies Latest reply on Aug 29, 2016 11:11 PM by dijkstra

    Secondary IP Address

    dijkstra New Member

      How does the "ip address <ip-address> <subnet-mask> secondary" command works? Like what mac-address does it use? Does it create another mac-address or it just uses its interfaces mac-address because I'm having packet loss when pinging a printer when there's a secondary IP Address on the interface.

        • Re: Secondary IP Address
          michael56 New Member

          A secondary IP is just that, another IP address that allows you to access the device or interface. Example. If you have a primary and secondary IP on you PE and CE interfaces, telnetting/ssh/etc to EITHER IP will give you access to the CPE device. Think of it as a "backup address" so that if you forget or lose one of the IP's, the other will let you into the device (assuming its included in any acl's or rules or policies as well). If natting within the device, you would be able to nat to either IP as well and reach the internet.


          As far as pinging a printer on an interface with a secondary IP, unless the printer is capable of responding to multiple IP addressing, I would remove the secondary IP address. As far as I know you can only have one IP to a printer if statically assigned so I would remove the secondary IP.


          Pinging, by nature, doesn't necessarily indicate you're losing packets. Ping data is not comparable to an actual data packet. If your PING is just failing after a brief period, either the printer buffer is full and just quits responding, or you have a ping limit in a router/switch configuration that deliberately limits ping count response.

          • Re: Secondary IP Address
            jayh Hall_of_Fame

            A secondary IP address is a different IP address and mask on the same interface.Both the primary and secondary IP will ARP to the same MAC on the interface. It shouldn't affect printing unless there's an IP conflict or something. Secondary addresses can be useful when migrating from one network to another or to support multiple subnets on the same wire. They may not be appropriate for many applications.


            Secondary IP addresses can cause problems if there's DHCP on either subnet, and some routing protocols like OSPF may not work properly. (With your username, you should understand OSPF quite well.)


            If you require more subnets than you have physical interface ports, consider using VLANs with 802.1q trunking and put each subnet on its own subinterface on the router interface. On the connected switch, assign access ports on each VLAN as appropriate for the end devices.