发新话题
打印

[网络转载] 源站路由选项

源站路由选项

源站路由反映的思路是提供一种方式,让源主机指定一条通过互联网的路径。例如:为了测试在某个物理网络N上的吞吐量,即使正常的情况下路由器选择的路径中不包含N,系统管理员也可以使用源站路由强制要求IP数据报经过网络N

IP支持2种形式的源站选路:


1松散源站选路:他给出了一连串路由器接口的IP地址序列,报文必须沿着IP地址序列传送,但是允许在相继的两个地址之间跳过多个路由器。


2:严格源站选路:它给出了一系列路由器接口的IP地址序列,报文必要严格按照路由转发,如果下一跳不再列表中,那么将会发生错误。





松散源站选路拓扑是这样的:





我们想在R3上去R1的lo0口1.1.1.1 OSPF的选路应该是走下面的以太链路到R2再到R1 我们先看一下R3的路由表
R3#sh ip rou
Gateway of last resort is not set
    1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/75] via 10.1.1.2, 00:28:13
, Ethernet0/0    ---------------------出口是E0/0
     35.0.0.0/24 is subnetted, 1 subnets
C       35.1.1.0 is directly connected, Serial2/0
     24.0.0.0/24 is subnetted, 1 subnets
O       24.1.1.0 [110/74] via 10.1.1.2, 00:28:13, Ethernet0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Ethernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.1.1.0 [110/74] via 10.1.1.2, 00:28:13, Ethernet0/0
     45.0.0.0/24 is subnetted, 1 subnets
O       45.1.1.0 [110/128] via 35.1.1.5, 00:28:13, Serial2/0

我们通过LOOSE选项后的结果
R3#ping
Protocol [ip]:
Target IP address: 1.1.1.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: loose
Source route: 35.1.1.3 45.1.1.4 24.1.1.2 12.1.1.1
Loose, Strict, Record, Timestamp, Verbose[LV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet has IP options:  Total option bytes= 19, padded length=20
Loose source route: <*> ----------- R3去R1 时候的数据
  (35.1.1.3)   
   (45.1.1.4)  
   (24.1.1.2)
   (12.1.1.1)

Reply to request 0 (108 ms).  Received packet has options
Total option bytes= 20, padded length=20
Loose source route:     
------------R1回R3 时候的数据
  (12.1.1.1)
   (24.1.1.2)
   (45.1.1.4)
   (10.1.1.3)

   <*>
End of list

Reply to request 1 (100 ms).  Received packet has options
Total option bytes= 20, padded length=20
Loose source route:
   (12.1.1.1)
   (24.1.1.2)
   (45.1.1.4)
   (10.1.1.3)
   <*>
End of list

Reply to request 2 (100 ms).  Received packet has options
Total option bytes= 20, padded length=20
Loose source route:
   (12.1.1.1)
   (24.1.1.2)
   (45.1.1.4)
   (10.1.1.3)
   <*>
End of list

Reply to request 3 (108 ms).  Received packet has options
Total option bytes= 20, padded length=20
Loose source route:
   (12.1.1.1)
   (24.1.1.2)
   (45.1.1.4)
   (10.1.1.3)
   <*>
End of list

Reply to request 4 (112 ms).  Received packet has options
Total option bytes= 20, padded length=20
Loose source route:
   (12.1.1.1)
   (24.1.1.2)
   (45.1.1.4)
   (10.1.1.3)
   <*>
End of list

Success rate is 100 percent (5/5), round-trip min/avg/max = 100/105/112 ms

TOP

让源主机指定一条通过互联网的路径,好,这样可以定向了

TOP

发新话题