X.25 subinterface configuration example

Network requirements

Configure multiple subinterfaces on a physical interface for connecting to multiple network segments.

In Figure 141, Router A is configured with two subinterfaces, which are connected with Router B and Router C. Router D operates as an X.25 switch.

Configure the subinterfaces, so that Router A can communicate with Router B and Router C, respectively.

Figure 141: Network diagram

Configuration procedure

  1. Configure Router A:

    <RouterA> system-view
    [RouterA] interface serial 2/0
    [RouterA-Serial2/0] link-protocol x25 dte
    [RouterA-Serial2/0] x25 x121-address 100
    [RouterA-Serial2/0] quit
    

    # Configure subinterface Serial 2/0.1, and X.25 mapping to Router B.

    [RouterA] interface serial 2/0.1
    [RouterA-Serial2/0.1] ip address 10.1.1.2 255.255.0.0
    [RouterA-Serial2/0.1] x25 map ip 10.1.1.1 x121-address 200
    [RouterA-Serial2/0.1] quit
    

    # Configure subinterface serial 2/0.2, and X.25 mapping to Router C.

    [RouterA] interface serial 2/0.2
    [RouterA-Serial2/0.2] ip address 20.1.1.2 255.255.0.0
    [RouterA-Serial2/0.2] x25 map ip 20.1.1.1 x121-address 300
    [RouterA-Serial2/0.2] quit
    
  2. Configure Router B:

    <RouterB> system-view
    [RouterB] interface serial 2/0
    [RouterB-Serial2/0] link-protocol x25 dte
    [RouterB-Serial2/0] x25 x121-address 200
    [RouterB-Serial2/0] x25 map ip 10.1.1.2 x121-address 100
    [RouterB-Serial2/0] ip address 10.1.1.1 255.255.0.0
    
  3. Configure Router C:

    <RouterC> system-view
    [RouterC] interface serial 2/0
    [RouterC-Serial2/0] link-protocol x25 dte
    [RouterC-Serial2/0] x25 x121-address 300
    [RouterC-Serial2/0] x25 map ip 20.1.1.2 x121-address 100
    [RouterC-Serial2/0] ip address 20.1.1.1 255.255.0.0
    
  4. Configure Router D as an X.25 switch:

    <RouterD> system-view
    [RouterD] interface serial 2/0
    [RouterD-Serial2/0] link-protocol x25 dce
    [RouterD-Serial2/0] quit
    [RouterD] interface serial 2/1
    [RouterD-Serial2/1] link-protocol x25 dce
    [RouterD-Serial2/1] quit
    [RouterD] interface serial 2/2
    [RouterD-Serial2/2] link-protocol x25 dce
    [RouterD-Serial2/2] quit
    

    # Configure SVC switching routes.

    [RouterD] x25 switching
    [RouterD] x25 switch svc 100 interface serial 2/0
    [RouterD] x25 switch svc 200 interface serial 2/1
    [RouterD] x25 switch svc 300 interface serial 2/2
    

Verifying the configuration

The virtual circuit configured in this example is an SVC. The routers establish it only when they must communicate.

# Ping Router B from Router A.

[RouterA] ping 10.1.1.1
  PING 10.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=64 ms
    Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=52 ms
    Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=53 ms
    Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=52 ms
    Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=52 ms

  --- 10.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 52/54/64 ms

The output shows that the SVC has been established between the two routers.

# Display the X.25 address mapping table on Router A.

[RouterA] display x25 map
  Interface: Serial2/0.2(protocol status is UP)
    ip 20.1.1.1  X.121 address:300
      Map-type: SVC_MAP  VC-number: 0
      Facility:
  Interface: Serial2/0.1(protocol status is UP)
    ip 10.1.1.1  X.121 address:200
      Map-type: SVC_MAP  VC-number: 0
      Facility:

# Display X.25 virtual circuit information on Router A.

[RouterA] display x25 vc
Interface: Serial2/0.1
  SVC 1024
    State: P4(transmit)
    Map: ip 10.1.1.1 to 200
    Window size: input 2  output 2
    Packet Size: input 128  output 128
    Local PS: 5  Local PR: 5  Remote PS: 4  Remote PR: 5
    Local Busy: FALSE  Reset times: 0
    Input/Output:
      DATA 5/5  INTERRUPT 0/0
      RR 0/0  RNR 0/0  REJ 0/0
      Bytes 420/420
    Send Queue(Current/Max): 0/200

# Display the X.25 SVC switching table of Router D.

[RouterD] display x25 switch-table svc static
Number Destination    Substitute-src Substitute-dst CUD      SwitchTo(type/name)
1      100                                                   I/Serial2/0
2      200                                                   I/Serial2/1
3      300                                                   I/Serial2/2
Total of static svc is 3.
The item type of SwitchTo meaning:
  I: interface   H: hunt-group   T: xot

[RouterD] display x25 switch-table svc dynamic
  #1     (In: Serial2/0          - SVC1024) <--> (Out: Serial2/1          - SVC1   )