CCNA Training – OSPF Costs
As a CCNA / CCNP candidate you are expected to understand how to set and interpret the OSPF cost function on your Cisco devices
During your career as a Cisco network engineer you will have to deal with setting and manipulating the OSPF costs on an interface.
OSPF uses a metric called “Cost” to calculate the metric of path. The cost is a cumulative value which is an incremental metric.
The cost is as a default based on the bandwidth of the interface. The Higher the interface bandwidth the lower the cost that is associated to that interface, to see the cost that is assigned to any given interface which is participating in OSPF issue the following command:
Router# show ip ospf interface
The output of this command will show the current cost given to this interface. The costs of the interface is calculated by taking the bandwidth of the interface and dividing this number by a value known as the “auto-cost reference-bandwidth”.
This auto-cost reference-bandwidth is an integer used to calculate a standard metric across OSPF and is set to 100,000,000. The cost is calculated as follows:
100,000,000/BW
If the interface bandwidth is 10Mbps, then the resulting cost would be 10:
100,000,000/10,000,000 = 10
If the interface bandwidth is 100Mbps, then the resulting cost would be 1:
100,000,000/100,000,000 = 1
The next example reveals some deficiencies with the auto-cost reference-bandwidth set at 100,000,000. If we had a 1Gbp interface it’s cost will be calculated by OSPF to be the exact same number as that for the 100Mbps interface.
100,000,000/1000,000,000 = 1
The same would apply for higher speed interfaces such as 10Gbps interfaces which would also be interpreted by OSPF as having a cost of 1, since OSPF cannot define interface costs as an integer part of a decimal number i.e. 0.5 or 0.125.
So that OSPF may be able to calculate the cost of an interface based on the bandwidth of the interface with great accuracy we will need to change the value of the auto-cost reference-bandwidth value from 100,000,000 to a greater value.
To change the auto-cost reference-bandwidth use the following commands:
router(config)#router ospf 1
R2_4(config-router)#auto-cost reference-bandwidth 10000
% OSPF: Reference bandwidth is changed.
Please ensure reference bandwidth is consistent across all routers.
The auto-cost reference-bandwidth now has a value of 10000,000,000 (The value is set in Mbps), therefore now the OSPF process will view the 100Mbps interface as having a cost of 100, 1Gbps having a Cost of 10 and 10Gbps a cost of 1, another point worth mentioning is that the router will prompt you to make sure that the auto-cost reference-bandwidth value is set consistently across all your routers.
Note: The cost given to a path is added to the metric only when the route is received inbound on an interface, not outbound, therefore should you wish to alter the cost of the path you must do this on the inbound interface.
Joe Spoto is a senior lecturer at Commsupport networks CCNA in the United Kingdom. Joe teaches Cisco CCNA, CCNP, CCVP courses when he is not out on the road fixing and building networks, if you want to find out more about what we do at Commsupport please visit us at CCNACommsupport run free one day training sessions and free on-line webinars, CCNP
Showing posts with label DHCP. Show all posts
Showing posts with label DHCP. Show all posts
Wednesday, 16 June 2010
Monday, 14 June 2010
DHCP IP Helper address in Cisco devices
DHCP IP Helper address in Cisco devices
As a CCNA / CCNP candidate you are expected to understand the purpose and function of the IP Helper address .
The CCNA / CCNP’s exam will ask of you to determine the purpose of the IP Helper command, what it contains and the role it plays in your network.
The purpose of the IP helper command for the purposes of DHCP (Dynamic Host Configuration Protocol) is to assist a host within a broadcast domain to acquire an IP address from a DHCP server that resides within another broadcast domain.
Before we take a detailed view of how the IP helper command works we will firstly need to look at what defines a broadcast domain. A broad is a message which is generated by host or hosts when they wish to either announce their presence to the other hosts on the network or they need to discover some entity on the network. The two most common types of broadcast messages that are issued from a host are ARP (Address Resolution Protocol) messages to resolve a known IP address to a Layer 2 MAC address or a DHCP discover message.
Both the ARP message and the DHCP discover message will received by all of the host within the VLAN or Subnet of the host that generated the broadcast message, if the broadcast message is received by a router interface the default action of the router interface is to discard the message unless it itself is the intended recipient of the broadcast, say for example the generating host was ARP’ing for it’s default gateways’ MAC address.
The router will not by default forward the broadcast of any nature across to another subnet. Imagine if the router did this and forwarded all broadcasts from one network into another network, your router at home or at the office is connected to the internet, imagine if your router as to forward by default your broadcasts from one subnet, i.e. yours over into the public network, and multiplied that by a few million times one for every router that is connected to the internet, well that would be a lot of traffic, so again by default it is not in the interest of performance that broadcasts are forwarded from one subnet to another.
So where does that leave us in regards to the client sending out DHCP Discover messages in the attempt of getting a valid host IP address. If no DHCP server resides within the same subnet that the client resides in because the DHCP server lives in another subnet in then there is no chance of the client getting an IP address.
We in this case have to assist the client in getting an IP address from the DHCP server which lives in another network and to do this we need to use the “IP helper-address” command which is placed on the same interface that is the default gateway for the host requesting the IP address. The command would be as follows
Router(config-if)#ip helper-address x.x.x.x
The x.x.x.x would represent the address of the DHCP server. It is important that the router knows how to reach the subnet that the DHCP resides within, unless this is the case the router will never be able to forward the DHCP discover messages which are generated by the client to the DHCP server.
When the routers’ interface receives the DHCP discover message from the client it will relay the DHCP discover message over to the DHCP server placing it’s own interface IP address in a field called the “Relay agent”, this is done so that the DHCP server knows from which of its address scopes to draw a valid address from. It is important to bear in mind at this point that the original DHCP discover message which is a broadcast is relayed over to the DHCP server as a unicast message.
Joe Spoto is a senior lecturer at Commsupport networks CCNA in the United Kingdom. Joe teaches Cisco CCNA, CCNP, CCVP courses when he is not out on the road fixing and building networks, if you want to find out more about what we do at Commsupport please visit us at CCNACommsupport run free one day training sessions and free on-line webinars, CCNP
As a CCNA / CCNP candidate you are expected to understand the purpose and function of the IP Helper address .
The CCNA / CCNP’s exam will ask of you to determine the purpose of the IP Helper command, what it contains and the role it plays in your network.
The purpose of the IP helper command for the purposes of DHCP (Dynamic Host Configuration Protocol) is to assist a host within a broadcast domain to acquire an IP address from a DHCP server that resides within another broadcast domain.
Before we take a detailed view of how the IP helper command works we will firstly need to look at what defines a broadcast domain. A broad is a message which is generated by host or hosts when they wish to either announce their presence to the other hosts on the network or they need to discover some entity on the network. The two most common types of broadcast messages that are issued from a host are ARP (Address Resolution Protocol) messages to resolve a known IP address to a Layer 2 MAC address or a DHCP discover message.
Both the ARP message and the DHCP discover message will received by all of the host within the VLAN or Subnet of the host that generated the broadcast message, if the broadcast message is received by a router interface the default action of the router interface is to discard the message unless it itself is the intended recipient of the broadcast, say for example the generating host was ARP’ing for it’s default gateways’ MAC address.
The router will not by default forward the broadcast of any nature across to another subnet. Imagine if the router did this and forwarded all broadcasts from one network into another network, your router at home or at the office is connected to the internet, imagine if your router as to forward by default your broadcasts from one subnet, i.e. yours over into the public network, and multiplied that by a few million times one for every router that is connected to the internet, well that would be a lot of traffic, so again by default it is not in the interest of performance that broadcasts are forwarded from one subnet to another.
So where does that leave us in regards to the client sending out DHCP Discover messages in the attempt of getting a valid host IP address. If no DHCP server resides within the same subnet that the client resides in because the DHCP server lives in another subnet in then there is no chance of the client getting an IP address.
We in this case have to assist the client in getting an IP address from the DHCP server which lives in another network and to do this we need to use the “IP helper-address” command which is placed on the same interface that is the default gateway for the host requesting the IP address. The command would be as follows
Router(config-if)#ip helper-address x.x.x.x
The x.x.x.x would represent the address of the DHCP server. It is important that the router knows how to reach the subnet that the DHCP resides within, unless this is the case the router will never be able to forward the DHCP discover messages which are generated by the client to the DHCP server.
When the routers’ interface receives the DHCP discover message from the client it will relay the DHCP discover message over to the DHCP server placing it’s own interface IP address in a field called the “Relay agent”, this is done so that the DHCP server knows from which of its address scopes to draw a valid address from. It is important to bear in mind at this point that the original DHCP discover message which is a broadcast is relayed over to the DHCP server as a unicast message.
Joe Spoto is a senior lecturer at Commsupport networks CCNA in the United Kingdom. Joe teaches Cisco CCNA, CCNP, CCVP courses when he is not out on the road fixing and building networks, if you want to find out more about what we do at Commsupport please visit us at CCNACommsupport run free one day training sessions and free on-line webinars, CCNP
Labels:
CCNA,
ccna courses,
CCNA training,
ccnp,
ccnp courses,
cisco ccna,
cisco ccna training,
DHCP
Subscribe to:
Posts (Atom)