PDA

View Full Version : Per VLAN rate-limiting



Ech
11-09-2005, 03:03 PM
Chào các huynh,

Tôi không biết có cách nào để hạn chế bandwidth theo từng VLAN? Nếu có thể xin cho biết một ví dụ mẫu. Cách đơn giản nhất để có thể kiểm chứng bandwidth thực tế, và khẳng định là cấu hình trên hoạt động đúng.

Vấn đề cụ thể là thế này. Công ty tôi có mua một đường truyền "Transparent FastEthernet VLAN" tốc độ 10M từ một service provider để kết nối từ điểm A tới điểm B. Họ ròng cáp quan tới cả hai nơi, và mỗi nơi họ lắp đặt một cái Cisco switch (tôi ko nhớ model). Giữa 2 cái switch này chắc có một vài cái switch khác, dùng chung với các công ty khác. Họ thiết lập VLAN và policy-map, traffic-shapping để giới hạn tốc độ cho công ty tôi là 10M. Hai cái router của công ty ở hai đầu A và B được đấu trực tiếp vào switch của họ, và được cài đặt là Full-Duplex, Speed 10M (họ nói tôi có thể đặt là 100M, Full-duplex, nhưng phải phù hợp với cấu hình của switch, tức là provider cũng phải cài như vậy trên switch của họ).

Tuy nhiên, sau khi thiết lập FTP server ở một đầu, và download/upload ở đầu kia, thì tôi thấy không thể nào đạt được tốc độ khoảng 8Mbps theo cả hai hướng. Nếu download một chiều là 8M thì chiều kia gần như là 0.

Tôi dùng lệnh extended ping, và đặt timeout = 0, cũng cho kết quả tương tự : hoặc là hai chiều throughput khoảng 4.5M, hoặc chỉ được một chiều 9M.

Tôi có linh cảm là họ settup policy nhầm, nên rate limit 10M là cho tổng throughput của cả hai chiều, chứ ko phải mỗi chiều 10M. Hoặc là họ có một cổng nào đó dùng Half-Duplex.

Các huynh có biết họ dùng cách nào để limit bandwidth theo từng VLAN không, và cách nào đơn giản để có thể kiểm tra bandwidth thực tế.

Cám ơn trước nhiều nhiều,


RouterA#sh run int fa0/1
Building configuration...

Current configuration : 220 bytes
!
interface FastEthernet0/1
bandwidth 10000
ip address 32.114.115.18 255.255.255.252
load-interval 30
speed 10
full-duplex
no cdp enable
end




RouterA#ping ip
Target IP address: 32.114.115.17
Repeat count [5]: 50000
Datagram size [100]: 5000
Timeout in seconds [2]: 0
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 50000, 1500-byte ICMP Echos to 32.114.115.17, timeout is 0 seconds:
.................................................. ....................
.................................................. ....................
.................................................. ....................
.................................................. ....................
.................................................. ....................


Success rate is 0 percent (0/50000)
RouterA#sh int fa0/1
FastEthernet0/1 is up, line protocol is up
Hardware is Gt96k FE, address is 0013.606f.9ef1 (bia 0013.606f.9ef1)

Internet address is 32.114.115.18/30
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 243/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:03, output 00:00:03, output hang never
Last clearing of "show interface" counters 10:08:15
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 610169
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 5000 bits/sec, 0 packets/sec
30 second output rate 8082000 bits/sec, 671 packets/sec
88924 packets input, 125315176 bytes
Received 2282 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
409597 packets output, 599586766 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out





RouterA#ping ip
Target IP address: 32.114.115.17
Repeat count [5]: 50000
Datagram size [100]: 1500
Timeout in seconds [2]: 0
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 50000, 1500-byte ICMP Echos to 32.114.115.17, timeout is 0 seconds:
.................................................. ....................
.................................................. ....................
.................................................. ....................
.................................................. ....................
.................................................. ....................

RouterA#sh int fa0/1
FastEthernet0/1 is up, line protocol is up
Hardware is Gt96k FE, address is 0013.606f.9ef1 (bia 0013.606f.9ef1)
Internet address is 32.114.115.18/30
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 102/255, rxload 102/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 10:14:05
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 664260
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 4028000 bits/sec, 337 packets/sec
30 second output rate 4035000 bits/sec, 338 packets/sec
134161 packets input, 193650691 bytes
Received 2304 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
455603 packets output, 669105079 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

Ech
12-09-2005, 09:13 AM
Hôm nay tôi đã có cách để push the throughput to the limit & test the max bandwidth rồi.

Dưới đây là cách tôi làm:

- Have routers connected at both ends
- Open two or three telnet sessions to one router (backbone one), do extended pings with 100 000 packets, and timeout of 0 sec.
- Dialin to the other router, and check the interface.

The throughput I saw today is over 9M, which is cool bannana. That took all my worries away.

Thanks anyway.

Cheers,





Open two Telnet sessions to the backbone, and send extended pings to CE.

(Backbone)
AUSYDN2101ER2#ping
Protocol [ip]:
Target IP address: 32.114.115.18
Repeat count [5]: 100000
Datagram size [100]: 5000
Timeout in seconds [2]: 0
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 100000, 5000-byte ICMP Echos to 32.114.115.18, timeout is 2 seconds:



AUSYDN2101ER2#ping
Protocol [ip]:
Target IP address: 32.114.115.18
Repeat count [5]: 100000
Datagram size [100]: 5000
Timeout in seconds [2]: 0
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 100000, 5000-byte ICMP Echos to 32.114.115.18, timeout is 2 seconds:





(Access router)
AU9002SYD0003R#ping
Protocol [ip]:
Target IP address: 32.114.115.18
Repeat count [5]: 1000
Datagram size [100]: 1500
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 1000, 1500-byte ICMP Echos to 32.114.115.18, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/1/4 ms
AU9002SYD0003R#sh clock
11:39:20.351 AEST Mon Sep 12 2005
AU9002SYD0003R#sh int fa0/1
FastEthernet0/1 is up, line protocol is up
Hardware is Gt96k FE, address is 0013.606f.9ef1 (bia 0013.606f.9ef1)
Description: 10M FastEthernet WAN connection to AUSYDN2101ER2 Fa8/0/0.1
Internet address is 32.114.115.18/30
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 175/255, rxload 175/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 1d12h
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 1196462
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 6883000 bits/sec, 676 packets/sec
30 second output rate 6872000 bits/sec, 676 packets/sec
806197 packets input, 1097649880 bytes
Received 8219 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
1242527 packets output, 1726917195 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
AU9002SYD0003R#sh clock
11:44:49.808 AEST Mon Sep 12 2005
AU9002SYD0003R#sh int fa0/1
FastEthernet0/1 is up, line protocol is up
Hardware is Gt96k FE, address is 0013.606f.9ef1 (bia 0013.606f.9ef1)
Description: 10M FastEthernet WAN connection to AUSYDN2101ER2 Fa8/0/0.1
Internet address is 32.114.115.18/30
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 195/255, rxload 196/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 1d12h
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 1196462
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 7719000 bits/sec, 758 packets/sec
30 second output rate 7686000 bits/sec, 756 packets/sec
816684 packets input, 1111075263 bytes
Received 8219 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
1252945 packets output, 1740239486 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
AU9002SYD0003R#ping
Protocol [ip]:
Target IP address: 32.114.115.17
Repeat count [5]: 1000
Datagram size [100]: 1500
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 1000, 1500-byte ICMP Echos to 32.114.115.17, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!..!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!
Success rate is 99 percent (995/1000), round-trip min/avg/max = 4/155/348 ms
AU9002SYD0003R#sh int fa0/1
FastEthernet0/1 is up, line protocol is up
Hardware is Gt96k FE, address is 0013.606f.9ef1 (bia 0013.606f.9ef1)
Description: 10M FastEthernet WAN connection to AUSYDN2101ER2 Fa8/0/0.1
Internet address is 32.114.115.18/30
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 231/255, rxload 233/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of "show interface" counters 1d12h
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 1196462
Queueing strategy: fifo
Output queue: 0/40 (size/max)
30 second input rate 9140000 bits/sec, 889 packets/sec
30 second output rate 9078000 bits/sec, 884 packets/sec
1006584 packets input, 1354432508 bytes
Received 8231 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
1441217 packets output, 1981240569 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

robedan
10-01-2006, 10:33 PM
CONGESTION AVOIDANCE ALGORITHM:
Một kết nối mới truyền tải một lượng dữ liệu lớn qua mạng trong trường hợp mạng đang bị nghẽn sẽ gây ra vấn đề nghiêm trọng. Khi tắc nghẽn xảy ra trễ của mạng sẽ tăng lên và Router bắt đầu xếp hàng các datagrams cho tới khi nó có thể định tuyến và gửi các gói dữ liệu này đi. Do máy có khả năng lưu trữ giới hạn nên các datagram phải “cạnh tranh” nhau để vào đó. Trong trường hợp xấu nhất, tổng số datagram gửi đến bộ định tuyến (bị nghẽn mạch) tăng lên cho đễn khi bộ định tuyến đạt đến khả năng lưu trữ tối đa và bắt đầu huỷ bỏ những datagram đến sau. Các điểm đầu cuối thường không biết chi tiết về nơi xảy ra nghẽn mạch hoặc tại sao nghẽn mạch lại xảy ra. Đối với chúng, sự nghẽn mạch chỉ đơn giản là trễ tăng. Hầu hết các giao thức lớp transport sử dụng bộ đếm thời gian và phương pháp retransmision do đó chúng phản ứng lại với trễ lớn bằng cách truyền lại các datagram. Việc truyền lại này không những không giải quyết được vấn đề mà còn làm tồi tệ hơn sự nghẽn mạch. Giao thức TCP sử dụng cơ chế nhận tích luỹ và do đó nơi nhận gói sẽ không thể báo cho phía phát các gói bị mất và phải đợi đến khi cửa sổ đầy và bộ định thời thông báo về sự cố trong hệ thống. Điều này có nghĩa là khi có lỗi xảy ra trong một đoạn của cửa sổ thì sẽ phải thực hiện truyền lại toàn bộ cửa sổ đó. Trong các mạng có độ trễ lớn, kích thước cửa sổ sẽ có xu hướng lớn hơn cho nên khả năng xảy ra lỗi đoạn (và do đó gây ra lỗi cửa sổ) sẽ tăng hơn và số cửa sổ phải truyền lại cũng nhiều hơn dẫn đến hiệu năng của mạng có thể giảm một cách đáng kể.