一个基于帧中继的虚电路分流的实验<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />

一个基于帧中继的虚电路分流的实验
////////////////////////////////////////////////////////////////////////

R1#sh ip int br

Interface                  IP-Address      OK? Method Status                Protocol

Serial1/1                  unassigned      YES manual up                    up 

Serial1/1.100              172.16.1.1      YES manual up                    up 

Serial1/1.200              172.16.2.1      YES manual up                    up 

Loopback0                  <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />10.1.1.1        YES manual up                    up

/////////////////////////////////////////////////////////////////////////

R3#sh ip int br

Interface                  IP-Address      OK? Method Status                Protocol

Serial1/0                  unassigned      YES manual up                    up 

Serial1/0.101              172.16.1.2      YES manual up                    up 

Serial1/0.201              172.16.2.2      YES manual up                    up 

Loopback0                  10.1.2.1        YES manual up                    up 

/////////////////////////////////////////////////////////////////////////

 

步骤一:配置R2的为帧中继交换机。

 

R2(config)#interface serial 1/0

R2(config-if)#encapsulation frame-relay

R2(config-if)#frame-relay intf-type dce

R2(config-if)#frame-relay lmi-type cisco

R2(config-if)#frame-relay route 200 interface serial 1/1 201

[l2] R2(config-if)#clock rate 64000

R2(config-if)#no shutdown

R2(config-if)#exit

 

R2(config)#interface serial 1/1

R2(config-if)#encapsulation frame-relay

R2(config-if)#frame-relay intf-type dce

R2(config-if)#frame-relay lmi-type ansi

R2(config-if)#frame-relay route 101 interface serial 1/0 100

R2(config-if)#frame-relay route 201 interface serial 1/0 200

R2(config-if)#clock rate 64000

R2(config-if)#no shutdown

R2(config-if)#exit

 

Input Intf      Input Dlci      Output Intf     Output Dlci     Status

Serial1/0       100             Serial1/1       101             active

Serial1/0       200             Serial1/1       201             active

Serial1/1       101             Serial1/0       100             active

Serial1/1       201             Serial1/0       200             active

 

步骤二配置R1路由器

R1(config)#int s1/1

R1(config-if)#encapsulation frame-relay

R1(config-if)#no ip addr

R1(config-if)#no sh

R1(config-if)#exit

 

R1(config)#int s1/1.100 point-to-point

R1(config-subif)#ip address 172.16.1.1 255.255.255.0

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

R1(config-fr-dlci)#exit

R1(config-subif)#exit

R1(config)#

R1(config)#int s1/1.200 point-to-point

R1(config-subif)#ip add 172.16.2.1 255.255.255.0

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

R1(config-fr-dlci)#exit

R1(config-subif)#exit

R1(config)#

步骤三:配置R3路由器

R3(config)#int s1/0

R3(config-if)#encapsulation frame-relay

 

R3(config-if)#no ip addr

R3(config-if)#no sh

R3(config-if)#exit

 

R3(config)#int s1/1.101 point-to-point

R3(config-subif)#ip add 172.16.1.2 255.255.255.0

R3(config-subif)#frame-relay interface-dlci 101

R3(config-fr-dlci)#exit

R3(config-subif)#exit

R3(config)#

R3(config)#int s1/1.201 point-to-point

R3(config-subif)#ip add 172.16.2.2 255.255.255.0

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

R3(config-fr-dlci)#exit

R3(config-subif)#exit

R3(config)#

步骤四:在R1使用show frame-realy lmi查看LMI的信令状态信息

R1#sh frame-relay lmi

 

LMI Statistics for interface Serial1/1 (Frame Relay DTE) LMI TYPE = CISCO

  Invalid Unnumbered info 0             Invalid Prot Disc 0

  Invalid dummy Call Ref 0              Invalid Msg Type 0

  Invalid Status Message 0              Invalid Lock Shift 0

  Invalid Information ID 0              Invalid Report IE Len 0

  Invalid Report Request 0              Invalid Keep IE Len 0

  Num Status Enq. Sent 716              Num Status msgs Rcvd 717

  Num Update Status Rcvd 0              Num Status Timeouts 0R1#

步骤五:在R1上查看map

 R1#sh frame-relay map

Serial1/1.200 (up): point-to-point dlci, dlci 200(0xC8,0x3080), broadcast

          status defined, active

Serial1/1.100 (up): point-to-point dlci, dlci 100(0x64,0x1840), broadcast

          status defined, active

步骤六:在R3上查看反向ARP

R3#sh frame-relay map

Serial1/0.201 (up): point-to-point dlci, dlci 201(0xC9,0x3090), broadcast

          status defined, active

Serial1/0.101 (up): point-to-point dlci, dlci 101(0x65,0x1850), broadcast

          status defined, active

 

步骤七:在R1ping R3

R1#ping 172.16.1.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/61/120 ms

R1#ping 172.16.2.2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 56/67/96 ms

 

 

我来看看数据怎么走的。

R1#traceroute 10.1.2.1

Type escape sequence to abort.

Tracing the route to 10.1.2.1

  1 172.16.1.2 8 msec *  16 msec

R3#traceroute 10.1.1.1

Type escape sequence to abort.

Tracing the route to 10.1.1.1

  1 172.16.1.1 552 msec *  80 msec

说明数据默认是从其中一条PVC走的。

//////////////////////////////////////////////////////////////////////////

 

设置路由的metric来看看能不能分流,

R1(config)#ip route 10.1.2.0 255.255.255.0 172.16.1.2

R1(config)#ip route 10.1.2.0 255.255.255.0 172.16.2.2 2

 

R3(config)#ip route 10.1.1.0 255.255.255.0 172.16.1.1 2

R3(config)#ip route 10.1.1.0 255.255.255.0 172.16.2.1

 

来看看现在数据从那条路走,能不能来和去的时候走不同的PVC

R1#traceroute 10.1.2.1

Type escape sequence to abort.

Tracing the route to 10.1.2.1

  1 172.16.1.2 140 msec *  56 msec

 

R3#traceroute 10.1.1.1

Type escape sequence to abort.

Tracing the route to 10.1.1.1

  1 172.16.2.1 96 msec *  64 msec

 

算是实现了简单的分流:

 

 

 

意外发现

R1PING上自己的接口IP。是否可以PING通?为什么?如果解决?

原来是不通的,现在通了。可能真好验证了某高手上次提出的论点。还发现Ping一次 会有12个包。

R3#sh interfaces stats

Serial1/0

          Switching path    Pkts In   Chars In   Pkts Out  Chars Out

               Processor       1513     108988       1512     105889

             Route cache          9        936          9        936

                   Total       1522     109924       1521     106825

R3#sh interfaces stats

Serial1/0

          Switching path    Pkts In   Chars In   Pkts Out  Chars Out

               Processor       1523     109873       1523     107063

             Route cache          9        936          9        936

                   Total       1532     110809       1532     107999

 

还抓个包。有空研究一下帧结构


 [s1]启用frame-relay
 [l2]map
 [l3]j检查route是对的。
 [s4]低于11.2的版本的IOS无法自动感知帧中继交换机所使用的LMI信令类型,所以需要手动的配置。

转载于:https://blog.51cto.com/314742/298083

相关文章:

  • 2021-06-03
  • 2022-01-04
  • 2021-08-14
  • 2021-07-14
  • 2021-06-16
  • 2021-07-03
  • 2021-08-24
  • 2021-12-31
猜你喜欢
  • 2022-01-04
  • 2021-04-21
  • 2021-07-14
  • 2021-05-07
  • 2021-06-04
  • 2021-08-26
  • 2021-05-18
相关资源
相似解决方案