Friday, January 19, 2007

Delete multiple default gateways

  1. Obtain how many gateways
    • # odmget -q "attribute=route" CuAt

      CuAt:
      name = "inet0"
      attribute = "route"
      value = "net,-hopcount,0,,0,192.168.0.2"
      type = "R"
      generic = "DU"
      rep = "s"
      nls_index = 0

      CuAt:
      name = "inet0"
      attribute = "route"
      value = "net,-hopcount,0,,0,192.168.0.2"
      type = "R"
      generic = "DU"
      rep = "s"
      nls_index = 0
  2. If there are more than one, need to remove the excess route
    • # chdev -l inet0 -a delroute="net,-hopcount,0,,0,192.168.0.2"
      Method error (/usr/lib/methods/chginet):
      0514-068 Cause not known.
      0821-279 writing to routing socket: The process does not exist.
      route: not in table or multiple matches
      0821-207 chginet: Cannot add route record to CuAt.
  3. Then verify again
    • # odmget -q "attribute=route" CuAt

      CuAt:
      name = "inet0"
      attribute = "route"
      value = "net,-hopcount,0,,0,192.168.0.1"
      type = "R"
      generic = "DU"
      rep = "s"
      nls_index = 0

No comments: