Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNP) > Discussions

_Communities

This Question is Not Answered 1 Correct Answer available (4 pts) 2 Helpful Answers available (2 pts)
40375 Views 10 Replies Latest reply: Oct 18, 2012 10:38 PM by borzol CCNP (CCIE R&S candidate) RSS

Currently Being Moderated

Secondary IP Address

Sep 21, 2010 2:01 PM

Nilesh Agnihotri 5 posts since
Sep 11, 2010

What is secondary ip address,why it is used?

i've learned somewhere that OSPF configured routers are known by their R-ID and EIGRP configured routers are known by there primary address,so why there is secondary addresses are used?

 

 

 

Regards,

 

Nilesh Agnihotri

  • Martin 13,067 posts since
    Jan 16, 2009
    Currently Being Moderated
    1. Sep 21, 2010 3:16 PM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    changing IP addressing schema is one reason for secondary IP address.

  • IntegrationArchitect 1,126 posts since
    Aug 14, 2009
    Currently Being Moderated
    2. Sep 21, 2010 5:14 PM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    Say you have a DMZ appearing on a a Router Ethernet interface with 10.0.0.1/24 and you run out of IPs and you need to put more servers there and not impact anything else. You can use IP Secondary on that interface and bring up another range like 10.0.1.1/24.

    .

    Another ISP trick is the public IP could be a given block range and subnet but the ISPs first hop over the WAN has another private IP that is not exposed--except to your router in a narrow rage and tigher subnet and that lets you out to the backbone.  So you want to advertise the correct IP.

     

     

    https://supportforums.cisco.com/docs/DOC-4618

  • Conwyn 7,914 posts since
    Sep 10, 2008
    Currently Being Moderated
    3. Sep 21, 2010 11:12 PM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    Hi Nilesh

     

    OSPF and EIGRP both use Router-ID as the first choice. This is a configured value not the hostname. It select the highest available loopback address and the highest interface address. It use the primary not the secondary address.

     

    Regards Conwyn

     

    UnderDesk#show ip ospf 123
    Routing Process "ospf 123" with ID 222.222.222.222

     

    UnderDesk#show run | section router ospf 123
    router ospf 123
    log-adjacency-changes
    passive-interface default
    no passive-interface Loopback99
    network 0.0.0.0 255.255.255.255 area 0

     

    UnderDesk#show run int loopback 99
    Building configuration...

    Current configuration : 126 bytes
    !
    interface Loopback99
    ip address 223.223.223.223 255.255.255.255 secondary
    ip address 222.222.222.222 255.255.255.255

  • Jared 5,498 posts since
    Jul 27, 2008
    Currently Being Moderated
    4. Sep 22, 2010 5:56 PM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    Another use for the secondary IP address command on the router is to actually bind another subnet to the same interface.  So, lets say that you have 192.168.105.1/24 bound to an ethernet interface of a router.  192.168.106.1/24 is used else where in your network.  You outgrow your subnet and need more addresses, so you bind 192.168.107.1/24 to the interface.  You would essentially have 2 different subnets, bound to the same interface and the router would route both subnets.  However, these subnets would be on the same broadcast domain.

     

    This isn't a best practice.  It isn't recommended.  It is possible.  I have seen a few networks where this was done as a temporary measure until the sites were re-addressed with a more contigious addressing scheme.

  • Darleen 5 posts since
    Mar 28, 2011
    Currently Being Moderated
    5. May 5, 2011 10:36 AM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    I have a definition for 'secondary ip address' that I found in the 2nd Edition of Cisco. 'The second (or more) IP address configured on a router interface, using the secondary keyword on the ip address command.' It also gives an example -

    ip address 10.1.7.252  255.255.255.0 secondary

    ip address 10.1.2.252  255.255.255.0

     

    The only side effect is when packets are sent between hosts on the LAN, it might be routed right. The sending host sends packet to router, which the router will send packet back into LAN.

  • Steven Williams 3,266 posts since
    Jan 26, 2009
    Currently Being Moderated
    6. May 5, 2011 10:58 AM (in response to Darleen)
    Re: Secondary IP Address

    I am with Jared on this one. That is the only reason I have used a secondary IP address, to multi-home a router interface. And I agree it is not recommended for long term use, but I have used it for migration purposes.

  • oliver-learning net 82 posts since
    Nov 5, 2008
    Currently Being Moderated
    7. May 5, 2011 11:44 AM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    Server's often have multiple IP addresses, to host either different types of server on the same box, or different web-servers (there are other probably better ways to avoid this). But if you do .......does this force a router port into half-duplex ? Is this actually possibile ? Or is it just a really bad idea to do anything like that ?

  • Jason Robbins 2 posts since
    Sep 18, 2008
    Currently Being Moderated
    8. May 9, 2012 5:07 PM (in response to Nilesh Agnihotri)
    Re: Secondary IP Address

    The most piratical use of secondary IP addresses is to migrate to new IP block. I have also seen networks where admin used a secondary address to expand an existing vlan. It is not a practice that I would recomend as it is very messy and leads to more confusion. 

  • arjis2010 1 posts since
    Dec 13, 2010
    Currently Being Moderated
    9. Jul 13, 2012 12:40 PM (in response to Jason Robbins)
    Re: Secondary IP Address

    I would suppose it gets even messier when you factor DHCP and IP helper statements into the mix...

  • borzol CCNP (CCIE R&S candidate) 276 posts since
    Apr 6, 2012
    Currently Being Moderated
    10. Oct 18, 2012 10:38 PM (in response to arjis2010)
    Re: Secondary IP Address

    Lou wrote:

     

    I would suppose it gets even messier when you factor DHCP and IP helper statements into the mix...

    In this case (helper address and dhcp) you should use ip dhcp smart-relay in global config mode.

     

    It works in two way:

     

    When a host send a dhcp discover router puts its primary address into dhcp request DG field and see whether any offer arrives to host. If not then router changes IP address in DG field of DHCP packet to its secondary address.

     

    Summary:

     

    If dhcp server has a pool to primary than router will use primary address in dhcp field of dhcp packet while this pool has free ip address. If ip address pool for primary address exhausted than put secondary address into DG field.

     

    If there is no pool for primary address in dhcp server than it put secondary address into dhcp field of packet.

     

    For further information see this link.

     

    regards,

     

    borzol

Actions

More Like This

  • Retrieving data ...

Bookmarked By (2)