Saturday, March 21, 2009

MPLS Fundamentals - Chapter 4 – Useful Commands

  • Enable CEF with the global 'ip cef' command.
  • Enable LDP globally with the 'mpls ip' command.
  • To discover whether the LSR sends and receives LDP Hellos, the Hello interval, and the Hold time, use the 'show mpls ldp discovery [detail]' command.
  • The 'show mpls interfaces' command allows you to quickly see which interfaces are running LDP.
  • You can change the LDP router ID manually by using the command 'mpls ldp router-id interface [force]'.
  • If the LDP peers agree on the session parameters, they keep the TCP connection between them. If not, they retry to create the LDP session between them, but at a throttled rate. In Cisco IOS, the LDP backoff command controls this throttling rate: 'mpls ldp backoff initial-backoff maximum-backoff'
  • The command to change the LDP session keepalive timer is 'mpls ldp holdtime seconds'
  • Another command to have a look at the LIB on the LSR is 'show mpls ip binding'.
  • You can also see the discovery and session timers with the command 'show mpls ldp parameters'.
  • To change the IP address, configure the command 'mpls ldp discovery transport-address {interface | ipaddress}' on the interface of the router and specify an interface or IP address to be used to create the LDP session.
  • Command to check the LDP Neighbor Hold Time and KA Interval is 'show mpls ldp neighbor 10.200.254.5 detail'
  • Command 'show mpls ldp bindings' shows the LIB on an LSR. The advantage of the command show mpls ip binding is that it also shows which label from all possible remote bindings is used to forward traffic by indicating inuse. Inuse indicates the outgoing label in the LFIB for that prefix.
  • Command to see the label bindings for a specific prefix is 'show mpls ldp bindings <ip> <mask>'
  • In older Cisco IOS software (pre 12.0(21)ST), the default behavior was not to send a Label Withdraw message to withdraw the label before advertising the new label for the FEC. The new label advertisement was also an implicit label withdraw. If you want to keep the old behavior, you must configure the command 'mpls ldp neighbor neighbor implicit-withdraw'.
  • LDP received messages, excluding periodic Keep Alives debugging - 'debug mpls ldp messages received'
  • LDP Label Information Base (LIB) changes debugging - 'debug mpls ldp bindings'
  • For LDP neighbors that are not directly connected, the LDP neighborship needs to be configured manually on both the routers with the 'mpls ldp neighbor targeted' command.
  • To change the LDP Hello interval and the Hold time for targeted LDP sessions, you can use the command 'mpls ldp discovery {hello {holdtime | interval} seconds | targeted-hello {holdtime | interval} seconds | accept [from acl]}'
  • 'mpls ldp discovery targeted-hello accept [from acl]' command can be used to configure the other router to accept targeted LDP sessions from specific LDP routers.
  • In Cisco IOS, you can configure MD5 for LDP by configuring a password for the LDP peer with the command 'mpls ldp neighbor [vrf vpn-name] ip-addr password [0-7] pswd-string'
  • LDP lets you control the advertisement of labels. You can configure LDP to advertise or not to advertise certain labels to certain LDP peers using the command 'mpls ldp advertise-labels [vrf vpn-name] [interface interface | for prefix-access-list [to peer-access-list]]'
  • Command to enable the inbound label binding filtering: 'mpls ldp neighbor [vrf vpn-name] nbr-address labels accept acl'
  • The OSPF router command to enable LDP Autoconfiguration is this: 'mpls ldp autoconfig [area area-id]'
  • The interface command to disable LDP Autoconfiguration on an interface is as follows: 'no mpls ldp igp autoconfig'
  • 'show mpls interfaces detail' & 'show mpls ldp discovery detail' commands can be used to see if MPLS was configured using the interface comand or using the autoconfig command.
  • The command to enable it for the IGP is 'mpls ldp sync', and it is configured under the router process.
  • Disable MPLS LDP-IGP Synchronization on one particular interface with the command 'no mpls ldp igp sync'.
  • By default, if synchronization is not achieved, the IGP waits indefinitely to bring up the adjacency. You can change this with the global command 'mpls ldp igp sync holddown msecs', which instructs the IGP to wait only for the configured time.
  • Commands 'show mpls ldp igp sync serial 4/0' & 'show ip ospf mpls ldp interface' can be used to check the status of an interface in regards to the IGP-LDP synchronization.
  • The command 'debug mpls ldp sync [interface <name>] [peer-acl <acl>]' provides debug information on the LDP synchronization.
  • The global command to enable LDP Session Protection is 'mpls ldp session protection [vrf vpn-name] [for acl] [duration seconds]'
  • For the protection to work, you need to enable it on both the LSRs. If this is not possible, you can enable it on one LSR, and the other LSR can accept the targeted LDP Hellos by configuring the command 'mpls ldp discovery targeted-hello accept'.

No comments: