Các thuật toán vector khoảng cách là các thuật toán định tuyến phân phối đầu tiên
là bộ định tuyến implemented.Each, bên cạnh các bảng định tuyến, duy trì một
cấu trúc dữ liệu, được gọi là vector khoảng cách, đối với mỗi vector khoảng cách line.The
chứa một mục nhập cho mỗi điểm đến, và mỗi mục chứa địa chỉ đích và các vector khoảng cách metrics.The liên quan có chứa
thông tin từ các bảng định tuyến của router kết nối vào
đầu kia của đường. Bảng định tuyến được tính toán, kết hợp tất cả các
vectơ khoảng cách liên kết với các bộ định tuyến đường dây hoạt động. Mỗi router định kỳ gửi bảng định tuyến của nó cho các router lân cận khác (hàng xóm
. router) trong các hình thức vectơ khoảng cách
Khi một router nhận được một vector khoảng cách từ một router lân cận, nó
cho biết thêm các số liệu dòng nhận như của các vector khoảng cách, nó lưu trữ
kết quả trong cấu trúc dữ liệu địa phương của nó, nó sẽ kiểm tra xem bất kỳ sự thay đổi nào
so với các vector khoảng cách lưu trữ trước đó, và nếu như vậy, nó recomputes bảng định tuyến bằng cách kết hợp tất cả các vector khoảng cách của đường dây hoạt động.
Các hoạt động tính toán lại tương tự xảy ra khi một đường đi từ ON
. Nhà nước về trạng thái OFF, hoặc ngược lại
Việc sáp nhập được dựa trên một tiêu chí về số liệu thấp nhất: Đối với mỗi điểm đến, những con đường đã chọn là một trong các số liệu thấp nhất trong số tất cả các con đường có thể.
Nếu các bảng định tuyến quay ra phải được thay đổi so với trước đó, các vector khoảng cách phù hợp sẽ được gửi đến các bộ định tuyến lân cận. Một số
hiện thực của giao thức vector khoảng cách định kỳ gửi khoảng cách
vectơ, quá, ví dụ, các RIP (xem Phần 7.4.1) gửi khoảng cách
vector mỗi 30 giây.
Lợi ích của lớp này của thuật toán là sự dễ dàng khắc nghiệt của implementation.Its nhược điểm là như sau
đang được dịch, vui lòng đợi..