帧中继子接口配置

帧中继子接口

帧中继有两种类型的接口:主接口和子接口。其中子接口是一个逻辑结构,可以配置协议地址和虚电路等,一个物理接口可以有多个子接口。虽然子接口是逻辑结构,并不实际存在,但对于网络层而言,子接口和主接口是没有区别的,都可以配置虚电路与远端设备相连。帧中继的子接口又可以分为两种类型:点到点(point-to-point)子接口和点到多点(point-to-multipoint)子接口。点到点子接口用于连接单个远端目标,点到多点子接口用于连接多个远端目标。点到多点子接口在一个子接口上配置多条虚电路,每条虚电路都和它相连的远端网络地址建立一个地址映射,这样不同的虚电路就可以到达不同的远端而不会混淆。

地址映射的建立可以用手工配置的方法,也可以利用逆向地址解析协议来动态建立。点到点子接口和多点子接口配置虚电路及地址映射的方法是不同的。

点到点子接口:对点到点子接口而言,因为只有唯一的一个对端地址,所以在给子接口配置一条PVC 时实际已经确定了对端地址,不能配置静态地址映射,也不能动态学习地址映射。

多点子接口:对点到多点子接口,对端地址与本地DLCI映射可以通过配置静态地址映射,或者通过逆向地址解析协议来确定(Inverse ARP在主接口上配置即可)。如果要建立静态地址映射,则应该对每一条虚电路建立静态地址映射关系。

拓扑图

Java中子接口是什么意思 接口的子接口_网络

设备参数:

设备

接口

IP地址

子网掩码

默认网关

DLCI

R1

S0/0/0



N/A

102

S0/0/0.12

192.168.123.1

255.255.255.0

R2

S0/0/0.21

192.168.123.2

255.255.255.0

N/A

201

实验内容:

帧中继配置:

Java中子接口是什么意思 接口的子接口_ci_02

Java中子接口是什么意思 接口的子接口_linux_03

Java中子接口是什么意思 接口的子接口_ci_04

R1配置:

Router>enable

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#ho

Router(config)#hostname R1

R1(config)#int

R1(config)#interface s0/0/0

R1(config-if)#no ip address

R1(config-if)#encapsulation frame-relay

R1(config-if)#no frame-relay inverse-arp

R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
R1(config)#interface s0/0/0.12 point-to-pointR1(config)#interface s0/0/0.12 point-to-point
R1(config-subif)#
%LINK-5-CHANGED: Interface Serial0/0/0.12, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0.12, changed state to up
R1(config-subif)#ip address 192.168.123.1 255.255.255.0

R1(config-subif)#frame-relay interface-dlci 102

R1(config-subif)#endR1(config-subif)#ip address 192.168.123.1 255.255.255.0
R1(config-subif)#frame-relay interface-dlci 102
R1(config-subif)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#show frame-relay map
Serial0/0/0.12 (up): point-to-point dlci, dlci 102, broadcast, status defined, active
R1#ping 192.168.123.1
R1#ping 192.168.123.1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/30/43 ms
R1#ping 192.168.123.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/18/29 ms
R1#
R2配置:
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface s0/0/0
R2(config-if)#no ip address
R2(config-if)#encapsulation frame-relay
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#no shutdown
Router>enable

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R2

R2(config)#interface s0/0/0

R2(config-if)#no ip address

R2(config-if)#encapsulation frame-relay

R2(config-if)#no frame-relay inverse-arp

R2(config-if)#no shutdownR2(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
R2(config-if)#exit
R2(config)#interface s0/0/0.12 point-to-pointR2(config)#interface s0/0/0.12 point-to-point
R2(config-subif)#
%LINK-5-CHANGED: Interface Serial0/0/0.12, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0.12, changed state to up
R2(config-subif)#ip address 192.168.123.2 255.255.255.0

R2(config-subif)#frame-relay interface-dlci 201

R2(config-subif)#no shutdown

R2(config-subif)#endR2(config-subif)#ip address 192.168.123.2 255.255.255.0
R2(config-subif)#frame-relay interface-dlci 201
R2(config-subif)#no shutdown
R2(config-subif)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#show fr
R2#show frame-relay m
R2#show frame-relay map
Serial0/0/0.12 (up): point-to-point dlci, dlci 201, broadcast, status defined, active
R2#ping 192.168.123.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 10/16/19 ms
R2#ping 192.168.123.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 25/30/37 ms
R2#

不积跬步无以至千里,不积小流无以成江海;

千里之行,始于足下;

每天一个小实验。