Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Thursday, December 25, 2008

Cisco CCNP / BSCI Exam Tutorial: A Guide To Ipv6 Addressing

Learning IPv6 is paramount in your efforts to pass the BSCI exam and go on to earn your CCNP, and it's going to help in your real-world networking career as well. IPv6 can be confusing at first, but it's like anything else in Cisco or networking as a whole - learn one part at a time, master the fundamentals, and you're on your way to success. In today's article we're going to take a look at IPv6 address types.

In IPv4, a unicast address is simply an address used to represent a single host, where multicast addresses represent a group of hosts and broadcasts represent all hosts.

In IPv6, it's not quite that simple. There are actually different types of unicast addresses, each with its own separate function. This allows IPv6 to get data where it's supposed to go quicker than IPv4 while conserving router resources.

IPv6 offers two kinds of local addresses, link-local and site-local. Site-local addresses allow devices in the same organization, or site, to exchange data. Site-local addresses are IPv6's equivalent to IPv4's private address classes, since hosts using them are able to communicate with each other throughout the organization, but these addresses cannot be used to reach Internet hosts.

Site-local and link-local addresses are actually derived from a host's MAC address. Therefore, if HostA has HostB's IPv6 address, HostA can determine HostB's MAC address from that, making ARP unnecessary.

Link-local addresses have a smaller scope than site-local. Link-local addresses are just that, local to a physical link. These particular addresses are not used at all in forwarding data. One use for these addresses is Neighbor Discovery, which is IPv6's answer to ARP.

You can identify these and other IPv6 addresses by their initial bits:

001 - Global address

(first 96 bits set to zero) - IPv4-compatible address

1111 1111 – Multicast

1111 1110 11 - Site local

1111 1110 10 - Link Local

As a future CCNP, you're more than familiar with the reserved IPv4 address classes. You also know that they're not exactly contiguous. The developers of IPv6 took a structured approach to IPv6 reserved addresses - any address that begins with "0000 0000" is an IPv6 reserved address. One of these is the IPv6 loopback address, and this will give you some practice with your zero compression!

IP v6 Loopback: 0000:0000:0000:0000:0000:0000:0000:0001

Using Leading Zero Compression Only: 0:0:0:0:0:0:0:1

Combining Leading Zero and Zero Compression: ::1

Zero compression looks pretty good now, doesn't it? You just have to get used to it and keep the rules in mind. You can use all the leading zero compression you want, but zero compression ("double-colon") can only be used once in a single address.

IPv6 is here to stay, not only on your BSCI and CCNP exams, but in the real world as well. Learning it now will not only aid you in passing your Cisco exams, but in supporting IPv6 in the future.

Cisco CCNP / BSCI Certification: The Local Preference BGP Attribute

When studying for your BSCI exam for the CCNP, you get your first taste of BGP. One of the major differences between BGP and the other protocols you've studied to date is that BGP uses attributes to describe paths, and to influence the selection of one path over the other.

In this free tutorial, we're going to take a look at the Local Preference attribute and compare it to the Cisco-proprietary BGP attribute "weight".

The Local Preference (LOCAL_PREF) attribute is used to influence how traffic will flow from one Autonomous System (AS) to another when multiple paths exist. For example, if AS 100 has two different paths to a destination network in AS 200, the LOCAL_PREF attribute can be used to influence the path selection.

The major difference between the Weight and LOCAL_PREF attributes is that when the LOCAL_PREF attribute is changed, that change is reflected throughout the AS. The new LOCAL_PREF value will be advertised to all other routers in the AS, as compared to the Weight attribute, which is locally significant only. If you change the Weight for a path on one router in an AS, the other routers in the AS will not learn of the change.

A route-map can be used to change a local preference value. For example, if you want to change the local preference value to 200 for the path advertisement 10.2.2.0/24 coming in from neighbor 10.1.1.1, there are three steps involved. First, write an ACL matching the remote network you want to change the local preference for.

R1(config)#access-list 5 permit 10.2.2.0 0.0.0.255

Second, write a route-map setting the local preference to 200. This will double the default value of 100, and the path with the highest local preference will be the preferred path.

R1(config)#route-map PREFER_PATH permit 10

R1(config-route-map)#match ip address 5

R1(config-route-map)#set local-pref 200

Finally, apply the route-map to routes that are being received from 10.1.1.1.

R1(config)#router bgp 100

R1(config-router)#network 10.1.1.1 route-map PREFER_PATH in

R1 will then advertise this new local preference value to all other routers in AS 100 - all of its iBGP neighbors.

Cisco CCNP / BSCI Certification: The BGP Attribute “MED”

When you're preparing to pass the BSCI exam and earn your CCNP certification, one of the biggest challenges is learning BGP. BGP is totally different from any protocol you learned to earn your CCNA certification, and one of the differences is that BGP uses path attributes to favor one path over another when multiple paths to or from a destination exist.

Notice I said "to or from". In earlier free BGP tutorials, I discussed the BGP attributes "weight" and "local preference". These attributes are used to favor one path to a destination over another; for example, if BGP AS 100 has two paths to a destination in AS 200, these two attributes can be set in AS 100 to favor one path over another. But what if AS 100 wants to inform the routers in AS 200 as to which path it should use to reach a given destination in AS 100?

That's where the BGP attribute "Multi-Exit Discriminator", or MED, comes in. The MED value can be set in AS 100 to tell AS 200 which path it should use to reach a given network in AS 100.

As with many BGP attributes, the MED can be set with a route-map. What you need to watch is that there is no "set med" value in route maps. To change the MED of a path, you need to change the metric of that path. Let's say that there are two entry paths for AS 200 to use to reach destinations in AS 100. You want AS 200 to use the 100.1.1.0/24 path over the 100.2.2.0/24 path. First, identify the two paths with two separate ACLs.

R1(config)#access-list 22 permit 100.1.1.0 0.0.0.255

R1(config)#access-list 23 permit 100.2.2.0 0.0.0.255

Next, write a route-map that assigns a lower metric to the more-desirable path.

R1(config)#route-map PREFER_PATH permit 10

R1(config-route-map)#match ip address 22

R1(config-route-map)#set metric 100

R1(config-route-map)#route-map PREFER_PATH permit 20

R1(config-route-map)#match ip address 23

R1(config-route-map)#set metric 250

Finally, apply the route-map to the neighbor or neighbors.

R1(config-route-map)#router bgp 100

R1(config-router)#neighbor 22.2.2.2 route-map PREFER_PATH out

The key points to keep in mind is that while many BGP attributes prefer a higher value, the MED is basically an external metric - and a lower metric is preferred, just as with the protocols you've already studied to earn your CCNA certification.