Showing posts with label Explanation. Show all posts
Showing posts with label Explanation. Show all posts

Friday, June 22, 2012

ROUTER - A Introduction


 

  • THERE ARE 7 MAJOR INTERNAL COMPONENTS OF A ROUTER:

  • CPU.
  • RAM.
  • NVRAM.
  • FLASH.
  • ROM.
  • CONSOLE.
  • INTERFACES.

    INSIDE ROUTER MOTHERBOARD

    CISCO ROUTERS (AND SWITCHES) GENERALLY CONTAIN FOUR TYPES OF MEMORY:

  • ROM (Read-Only Memory).
  • Flash.
  • NVRAM (Non-Volatile RAM).
  • RAM (Random-Access Memory).

    ROM Contains A Bootstrap Program Called ROM Monitor (Or ROMMON). When A Router Is Powered On, The Bootstrap Runs A Hardware Diagnostic Called POST (Power-On Self Test).


    ROUTER COMPONENTS AND THEIR FUNCTIONS:


    CPU - Executes Operating System Instructions. The CPU Performs Functions Just As It Does In A Normal PC. It Executes Commands Given By The IOS Using Other Hardware Components. High-End Routers May Contain Multiple Processors Or Extra Slots To Add More Cpus Later

    RANDOM ACCESS MEMORY (RAM) - Contains The Running Copy Of Configuration File. Stores Routing Table. RAM Contents Lost When Power Is Off. RAM Is Used To Store Operational Information Such As Routing Tables, Router's Running Configuration File. RAM Also Provides Caching And Packet Buffering Capabilities. Its Contents Are Lost When You Switch Off Or Restart The Router.

    READ-ONLY MEMORY (ROM) - Holds Diagnostic Software Used When Router Is Powered Up. Stores The Router’s Bootstrap Program.

    NON-VOLATILE RAM (NVRAM) - Stores Startup Configuration. This May Include IP Addresses (Routing Protocol, Hostname Of Router). NVRAM Does Not Lose Its Information When Power Is Turned Off. This Is In Contrast To The Most Common Forms Of RAM, Such As DRAM, That Requires Continual Power To Maintain Its Information. NVRAM Is Used By The Cisco IOS As Permanent Storage For The Startup Configuration File (Startup-Config).

    All Configuration Changes Are Stored In The Running-Config File In RAM, And With Few Exceptions, Are Implemented Immediately By The IOS. To Save Those Changes In Case The Router Is Restarted Or Loses Power, The Running-Config Must Be Copied To NVRAM, Where It Is Stored As The Startup-Config File. NVRAM Retains Its Contents Even When The Router Reloads Or Is Powered Off.

    FLASH MEMORY - Contains The Operating System (Cisco IOS). Flash Memory Is Nonvolatile Computer Memory That Can Be Electrically Stored And Erased. Flash Is Used As Permanent Storage For The Operating System, Cisco IOS. In Most Models Of Cisco Routers, The IOS Is Permanently Stored In Flash Memory And Copied Into RAM During The Bootup Process, Where It Is Then Executed By The CPU. Some Older Models Of Cisco Routers Run The IOS Directly From Flash.

    Flash Consists Of Simms Or PCMCIA Cards, Which Can Be Upgraded To Increase The Amount Of Flash Memory.Flash Memory Does Not Lose Its Contents When The Router Loses Power Or Is Restarted.
    INTERFACES - There Exist Multiple Physical Interfaces That Are Used To Connect Network.The Interfaces Provide Connectivity To LAN, WAN, And Console/Aux. They Can Be RJ-45 Jacks Soldered Onto The Motherboard, Transceiver Modules, Or Card Modules. Cisco Routers, Especially The Higher-End Models, Can Be Configured In Many Different Ways. They Can Use A Combination Of Transceivers, Card Modules And Onboard Interfaces.

    EXAMPLES OF INTERFACE TYPES:
  • Serial Interfaces.
  • Ethernet Interfaces.
  • Fast Ethernet Interfaces.
  • Token Ring Interfaces.
  • ATM Interfaces.


    Interfaces Are Identified By Both The Type Of Interface, And The Interface Number (Which Always Begins At “0”). Thus, The First Ethernet Interface On A Router Would Be Identified As Ethernet0.

    Certain Router Families (Such As The 3600 Series) Are Modular, And Have Multiple “Slots” For Interfaces. Thus, Interfaces On These Routers Are Identified By Both The Module Number And The Interface Number, Formatted As: Module/Interface. Thus, The Third Fast Ethernet Interface On The First Modular Slot Would Be Identified As Fastethernet0/2.

    Lines Identify Ports That Allow Us To Connect Into, And Then Configure, Cisco Devices. The Most Common Examples Of Lines Include:
  • Console Ports.
  • Auxiliary Ports.
  • VTY (Telnet) Ports.


    Just Like Interfaces, Lines Are Identified By Both The Type Of Line, And The Line Number (Again, Always Begins At “0”). Thus, The First Console Port On A Router Would Be Identified As Console0.

    A Cisco 2600 series router is a cut above the routers populating the 2500 series because it has a faster processor and can handle many more interfaces. Figure as below shows a diagram of a Cisco 2600 modular router.





    SUMMARY



    SUMMARY OF BOOT SEQUENCE :


    1. On Power On Cisco Router First Will Perform The POST( Power On Self Test). The POST Tests The Hardware To Verify That All Components Of The Device Are Operational And Present. For Example, The POST Checks For The Different Interfaces On The Router. The POST Is Stored In And Run From ROM (Read-Only Memory).

    2. The Bootstrap Looks For And Loads The Cisco IOS Software. The Bootstrap Is A Program In ROM That Is Used To Execute Programs. The Bootstrap Program Is Responsible For Finding Where Each IOS Program Is Located And Then Loading The File. By Default, The IOS Software Is Loaded From Flash Memory In All Cisco Routers.

    3. The IOS Software Looks For A Valid Configuration File Stored In NVRAM. Which Is Called As Startup-Config.

    4. If A Startup-Config File Is In NVRAM, The Router Will Load And Run This File. The Router Is Now Operational. If A Startup-Config File Is Not In NVRAM, The Router Will Start The Setup-Mode Configuration Upon Bootup.

    5. Any Further Modification On Running Router Will Be Stored On RAM, Where You Need To Manually Execute Command Copy Running-Config Startup-Config To Make Your Current Configuration As A Startup-Config, Every Time You Boot Your Router.



  • What are the Basics of a Cisco Router?


    Definition
    A Router is a layer 3 network device that transmits data between different network segments and can use a packet header to determine the best path for the packet to travel. Routers can connect network sections that use different protocols. They also allow all users in a network to share a single connection to the Internet or a wide area network (WAN).
    Internal Router Components
    • Read-Only Memory (ROM)
      ROM stores the router’s bootstrap startup program, operating system software, and any power-on diagnostic tests programs.
    • Flash Memory
      Flash Memory is reprogrammable, erasable ROM that stores the system image(s) of the operating system. Memory content is retained when the router is switched off or restarted.
    • Random Access Memory (RAM)
      RAM stores operational information like routing tables while providing caching and packet buffering capabilities. Its contents are lost whenever the router is switched off or restarted.
    • Nonvolatile RAM (NVRAM)
      NVRAM is used to store the router’s startup configuration file. The contents of the file are maintained whenever the router is switched on, off or restarted.
    • Network Interfaces
      The router’s network interfaces are located on the motherboard or on separate interface modules. Ethernet or Token Ring interfaces can be configured to authorize connection to a LAN, while synchronous serial interfaces are configured to permit connection to WANs.
    External Router Components
    A router can be configured over any of its network interfaces. Trivial File Transfer Protocol (TFTP) servers can be used to provide configuration information to a router.
    TFTP is a simplified version of FTP.
    Router’s Startup Procedure
    Every time a router is switched on; it goes through self-test diagnosis to verify the basic operation of the CPU, network interfaces, and memory.
    The system bootstrap software then searches for a valid router operating system software (Cisco® IOS image). The Cisco® IOS image can be found in ROM, Flash memory, or a TSFT server on the network.
    Cisco® CLI Command Modes
    The Cisco® IOS software provides access to a variety of different command modes, each of which provides a different group of related commands. The Cisco® Command Line Interface (CLI) is called EXEC, and can be used in either User mode or Privileged mode. The commands available in Privileged mode are also available in User mode.
    User EXEC commands allow you to:
    • Connect to remote devices
    • Make temporary changes to terminal settings
    • Perform basic tests
    • List system information
    To access privileged mode, a password is required. Privileged EXEC commands can be used to:
    • Set operating parameters
    • Perform a detailed examination of the router’s status
    • Test and debug router operation
    • Access global and other included configuration modes
    You can also enter global configuration mode from Privileged mode, which will give you access to configuration commands that affect the entire system.

    Thursday, June 21, 2012

    Maximum Transfer Unit

    Maximum Transfer Unit refers to the size of the largest chunk of data, within a single unit, that can be transmitted under a particular protocol. For example, the maximum transfer unit for Ethernet is 1,536 eight-bit bytes. The Maximum Transfer Unit for Fibre Channel, by comparison, is 2,112 eight-bit bytes

    The Maximum Transmission Unit (MTU) is the largest size of IP datagram which may be transferred using a specific data link connection The MTU value is a design parameter of a LAN and is a mutually agreed value (i.e. both ends of a link agree to use the same specific value) for most WAN links.
    The size of MTU may vary greatly between different links (e.g. typically from 128 B up to 10 kB).The prevalent Path MTU on the Internet is now 1500 bytes, the Ethernet MTU. There are some initiatives to support larger MTUs in networks (e.g. 8 KB), in particular on research networks. But their usability is hampered by last-mile deployment of Ethernet with an MTU of 1500 and lack of robustness of Path MTU Discovery.


    Maximum Transmission Unit (MTU) and Datagram Fragmentation
    The IP implementation of all devices on an IP internet needs to be aware of the capacity of the technology used by that implementation for its immediate data link layer connection to other devices. This limit is called the maximum transmission unit (MTU) of the network. This term is also sometimes seen as the maximum transfer unit.
    If an IP layer receives a message to be sent across the internetwork, it looks at the size of the message and then computes how large the IP datagram would be after the addition of the 20 or more bytes needed for the IP header. If the total length is greater than the MTU of the underlying network, the IP layer will fragment the message into multiple IP fragments. So, if a host is connected using an Ethernet LAN to its local network, it may use an MTU of 1,500 for IP datagrams, and will fragment anything larger. Figure 88 shows an example of differing MTUs and fragmentation.
    Key Concept: The size of the largest IP datagram that can be transmitted over a physical network is called that network’s maximum transmission unit (MTU). If a datagram is passed from a network with a high MTU to one with a low MTU, it must be fragmented to fit the network with the smaller MTU.

    Since some physical networks on the path between devices may have a smaller MTU than others, it may be necessary to fragment more than once. For example, suppose the source device wants to send an IP message 12,000 bytes long. Its local connection has an MTU of 3,300 bytes. It will have to divide this message into four fragments for transmission: three that are about 3,300 bytes long and a fourth remnant about 2,100 bytes long. (I'm oversimplifying by ignoring the extra headers required; the next topic includes the full details of the fragmentation process.)

    Figure 88: IP Maximum Transmission Unit (MTU) and Fragmentation
    In this simple example, Device A is sending to Device B over a small internetwork consisting of one router and two physical links. The link from A to the router has an MTU of 3,300 bytes, but from the router to B it is only 1,300 bytes. Thus, any IP datagrams over 1,300 bytes will need to be fragmented.




    Difference Between Unicasting and Multicasting


    Unicasting vs Multicasting 
    In computer networking, unicast refers to transmitting information from one sender to a one receiver. So unicasting involves only two nodes in a network. The single receiver in unicasting is identified by a unique address. On the other hand, Multicasting refers to transmitting information in a single transmission to a group of receivers. Multicasting is commonly implemented as IP (internet Protocol) Multicasting.
    What is Unicasting?
    When it comes to computer networking, unicasting refers to transmitting information from a single sender to a single receiver. Unicasting uses session based IP delivery protocols such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). In unicasting, each receiver or client connects to the server consuming additional bandwidth. The client has a direct relationship with the server. For example, consider a situation where you request the URL http://www.cnn.com from your computer. This request should be received only by the CNN server else the network will be filled with unwanted requests sent to other computers in the network. Therefore unicast transmission is essential to networks and is supported by Ethernet and IP networks. Some examples of unicast transmissions are http, smtp, telnet, ssh and pop3. Unicasting is used when a private or unique resource is requested by a client. But unicasting is not suitable when transmitting information to lot of clients since the sender has to make separate connections with every receiver. This will consume computing resources in the sender and will consume a large bandwidth in the network.
    What is Multicasting?
    As mentioned earlier, multicasting refers to transmitting information to a group of receivers in a single transmission. In multicasting, source is required to transmit a data packet only once. The nodes in the network such as routers make the necessary copies of the transmitted data packet, so that it could be received by multiple receivers. The intermediate routers send the packets to receivers who have registered with them indicating the interest to receive data from that particular sender. IP multicasting is one of the commonly used multicasting implementations. Furthermore, the source does not need to know the addresses of the receivers that it is going to multicast and there is no direct relationship between the sender and the receivers. Multicasting is not suitable for bulk data transferring and not generally used in a large scale on the internet since only small sections of the Internet are multicast-enabled.
    What is the difference between Unicasting and Multicasting?
    The main difference between unicasting and multicasting is on how they communicate with receiver. In unicasting, information is transmitted to a single receiver by a single sender and the receiver has a direct relationship with the sender. In multicasting, information is sent to multiple receivers in a single transmission and there is no direct relationship between the senders and receivers. Unicasting is used when a private resource is requested by a client and it is not suitable for transmitting information to lot of clients since it will consume a large bandwidth of the network. On the other hand, multicasting does not make direct connections with the receivers, hence does not consume network bandwidth as unicasting.

    Managing a Cisco Internetwork

    - Cisco Router Components -- Bootstrap, POST, ROM Monitor (all in ROM); Mini-IOS (RXBOOT, or bootloader), RAM, ROM, Flash, NVRAM, Configuration register.
    - Cisco Router Boot Sequence -- POST; Bootstrap loads the IOS; the IOS loads a configuration ("startup-config", if present in NVRAM).
    - Configuration register -- 16 bits, read 15-0 from left to right. Default is 0x2102 = 0010 0001 0000 0010 -- load IOS from flash and look for "startup-config".
    - Configuration register common values in bits (and hex):
    - 0-3 -- 0x0000-0x000F -- Boot field, as follows:
    - 00 -- ROM monitor mode -- register = 2100. You must manually boot the router with the "b" command.
    - 01 -- Boot image from ROM -- register = 2101.
    - 02-F -- Specifies a default boot filename.
    - 6 -- 0x0040 -- ignore NVRAM contents.
    - 7 -- 0x0080 -- OEM bit enabled.
    - 8 -- 0x0100 -- Break disabled.
    - 10 -- 0x0400 -- IP broadcast with all zeros.
    - 11-12 -- 0x0800-0x1000 -- console line speed.
    - 13 -- 0x2000 -- Boot default ROM software if network boot fails.
    - 14 -- 0x4000 -- IP broadcasts do not have net numbers.
    - 15 -- 0x8000 -- Enable diagnostic messages and ignore NVM contents.
    - "sh version" shows the current value of the configuration register.
    - Change the config register (run this from "config t" mode) -- "config-register 0x0101" -- Boot into ROM mode and then show the current config register value.
    - Recovering Passwords:
    - Perform a "break" while the router boots -- you should see "rommon 1 >".
    - "confreg 0x2142" -- turns on bit 6 -- ignore NVRAM contents. Note: On a Cisco 2500 router, type "o" after the break, then "o/r 0x2142".
    ! To boot from a different file, use "boot system <ios_name>", or "boot system tftp <ios_name> <ip_address>".
    - Reboot the router -- "reset" ("I" on a 2500 -- meaning "initialize").
    - Fix password and reboot -- "copy start run", "config t", "enable secret <new_pass>", "config-register 0x2102", Ctrl-Z, "copy run start", "reload".
    - Back up and Restore the Cisco IOS:
    - Check the flash and the TFTP server -- "sh flash", "ping 192.168.1.4".
    - Backup the IOS image -- "copy flash tftp".
    - Restore of Upgrade the Cisco Router IOS -- "copy tftp flash" (you may be asked to erase existing flash data). You can also erase it manually with "erase flash:".
    - Set up a Cisco router to be a TFTP server -- "config t", "tftp-server flash:."
    - Back up or Restore the Cisco Configuration -- "copy run tftp", "copy tftp run". Erase the startup config -- "erase start".
    - Cisco Discovery Protocol (CDP) -- collect hardware and protocol information about neighbor devices. "sh cdp" shows CDP values:
    - CDP timer -- how often CDP packets are transmitted to all active interfaces (default 60 seconds) -- "config t", "cdp timer 90".
    - CDP holdtime -- how long to hold packets received from neighbor devices (default 180 seconds) -- "config t", "cdp holdtime 240".
    - "sh cdp nei" (or "show cdp neighbor") shows CDP information ONLY about directly connected devices. "sh cdp neighbor detail" = "sh cdp entry *" BOTH display extended information ("sh cdp entry *" does NOT work on a 1900 switch).
    - "sh cdp traffic" shows CDP traffic summary. "sh cdp interface" shows interface CDP information.
    - CDP is enabled by default. Disable globally -- "no cdp run". To disable per interface -- "config t", "int s0", "no cdp enable".
    - "telnet 192.168.2.100" = "192.168.2.100" -- "telnet" can be skipped, it is assumed.
    - Connect via telnet to several routers simultaneously -- "telnet 192.168.1.100", "Ctrl-Shift-6 then x" (suspend), "telnet 192.168.2.100".
    - "sh sessions" shows telnet connections from your router to another device. "sh users" shows telnet sessions in your router.
    - "disconnect <ID>" disconnects a session. "clear line <ID>" disconnects a telnet session in your router.
    - Use a host table to resolve addresses -- "config t", "ip host myrouter 192.168.1.100". Then you can telnet via "telnet myrouter", or just "myrouter". Remove with "no ip host myrouter".
    - Using a DNS server for name resolution -- "config t", "ip domain-lookup", "ip name-server 192.168.1.4", "ip domain-name mydomain.com".
    - "sh hosts" displays the host table, or DNS information, if set up.
    - "ping" and "traceroute" can be used from user mode and enable mode, but not from config mode.
    - If you try to run traceroute with IPX or AppleTalk, you will get an error. Those two are not supported yet

    Difference Between IP and Port


    IP vs Port 
    With the latest developments of information and communication technologies (ICT) every nook and corner of the vast globe is interconnected. The basis of this wonderful victory is mainly due to rapidly evolving communication and networking technologies. The building blocks of these miracle creations are based upon the concepts of IP addressing and ports.
    Through IP addresses and ports,   millions of servers and clients on the internet are communicating with each other.
    IP address
    IP address is a logical 32 bit address which is used to determine the destination of a data packet (datagram). IP address identifies the source and destination networks which allow the datagram to flow accordingly in the specified route. Every host and router on the internet has an IP address, just like all telephones have a unique number for the identification purpose. The concept of IP addressing was standardized in 1981.
    Basically dotted decimal notation is being used in IP addressing. Normally an IP address consists of two parts as network portion and the host portion. Ordinary arrangement of an IP address is as follows:
    Each of the 4 bytes (8 bits = 1byte) consists of values ranging from 0-255. IP addresses are grouped into classes as (A, B, C and D) depending on the size of the network identifier and the host identifier. When this approach is being used in determining the IP addresses, it is identified as class full addressing. Depending on the type of the network to be created, have to select a suitable address scheme.
    E.g.: Class A=> For few networks , each with many hosts.
    Class C=> For many networks, each with few hosts.
    Mostly, within a considered LAN environment network identifier of the IP address remains same, where as host part is varying.
    One of the big disadvantages caused by class full addressing is wastage of IP addresses. So, engineers moved into the new approach of class less addressing. Unlike in the class full addressing, here, size of the network identifier is variable. In this approach, the concept of subnet masking is used to determine the size of the network identifier.
    Example for an ordinary IP address is 207.115.10.64
    Ports
    Ports are represented by 16-bit numbers. Hence ports range from 0-65,525. The port numbers from 0 -1023 are restricted, because they are reserved for the use of well known protocol services such as HTTP and FTP.
    In a network, the end point, which two hosts communicate with each other are identified as ports. Most of the ports are assigned with an allocated task. These ports are identified by the port number as discussed earlier.
    So the functional behavior of the IP address and the port is as follows. Before sending the data packet from the source machine, source and destination IP addresses along with the respective port numbers are fed to the datagram. With the help of the IP address, datagram tracks the destination machine and reaches it. After the packet is unveiled,  with the help of the port numbers OS is directing the data to the correct application. If the port number is misplaced, OS is unaware which data to be sent to which application.
    So as a summary, IP address does the big task of directing the data to the intended destination, whereas port numbers determine which application to be fed with the data received. Eventually with the respective port number, allocated application admits the data through the reserved port

    Wednesday, June 20, 2012

    Network Basics - Explanation



    • Network - A network is a group of computers connected together in a way that allows information to be exchanged between the computers.
    • Node - A node is anything that is connected to the network. While a node is typically a computer, it can also be something like a printer or CD-ROM tower.
    • Segment - A segment is any portion of a network that is separated, by a switch, bridge or router, from other parts of the network.
    • Backbone - The backbone is the main cabling of a network that all of the segments connect to. Typically, the backbone is capable of carrying more information than the individual segments. For example, each segment may have a transfer rate of 10 Mbps (megabits per second), while the backbone may operate at 100 Mbps.
    • Topology - Topology is the way that each node is physically connected to the network (more on this in the next section).
    • Local Area Network (LAN) - A LAN is a network of computers that are in the same general physical location, usually within a building or a campus. If the computers are far apart (such as across town or in different cities), then a Wide Area Network (WAN) is typically used.
    • Network Interface Card (NIC) - Every computer (and most other devices) is connected to a network through an NIC. In most desktop computers, this is an Ethernet card (normally 10 or 100 Mbps) that is plugged into a slot on the computer's motherboard.
    • Media Access Control (MAC) address - This is the physical address of any device -- such as the NIC in a computer -- on the network. The MAC address, which is made up of two equal parts, is 6 bytes long. The first 3 bytes identify the company that made the NIC. The second 3 bytes are the serial number of the NIC itself.
    • Unicast - A unicast is a transmission from one node addressed specifically to another node.
    • Multicast - In a multicast, a node sends a packet addressed to a special group address. Devices that are interested in this group register to receive packets addressed to the group. An example might be a Cisco router sending out an update to all of the other Cisco routers.
    • Broadcast - In a broadcast, a node sends out a packet that is intended for transmission to all other nodes on the network.