IP unnumbered configuration example

Network requirements

As shown in Figure 10, two routers on an intranet are connected to each other through serial interfaces across a Digital Data Network. Each router connects to a LAN through an Ethernet interface.

To save IP addresses, configure the serial interfaces to borrow IP addresses from the Ethernet interfaces.

Figure 10: Network diagram

Configuration procedure

  1. Configure Router A:

    # Assign a primary IP address to GigabitEthernet 1/0/1.

    <RouterA> system-view
    [RouterA] interface gigabitethernet 1/0/1
    [RouterA-GigabitEthernet1/0/1] ip address 172.16.10.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/1] quit
    

    # Configure Serial 2/1/1 to borrow an IP address from GigabitEthernet 1/0/1.

    [RouterA] interface serial 2/1/1
    [RouterA-Serial2/1/1] ip address unnumbered interface gigabitethernet 1/0/1
    [RouterA-Serial2/1/1] quit
    

    # Configure a static route to the subnet attached to Router B, specifying Serial 2/1/1 as the outgoing interface.

    [RouterA] ip route-static 172.16.20.0 255.255.255.0 serial 2/1/1
    
  2. Configure Router B:

    # Assign a primary IP address to GigabitEthernet 1/0/1.

    <RouterB> system-view
    [RouterB] interface gigabitethernet 1/0/1
    [RouterB-GigabitEthernet1/0/1] ip address 172.16.20.1 255.255.255.0
    [RouterB-GigabitEthernet1/0/1] quit
    

    # Configure interface Serial 2/1/1 to borrow an IP address from GigabitEthernet 1/0/1.

    [RouterB] interface serial 2/1/1
    [RouterB-Serial2/1/1] ip address unnumbered interface gigabitethernet 1/0/1
    [RouterB-Serial2/1/1] quit
    

    # Configure a static route to the subnet attached to Router A, specifying Serial 2/1/1 as the outgoing interface.

    [RouterB] ip route-static 172.16.10.0 255.255.255.0 serial 2/1/1
    

Verifying the configuration

# Verify that a host attached to Router B can be pinged from Router A.

[RouterA] ping 172.16.20.2
Ping 172.16.20.2 (172.16.20.2): 56 data bytes, press CTRL_C to break
56 bytes from 172.16.20.2: icmp_seq=0 ttl=128 time=7.000 ms
56 bytes from 172.16.20.2: icmp_seq=1 ttl=128 time=2.000 ms
56 bytes from 172.16.20.2: icmp_seq=2 ttl=128 time=1.000 ms
56 bytes from 172.16.20.2: icmp_seq=3 ttl=128 time=1.000 ms
56 bytes from 172.16.20.2: icmp_seq=4 ttl=128 time=2.000 ms

--- Ping statistics for 172.16.20.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/2.600/7.000/2.245 ms