Wednesday, March 27, 2019

Implementation of DHCP

Implementation of DHCP 

The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on UDP/IP networks whereby a DHCP server dynamically assigns an IP address and other network configuration parameters to each device on a network so they can communicate with other IP networks.

To configure dynamic IP address assignment on multiple VLAN with a unique DHCP server appliance on the network.
Two VLANs are configured on Switch0 with Router0 as default gateway :
  • VLAN 10 - Nework : 192.168.10.0/24 - Gateway : 192.168.10.1 (FA 0/0.10)
  • VLAN 20 - Network : 192.168.20.0/24 - Gateway : 192.168.20.1 (FA 0/0.20)
The unique DHCP server is located on a remote subnet with IP 172.16.24.2.
DHCP lab overview on packet tracer 5

DHCP configuration

Declare IP address pools on the DHCP management tab of the server like on the picture below. One pool has to be declared for each VLAN. Don't forget to configure the right network settings and default gateway (Router0 FA 0/0.10 and FA 0.0.20 IP address) for each VLAN.
DHCP server configuration on packet tracer 5.3




Configure router0 for DHCP forwarding to the DHCP server (DHCP relay)

Router(config)# interface FastEthernet0/0.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address 192.168.10.1 255.255.255.0
Router(config-subif)# ip helper-address 172.16.24.2

Router(config)# interface FastEthernet0/0.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address 192.168.20.1 255.255.255.0
Router(config-subif)# ip helper-address 172.16.24.2


Configure router0 for DHCP forwarding to the DHCP server (DHCP relay)

Router(config)# interface FastEthernet0/0.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address 192.168.10.1 255.255.255.0
Router(config-subif)# ip helper-address 172.16.24.2

Router(config)# interface FastEthernet0/0.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address 192.168.20.1 255.255.255.0

Router(config-subif)# ip helper-address 172.16.24.2

Tuesday, March 26, 2019

OSPF Protocol

OSPF Protocol


Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) standardized by the Internet Engineering Task Force (IETF) and commonly used in large Enterprise networks. OSPF is a link-state routing protocol providing fast convergence and excellent scalability. Like all link-state protocols, OSPF is very efficient in its use of network bandwidth.


CONFIGURING OSPF PROTOCOL
CLI FOR ROUTER 1 AND ROUTER 2 (contd)

CLI FOR ROUTER 2 (contd)


RIP Routing Protocol

RIP Routing Protocol 





Routing Information Protocol (RIP) is a dynamic protocol used to find the best route or path from end-to-end (source to destination) over a network by using a routing metric/hop count algorithm. This algorithm is used to determine the shortest path from the source to destination, which allows the data to be delivered at high speed in the shortest time.


Steps to implement RIP protocol : 

Step 1:Create a topology like this and do basic configurations ip address to the router interfaces ,ip address and default gateway to the host same as in topology.






In Router R1,



R1(config)#interface fastethernet 2/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit


R1(config)#interface serial 1/0
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#encapsulation ppp
R1(config-if)#no shutdown
R1(config-if)#exit


In Router R2,



R2(config)#interface serial 1/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#encapsulation ppp
R2(config-if)#no shutdown
R2(config-if)#exit




R2(config)#interface fastethernet2/0
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit



By default routers know directly connected network. 


Step 2:Check the routing table of  the router R1 and R2 by giving the command show ip route in privileged mode,



In Router R1,


R1#show ip route
Gateway of last resort is not set

C    10.0.0.0/8 is directly connected, FastEthernet2/0
C    20.0.0.0/8 is directly connected, Serial1/0




In Router R2,


R1#show ip route
Gateway of last resort is not set

C    30.0.0.0/8 is directly connected, FastEthernet2/0
C    20.0.0.0/8 is directly connected, Serial1/0




Step 3:Now,Run Rip protocols on R1 and R2 .What rip will do is, it will create a routing update by adding directly connected networks information and it will send to neighbor routers



Just add directly connected networks

In Router R1,


R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#network 20.0.0.0
R1(config-router)#exit



In Router R2,


R2(config)#router rip
R2(config-router)#network 20.0.0.0
R2(config-router)#network 30.0.0.0
R2(config-router)#exit




Now routers learns network information automatically through routing updates



Step 4:Now give show ip route command in R1 and R2 and check the routing table




In Router R1,

R1#show ip route

Gateway of last resort is not set

C    10.0.0.0/8 is directly connected, FastEthernet0/0
C    20.0.0.0/8 is directly connected, Serial2/0
R    30.0.0.0/8 [120/1] via 20.0.0.2, 00:00:28, Serial2/0
R1#

Here,network 30.0.0.0 learned by the router R1 via Serial 2/0 by routing update from R2,that will be reachable via 20.0.0.2(next hop).
[120/1]-120 Administrative distance of Rip,1-Reachable on one hop.


In Router R2,


R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is not set

R    10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:16, Serial2/0
C    20.0.0.0/8 is directly connected, Serial2/0
C    30.0.0.0/8 is directly connected, FastEthernet0/0

Here,network 30.0.0.0 learned by the router R2 via Serial 2/0 by routing update from R1,that will be reachable via 20.0.0.1(next hop).



Step 5:Now ping from the Host 10.0.0.10 to Host 30.0.0.10 by giving command 



ping 30.0.0.10 you will get,