Router

Router is a #Network Device operates at Network Layer# which forwards packets from source to destination based on network layers protocols (reading the source and destination IP Address). It will communicate with other routers using Routing Protocol# (dynamic routing) or be manually edited by network administrators (static routing) to maintain or update their Routing Table# that contain optimal routing paths. Of course Router needs to be connected to a network to establish either dynamic routing or static routing.

Note: Static routing can be a rather tedious networking administrative chore which is prone to human error and doesn’t really scale well.

We could access the Router console using either console port, Telnet or Secure Shell (SSH)#, or auxiliary port (not always available). Console port is used to connect terminal or a personal computer that runs terminal emulator software.

The physical structure of Router mainly consists of CPU, RAM, ROM, Flash, NVRAM and interfaces or ports. RAM not only stores the Routing Table#, but also holds Address Resolution Protocol (ARP) cache and fast-switching cache, performs packet buffering, and provides temporary memory for the running configuration file. NVRAM provides permanent storage for startup configuration file. Various versions of #Cisco Internetwork Operating System (IOS) are stored in Flash. ROM is where the power-on self test (POST) diagnostic software and bootstrap program (boot up partial IOS) located.

#important

When the router first boots up, it will perform POST which executes diagnostics from ROM on several components such as CPU, RAM, NVRAM etc. If there is no error encountered during the diagnostics, then the bootstrap program will be loaded into the RAM from ROM to locate IOS (usually located in Flash, but sometimes utilises Trivial File Transfer Protocol (TFTP) if it can’t find the operating system) and load the operating system into RAM. After that, the bootstrap program will try to load the startup configuration file stored in NVRAM, if any, or TFTP server, if there’s none, into RAM. Depending on the existence of the startup configuration file, the IOS will either load it into RAM as running-config file or enter Setup mode. User could choose to skip the Setup mode, and a default running-config file will be created.

Note: If there is a problem on locating IOS image, then ROM will provide a partial version of IOS. It will then help diagnose any problems and try to load a complete version of IOS elsewhere.

Note: To avoid the delays of searching startup configuration file on TFTP server, especially for the newly installed routers, disconnect all the WAN interfaces until a startup configuration file is obtained.

Router consists of two types of interfaces: LAN interfaces and WAN interfaces. LAN interfaces could be used to connect Router to the LAN which is typically connected with an RJ-45 jack (Unshielded Twisted Pair Cable (UTP)). For connecting Router to Switch, we use a Straight-Through Cable. In the case of Router to Router, we use a Crossover Cable. For PC to Router, we will use Roll-Over Cable. LAN interface could serve Ethernet# and Fast Ethernet.

WAN interfaces are for external connection, that is router to external network. It could serve different Wide Area Network (WAN) technologies such as Serial, Integrated Services Digital Network (ISDN) and Frame Relay.

Every interface or port belongs to a different network. This means that each connected interface represents exactly one network. Although Router itself is a complete entity, the network could only recognise its interfaces, which are independent of the Router in logical perspective. Thus, the Router could be referred in different IP Address depending on which network we are working on.

The process of forwarding the packet from its received port to the outgoing port is called switching. Despite the naming, Router will immediately drop the packet when it can’t figure the destination in its routing table maintained by itself. Otherwise, it will simply modify the destination Media Access Control Address (MAC) (the next-hop, can be another Router or the final destination) in the packet without touching the IP Address which defines the final destination. Though the primary forwarding decision will be based on the Routing Table# or routing information, assuming there is a mapping of logical address to its interface or port. If there is no path defined in the routing table to where the packet should be forwarded to, Router will redirect it to a default route if set (usually 0.0.0.0 in IPv4 Address and ::/0 in IPv6 Address), or simply discards it and sends Internet Control Message Protocol (ICMP)# Unreachable message to the source. Additionally, we can divide a physical interface into at most 65,535 logical interfaces using the command interface {interface-name} {interface}.{subinterface}. This is particularly useful in Virtual LAN (VLAN) routing.

It can be used to divide devices into Broadcast Domain#.

It is one of the solution that could prevent #Network Loop.

Very large, very high-speed Router is often used in #packet-switched network and formed the backbone of the modern Internet and global Wide Area Network (WAN) connectivity services. They are called the core routers. Those which sitting at the edges of the network and providing WAN access to everyone else are usually called the edge routers.

Both its Ethernet# and serial interface (e.g., HWIC-2T) could be assigned with #IP Address. Before adding the interface modules to the router, the best practice is to turn off the router if it is running and then switch it on after the installation. It is same in Cisco Packet Tracer environment.

There are routers integrate other network devices’ functionalities such as Integrated Service Router (ISR)#.

Links to this page
  • Wide Area Network (WAN)

    WAN is a network that covers a broad geographic area, which often uses service providers’ (SP) transmission facilities and operates on Physical Layer#, Data Link Layer# and Network Layer# to connect several #Local-Area Network (LAN). Several network devices could operate within WAN such as Switch# (at data link layer) and Router#.

  • Virtual LAN (VLAN)

    Since VLAN practically isolates devices in different VLANs, there is a need of routing in order for one device to communicate with other device reside in different VLAN. A naive approach would be to have separate links for each VLAN connected to a Router, and we can see that it will not scale well. Instead, we could utilise the capability of a modern router to divide a physical interface into multiple logical interfaces. After that, define the VLAN Trunking# standard used and its VLAN number using the command encapsulation {standard} {vlan-number}, and its subsequent subnet network address for the VLAN.

    We can apply access rules and provision services to the users of same or similar responsibilities without the need to change the topology of the network or changing the IP Address. Furthermore, VLAN can also create their own Broadcast Domain# without the help from Network Layer Network Device (modern #Switch and #Router). Basically, we could assign the hosts in a subnet# to be in the same VLAN. By using VLAN, we could have different broadcast domains even in a single switch so that broadcast flooding affects only those in the same grouping. If a link needs to handle more than one VLAN, #VLAN Trunking will be used.

  • Triple A (AAA)

    An AAA server should be attached to a network access point (whether it is a network access server, Router, or terminal server). The user will request access to the network, which the AAA server compares the user-supplied authentication data, forwarded by the network access point, with its database stored user-associated data to see if the information match. If it matched, Authroisation will take place to see what services do this user have access to, and later records their activities within the network.

  • TRS2251 Chapter 2: Introduction to Routing and Packet Switching
    Router (review Router Bootup Process)
  • Subnetting

    Router uses the subnet mask (32-bit number in the same format to #IPv4 Address) to distinguish the network, the subnet and the host address space. It has a consecutive 1s starting from the most significant bits (MSB) followed by 0s. The former represents the network bits, the latter shows the host bits. Currently, there are two ways to do subnetting:

  • Static Routing

    Static Routing is a static way to configure the #Routing Table of a Router#. It is static as not reactive to external changes such as topology changes. Usually, this is done manually by the network administrator in order to have some sort of control over route configuration. One particular example is using static route in a stub network, where there is only one route for the network to be accessed. We could simplify the network routing by using route summarisation which represents all similar routes with a single network (using network class’s default route# but smaller subnet mask is possible) if the routes share a single exit interface.

  • Routing Table Principles
    Every Router# makes its decision alone, based on the available Routing Table# (with routing# information) that it obtained.
  • Routing Table

    Routing Table is a data file in #Router that is used to store route information about directly connected networks and remote networks. Directly connected network is defined as a network that is directly attached to one of the router’s interface. Conversely, remote network is a network that is not directly attached to the router.

  • Routing Protocol

    Routing Protocol is a series of messages that #Router used to exchange information about whether particular links are up or down, and about other next-hop routers in the network. It is often used for dynamic routing to discover remote networks and ease the administrative and operational overhead of static routing. That being said, it doesn’t replace static routing in network administration, and it does burn more router resources such as CPU cycles, memory, and link bandwidth. Furthermore, it is less secure compare to static routing since the discovering phase includes reconnaissance on its neighbours’ information.

    The determined routing path will be later stored in the #Routing Table of the #Router. If there is a topological change in the network, the protocol will update the routing table accordingly and advertise it to its neighbours.

  • Routing Information Protocol (RIP)

    RIP only propagate the network address of known routes. There is no need to include subnet mask as part of the routing information since it could determine the subnet mask by just looking at the Address Classes default subnet masks. The boundary Router (the entry router to the RIP network) will summarise the RIP subnets from the internal network to the external network. This reduces the size of the Routing Table and resulted in a faster lookup in the routing table (single route can represent multiple routes). However, it comes at a cost of not able to support discontiguous network. Furthermore, if the subnet mask doesn’t match the class or a subnet of the class, RIP will not advertise the route to the other RIP enabled routers.

  • Recursive Route Lookup

    Recursive Route Lookup occurs when the #Router has to perform multiple lookups in the #Routing Table before forwarding the packet.

  • Open Shortest Path First (OSPF)

    There are five types of link-state packets that could be sent by an OSPF Router:

  • Network Loop
    Use 202207061800# to break up the networks into smaller segments
  • Network Device
  • Network Congestion

    Network Congestion is networking condition which could happen when there are too many sources sending too much data too fast for network to handle. This phenomenon could be observed when there are packet losses (due to buffer overflow at Routers and increasing end-to-end delays (due to queuing in router buffers). The result is the unfairness and poor utilisation of network resources due to resources used by dropped packets before they were lost, retransmissions, and poor resource allocation at high load.

  • Multiprotocol Label Switching (MPLS)

    There are three primary equipment types within a MPLS network: **customer premises equipment (CPE), provider edge (PE), and provider routers (P). CPE will be on the customer site, and all the traffic leaving the local site is routed through it. PE, could be a high-end switch or router, is at the entry point of the service provider’s network. P locates in the core of the network, which will be responsible on forwarding packets based on the labelling.

    Within the WAN that implements MPLS, all packets will be assigned a label by a Router (just before entering the MPLS network), based on IP destinations, IP sources, Quality of Service (QoS)#, VPN membership or engineered specific routes, in order to differentiate from each other in the MPLS network. The packet will then be forwarded to the MPLS core routers, and they will apply appropriate services and forward it based on its label. As the packet reached the destination edge of the MPLS network, the label will be removed from the packet. They are usually 4 bytes (32 bits) long.

  • Media Access Control Address (MAC)

    MAC address is a manufacturer-allocated ID number attached to a device (a computer or a network device such as 202207061800). It is permanent and unique, unlike 202206151453, meaning you can identify a specific device across the network by referring to its MAC address. An example to the MAC address: 89-F1-C3-28-3A-FF.

  • Link/Carrier Availability

    Link/Carrier Availability usually refers to the design practice that home multiple servers, establish multiple link connections between Switch and Router, and/or subscriptions to several service providers.

  • Link-State Routing Protocol

    In Link-State Routing, aka Shortest Path First (SPF), each #Router needs to know the entire topology of the network with the aid of a database. The database stores link states, that is information about the state of a router’s links, which include IP Address, type of network (Ethernet or serial point-to-point link), cost, and neighbours. This database will be identical to all routers using the same protocol albeit processed independently. The #exchange of topology information (called flooding) only happened upon the initial set-up of the network and when there is a topological change in the network (new router added or router is removed). Since only information specific to the change needs to be propagated, combined with the hierarchical model used by the protocol, it limits the scope of the route changes that occur and provides better scaling than Distance Vector Routing Protocol. Though there still a need for keep alive message between router and its neighbours to detect potential topological changes.

  • Internet Group Management Protocol (IGMP)

    IGMP is an #Internet Protocol Suite (TCP/IP) protocol used by hosts and adjacent Routers# to establish multicast IPv4 Address# group memberships.

  • Integrated Service Router (ISR)

    ISR is a kind of #Router that combine the functionalities of Switch#, wireless access point and router. It is widely adopted for the home Local-Area Network (LAN).

  • IP Security (IPsec)

    There are two protocol modes available in IPsec: transport mode and tunnel mode. Transport mode provides End-to-end security# which only protects the IP packet payload. Tunnel mode provides gateway-to-gateway (usually Router owned by the same corporation) security which protects the entire IP packet. However, the traffic after the gateway will not be protected under tunnel mode, and it can’t be set up by normal user. The authentication and encryption will be done slightly different in each mode. In transport mode, authentication and encryption will only be done on the payload (could be susceptible to Traffic Analysis#) and sometimes include a portion of IP header (if using AH only) and IPv6 extension headers. In tunnel mode, authentication and encryption must be done on the entire packet (in AH only tunnel mode SA, it will authenticate a portion of IP header and IPv6 extension headers too). Both mode could be stacked to each other in order to satisfy four cases of SA.

  • IP Address

    Some interfaces, such as Network Interface Card (NIC)# and Router’s# Ethernet or serial interface, are could be assigned with an IP Address.

    The address could be assigned via static method or dynamic method#. For general case, devices that don’t move too much such as servers, Router# and Switch# are assigned with static IP address. Mobile devices like laptop and smartphone should be using dynamic method to get the IP address instead.

  • Hot Standby Router Protocol (HSRP)

    HSRP is a Cisco proprietary First Hop Redundancy Protocol in cases of Router# failures which causes problems in routing. The default hello interface is 3 seconds, and the default hold time is 10 seconds.

  • Hierarchical Network

    Networks could divide Router or Switch into several logical grouping#. In turn, this simplifies the routing updates as they will be confined within the grouping, and drastically reduces the traffic overhead. Notice its similarity to VLAN.

  • Forwarding Equivalence Classes (FEC)

    FEC is a specific path through the network of #Multiprotocol Label Switching (MPLS) provider routers and is equal to the destination network, stored in an IP routing table.

  • Equal Cost Load Balancing

    Using Equal Cost #Load Balancing, the Router will send packets over multiple exit interfaces listed in the Routing Table.

  • Dynamic Host Configuration Protocol (DHCP)

    By using the command ip helper-address {ip-address} on a Router, the router will overrule broadcast rule and get the IP address from the DHCP server instead via DHCP relay agent.

  • Distance Vector Routing Protocol

    In Distance Vector Routing, the #Routers share their Routing Table with their direct neighbour(s) (often termed “routing by rumour”) periodically. The table stores routing information which describes the direction (router and the corresponding port) where the packets should be forwarded to and the distance using one of the metrics (See in #Routing Protocol). When a router receives the information via this method, it will undergo a process called distance accumulation, that is, increments the distance by one. By this way, routers within the network are ignorant to its topology. The process is usually done by the Bellman-Ford algorithm.

  • Default Route

    Default Route is a route that will match all packets when the packet’s destination IP Address# is not known. It reduces the size of the Routing Table#. Typically, Default Route is used to connect edge Router# to Internet Service Provider’s (ISP)# network.

  • Collision Domain
  • Cisco OSPF Router Configuration

    To enable #Open Shortest Path First (OSPF) to a #Cisco router, run the command router ospf {process-id} to enter Router Configuration Mode with the process ID ranging from 1 to 65,535. A Router# can run multiple OSPF interfaces (differ by the process ID) at the same time.

  • Broadcast Domain

    Broadcast Domain is a network segment where a device can receive all broadcast messages from the members of the segment. It is usually segmented by Network Layer# Network Device# (modern #Switch and #Router).

  • Autonomous System (AS)

    AS is a #logical network segment that contains several Network Devices# especially Routers# under a common administration sharing a common routing strategy. An AS is typically identified using 16-bit autonomous system number (ASN) given by the American Registry of Internet Numbers (ARIN), an Internet Service Provider (ISP) or a network administrator. It is a basic unit in Routing inside AS involves #IGP whereas routing outside AS involves #EGP.

  • Asynchronous Transfer Mode (ATM)

    ATM is a Wide Area Network (WAN) technology that support both #Packet Switching and #Circuit Switching functionalities. It operates at #Data Link Layer. The basic components in an ATM network are ATM switches#, which is responsible for moving cells through the network, and ATM endpoints, such as workstations, Router, data service units (DSU) etc.

  • Administrative Distance (AD)

    AD is a numeric value that specifies the preference of a particular route source# which range from 0 to 255. The lower the value, the more trust the Router will be on the source. The following table shows the AD value for each route source.

#networking #hardware #important