Verify Your lo0 Interface Configuration

After you commit your lo0 configuration, you should be able to ping the router’s loopback address. You can also use a show interfaces command to verify its status:

lab@r3> ping 10.0.3.3 PING 10.0.3.3 (10.0.3.3): 56 data bytes 64 bytes from 10.0.3.3: icmp_seq=0 ttl=255 time=8.148 ms ^C --- 10.0.3.3 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 8.148/8.148/8.148/0.000 ms lab@r3> show interfaces lo0 Physical interface: lo0, Enabled, Physical link is Up    Interface index: 4, SNMP ifIndex: 7    Type: Loopback, MTU: Unlimited    Device flags   : Present Running Loopback    Interface flags: SNMP-Traps    Link flags     : None    Input packets : 2    Output packets: 2    Logical interface lo0.0 (Index 3) (SNMP ifIndex 28)     Flags: SNMP-Traps Encapsulation: Unspecified     Protocol inet, MTU: Unlimited, Flags: None      Addresses, Flags: Is-Default Is-Primary        Local: 10.0.3.3

In this screen capture, you can see that the one and only address assigned to the lo0 interface is, by definition, both the preferred and primary addresses for the interface. The preferred address is used to source a packet when multiple addresses belonging to the same logical IP subnet (LIS) have been assigned, and the destination address of the packet identifies it as belonging to that particular subnet. In contrast, the primary address is used to source a packet when a particular interface is used for packet egress, but the destination address of the packet does not identify it as belonging to any of the subnets assigned to that particular interface. This situation is often the case when sending multicast or global broadcast packets (using address 255.255.255.255) because these types of addresses are not associated with any particular subnet or interface address assignments.

Because the primary address of the lo0 interface is used as the RID, you may need to manually configure a particular address to be the primary one in situations where you assign multiple addresses to a router’s lo0 interface.

The following captures illustrate this point by assigning a second address to r3’s lo0 interface:

[edit interfaces lo0] lab@r3# set unit 0 family inet address 200.0.0.1 [edit interfaces lo0] lab@r3# show unit 0 {    family inet {       address 10.0.3.3/32;       address 200.0.0.1/32;    }  } lab@r3> show interfaces lo0 Physical interface: lo0, Enabled, Physical link is Up    Interface index: 4, SNMP ifIndex: 7    Type: Loopback, MTU: Unlimited    Device flags   : Present Running Loopback    Interface flags: SNMP-Traps    Link flags     : None    Input packets : 2    Output packets: 2    Logical interface lo0.0 (Index 3) (SNMP ifIndex 28)    Flags: SNMP-Traps Encapsulation: Unspecified    Protocol inet, MTU: Unlimited, Flags: None      Addresses, Flags: Is-Default Is-Primary        Local: 10.0.3.3      Addresses        Local: 200.0.0.1

After committing, the results shown previously indicate that the lowest IP address on a particular logical unit is chosen as the primary address for that logical interface. If we assume that you wanted r3’s RID to be 200.0.0.1, then you will need to manually configure the 200.0.0.1 address as the primary address on the lo0 interface. To set an address as primary, use the primary argument when assigning the address:

[edit interfaces lo0] lab@r3# set unit 0 family inet address 200.0.0.1/32 primary [edit interfaces lo0] lab@r3# commit commit complete [edit interfaces lo0] lab@r3# run show interfaces lo0 Physical interface: lo0, Enabled, Physical link is Up    Interface index: 4, SNMP ifIndex: 7    Type: Loopback, MTU: Unlimited    Device flags   : Present Running Loopback    Interface flags: SNMP-Traps    Link flags     : None    Input packets : 2    Output packets: 2 
Logical interface lo0.0 (Index 3) (SNMP ifIndex 28)  Flags: SNMP-Traps Encapsulation: Unspecified  Protocol inet, MTU: Unlimited, Flags: None    Addresses      Local: 10.0.3.3    Addresses, Flags: Primary Is-Default Is-Primary      Local: 200.0.0.1 
Warning 

Because the router’s lo0 address is used as a router ID in protocols such as OSPF and BGP, extra care should be taken when configuring your loopback interface. Problems relating to duplicate RIDs can be quite difficult to isolate and repair.

The 200.0.0.1 address should now be removed from your lo0 interface before proceeding, to ensure that it does not cause problems with subsequent lab activities.

Because JUNOS software permits multiple addresses on a single logical unit, care should be taken when correcting addressing mistakes; simply reassigning the correct address will normally result in the interface having two addresses—one being good, and the other bad. To save time, you might use the JUNOS software rename function to correct addressing mistakes. This saves you the trouble of having to explicitly delete the incorrect address, thereby helping you avoid the pitfall described previously. The following example shows how the rename command is used to reassign the existing fe-0/1/2 interface address from 10.0.1.1/24 to a new value of 10.0.1.200/30:

[edit interfaces fe-0/1/2] lab@router# rename unit 0 family inet address 10.0.1.1/24 to address 10.0.1.200/30 [edit interfaces fe-0/1/2] lab@router# show unit 0 {    family inet {       address 10.0.1.200/30;    }  }




JNCIP. Juniper Networks Certified Internet Professional Study Guide Exam CERT-JNCIP-M
JNCIP: Juniper Networks Certified Internet Professional Study Guide
ISBN: 0782140734
EAN: 2147483647
Year: 2003
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net