Tuesday 30 October 2018

What are the classes of IP Routing?



Routing protocol classes

   There are three classes of routing protocols:

·          Distance vector
·         Link state
·         Hybrid



Distance vector 

the distance vector protocol is used to find the best path to a remote network by judging distance. In RIP routing, each instance where a packet goes through a router is called a hop, and the route with the least number of hops to the network will be considered the best one. The vector indicates the direction of the remote network. RIP is a true distance-vector routing protocol and periodically sends out the entire routing table to directly connected neighbors.

Link state

Link-state protocols also called shortest-path first protocols, each router creates three separate tables. One of their tables keeps track of directly attached neighbors, one determines the topology of the entire internetwork, and one is used as the routing table. Link-state routers know more about internetwork than any distance-vector routing protocol ever could. OSPF is a true link-state routing protocol. Link-state protocols send updates containing the state of their own links to all other directly connected routers on the network. And this is then propagated to their neighbors.  
              

 Hybrid 

 Hybrid protocols use aspects of both distance-vector and link-state protocols, and EIGRP is a   great example- it is typically just called EIGRP an advanced distance-vector protocol.               

Monday 29 October 2018

What is IP Routing? What is routing and routed protocol?



 IP Routing

IP routing is basically the process of moving packets from one network to another network using routers.


Here is the list of all the default routing labs and theories
1.       






Routing protocols

Router use routing protocol to dynamically find all the networks within the great internetwork and to ensure that all router have the same routing table, routing protocols are also employed to determine the best path a packet should through an internetwork to get its destination most effectively. RIP, RIPv2, OSPF, and EIGRP are the most common routing protocols.



Routed protocols

Routed protocols can be used to send user data (packets) through the established enterprise. Routed protocols are assigned to an interface and determine the method of packet delivery. E.g. IP and IPv6.

The three type of routing method.

Ø  Static routing
Ø  Default routing
Ø  Dynamic routing

Static Routing

Static routing is the process that ensure when you manually add routes in each router’s routing table. There are the advantages and disadvantages of Static Routing.

Here the advantages:

·         There is no overhead on the router CPU.
·         There is no bandwidth usage between routers.
·         It adds security because of you, the administrator, can be very exclusive and choose to allow routing access to certain networks only.

And here are the disadvantages:

·         The administrator is must have a vault-tight knowledge of the internetwork and how each router is connected in order to configure routes correctly. If you don’t have a good, accurate map of your internetwork, things will get very messy.
·         If you add a network to the internetwork, you have to tediously add a route to it on all routers by hand.
·         It’s just not feasible to use it in most large networks because maintaining it would be a full-time job in itself.

Here’s the command syntax you use to add a static route to a routing table from global

 ip route    [destination network] [mask] [next-hop address or exit interface­] [administrative distance] [permanent]

ip routethe command used to change the static route.

Destination network- the network you’re placing in the routing table

Mask-   the subnet mask being used on the network

Next-hop address- this is ip address o the next-hop router that will receive packets and forward them to the remote network.

Exit interface- used in place o the next-hop address if you want, and show up as a directly connected route.

Administrative- distance by default, static routes have an administrative distance o 1 or 0. Next-hop AD is 1, and exit interface AD is 0.

Permanent if the interface is shut down or the router can’t communicate to the next-hop router, the route will automatically discarded from the  routing table by default. Choosing the permanent option keeps the entry in the routing table no matter what happens.



Static routing config:



 Topology
                                            


    
GOAL:
·         Design topology and assign IP addresses as per the diagram.
·         Configure static routing on Router Luke, mark, and john. And ensure that all the LAN interfaces can ping to each other.

LUKE#show ip interface brief


Interface              IP-Address         OK? Method Status                Protocol
Serial3/0              10.1.1.1              YES manual up                           up
Loopback0          192.168.100.50  YES manual up                           up



 MARK#show ip interface brief


Interface              IP-Address           OK? Method Status                Protocol
Serial3/0              10.1.1.2                YES manual up                           up
Serial3/1              11.1.1.2                 YES manual up                           up
Loopback0          192.168.150.75     YES manual up                           up



JOHN#show ip interface brief
Interface              IP-Address            OK? Method Status                Protocol
Serial3/1              11.1.1.1                  YES manual up                         up
Loopback0           192.168.200.100    YES manual up                        up
LUKE(config)#ip route 192.168.150.0 255.255.255.0 10.1.1.2
LUKE(config)#ip route 192.168.200.0 255.255.255.0 10.1.1.2
LUKE(config)#ip route 11.0.0.0 255.0.0.0  10.1.1.2

MARK(config)#ip route 192.168.100.0 255.255.255.0 10.1.1.1
MARK(config)#ip route 192.168.200.0 255.255.255.0 11.1.1.1

JOHN(config)#ip route 192.168.100.0 255.255.255.0 11.1.1.2
JOHN(config)#ip route 192.168.150.0 255.255.255.0 11.1.1.2
JOHN(config)#ip route 10.0.0.0 255.0.0.0 11.1.1.2


LUKE#show ip route static
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

S     11.0.0.0/8 [1/0] via 10.1.1.2
S     192.168.150.0/24 [1/0] via 10.1.1.2
S     192.168.200.0/24 [1/0] via 10.1.1.2




MARK#show ip route static
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

S     192.168.100.0/24 [1/0] via 10.1.1.1
S     192.168.200.0/24 [1/0] via 11.1.1.1


JOHN#show ip route static
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

S     10.0.0.0/8 [1/0] via 11.1.1.2
S     192.168.100.0/24 [1/0] via 11.1.1.2
S     192.168.150.0/24 [1/0] via 11.1.1.2


LUKE#ping 192.168.200.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.200.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/48/64 ms

LUKE#ping 192.168.150.75
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.150.75, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/24/28 ms

LUKE#ping 11.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/25/36 ms


MARK#ping 192.168.100.50
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.50, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/14/24 ms

MARK#ping 192.168.200.100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.200.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/12/28 ms


JOHN#ping 192.168.100.50
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.50, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/32/40 ms

JOHN#ping 192.168.150.75
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.150.75, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/20/20 ms

JOHN#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/45/60 ms


Default Routing

Default route is used by IP to forward any packet with a destination not found in the routing table, which is why it is also called a gateway of last resort. Also can be used at end location where is only one exit path for any destination (internet).
Default routes help in reducing the size of your routing table. It’s a last preferred route in the routing table.



Dynamic routing

Dynamic routing is used to find networks and update routing tables on routers dynamically. Its easier than using static or default routing, but it will cost you in term o router CPU processing and bandwidth on network link.

Advantages of dynamic over static:

·         There is no need to know the destination networks.
·         Need to advertise the directly connected networks.
·         Update the topology change dynamically
·         Administrative work is reduce.
·         Used for large organization.
·         This is easier than using static or default routing.

 Administrative distance

The administrative distance (AD) is used to rate the trustworthiness of routing information received on a router from a neighbor routers. An administrative distance is an integer from 0 to 255, where 0 is the most trusted and 255 means no traffic will be passed via this route.

Default administrative distance
Connected interface   = 0
Static route                 =1
EIGRP                        =90
OSPF                          =110
RIP                              =120
External EIGRP          =170
Unknown                     = 255 (this route will never used).

The OSI Model

The OSI Model Advantages of the reference model
It divided the network communication process into smaller and simpler components, thus aiding component development, design and troubleshooting.
It allows multiple-vendor development through standardization of network components.
It encourages industry standardization by defining what functions occur at each layer of the model.
It allows various types of network hardware and software to communicate.
It prevent changes in one layer from affective others, so it doesn’t hamper development.

The OSI Reference model
The OSI has seven different layers, divided into two groups. The top three upper layers define how the applications within the end station will communicate with each other and with users. The bottom four layers define how data is transmitted end to end.


 The application layer

Application layer provides a user interface, this layer of the OSI model mark the spot where users actually communicate to the computer.
The application layer is also responsible for identifying and establishing the availability of the intended communication partner and determines whether sufficient resources for the intended communication exist. It’s important to remember to remember that the application layer is acting as an interface between the actual application programs.
Here are a few good examples of these kinds of events:

  File transfers
 Email
Enabling remote access
 Network management activates
Client/server processes
 Information location
Many network applications provide service for communication over enterprise network.


  Presentation layer

Presentation layer gets its name from its purpose: it presents data to the application layer and in responsible for data compression, decompression, encryption, decryption and code formatting. It’s an OSI model’s translator, one very effective way of ensuring a successful data transfer is to convert the data into a standard format before transmission. Presentation layer ensure that data transferred from the application layer of one system can be read by the application layer of another one.

The session layer

The session layer is responsible for setting up, managing, and dismantling sessions between presentation layer entities and keeping user data separate. It coordinates communication between systems and serves to organize their communication via three different modes: simplex, half-duplex and full-duplex.

Simplex:  is simple one-way communication, kind of like saying something and not getting a reply.

Half-duplex: is actual two-way communication, but is can take place in only one direction at a time. It’s like walkie-talkie.

Full duplex: is exactly like a real conversation where device can transmit and receive at the same time. Like a telephone conversation.

 Transport layer

The transport layer segment and reassemble data into a data stream. They provide end-to-end data transport services and can establish a logical connection between the sending host and destination host on an internetwork. Transport layer is responsible for providing mechanism for multiplexing upper-layer application, establishing session, and tearing down virtual circuits. The transport layer can either be connectionless or connection-oriented. Transport layer use two types of protocol TCP and UDP.

Feature of TCP.
         
flow control
  Flowing control prevent a sending host on one side of the connection from overflowing the                  buffer in the receiving host.
The segments delivered are acknowledged back to the sender upon their reception.
 Any segments not acknowledge are retransmitted.
 Segments are sequenced back into their proper order upon arrival at their destination.
A manageable data flow is maintained in order to avoid congestion, overloading and data loss.


Connection-oriented connection
 In reliable transport operation, a device that wants to transmit sets up a connection-                       oriented communication with a remote device by creating a session is called a setup or three-way handshake.
The first “connection agreement” segment is a request for synchronization.
The second and third segments acknowledge the request and establish  connection parameters.
The final segment is also an acknowledgment. It notifies the destination host that the connection agreement has been accepted and the actual connection has been established.
A service is considered connection-oriented if it has the following characteristics:
A virtual circuit is set up(e.g., call setup   or three-way handshake).
Its uses sequencing.
Its use acknowledgements.
Its use flow control. The types of flow control are buffering, windowing and  congestion avoidance.

Windowing

The quantity of data segments measured in bytes that the transmitting machine is allowed to send without receiving an acknowledgement for them is called a windowing.


Acknowledgment

Reliable data delivery ensures the integrity of the stream of data sent from one machine to the other through s fully functional data link. It guarantees that the data won’t be lost or duplicated. This is achieved through something called positive acknowledgment with Retransmission.

Network layer

The network layer also called layer 3 manages device addressing, tracking the location of devices on the network, and determines the best way to move data. Two types of packets are used at the network layer: data packets and route packets.

 Data packets
It’s used to transport user data through the internetwork. Protocols used to support data traffic are called routed protocols; examples ipv4 and ipv6.
 Routed updates packets
Used to update neighboring routers about the networks connected to all routers within the internetwork, protocols that send route update packets are called routing protocols ; (e.g. RIP, RIPv2, ISIS , EIGRP and OSPF).
The Data link layer

The data link layer provides the physical transmission of the data and handles error notification; this means that the data link layer will ensure that message is delivered to the proper device on a LAN using hardware address. The IEEE Data link layer has two sub layers:
 Media access control (MAC) 802.3
Define how packets are placed on the media. Contention media access is “first come/first served”
 Logical link control (LLC) 802.2
Responsible for identifying networks layer protocols and then encapsulating them.

 Physical layer

Physical layer does two things: it send bits and received bits. The physical layer specifies the electrical, mechanical, procedural and functional requirement for activating, maintain, deactivating a physical link between end system. This layer is also where you indentify the interface between the data terminal equipment (DTE) and the data communication equipment (DCE)

 Data circuit-terminating equipment.
The DCE is usually located at the service provider. While the DTE is attached device.

 Data terminal equipment
The service available to the DTE is most often accessed via a modern or channel service unit (CSU/DSU)..



Sunday 28 October 2018

IPv4 Addressing


IPv4 addressing

It is a numeric identifier assigned to each machine on an IP network. It designates the specific location of a device on the network. An IP address is a software address not a hardware address­. IP address was designed to allow hosts on one network to communicate with a host on a different network.

IP Terminology


Bit – A bit is one digit, either a 1 or a 0.

Byte- a byte is 7 or 8 bits, depending on whether parity is used.

Octet- an octet, made up of 8 bits, is just an ordinary 8-bit binary number.

Network address- this is the designation used in routing to send packets to a remote network.

Broadcast address- the address used by application and host to send information to allow nodes on a  network is called the Broadcast address.

The Hierarchical IP Address Scheme  

An IP address consists o 32 bits of information. These bits are divided into four sections, referred to as octets or byte, and each containing 1 byte (8 bits). You can depict an IP address using one of three methods: Dotted-decimal.


Network Address Range: Class A

The designers of the IP address scheme said that the first bytes in a Class A network address must always be off or 0. This means a Class A address must be between 0 and 127 in the first byte, inclusive.

·         Network Address Range: Class B

Class B network is defined when the first byte is configured from 128 to 191.

·         Network Address Range : Class C

An IP address that starts at 192 and goes to 223.

·         Network Address Range: Classes D and E.

The addresses between 224 to 255 are reserved for Class D and E networks. Class D (224-239) is used or multicast addresses and Class E (240-255) for scientific purposes.

Network Addresses: Special Purpose

Some IP addresses are reserved for special purpose, so network administrator can’t ever assign these addresses to nodes.Address function Network 127.0.0.1 reserved for loopback tests. Designates the local node and allows that node to send a test packet to self without generating network traffic.
Node address of all 0s interpreted to mean “network address” or any host on specified network.
Node address of all 1s interpreted to mean “all nodes” on the specified network; for example, 128.2.255.255 means “all nodes” on network 128.2. (Class B address).

Enter IP address set all 0s used by Cisco routers to designate the default route. Could also means “any network”.

Enter IP address set to all 1s (same broadcast to all nodes on the current network; 255.255.255.255) sometimes called an “all 1s broadcast” or limited broadcast.

Private IP address

The people who create the IP addressing scheme also created what we call private IP addresses. These addresses can be used on a private network, but they’re not routable through the Internet.
This is designed for the purpose of creating a measure of well-needed security, but it also conveniently save valuable IP address space.

If every host on every network had to have real routable IP addresses, we could have run out of IP addresses to hand out years ago. But by using private IP addresses, ISPs, corporation, and home users only need a relatively tiny group of bona fide IP addresses to connect their networks to the Internet. This is economical because they can use private IP addresses on their inside networks and get along just fine.

To accomplish this task, the ISPs and the corporation- the end user, no matter who they are-need to use something called Network Address Translation (NAT).

Address Class Reserved Address Space

Class A: 10 . 0 . 0 . 0 through 10 . 255 . 255 . 255
Class B: 172 . 16 . 0 . 0 through 172 . 31 . 255 . 255
Class C: 192 . 168 . 0 . 0 through  192 . 168 . 255 . 255









What is Virtual Router Redundancy Protocol (VRRP)? How to configure Virtual Router Redundancy Protocol (VRRP)?

 Virtual Router Redundancy Protocol (VRRP) is a gateway redundancy networking protocol used to create a virtual gateway similar to HSRP . VR...