Route My World!

A CCNA/CCNP Blog

Archive for June 13th, 2008

ICND2 OECG Chapter 4: IP Routing: Static and Connected Routes

Posted by Aragoen Celtdra on 13th June 2008

IP Routing and Addressing

IP Routing

  • When a packet is sent by a host, the packet’s destination IP address is compared to what the host/sender believes is the valid range of IP addresses in the connected subnet. The comparison is made based on the host’s IP address and subnet mask.
    • If the destination IP address is in the same subnet, the packet is sent directly to the destination host. ARP is used to find the MAC address of the destination host
    • If destionation is not on the same subnet, use ARP to find MAC address of the default gateway and send the packet there.
  • Routers logic:
    1. For each frame that is received, use frame’s FCS to check for errors. Discard frames if there are errors.
    2. Check the frame’s destination MAC address. Process only if addressed to this router’s MAC address or to a broadcast/multicast address.
    3. Strip off the frame’s old data-link header and trailer, leaving the IP packet.
    4. Compare the destination IP address with the router’s routing table to find a matching route. This route should tell the packet what the outgoing interface is on that router, as well as the next-hop router (or the destination host).
    5. Determine the destination’s MAC address for forwarding the packet to the next router or the destination host.
    6. Encapsulate the packet with a new data link header and trailer (Ethernet, PPP, HDLC, etc.) that contains info for the next device.

IP Addressing and Subnetting

  • Classful IP network: Class A, B, and C
  • A subnet is a subset of a classfull network
  • A subnet mask allows the determination of an IP addresses subnet, range of valid IP addresses, and broadcast address for that subnet.
  • Devices in the same subnet should use the same subnet mask to prevent confusion on the range of IP addresses in that subnet
  • Devices in a single VLAN should be in the same subnet, and conversely, devices in different VLANs should be in different subnets.
  • Hosts separated by a router must be in different subnets
  • A router needs to perform routing when exchanging data between different subnets
  • Point-to-point serial links need to be in a different subnet than the LAN segment. In a p2p, you only need two IP addresses because there’s only two interfaces involved.
  • Need to Master Subetting!!!
  • The following is a list suggested tasks that need to be mastered with the amount of time you should solve them by:
    • Given a dotted decimal mask, convert it to prefix notation, or vice versa. (Suggested time for exam readiness: 5 seconds)
    • Given an IP address and mask, find the subnet number, range of addresses, and subnet broadcast address. (Suggested time: 15 seconds)
    • Given a subnet mask and class (A, B, or C) of a network, determine the number of subnets and hosts per subnet. (Suggested time: 15 seconds)
    • Given a class of network (A, B, or C) and design requirements for a number of subnets and number of hosts per subnet, find all masks that meet the requirements, and choose the mask that either maximizes the number of subnets or the number of hosts per subnet. (Suggested time: 30 seconds)
    • Given a classful network and a single subnet mask to use for all subnets, list the subnet
  • IP Forwarding by Matching the Most Specific Route
    • When there is more than one route in a routers IP routing table that match a certain destination IP address, the route that is most specific is the one that gets used. As clue, the route with the longest prefix is the most specific route.
    • Consider the following example listing several routes that all match the destination IP address 172.16.1.1:
      • 172.16.1.1/32
      • 172.16.1.0/24
      • 172.16.0.0/22
      • All the routes on the above list match the destination 172.16.1.1. But because the first route (172.16.1.1/32) is the most specific – the longest prefix of all the matching routes – that is the route that is used.

DNS, DHCP, ARP, ICMP

  • The following list shows a step by step process of how these protocols are used:
    1. The host use DHCP to acquire its IP address, subnet mask, DNS IP address, and default gateway.
    2. The host makes a DNS request to resolve a host name to its IP address
    3. A host uses ARP to discover the data link address of a next hop device and use that information to build the ethernet frame.
    4. If a ping command is used, the IP packet sends an ICMP echo request to it’s destination address, and it receives an ICMP echo reply back from the original destination.

Fragmentation and MTU

  • Maximum Transmission Unit (MTU) is the maximum length of an IP packet. For ethernet interfaces, the MTU is 1500 bytes.
  • Routers cannot forward a packet if the packet is bigger than the MTU. In order for the packet to be transmitted, a process is used to break down this packet into smaller packets. This process is called Fragmentation.
    • mtu – interface subcommand to change mtu size. Sets MTU for all Layer 3 protocol.
    • ip mtu – interface subcommand that sets the mtu setting for the IP protocol.
    • If both are configured on an interface, ip mtu command takes precedence. However, if mtu command is configured after the ip mtu, the ip mtu value is reset to whatever the mtu command sets it to.

Routes to Directly Connected Subnets

The router will automatically add the route to a subnet, connected to each interface, in its routing table under two conditions:

  • The interfaces are up/up
  • The interfaces have ip addresses

Secondary IP Addressing

  • The method secondary ip addressing allows the use of multiple networks or subnets on the same LAN segment. This is typically employed if a particular segment runs out of IP address and the enterprise needs to add more IP addresses to that segment in a way that the new IP scheme will not overlap with the current ip addresses.
  • For this to work, a single router will need to have two IP addresses from each subnet. The hosts in each of those subnets can then use these addresses as their respective default gateway.
  • A sample configuration:

interface fa0/1
ip address 192.168.100.1 255.255.255.0
ip address 192.168.200.1 255.255.255.0 secondary

Supporting Connected Routes to Subnet Zero

  • The zero subnet is the one subnet in each classful network that has all binary 0s in the subnet part of the address. It turns out that the zero subnet address is the same as the classful network number
    • for example, 172.16.2.5/22 is in the subnet 172.16.0.0 which is its zero subnet, as well as the classful network number.
  • ip subnet-zero command allows the router to accept it as a valid route.
    • The ip subnet-zero is on by default starting with IOS 12.0 and later
    • In the exam, assume that the ip subnet-zero is configured unless specified.
  • no ip subnet-zero command disallows the configuration of an ip address in the zero subnet range.

ISL and 802.1Q Configuration on Routers

Sample configuration with ISL Encapsulation

interface fastethernet 0/0.1
ip address 10.1.1.1 255.255.255.0
encapsulation isl 1
!
interface fastethernet 0/0.2
ip address 10.1.2.1 255.255.255.0
encapsulation isl 2
!
interface fastethernet 0/0.3
ip address 10.1.3.1 255.255.255.0
encapsulation isl 3

Sample configuration with 802.1Q encapsulation

interface fastethernet 0/0
ip address 10.1.1.1 255.255.255.0
!
interface fastethernet 0/0.2
ip address 10.1.2.1 255.255.255.0
encapsulation dot1q 2
!
interface fastethernet 0/0.3
ip address 10.1.3.1 255.255.255.0
encapsulation dot1q 3

!

An alternative to configuring the physical interface, you can configure another subinterface:

!

interface fastethernet 0/0.1
ip address 10.1.1.1 255.255.255.0
encapsulation dot1q 1 native

  • The alternative command with encapsulation dot1q 1 native tells the router that the subinterface is in VLAN 1, and native keyword tells the router not to use 802.1Q headers.
  • The port on the switch needs to be configured with either a switchport mode trunk or switchport trunk encapsulation dot1q interface subcommand. This is because routers do not perform dynamic negotiation of trunking so the switch has to do it.

Static Routes

Configuring Static Routes

R1#configure terminal

R1(config)#ip route 10.1.2.0 255.255.255.0 10.1.128.252

R1(config)#ip route 10.1.3.0 255.255.255.0 10.1.130.253

Command Route to subnet Subnet Mask Next-hop IP address
ip route 10.1.2.0 255.255.255.0 10.1.128.252
ip route 10.1.3.0 255.255.255.0 10.1.130.253

NOTE: The next-hop IP address should be an IP address in a directly connected subnet.

  • The ip route command can either refer to the next-hop ip address as shown above or use the outgoing interface of the router. This is typically used for interfaces that connect on a point-to-point interface links

Static Default Route

  • A default route is a route that matches all packet destination. It is also known as gateway of last resort. It is used when there is no other known route that exist for a certain ip destination. In a typical setup, the default route is set to point to a router that has a route to the Internet or to the service provider for that enterprise

Default Route Using the ip route Command

  • ip route 0.0.0.0 0.0.0.0 12.217.21.2
  • This command creates a route to destination 0.0.0.0 with mask 0.0.0.0 using the 12.217.21.2 as the next hop router. This configuration basically matches any and all IP destinations.
  • In the routing table, this best route is marked as the gateway of last resort.
  • If there’s two or more defualt routes in the routing table, the router will mark each default route with an asterisk in its routing table and it will pick the best route. This best route is chosen as the gateway of last resort.

Default Routes Using the ip default-network Command

  • The command ip default-network can be used on a router to tell that router to build its default route based on an already learned route – from his routing table. So the syntax of the command actually uses the classful IP network as its parameter.
  • ip default-network 10.0.0.0
  • To summarize:
    • Default Static routes can be statically configured using the ip route 0.0.0.0 0.0.0.0 next-hop-address or the ip default-network net-number command.
    • When a router only matches a packet with the default route, the router uses the forwarding details listed in the gateway of last resort line

Classful and Classless Routing

  • Classless Routing – Use the default route if a packet does not match any other routes.
  • Classful Routing – If a packet does not match any other routes and matches only the default route:
    • Use the default route if the router does not have any routes in the same classful network as the destination IP address
    • Discard the packet if there is a route that matches the classful network that the destination IP address belongs to.

Posted in CCNA Basics, CCNA Notes, Routing Protocols | No Comments » | Print This Post

CertGuard cheated us!

Posted by Aragoen Celtdra on 13th June 2008

I just read the latest posting from CCIE Pursuit on the matter that has recently been surrounding Ethan Banks. If I’m reading it correctly, it appears that the fact that Ethan Bank’s site is currently down could have something to do with the latest allegations by Mr. Robert Williams of Certguard that Ethan cheated on his CCIE exam.

Now, I have had admiration towards what Mr Williams has been doing in the past, raising awareness to the inappropriate and destructive behaviors of these “cheaters”, as I have strong convictions toward cheating on the Cisco exams – particularly, for the fact that it cheapens the value of the certifications that many have worked hard for.

But since following this debacle from the start, I started to lose confidence and trust in what Mr. Williams represents. The blunt carelessness in his accusations has probably hurt those who care about this profession more than the ones he is trying to go after. There are many of us who follow Ethan and admire the things that he has accomplished.

There’s no question that Mr. Williams read Ethans blog – otherwise, how would he have come to this allegations of cheating? But did he really read his posts? Because if he did, he would have been able see past what he accuses Ethan of – his alleged “self-incriminating statements” – and see the incredible discipline and meticulous preparations that Ethan had done to pass this test. I can’t guarantee anything, but I’m pretty sure there is little or no damage done by Ethan even mentioning the inappropriate study materials. If there’s anything that Ethan has taught us (“Ethan’s followers” as Mr. Williams would say), he inadvertently showed us how to put value in true hard work in the same fashion that he had undertaken.

I really don’t understand how anyone as smart as Mr. Williams can summarily sentence someone who has done more good to this profession than anyone out there. I really feel that Certguard has cheated us of a wonderful mentor and a great leader for engineers to follow. Mr Williams has done a lot of things right. But I think he’s got this one wrong. Really wrong!

Posted in General | No Comments » | Print This Post

 

Route My World! is Digg proof thanks to caching by WP Super Cache