---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# IPAddressFixup - 전역

# IPAddressFixup - 전역 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 11분

IPAddressFixup 스크립트 포함은 장치가 성공적으로 검색된 후 다른 장치가 동일한 IP 주소를 갖지 않도록 하는 메서드를 제공합니다. 중복이 발견되면 IP 주소 필드가 지워집니다.

서버 측 검색 스크립트와 함께 사용하여 IP 주소를 확인합니다.

## IPAddressFixup - dedupe(String tableName, String ip) {#ariaid-title2}

지정된 테이블에서 지정된 IP 주소의 중복을 제거합니다.
장치가 성공적으로 검색되면 dedupe() 메서드를 사용하여 해당 장치의 중복 IP 주소를 제거할 수 있습니다.
{#r_IPAF-dedupe_S_S__table_hsd_nnq_pt__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| tableName | 문자열 | 중복을 확인할 테이블입니다. |
| ip | 문자열 | 확인할 IP 주소입니다. |
[표 1. 매개변수]

{#r_IPAF-dedupe_S_S__table_hsd_nnq_pt} {#r_IPAF-dedupe_S_S__table_isd_nnq_pt__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 2. 반환]

{#r_IPAF-dedupe_S_S__table_isd_nnq_pt}  
다음 예제는 백그라운드 스크립트에서 dedupe() 를 사용하여 cmdb_ci_hardware 테이블 내의 지정된 IP 주소에 대해 중복된 IP 주소를 제거하는 방법을 보여줍니다.

    var grDiscovery=new GlideRecord("discovery_device_history");
    grDiscovery.addQuery('sys_id','<sys id of the record>'); // sys_id of the device discovery_device_history
    grDiscovery.query();
    if(grDiscovery.next())
      {
        var fx=new IPAddressFixup(grDiscovery.cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference 
        fx.dedupe('cmdb_ci_hardware','192.161.1.1'); // Pass the IP address and table which removes duplicates of the specified IP address in the specified table.
      }

다음 예시는 비즈니스 규칙에서 dedupe() 를 사용하여 cmdb_ci_hardware 테이블 내의 지정된 IP 주소에 대해 중복된 IP 주소를 제거하는 방법을 보여줍니다.

    (function executeRule(current, previous /*null when async*/) {

    var cmdb_ci = current.cmdb_ci + '';
    if (cmdb_ci) 
      {
        var ipf = new IPAddressFixup(cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference
        ipf.dedupe('cmdb_ci_hardware','168.128.1.1'); // Removes duplicates of the specified IP address in the specified table.
      }
    })(current, previous);

## IPAddressFixup - dedupeAll() {#ariaid-title3}

테이블에서 중복된 IP 주소를 모두 제거합니다.
{#r_IPAF-dedupeAll__table_fq1_hnq_pt__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 3. 매개변수]

{#r_IPAF-dedupeAll__table_fq1_hnq_pt} {#r_IPAF-dedupeAll__table_gq1_hnq_pt__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 4. 반환]

{#r_IPAF-dedupeAll__table_gq1_hnq_pt}  
다음 예제는 백그라운드 스크립트에서 dedupeAll() 을 사용하여 모든 중복 IP 주소를 제거하는 방법을 보여줍니다.

    var grDiscovery=new GlideRecord("discovery_device_history"); 
    grDiscovery.addQuery('sys_id','<sys id of the record>'); // sys_id of the device discovery_device_history
    grDiscovery.query();
    if(grDiscovery.next())
    {
      var fx=new IPAddressFixup(grDiscovery.cmdb_ci); // Call script include IPAddressFixup and pass cmdb reference
      fx.dedupeAll(); //Removes all duplicate IP addresses from the tables.
    }

다음 예제는 비즈니스 규칙에서 dedupeAll() 을 사용하여 중복된 IP 주소를 모두 제거하는 방법을 보여줍니다.

    (function executeRule(current, previous /*null when async*/) {

    var cmdb_ci = current.cmdb_ci + '';
    if (cmdb_ci) 
    {
      var ipf = new IPAddressFixup(cmdb_ci); //call script include IPAddressFixup and pass cmdb reference
      ipf.dedupeAll(); //Removes all duplicate IP addresses from the tables.
    })(current, previous);

## IPAddressFixup - fix() {#ariaid-title4}

중복된 IP 주소를 모두 제거하고 상위 ip_address 기록이 NIC(네트워크 인터페이스 카드) IP 주소 중 하나로 설정되었는지 확인합니다.
장치가 성공적으로 검색되면 dedupe() 메서드를 사용하여 해당 장치의 중복 IP 주소를 제거하고 상위 ip_address 기록 값을 설정할 수 있습니다.
{#r_IPAF-fix__table_bfp_dmq_pt__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 5. 매개변수]

{#r_IPAF-fix__table_bfp_dmq_pt} {#r_IPAF-fix__table_cfp_dmq_pt__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 6. 반환]

{#r_IPAF-fix__table_cfp_dmq_pt}  
다음 예제는 백그라운드 스크립트에서 fix() 를 사용하여 중복된 IP 주소를 제거하고 상위 IP 주소를 설정하는 방법을 보여줍니다.

    var grDiscovery=new GlideRecord("discovery_device_history"); 
    grDiscovery.addQuery('sys_id','<sys id of the the record>'); // sys_id of the device discovery_device_history
    grDiscovery.query();
    if(grDiscovery.next())
      {
        var fx=new IPAddressFixup(grDiscovery.cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference
        fx.fix(); // Remove all duplicate IP addresses and ensure that the parent ip_address record is set to one of the NIC's IP addresses.
      }

다음 예제는 비즈니스 규칙에서 fix() 를 사용하여 중복 IP 주소를 제거하고 상위 IP 주소를 설정하는 방법을 보여줍니다.

    (function executeRule(current, previous /*null when async*/) {

    var cmdb_ci = current.cmdb_ci + '';
    if (cmdb_ci) 
      {
        var ipf = new IPAddressFixup(cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference
        ipf.fix(); /// Remove all duplicate IP addresses and ensure that the parent ip_address record is set to one of the NIC's IP addresses.
      }
    })(current, previous);

## IPAddressFixup - getParentIP() {#ariaid-title5}

현재 장치의 상위 IP 주소를 반환합니다.
{#r_IPAF-getParentIP__table_ulc_1nq_pt__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 7. 매개변수]

{#r_IPAF-getParentIP__table_ulc_1nq_pt} {#r_IPAF-getParentIP__table_vlc_1nq_pt__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | 상위 IP 주소 |
[표 8. 반환]

{#r_IPAF-getParentIP__table_vlc_1nq_pt}  
다음 예제는 백그라운드 스크립트에서 getParentIP() 를 사용하여 상위 IP 주소를 가져오는 방법을 보여줍니다.

    var grDiscovery=new GlideRecord("discovery_device_history"); // current.cmdb_ci can be used in case of Business rule on discovery_device_history table
    grDiscovery.addQuery('sys_id','<sys id of the the record>'); // sys_id of the device discovery_device_history
    grDiscovery.query();
    if(grDiscovery.next())
      {
        var fx=new IPAddressFixup(grDiscovery.cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference
        gs.info(fx.getParentIP()); // Display the parent IP address of the device 
      }

출력:

    172.21.12.11

다음 예제는 비즈니스 규칙에서 getParentIP() 를 사용하여 상위 IP 주소를 가져오는 방법을 보여줍니다.

    ((function executeRule(current, previous /*null when async*/) {

    var cmdb_ci = current.cmdb_ci + '';
    if (cmdb_ci) 
      {
        var ipf = new IPAddressFixup(cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference
        gs.log(ipf.getParentIP()); // Log the parent IP address of the device. Located in the system logs table 
      }
    })(current, previous);

## IPAddressFixup - setParentIP(문자열 ip) {#ariaid-title6}

현재 CI의 상위 IP 주소 필드를 설정합니다.
{#r_IPAF-setParentIP_S__table_bgs_rmq_pt__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| ip | 문자열 | 현재 CI의 상위 IP 주소입니다. |
[표 9. 매개변수]

{#r_IPAF-setParentIP_S__table_bgs_rmq_pt} {#r_IPAF-setParentIP_S__table_cgs_rmq_pt__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 10. 반환]

{#r_IPAF-setParentIP_S__table_cgs_rmq_pt}  
다음 예제는 백그라운드 스크립트에서 setParentIP() 를 사용하여 상위 IP 주소를 저장하는 방법을 보여줍니다.

    var grDiscover=new GlideRecord("discovery_device_history"); 
    grDiscover.addQuery('sys_id','a14e43b31bb4051070cb96c6b04bcb23'); // sys_id of the device in discovery_device_history table. Put your own sys_id here.
    grDiscover.query();
    if(grDiscover.next())
      {
        var fx=new IPAddressFixup(grDiscover.cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference.
        fx.setParentIP('197.111.1.1'); // Pass IP address to set as new IP on current mentioned CI.
      }

다음 예제는 비즈니스 규칙에서 setParentIP() 를 사용하여 상위 IP 주소를 저장하는 방법을 보여줍니다.

    ((function executeRule(current, previous /*null when async*/) {

    var cmdb_ci = current.cmdb_ci + '';
    if (cmdb_ci) 
      {
        var ipf = new IPAddressFixup(cmdb_ci); // Instantiate IPAddressFixup - pass cmdb reference
        fx.setParentIP('195.11.1.1'); // Set the new IP address of the CI 
      }
    })(current, previous);

## IPAddressFixup - syncIP() {#ariaid-title7}

상위 ip_address 기록이 NIC의 IP 주소 중 하나로 설정되어 있는지 또는 NIC가 없는 경우 그대로 두는지 확인합니다.
{#r_IPAF-syncIP__table_ywk_kmq_pt__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 안 함 |   |   |
[표 11. 매개변수]

{#r_IPAF-syncIP__table_ywk_kmq_pt} {#r_IPAF-syncIP__table_zwk_kmq_pt__entry__2}

| 유형 | 설명 |
|-|-|
| 무효 |   |
[표 12. 반환]

{#r_IPAF-syncIP__table_zwk_kmq_pt}  
백그라운드 스크립트에서 syncIP() 메서드를 사용하는 예를 보여줍니다.

    var grDevHistory=new GlideRecord("discovery_device_history");
    grDevHistory.addQuery('sys_id','a14e43b31bb4051070cb96c6b04bcb23'); // Sys_id of the device in discovery_device_history table. Put your own sys_id here.
    grDevHistory.query();
    if(grDevHistory.next())
      {
        var fx=new IPAddressFixup(grDevHistory.cmdb_ci); // Call the script include IPAddressFixup and pass cmdb reference
        fx.syncIP(); // Ensures that the parent ip_address record is set to one of the NIC's IP addresses, or leaves it alone if there were no NICs.
      }

다음은 비즈니스 규칙에서 syncIP() 메서드를 사용하는 예를 보여줍니다.

    (function executeRule(current, previous /*null when async*/) {

    var cmdb_ci = current.cmdb_ci + '';
    if (cmdb_ci) 
      {
        var ipf = new IPAddressFixup(cmdb_ci); // Call script include IPAddressFixup and pass cmdb reference
        ipf.syncIP(); // Ensures that the parent ip_address record is set to one of the NIC's IP addresses, or leaves it alone if there were no NICs.
      }
    })(current, previous);


