18 Jan

Routing protocols – recap and quick notes

Types of dynamic routing protocols:

 

RIP : Routing Information Protocol - AD 120
IGRP : Interior Gateway Routing Protocol - AD-100
EIGRP : Enhanced IGRP AD-90
OSPF : Open Shortest Path First AD-110
IS-IS : Intermediate system to intermediate system AD-115
BGP: Border Gateway Protocol AD-20

Comparison

Property   EIGRP OSPF  BGP
Administrative Distances Internal – 90
External 170
110 EBGP – 20
IBGP – 200
Method   Advanced distance vector  Link state Path vector
Summarization   Auto and manual Manual Auto and Manual
VLSM  Yes Yes Yes
Convergence Speed    Very fast convergence Fast Slow
Timers: Update
(hello/dead)    
Triggered (LAN 5/15, WAN 60/180)  Triggered when network change occurs, send periodic update LSA refreshes every 30 minutes (NBMA 30/120, LAN 10/40) Triggered (60/180)
Network Size  Large Large Very large
Mixed-Vendor Devices No Yes Yes
Use multicast  224.0.0.10 224.0.0.5  
Feature  – Partial updates conserve network bandwidth
– Support for IP, AppleTalk, and IPX
– Runs directly over IP, using protocol number 88
– Support for all Layer2 (data link layer) protocols and topologies
– Load balancing across equal-and unequal-cost pathways
– Multicast and unicast instead of broadcast address
– Support for authentication
– Manual summarization at any interface
– 100% loop-free classless routing
 – Minimizes the number of routing table entries
– Contains LSA flooding to a reasonable area
– Each routing device takes a copy of the LSA updates its LSDB and forward the LSA to all neighbor devices within area
– Minimizes the impact of a topology change
– Enforces the concept of a hierarchical network design
 – BGP provides the routing betw these autonomouse systems.
– BGP uses the concept of autonomous systems (AS). An autonomous system is a group of networks under a common administration. The Internet Assigned Numbers Authority (IANA) assigns AS numbers: 1 to 64511 are public AS
numbers and 64512 to 65535 are private AS numbers.
– IGP: A routing protocol that exchanges routing infor within AS. RIP, IGRP, OSPF, IS-IS and EIGRP are examples of IFPs.
– EGP: A routing protocol that exchanges routing infor betw different AS. BGP is an example of an EGP.
– The administrative distance for EBGP routes is 20. The administrative distance for IBGP routes is 200.
– BGP neighbors are called peers and must be statically configured.
– BGP uses TCP port 179. BGP peers exchange incremental, triggered route updates and periodic keepalives.
Operation – IP EIGRP Neighbor Table
– IP EIGRP Topology Table AD+FD
– The IP Routing Table
Neighbor Table
Topology Table LSDB
Routing Table
(LSA-> LSDB-> SPF algorithm-> SPF Tree-> Routing Table)
 
Function is controlled by EIGRP’s function is controlled by 4 key technologies:
– Neighbor discovery and maintenance: Periodic hello messages
– The Reliable Transport Protocol (RTP): Controls sending, tracking, and acknowledging EIGRP messages
– Diffusing Update Algorithm (DUAL): Determines the best loop-free route
– Protocol-independent modules (PDM): Modules are “plug-ins” for IP, IPX, Novel Netware and AppleTalk versions of EIGRP
Following are several types of areas:
– Backbone area: Area 0, which is attached to every other area.
– Regular area: Nonbackbone area; its database contains both internal and external routes.
– Stub area: It’s database contains only internal routes and a default route.
– Totally Stubby Area: Cisco proprietary area designation. Its database contains routes only for its own area and a
default route.
– Not-so-stubby area (NSSA): Its database contains internal routes, routes redistributed from a connected routing
process, and optionally a default route.
– Totally NSSA: Cisco proprietary area designation. Its database contains only routes for its own area, routes redistributed
from a connected routing process, and a default route.
BGP uses 3 databases. The first two listed are BGP-specific; the third is shared by all routing processes on the router:
– Neighbor database: A list of all configured BGP neighbors. To view it, use the show ip bgp summary
command.
– BGP database, or RIB (Routing Information Base): A list of networks known by BGP, along with their
paths and attributes. To view it, use the show ip bgp command.
– Routing table: A list of the paths to each network used by the router, and the next hop for each network. To view
it, use the show ip route command.
Packet Types/BGP Message Types EIGRP uses 5 packet types:
Hello: Identifies neighbors and serves as a keepalive mechanism sent multicast
Update: Reliably sends route information unicast to a specific router
Query: Reliably requests specific route information query packet multicast to its neighbors
Reply: Reliably responds to a query replies are unicast
ACK: Acknowledgment
The 5 OSPF packet types follow:
Hello: Identifies neighbors and serves as a keepalive.
Link State Request (LSR): Request for a Link State Update (LSU). Contains the type of LSU requested and the
ID of the router requesting it.
Database Description (DBD): A summary of the LSDB, including the RID and sequence number of each LSA
in the LSDB.
Link State Update (LSU): Contains a full LSA entry. An LSA includes topology information; for example, the
RID of this router and the RID and cost to each neighbor. One LSU can contain multiple LSAs.
Link State Acknowledgment (LSAck): Acknowledges all other OSPF packets (except Hellos).
BGP has 4 types of messages:
Open: After a neighbor is configured, BGP sends an open message to try to establish peering with that neighbor.
Includes information such as autonomous system number, router ID, and hold time.
Update: Message used to transfer routing information between peers. Includes new routes, withdrawn routes, and
path attributes.
Keepalive: BGP peers exchange keepalive messages every 60 seconds by default. These keep the peering session
active.
Notification: When a problem occurs that causes a router to end the BGP peering session, a notification message
is sent to the BGP neighbor and the connection is closed.
Neighbor Discovery and Route Exchange Neighbor Discovery and Route Exchange
Step 1. Router A sends out a hello.
Step 2. Router B sends back a hello and an update. The update contains routing information.
Step 3. Router A acknowledges the update.
Step 4. Router A sends its update.
Step 5. Router B acknowledges.
Establishing Neighbors and Exchanging Routes
Step 1. Down state: OSPF process not yet started, so no Hellos sent.
Step 2. Init state: Router sends Hello packets out all OSPF interfaces.
Step 3. Two-way state: Router receives a Hello from another router that contains its own router ID in the neighbor
list. All other required elements match, so routers can become neighbors.
Step 4. Exstart state: If routers become adjacent (exchange routes), they determine which one starts the
exchange process.
Step 5. Exchange state: Routers exchange DBDs listing the LSAs in their LSD by RID and sequence number.
Step 6. Loading state: Each router compares the DBD received to the contents of its LS database. It then sends a
LSR for missing or outdated LSAs. Each router responds to its neighbor’s LSR with a Link State Update.
Each LSU is acknowledged.
Step 7. Full state: The LSDB has been synchronized with the adjacent neighbor.
BGP Peering States
The command show ip bgp neighbors shows a list of peers and the status of their peering session. This status can
include the following states:
Idle: No peering; router is looking for neighbor. Idle (admin) means that the neighbor relationship has been
administratively shut down.
Connect: TCP handshake completed.
OpenSent, or Active: An open message was sent to try to establish the peering.
OpenConfirm: Router has received a reply to the open message.
Established: Routers have a BGP peering session. This is the desired state.
Metric (Calculation) Bandwidth+Delay Cost= 100 Mbps/Bandwidth IBGP – 0
Redistributed routes metric = IGP metric

Reference:
http://cisconetworkingcenter.blogspot.com/2013/01/comparison-of-routing-protocols-eigrp.html

Incoming search terms:

  • what information does rip and ospf protocols send to routers
  • number of routing protocols
  • routing protocols - types of advertisments
18 Jan

BGP RIB-Failure

When a Router receives a BGP UPDATE packet that contains Network Layer Reachability Information (NLRI) – this is, a route; the packet is processed in the next order:

– Step 1. BGP checks for the NLRI (prefix received) against any BGP inbound filter configured on the Router.

– Step 2. If the NLRI is not filtered, the prefix can be seen in the BGP table with the show ip bgp command.

– Step 3. If the Routing Table already has the same prefix/prefix-length entry with a lower Administrative Distance (AD) as seen in show ip route, BGP marks the route received with RIB-Failure.

*You can display BGP routes that are not inserted in the IP routing table with the show ip bgp rib-failure command, which also explains why the BGP route was not inserted in the IP routing table.

*all routes shown in show ip bgp rib-failure command will still advertised to all BGP peers.

*Network Layer Reachability Information (NLRI)

The Network Layer Reachability Information (NLRI) is exchanged between BGP routers using UPDATE messages. An NLRI is composed of a LENGTH and a PREFIX. The length is a network mask in CIDR notation (eg. /25) specifying the number of network bits, and the prefix is the Network address for that subnet.

The NLRI is unique to BGP version 4 and allows BGP to carry supernetting information, as well as perform aggregation.

The NLRI would look something like one of these:

     /25, 204.149.16.128
     /23, 206.134.32
     /8, 10

Reference:
1. https://blog.ipspace.net/2007/12/what-is-bgp-rib-failure.html
2. https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/213286-understand-bgp-rib-failure-and-the-bgp-s.html#anc4
3. https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5816-bgpfaq-5816.html#anc27

02 Jan

OSMC KODI: Mount NFS using fstab

Why use /etc/fstab instead of Kodi’s built in NFS client? Using /etc/fstab is faster than Kodi’s own NFS client – it delivers better throughput and is more reliable (also than SMB mounting). Many performance issues, especially with high-bitrate content can be solved by using NFS shares and /etc/fstab. Additionally, it’s quite easy to set up.

Preparation:
You will need to know the following information
1.The IP address of the system where your media files are shared from. (in this tutorial, i will be using 192.168.1.5)
2.The directory used by the NFS share on your NAS. Use the following command to find the correct export path for your NAS

showmount -e IP_of_your_NAS

3. Mount point in OSMC. (in this tutorial, i will be using /mnt/NFS_Share)

Edit your /etc/fstab file:

sudo nano /etc/fstab

Go to the end of the file (use the down arrow key) and add this line:

192.168.1.5:/mnt/array1/share /mnt/NFS_Share    nfs     noauto,x-systemd.automount  0  0

Once done editing /etc/fstab, save the file and exit nano /etc/fstab with CTRL+X and Y for “yes”.

Now verify that there are no errors in your fstab file:

sudo mount -a

Once you get a prompt with no errors, you will need to reload systemd:

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target

At this point, your shares should just work. To test, simply try to go to the share:

cd /mnt/NFS_Share 
ls

Source: https://discourse.osmc.tv/t/configuring-fstab-based-nfs-share-mounts/69953

Incoming search terms:

  • add files from nfs to osmc
  • kodi fstab mount
02 Jan

BGP Aggregate experiment

The BGP aggregate-address can be used to summarise a set of networks into a single prefix. For this post, I just wanted to show the difference between aggregate-address and aggregate-address with summary only.

We have below topology. I’m going to summarise prefixes in R1.

R1 config

hostname R1
!
interface GigabitEthernet0/0
 ip address 10.10.10.1 255.255.255.252
!
router bgp 10
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 neighbor 10.10.10.2 remote-as 20
!
ip route 192.168.1.0 255.255.255.0 Null0
ip route 192.168.2.0 255.255.255.0 Null0
ip route 192.168.3.0 255.255.255.0 Null0
!

R2 config

hostname R2
!
interface GigabitEthernet0/0
 ip address 10.10.10.2 255.255.255.252
!
router bgp 20
 bgp log-neighbor-changes
 neighbor 10.10.10.1 remote-as 10
!

Case 1: without aggregate-address

R2#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.1.0      10.10.10.1               0             0 10 i
 *>  192.168.2.0      10.10.10.1               0             0 10 i
 *>  192.168.3.0      10.10.10.1               0             0 10 i

Case 2: with aggregate-address
R1 config

router bgp 10
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 aggregate-address 192.168.0.0 255.255.252.0
Router#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.0.0/22   10.10.10.1               0             0 10 i
 *>  192.168.1.0      10.10.10.1               0             0 10 i
 *>  192.168.2.0      10.10.10.1               0             0 10 i
 *>  192.168.3.0      10.10.10.1               0             0 10 i

Note that we will be having the original /24 routes (longer prefix) and summarised /22 route.

Case 3: aggregate-address with summary only
R1 config

router bgp 10
 bgp log-neighbor-changes
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 aggregate-address 192.168.0.0 255.255.252.0 summary-only
R2#sh ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 *>  192.168.0.0/22   10.10.10.1               0             0 10 i

All the longer-prefixes inside of the aggregate address are suppressed.