cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dijkstra
New Contributor II

Secondary IP Address

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
jayh
Honored Contributor
Honored Contributor

Re: Secondary IP Address

Jump to solution

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.

View solution in original post

4 Replies
michael56
New Contributor III

Re: Secondary IP Address

Jump to solution

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.

jayh
Honored Contributor
Honored Contributor

Re: Secondary IP Address

Jump to solution

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.

dijkstra
New Contributor II

Re: Secondary IP Address

Jump to solution

Thanks michael56‌. I appreciate your answer. I think the printer buffer just can't handle a lot of PING.

dijkstra
New Contributor II

Re: Secondary IP Address

Jump to solution

Thanks jayh‌. So the router will not make another mac-address for the secondary IP address, it will just use the same mac-address as the first one. Thanks for clarifying that.