Tuesday 24 September 2019

IGMP (Internet Group Management Protocol)

IGMP

IGMP (Internet Group Management Protocol) is a networking protocol that is used with multicast by hosts and routers. Hosts that want to receive traffic from a certain multicast group with a router using IGMP. There are three versions of IGMP; versions 1, 2, and 3.




Enable communication between a router and connected hosts. 
The two most important goals of IGMP are as follows.
1. To inform a local multicast router that a host wants to receive multicast traffic for a specific group.
2. To inform local multicast routers that a host wants to leave a multicast group.

IGMP Versions

IGMP v1
IGMP v2 (by default)
IGMP V3


Internet Group Management Protocol version 1

IGMPv1 uses two specific message structures
Report message
                          Used by the client to join the group
Query messages
                          Used by router to see if the member of the group still exists
                          Always sent to 224.0.0.1 by multicast routers.


Internet Group Management Protocol (contend)




  • R1 sends periodic IGMP queries to the 224.0.0.1 address.
  • If only `one member group per subnet sends the IGMP report message to the router – in this case, H2
  • While the others host H1 and H3 suppress theirs.
  • IGMP query interval is 60 seconds and 180 delay timers.





 Internet Group Management Protocol version 2
 IGMPv2 brought several improvements.
  1. leave group messages from the host to the router. (apart from report and query)
  2. tunable timers
  3. queries election
  4. group-specific queries


IGMPv2 leave group 




When a host wants to leave the group they will send an IGMP  leave message to 224.0.0.2
Then the router will query the IGMP query message to 224.0.0.1 (all host multicast address)
As long as at least one client is in this group. The switch will forward the IGMP membership report back to the first hop router.

Group specific queries
  • In version 1 query is sent to all hosts on 224.0.0.1
  • In version 2 query was generated to only devices in that specific group

Internet Group Management Protocol version 3



Allows us to do source-specific multicast V1/v2 only support group specific multicast (*, g) join any source / specific group)\ V3 supports source-specific multicast (s,g) join.

 


 


Instagram

Facebook


Twitter



LINKEDIN








Monday 10 June 2019

What is Multicast? How its works?



In this chapter, we’ll see the basics of multicast. 

First, let’s talk about what multicast is… well in simple words we can say answer multicast is sending a message from a single source to selected multiple destinations.


There are three types of traffic that we can choose from for our networks:

Unicast
Broadcast
Multicast


Unicast If we want to send a message from one source to one destination, we use unicast.

broadcast If we want to send a message from one source to everyone, we use broadcast.

multicast if we want to send a message from one source to a group of receivers? Then we use multicast.

Why do we want to use multicast instead of unicast or broadcast? 

Multimedia using Unicast 









The application sends one copy of each packet to every client. Used when only a few clients need to access the application. If the message has to be sent to a large group, the same information has to be carried multiple times, even on the same link. Bandwidth usage is proportional to number of users. Routers make individual routing decisions based on each pair of source and destination.


Multimedia traffic using broadcast


The application sends only a copy of each packet using a broadcast. All end hosts need to process even if they don’t want to. Not recommended implantation for applications delivering data, voice, or video to multiple receivers.

Multimedia traffic using multicast

The most efficient solution – in between broadcast and unicast. The server sends one copy of each packet to a special address that represents multiple clients. The server sends out a single data stream to multiple clients.

Advantage of multicast

It saves bandwidth and controls network traffic by forcing the network to replicate packets only when necessary. Reduce network bandwidth consumption and host processing. Control network traffic and reduce server and CPU loads. 


Multicast Components

first, we use a designated range of IP addresses that is used for multicast traffic. We use the class D range for this: 224.0.0.0 to 239.255.255.255. These addresses are only used as destination addresses, but not as source addresses. The source IP address will be the device that is sending the multicast traffic.

we use IGMP ( internet group management protocol ) for hosts to tell the routers when and which multicast traffic they want to receive.

To help the switch figure out where to forward multicast traffic, we can use IGMP Snooping. 


we use a multicast routing protocol: why? we see in the next chapter.
  • DVMRP (Distance Vector Multicast Routing Protocol)
  • MOSPF (Multicast Open Shortest Path First)
  • PIM (Protocol Independent Multicast)
how does multicast work?

step 1- Multicast server application configured with layer 3 address (class- D)
step 2- Multicast application installed on all the hosts.
step 3- Indicate the router that they want to receive multicast traffic for the group (IGMP)
step 4- Multicast routing protocol forward multicast server. (PIM)
step 5- Calculate layer 2 multicast MAC address (IGMP Snooping/ CGMP)

This is basis of multicast, 
Thanks for reading 









 


 


Instagram

Facebook


Twitter



LINKEDIN








Thursday 6 June 2019

Network Address Translation (NAT)


Network address translation

NAT is the method of translation of private IP address into public IP address. In order to communicate with internet we must have registered public IP address.


Address translation was originally developed to solve two problems:
  1. To handle a shortage of IPv4 addresses
  2.  Hide network addressing schemes.

Private address range

There are certain addresses in each class of IP address that are reserved for private networks. These addresses are called private addresses.

Class A    10.0.0.0             TO 10.255.255.255
Class B    172.16.0.0         TO 172.31.255.255
Class C    192.168.0.0       TO 192.168.255.255


Types of NAT :-

Static NAT
Dynamic NAT
Port address Translation (PAT)


Static NAT- one to one mapping done manually for every private IP need on registered IP address (one to one)

Dynamic NAT- one to one mapping done automatically For every private IP needs one registered IP address (one to one)

Port address translation ( Dynamic NAT Overload )- Allows thousands of users connect to the internet using only one real global IP address. Maps many to one by suing different ports. PAT is the real reasons we are haven’t run out of valid IP address on the internet.

 


 


Instagram

Facebook


Twitter



LINKEDIN








Thursday 4 April 2019

Route filtering passive interface OSPF

Passive interface


Cisco IOS provides several ways to control updates traffic. Passive interface, distribute list, prefix list route maps. In this section we take look at passive interface in RIPv2, EIGRP, and OSPF.

Passive interface command is used in all routing protocol to disable sending updates out from a specific interface. However the command behavior varies from one protocol to another.

Passive interface in OSPF

In OSPF passive-interface, work just like it does with EIGRP. OSPF do not send any hello messages on passive interface its means no neighborship but still advertises about the connected subnet if matched with an OSPF network command.

lets see the configure:


Topology:


Goal:



  • configure the topology as per the diagram 
  • configure ospf and advertise the network
  • configure interface serial 4/1 passive interface 



R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial4/0                    1.1.1.1         YES manual up                    up

R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial4/0                    1.1.1.2         YES manual up                    up
Serial4/1                    2.1.1.1         YES manual up                    up


R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial4/1                    2.1.1.2         YES manual up                    up
Loopback0              13.0.0.1        YES manual up                    up
Loopback1              13.0.1.1        YES manual up                    up
Loopback2              13.0.2.1        YES manual up                    up
Loopback3              13.0.3.1        YES manual up                    up
Loopback4              13.0.4.1        YES manual up                    up


R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
R1(config-router)#exit

*Apr  4 14:25:00.243: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial4/0 from LOADING to FULL, Loading Done

R2(config)#router ospf 1
R2(config-router)#network 1.0.0.0 0.255.255.255 area 0

*Apr  4 14:25:00.403: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial4/0 from LOADING to FULL, Loading Done

R2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R2(config-router)#network 2.0.0.0 0.255.255.255 area 0
R2(config-router)#exit

*Apr  4 14:27:09.607: %OSPF-5-ADJCHG: Process 1, Nbr 13.0.4.1 on Serial4/1 from LOADING to FULL, Loading Done


R3(config)#router ospf 1
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#network 13.0.0.0 255.0.0.0 area 0
R3(config-router)#network 2.0.0.0 0.255.255.255 area 0
R3(config-router)#exit

*Apr  4 14:27:09.567: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial4/1 from LOADING to FULL, Loading Done

router 2 facing router 1 established connection  

router 2 facing router 3 established connection


  
lets see the routing table

R1#show ip route ospf
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

O     2.0.0.0/8 [110/128] via 1.1.1.2, 00:07:57, Serial4/0
      13.0.0.0/32 is subnetted, 5 subnets
O        13.0.0.1 [110/129] via 1.1.1.2, 00:07:57, Serial4/0
O        13.0.1.1 [110/129] via 1.1.1.2, 00:07:57, Serial4/0
O        13.0.2.1 [110/129] via 1.1.1.2, 00:07:57, Serial4/0
O        13.0.3.1 [110/129] via 1.1.1.2, 00:07:57, Serial4/0
O        13.0.4.1 [110/129] via 1.1.1.2, 00:07:57, Serial4/0
O     20.0.0.0/8 [110/65] via 1.1.1.2, 00:07:57, Serial4/0
O     30.0.0.0/8 [110/129] via 1.1.1.2, 00:07:57, Serial4/0



R2#show ip route ospf
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

O     10.0.0.0/8 [110/65] via 1.1.1.1, 00:11:44, Serial4/0
      13.0.0.0/32 is subnetted, 5 subnets
O        13.0.0.1 [110/65] via 2.1.1.2, 00:19:36, Serial4/1
O        13.0.1.1 [110/65] via 2.1.1.2, 00:19:36, Serial4/1
O        13.0.2.1 [110/65] via 2.1.1.2, 00:19:36, Serial4/1
O        13.0.3.1 [110/65] via 2.1.1.2, 00:19:36, Serial4/1
O        13.0.4.1 [110/65] via 2.1.1.2, 00:19:36, Serial4/1
O     30.0.0.0/8 [110/65] via 2.1.1.2, 00:19:36, Serial4/1


(configure passive interface serial 4/1 on router 2 facing router 3)

R2(config)#router ospf 1
R2(config-router)#passive-interface serial 4/1

*Apr  4 14:48:54.387: %OSPF-5-ADJCHG: Process 1, Nbr 13.0.4.1 on Serial4/1 from FULL to DOWN, Neighbor Down: Interface down or detached

R2(config-router)#end


R1#show ip route ospf
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

O     2.0.0.0/8 [110/128] via 1.1.1.2, 00:13:49, Serial4/0
O     20.0.0.0/8 [110/65] via 1.1.1.2, 00:13:49, Serial4/0

R2#show ip route ospf
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

O     10.0.0.0/8 [110/65] via 1.1.1.1, 00:17:28, Serial4/0

router 3 2.1.1.2 is sending hello messages but router 2 2.1.1.1 is not responding 



 


 


Instagram

Facebook


Twitter



LINKEDIN








Friday 22 March 2019

BGP Authentication


A router authenticates the source of each routing update packet that it receives. Many routing protocols support authentication like OSPF, EIGRP, ISIS, BGP, and RIPv2.



Border gateway protocol (BGP) support authentication mechanism using message digest 5 (MD5) algorithms. When authentication I enabled, any TCP segment belonging to BGP exchange between the peers is verified and accepted only if authentication is successful. If the authentication fails, the BGP neighbor relationship goes down (not be established).








lets see the configuration:-

Topology :

Goal:
  • configure the topology as per the diagram 
  • configure basic iBGP 
  • configure MD5 authentication use password internetworks


R1#show ip interface brief
Interface                   IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
FastEthernet1/0        unassigned      YES unset  administratively down down
GigabitEthernet2/0  unassigned      YES unset  administratively down down
Serial3/0                     1.1.1.1         YES manual up                    up


R2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                         up
FastEthernet1/0        unassigned      YES unset  administratively down down
GigabitEthernet2/0    unassigned      YES unset  administratively down down
Serial3/0                      1.1.1.2         YES manual up                      up



R1(config)#router bgp 65011
R1(config-router)#neighbor 1.1.1.2 remote-as 65011
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#no synchronization
R1(config-router)#exit



R2(config)#router  bgp 65011
R2(config-router)#neighbor 1.1.1.1 remote-as 65011

*Mar 22 13:44:19.255: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up


R2(config-router)#network 1.0.0.0
R2(config-router)#network 10.0.0.0
R2(config-router)#no synchronization
R2(config-router)#exit


R1# show ip bgp
BGP table version is 3, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 * i 1.0.0.0          1.1.1.2                  0    100      0 i
 *>                   0.0.0.0                  0         32768 i
 *>  10.0.0.0         0.0.0.0                  0         32768 i

R1#show ip bgp summary
BGP router identifier 10.1.1.1, local AS number 65011
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
3 path entries using 240 bytes of memory
2/1 BGP path/bestpath attribute entries using 272 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 800 total bytes of memory
BGP activity 2/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.2         4        65011      10      10        3    0    0 00:04:49        1



R2#show ip bgp
BGP table version is 4, local router ID is 20.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found


     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.0.0.0          0.0.0.0                  0         32768 i
 * i                  1.1.1.1                  0    100      0 i
 *>i 10.0.0.0         1.1.1.1                  0    100      0 i

R2#show ip bgp summary
BGP router identifier 20.1.1.1, local AS number 65011
BGP table version is 4, main routing table version 4
2 network entries using 288 bytes of memory
3 path entries using 240 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 800 total bytes of memory
BGP activity 2/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4        65011      11      10        4    0    0 00:05:18        2






R1(config)#router bgp 65011
R1(config-router)#neighbor 1.1.1.2 password internetworks
R1(config-router)#neighbor 1.1.1.2 version 4
R1(config-router)#end

R1#

*Mar 22 13:54:42.691: %TCP-6-BADAUTH: No MD5 digest from 1.1.1.2(179) to 1.1.1.1(47927) tableid - 0

*Mar 22 13:54:42.695: %TCP-6-BADAUTH: No MD5 digest from 1.1.1.2(179) to 1.1.1.1(47927) tableid - 0

*Mar 22 13:54:43.351: %TCP-6-BADAUTH: No MD5 digest from 1.1.1.2(32235) to 1.1.1.1(179) tableid - 0


R2#show ip bgp
BGP table version is 2, local router ID is 20.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.0.0.0          0.0.0.0                  0         32768 i

R2#show ip bgp summary
BGP router identifier 20.1.1.1, local AS number 65011
BGP table version is 2, main routing table version 2
1 network entries using 144 bytes of memory
1 path entries using 80 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 360 total bytes of memory
BGP activity 3/2 prefixes, 4/3 paths, scan interval 60 secs


Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1           4              65011       0       0        1    0    0 00:02:46                       Active



R2(config)#router bgp 65011
R2(config-router)#neighbor 1.1.1.1 password internetworks
R2(config-router)#neighbor 1.1.1.1 version 4

*Mar 22 13:57:36.931: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up

R2(config-router)#end


R2#show ip bgp
BGP table version is 3, local router ID is 20.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found


     Network          Next Hop            Metric LocPrf Weight Path
 * i 1.0.0.0          1.1.1.1                  0    100      0 i
 *>                   0.0.0.0                  0         32768 i
 *>i 10.0.0.0         1.1.1.1                  0    100      0 i

R2#show ip bgp summary
BGP router identifier 20.1.1.1, local AS number 65011
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
3 path entries using 240 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 800 total bytes of memory
BGP activity 4/2 prefixes, 6/3 paths, scan interval 60 secs


Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4        65011       5       5        3    0    0 00:00:44        2



 


 


Instagram

Facebook


Twitter



LINKEDIN








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...