查看完整版本: 源站路由选项 初级学员必会

hnza001 2007-2-2 22:10

源站路由选项 初级学员必会

[font=宋体][size=1][size=3][color=black][font=宋体]源站路由反映的思路是提供一种方式,让源主机指定一条通过互联网的路径。例如:为了测试在某个物理网络[/font][/color][color=black][size=10][font=Times New Roman]N[/font][/size][/color][color=black][font=宋体]上的吞吐量,即使正常的情况下路由器选择的路径中不包含[/font][/color][color=black][size=10][font=Times New Roman]N[/font][/size][/color][color=black][font=宋体],系统管理员也可以使用源站路由强制要求[/font][/color][color=black][size=10][font=Times New Roman]IP[/font][/size][/color][color=black][font=宋体]数据报经过网络[/font][/color][color=black][size=10][font=Times New Roman]N[/font][/size][/color][color=black][font=宋体]。[/font][/color][color=black][font=宋体][size=10][/size][/font][/color][/size]
[align=left][size=3][color=black][size=10][font=Times New Roman]IP[/font][/size][/color][color=black][font=宋体]支持[/font][/color][color=black][size=10][font=Times New Roman]2[/font][/size][/color][color=black][font=宋体]种形式的源站选路:[/font][/color][color=black][font=宋体][size=10][/size][/font][/color][/size][/align]
[align=left][size=3][color=black][size=10][font=Times New Roman]1[/font][/size][/color][color=black][font=宋体]:[/font][/color][color=black][font=宋体]松散源站选路:他给出了一连串路由器接口的[/font][/color][color=black][size=10][font=Times New Roman]IP[/font][/size][/color][color=black][font=宋体]地址序列,报文必须沿着[/font][/color][color=black][size=10][font=Times New Roman]IP[/font][/size][/color][color=black][font=宋体]地址序列传送,但是允许在相继的两个地址之间跳过多个路由器。[/font][/color][color=black][font=宋体][size=10][/size][/font][/color][/size][/align]
[align=left][size=3][color=black][font=宋体][size=10][font=Times New Roman]2[/font][/size][/font][/color][color=black][font=宋体]:严格源站选路:它给出了一系列路由器接口的[/font][/color][color=black][size=10][font=Times New Roman]IP[/font][/size][/color][color=black][font=宋体]地址序列,报文必要严格按照路由转发,如果下一跳不再列表中,那么将会发生错误。[/align]
[/font][/color][color=black][font=宋体][size=10][font=Times New Roman][img=667,514]http://www.one-tom.com/bbs/uploads/20070201_010842_yuanzhanluyou.jpg[/img]
[/font][/size][/font][/color][/size][size=3][color=black][font=宋体][/font][/color][/size]
[size=3][color=black][font=宋体][color=black][font=宋体]松散源站选路拓扑是这样的:[/font][/color]

[img=696,412]http://www.one-tom.com/bbs/uploads/20070130_144321_loose.jpg[/img]
[/font][/color][color=black][font=宋体][size=10][/size][/font][/color][/size][font=Times New Roman][size=3] [/size][/font]
[font=Times New Roman][size=5]我们想在R3上去R1的lo0口1.1.1.1 OSPF的选路应该是走下面的以太链路到R2再到R1 我们先看一下R3的路由表[/size][/font]
[font=Times New Roman][size=5]R3#sh ip rou [/size][/font]
[size=5]Gateway of last resort is not set[/size]
[size=5] [/size][size=5][color=#0000ff]    1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/75] via 10.1.1.2, 00:28:13[/color], [color=#ff0000]Ethernet0/0    ---------------------出口是E0/0[/color]
     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[/size]
[font=Times New Roman][size=5]我们通过LOOSE选项后的结果[/size][/font]
[size=5]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]:
[/size][size=5][color=#ff0000]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
[/color]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: <*> [color=#ff0000]----------- R3去R1 时候的数据[/color]
[/size][size=5][color=#ff0000]  (35.1.1.3)   
   (45.1.1.4)  
   (24.1.1.2)
   (12.1.1.1)[/color][/size]
[size=5]Reply to request 0 (108 ms).  Received packet has options
Total option bytes= 20, padded length=20
Loose source route:     [/size][size=5][color=#ff0000]------------R1回R3 时候的数据
[/color] [/size][size=5][color=#ff0000]  (12.1.1.1)
   (24.1.1.2)
   (45.1.1.4)
   (10.1.1.3)[/color]
   <*>
End of list[/size]
[size=5]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[/size]
[size=5]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[/size]
[size=5]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[/size]
[size=5]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[/size]
[size=5]Success rate is 100 percent (5/5), round-trip min/avg/max = 100/105/112 ms[/size]

[/size][/font]

hnza001 2007-2-2 22:16

严格源选路:

[size=2]下面作的是严格源选路:

[img=666,414]http://www.one-tom.com/bbs/uploads/20070130_145647_strict.jpg[/img]
必须严格按照路由表转发:
[size=5]R3#sh ip rou [/size]
[size=5]     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/75] via 10.1.1.2, 00:28:13, [color=#ff0000]Ethernet0/0[/color][/size]
[size=5]R2#sh ip rou[/size]
[size=5] 1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 12.1.1.1, 00:00:50, [color=#ff0000]Serial2/0[/color][/size]
[size=5]R1#sh ip rou[/size]
[size=5]     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, [color=#ff0000]Loopback0[/color][/size]
[size=5][color=#ff0000]结果如下:[/color][/size]
[size=5]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]:
[/size][size=5][color=#ff0000]Loose, Strict, Record, Timestamp, Verbose[none]: strict
Source route: 10.1.1.2 12.1.1.1
[/color]Loose, Strict, Record, Timestamp, Verbose[SV]:
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= 11, padded length=12
Strict source route: <*>
   (10.1.1.2)
   (12.1.1.1)[/size]
[size=5]Reply to request 0 (20 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 1 (32 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 2 (28 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 3 (32 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 4 (40 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/40 ms[/size]
[/size]

hnza001 2007-2-2 22:17

严格源选路:

[size=2]下面作的是严格源选路:

[img=666,414]http://www.one-tom.com/bbs/uploads/20070130_145647_strict.jpg[/img]
必须严格按照路由表转发:
[size=5]R3#sh ip rou [/size]
[size=5]     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/75] via 10.1.1.2, 00:28:13, [color=#ff0000]Ethernet0/0[/color][/size]
[size=5]R2#sh ip rou[/size]
[size=5] 1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/65] via 12.1.1.1, 00:00:50, [color=#ff0000]Serial2/0[/color][/size]
[size=5]R1#sh ip rou[/size]
[size=5]     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, [color=#ff0000]Loopback0[/color][/size]
[size=5][color=#ff0000]结果如下:[/color][/size]
[size=5]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]:
[/size][size=5][color=#ff0000]Loose, Strict, Record, Timestamp, Verbose[none]: strict
Source route: 10.1.1.2 12.1.1.1
[/color]Loose, Strict, Record, Timestamp, Verbose[SV]:
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= 11, padded length=12
Strict source route: <*>
   (10.1.1.2)
   (12.1.1.1)[/size]
[size=5]Reply to request 0 (20 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 1 (32 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 2 (28 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 3 (32 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Reply to request 4 (40 ms).  Received packet has options
Total option bytes= 12, padded length=12
Strict source route:
   (12.1.1.1)
   (10.1.1.2)
   <*>
End of list[/size]
[size=5]Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/40 ms[/size]
[/size]
页: [1]
查看完整版本: 源站路由选项 初级学员必会