cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1820
Views
35
Helpful
1
Replies

meaning of distance vector , link state

pankaj kumar
Level 1
Level 1

hey guys,

we know that rip,EIGRP are distance vector protocols and ospf is a link state protcol but what does this distance vector and link state means exactly.

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Pankaj,

Aaah, one of my favourite topics

The term distance vector should be understood as vector of distances, with the "vector" standing for one-dimensional array as commonly used by programmers. In distance vector protocols, the messages exchanged between routers are simply arrays in which each element describes a known network and the sending router's distance to it, e.g.:

Array[0]: Known network 10.0.0.0/24, distance 25

Array[1]: Known network 10.0.1.0/28, distance 5

Array[2]: Known network 10.0.128.0/23, distance 17

...

...

Indeed, an array - a vector - of distances. From this message, you know that the sending router knows about all those networks, and you know how far that router is from each network. However, you do not really know how many other routers are there on the paths towards any of those networks, and you do not even know whether the router that sent that message is or is not using you as its own next hop. That is the reason why distance vector protocols, while being very simple in their basics, are prone to transient routing loops.

The term link state refers to a different approach. In link state protocols, each router generates an exact description of itself and its connections, i.e. links, to its immediate neighbor objects - other routers, transit networks, stub networks. This information about a router is then flooded unchanged to all other routers in the network (or more precisely, in an area but let's not complicate things too much). If each router describes itself and its links to its neighbors, and all this information is flooded to all routers without modification then it means that all routers know about each other in the network, and what's more, each router knows the exact topology of the entire network. The key to knowing it is the flooding of the unchanged information about each router and its links to its neighbors across the whole network. Each router can then use one of several algorithms to locate a shortest path from itself to any other reachable destination in the network, similar to how GPS devices compute the shortest route between two waypoints (GPS devices also contain an exact road map which is very similar to what routers in link-state routing protocols create in their memory when they flood information about themselves). The term link state then refers to the essential information these protocols operate over: how are individual routers linked together, what exact routers are interconnected by a link, and what are the link properties or states: speed, addresses. Hence the name link state.

Best regards,

Peter

View solution in original post

1 Reply 1

Peter Paluch
Cisco Employee
Cisco Employee

Hi Pankaj,

Aaah, one of my favourite topics

The term distance vector should be understood as vector of distances, with the "vector" standing for one-dimensional array as commonly used by programmers. In distance vector protocols, the messages exchanged between routers are simply arrays in which each element describes a known network and the sending router's distance to it, e.g.:

Array[0]: Known network 10.0.0.0/24, distance 25

Array[1]: Known network 10.0.1.0/28, distance 5

Array[2]: Known network 10.0.128.0/23, distance 17

...

...

Indeed, an array - a vector - of distances. From this message, you know that the sending router knows about all those networks, and you know how far that router is from each network. However, you do not really know how many other routers are there on the paths towards any of those networks, and you do not even know whether the router that sent that message is or is not using you as its own next hop. That is the reason why distance vector protocols, while being very simple in their basics, are prone to transient routing loops.

The term link state refers to a different approach. In link state protocols, each router generates an exact description of itself and its connections, i.e. links, to its immediate neighbor objects - other routers, transit networks, stub networks. This information about a router is then flooded unchanged to all other routers in the network (or more precisely, in an area but let's not complicate things too much). If each router describes itself and its links to its neighbors, and all this information is flooded to all routers without modification then it means that all routers know about each other in the network, and what's more, each router knows the exact topology of the entire network. The key to knowing it is the flooding of the unchanged information about each router and its links to its neighbors across the whole network. Each router can then use one of several algorithms to locate a shortest path from itself to any other reachable destination in the network, similar to how GPS devices compute the shortest route between two waypoints (GPS devices also contain an exact road map which is very similar to what routers in link-state routing protocols create in their memory when they flood information about themselves). The term link state then refers to the essential information these protocols operate over: how are individual routers linked together, what exact routers are interconnected by a link, and what are the link properties or states: speed, addresses. Hence the name link state.

Best regards,

Peter

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card