Wednesday, December 9, 2015

Week 14: Day 038 - Routing #3


Hello again, get ready for some more routing today! I will be going over Dynamic Routing today. Here's a new thing I'll be doing, I will give a brief at the end of the entry on how much is left in the book and chapter to motivate myself.

Firstly, Dynamic routing are the protocols given to the router so it can do more things on its own. By this I mean, instead of tediously doing static routing, which is prone to human error, why not just let the router do everything itself? This is essentially what dynamic routing is. A hop is each time a packet goes through a router. If you're using a computer and are on Network ID X, you ping a computer in network ID Y, you go one hop, but if you ping Network ID Z, you go two hops. Routing protocols have been around like any tech, there are many types. The Network+ Test breaks the protocols into three groups: distance vector, link state, and hybrid. There will be a lot covering this, so I will cover it a lot as well.

Routing tables contain metrics. A metric is a value that routers use when they have more than one route to get to another network. Unlike our gateway routers at home, usually more advanced routers will have more connections to a certain network. This is used just in case a route is lost, to maintain a connection.

Here is the textbook's criteria for determining a metric:
- Maximum Transmission Unit: Better known as MTU, this determines the largest frame a particular technology can handle. Ethernet likes to use 1,500-byte-frames. Other technologies use smaller or larger frames. I fan IP packet is too big for a particular technology, that packet is broken into pieces to fit into the network protocol in what is called "fragmentation". Fragmentation is bad because it slows down the movement of IP packets. By setting the optimal MTU size before IP packets are sent, you avoid or t least reduce fragmentation.
- Costs: Connecting to the Internet isn't free. Some connections cost more than others, and some incur costs based on usage.
- Bandwidth: Some connections handle more data than others. An old dial-up connection moves at best 64 Kbps. A cable modem easily handles many millions of bits per second.
- Latency: Say you have a race car that has a top speed of 200 mph, but it takes 25 minutes to start the car. If you press the gas pedal, it takes 15 seconds to start accelerating. If the engine runs for more than 20 minutes, the care won't go faster than 50 mph. These issues prevent the car from doing what it should be able to do: go 200 miles per hour. Latency is like that. Hundreds of issues occur that slow down network connections between routers. These issues are known collectively as latency. A great example is a satellite connection. The distance between the satellite and the antenna causes a delay that has nothing to do with the peed of the connection.

Different dynamic routing protocls will use one ore more of those routing metrics in order to calculate it's own routing metric.

Then there's distance vector routing protocols, which were the first in the TCP/IP routing business. The distance vectors have some form of total cost. The simplest total cost of the hops between the router and the network would be 1, and if it were two hops a way it would be 2. However, not all network connections are equal! A router could have two, one-hop routes to a network each one going at different speeds. The slower one could have, for example, a metric of 10 instead of 1. What distance vectors essentially do, are calculating the total cost to get to a particular network ID, and compare it to the total cost on all other routes. The router will then choose the lowest cost. But for it to work, routers using distance vector must transfer their routing table to the other routers in the WAN. Each distance vector has a max number of hops, which the router will send its routing table to lower traffic. Now it's time to give some examples (to understand the next paragraph, go to Pg. 248-onwards)...

Say you have four routers, all of them have static routes set up between each other (metrics shown.) You add two new networks, one connects to Router A, the other to Router D. Let's call them NIX (Network ID X) and NIY (Network ID Y).  A computer on one network wants to send packets to a computer on the other, but the routers between Routers A and D don't know about the two new network IDs. This is when distance vector kicks in. Because all of the routers use a distance vector routing protocol, the problem is solved quickly. On a certain defined time interval, the routers will give each other their routing tables. Router A sends its route to NIX to Routers B and C. Router D sends its to NIY to Router C. Great, so now Routers B and C know how to get to  NIX and Router C can get to NIY. There is no completed path, between NIX and NIY though. This will need another interval. After another set amount of time, the routers send their updating routing tables to each other. Router A knows a path to get to NIY, and Router D knows a path to NIX. But a side effect, Router B and Router C have two routes to NIX. Router B can get to NIX through Router A and through Router C. But, Router C can get to NIX through Router A and through Router B. What should we do? When the router discovers multiple routes to teh same network ID, the distance vector routing protocol deletes everything except the route with the lowest total cost. Then Routers A and D get updated info about the lower total-cost hops to connect to NIX and NIY. Just as Routers B and C only kept the routes with lowest costs, Routers A and D will do the same, only keep the lowest-cost routes to the networks. Now Routers A and D have a lower-cost router to NIX an NIY. They got rid of the higher cost routes and begin sending data. Routers using the distance vector protocol are not as smart as you think though. They'll just keep sending each other routing tables, even though the information is the same. The routers are then in a steady state (or "convergence), which means that the routing tables have completed. Nothing has changed in terms of connections, and the routing tables won't change. What happens if the route between Routers B and C break? the routers have deleted the other routes, so the connection will go down temporarily, and they'll go through the process all over again! Distance vector routing protocols work fine in a situation with four routers, but it isn't good for large networks. Routers can use one of three distance vector routing protocols: RIPv1, RIPv2, or BGP.

The RIPv1 is the grandfather of all these distance vector protocols. RIP stands for "Routing Information Protocol". The first version is from back in the 80s. It has a max hop count of 15, so you could only have a max of 15 routers. That was a problem because the routing table requests would loop back to the initial router. RIPv1 sent out updates every 30 seconds all at the same time, causing network overloads. To ad don it didn't know VLSM (Variable-length subnet masking.) they also had no authentication which is extremely insecure. Then in 1994, RIPv2 came out. Since then VLSM was added plus authentication, but it still has the same hop count of 15. Basically, RIP is available in all routers, but no one uses RIP anymore, cause its convergence time sucks. The growth of the internet required a better routing protocol.

The one that's widely used today is BGP, which is due to the explosive growth of the internet. Lots of organisations, such as ISOC (Internet Society), IANA, and IETF (Internet Engineering Task Force) were trying to find a standardized dynamic protocol to implement. What ended up coming out of all of this was Autonomous System (AS) which is when one or more networks are governed by a single dynamic routing protocol. These Autonomous Systems do not use IP addresses, but ASNs (Autonomous System Number) assigned by IANA. It was originally 16-bit, but now it's 32-bit. An example of an ASN would be "1.33457". Just like you would assign an IP address to a router, you would configure the router to use ASN, by default ASN is assignment the IANA, however. Autonomous Systems communicate using a protocol called Exterior Gateway Protocol (EGP). the networks within AS communicate with protocols as well. They're called Interior Gateway Protocols (IGP). Neither EGP or IGP are dynamic routing protocols, it's just lingo used by ISPs. Many procols are used within AS, such as RIP. The Internet, however, have settled on one protocol to communicate between AS: the Border Gateway Protocol (BG-4). The Network+ exam objectives have BGP as a distance vector routing protocol, but it's really kinda different. It doesn't give you the same type of routing table. They're are instead manually configured ,and send out info passed to them from different AS' edge routers, which is what AS-to-AS routers are called. Then BGP will forward that info to include ASN and other non-IP stuff. BGP knows how to handle several situations unique to the internet. If a router gives a crappy new route, it will ignore it. BGP is great, is basically what I'm saying. On that bombshell, thanks for reading, and goodbye.

Completion Status: 37%
Pages Left:
- Book: 426 pages
- Chapter: 17 pages

No comments:

Post a Comment