Example for Configuring FR Sub-Interfaces
Networking Requirements
As shown in Figure 22-1, RouterA connects to RouterB and RouterC through the serial1/0/0 interface over the frame relay network. Sub-interfaces are configured for the Serial1/0/0 interface on Router A so that LAN1 can communicate with LAN2 and LAN3.
RouterA, RouterB, and RouterC function as DTEs to transmit IP packets and connect LANs through the frame relay network.
Configuration Roadmap
The configuration roadmap is as follows:
- Configure the link protocol of the interface that accesses the FR network on routerA.
Configure sub-interfaces and allocate IP addresses and VC.
Configure the static route to the peer LAN.
Procedure
- Configure RouterA.
# Configure link layer protocol as FR on Serial 1/0/0 of RouterA.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] interface serial 1/0/0 [RouterA-Serial1/0/0] link-protocol fr [RouterA-Serial1/0/0] fr interface-type dte [RouterA-Serial1/0/0] quit
# Configure the sub-interface Serial 1/0/0.1 on RouterA, and assign VC for it.
[RouterA] interface serial 1/0/0.1 p2mp [RouterA-Serial1/0/0.1] ip address 1.1.1.1 255.255.255.0 [RouterA-Serial1/0/0.1] fr dlci 50 [RouterA-fr-dlci-Serial1/0/0.1-50] quit
# Configure the sub-interface Serial 1/0/0.2 on RouterA, and assign VC for it.
[RouterA] interface serial 1/0/0.2 p2mp [RouterA-Serial1/0/0.2] ip address 1.1.2.1 255.255.255.0 [RouterA-Serial1/0/0.2] fr dlci 60 [RouterA-fr-dlci-Serial1/0/0.2-60] quit
# Configure the static routes from RouterA to LAN2 and LAN3.
[RouterA] ip route-static 10.10.0.0 255.255.0.0 1.1.1.2 [RouterA] ip route-static 10.11.0.0 255.255.0.0 1.1.2.2
- Configure RouterB.
# Configure link layer protocol as FR on Serial 1/0/0 of RouterB.
<Huawei> system-view [Huawei] sysname RouterB [RouterB] interface serial 1/0/0 [RouterB-Serial1/0/0] link-protocol fr [RouterB-Serial1/0/0] fr interface-type dte
# Configure the IP address on Serial 1/0/0 of RouterB, and assign VC for it.
[RouterB-Serial1/0/0] ip address 1.1.1.2 255.255.255.0 [RouterB-Serial1/0/0] fr dlci 70 [RouterB-fr-dlci-Serial1/0/0-70] quit
# Configure the static routes from RouterB to LAN1.
[RouterB] ip route-static 10.9.0.0 255.255.0.0 1.1.1.2
- Configure RouterC.
# Configure link layer protocol as FR on Serial 1/0/0 of RouterC.
<Huawei> system-view [Huawei] sysname RouterC [RouterC] interface serial 1/0/0 [RouterC-Serial1/0/0] link-protocol fr [RouterC-Serial1/0/0] fr interface-type dte
# Configure the IP address on Serial 1/0/0 of RouterC, and assign VC for it.
[RouterC-Serial1/0/0] ip address 1.1.2.2 255.255.255.0 [RouterC-Serial1/0/0] fr dlci 80 [RouterC-fr-dlci-Serial1/0/0-80] quit
# Configure the static routes from RouterC to LAN1.
[RouterC] ip route-static 10.9.0.0 255.255.0.0 1.1.2.2
- Verify the configuration.
# Run the display ip routing-table command on RouterA to view routes of LAN2 and LAN3. The ping command output shows that three LANs can access each other.
[RouterA] display ip routing-table Route Flags: R - relay, D - download to fib, T - to vpn-instance ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 2 Routes : 2 Destination/Mask Proto Pre Cost Flags NextHop Interface 10.10.0.0/16 Static 60 0 RD 1.1.1.2 Serial1/0/0.1 10.11.0.0/16 Static 60 0 RD 1.1.2.2 Serial1/0/0.2
[RouterA] ping 1.1.1.2 PING 1.1.1.2: 56 data bytes, press CTRL_C to break Reply from 1.1.1.2: bytes=56 Sequence=1 ttl=255 time=3 ms Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=255 time=3 ms Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=255 time=3 ms Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=255 time=3 ms Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=255 time=3 ms --- 1.1.1.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 3/3/3 ms
[RouterA] ping 1.1.2.2 PING 1.1.2.2: 56 data bytes, press CTRL_C to break Reply from 1.1.2.2: bytes=56 Sequence=1 ttl=255 time=3 ms Reply from 1.1.2.2: bytes=56 Sequence=2 ttl=255 time=3 ms Reply from 1.1.2.2: bytes=56 Sequence=3 ttl=255 time=3 ms Reply from 1.1.2.2: bytes=56 Sequence=4 ttl=255 time=3 ms Reply from 1.1.2.2: bytes=56 Sequence=5 ttl=255 time=3 ms --- 1.1.2.2 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 3/3/3 ms
Configuration Files
Configuration files of RouterA
# sysname RouterA # interface Serial1/0/0 link-protocol fr # interface Serial1/0/0.1 p2mp fr dlci 50 ip address 1.1.1.1 255.255.255.0 # interface Serial1/0/0.2 p2mp fr dlci 60 ip address 1.1.2.1 255.255.255.0 # ip route-static 10.10.0.0 255.255.0.0 1.1.1.2 ip route-static 10.11.0.0 255.255.0.0 1.1.2.2 # return
Configuration files of RouterB
# sysname RouterB # interface Serial1/0/0 link-protocol fr fr dlci 70 ip address 1.1.1.2 255.255.255.0 # ip route-static 10.9.0.0 255.255.0.0 1.1.1.1 # return
Configuration files of RouterC
# sysname RouterC # interface Serial1/0/0 link-protocol fr fr dlci 80 ip address 1.1.2.2 255.255.255.0 # ip route-static 10.9.0.0 255.255.0.0 1.1.2.1 # return