Internetworks offers a comprehensive collection of articles and tutorials on computer networks, covering basic to advanced concepts such as data link layer, network layer, network security, and more. It’s a great starting point for beginners and a useful reference for advanced learners. A+ N+ CCNA CCNP CCIE
by Edgar C Francis
BGP backdoor
it’s a well-known feature of the BGP which is used to change the AD (administrative
distance) of eBGP. By default, external BGP (eBGP) has an administrative
distance value of 20 with the help of a backdoor command you can set 200 AD. If two
routing protocols provide route information for the same destination the
administrative distance is the first criterion that a router uses to determine
which routing protocol to use for the best path. The lowest AD value is a more reliable protocol
and link.
Why do we
need to change eBGP AD?
Whenever our
router learns about a network (prefix) through eBGP and also with an IGP protocol like OSPF EIGRP or RIP then our router always chooses the Ebgp route
because Ebgp uses an administrative distance value of 20 so our router by default
prefers eBGP over EIGRP AD 90, RIP AD 120, OSPF AD 110.
In some scenarios this becomes a problem let’s
see the configuration.
Topology:
Goal:
configure the topology as per the diagram.
assign the IP addresses
configure EIGRP 100 on router 1 and router 3
advertise the interfaces
configure eBGP peering between router 1 and 2
configure eBGP peering between router 2 and router 3
make sure router 1 gets the 192.168.30.1 route from serial 4/3 link via EIGRP.
configure backdoor in order to get 192.168.30.1 route via serial link 4/3 from router 3.
*May 20 13:42:50.559: %BGP-5-ADJCHANGE: neighbor 2.2.2.1 Up
R3#show ip route 192.168.10.1 longer-prefixes
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
192.168.10.0/32 is subnetted, 1 subnets
B 192.168.10.1 [20/0] via 2.2.2.1, 00:02:03
( as can see from the above output router 3 is getting (R1) 192.168.10.1 route from route via serial 4/0 to serial 4/1 {2.2.2.1} R2. because of the lower AD value of eBGP )
Let's see on router 1 from where it's getting 192.168.30.1 network
R1#show ip route 192.168.30.1 longer-prefixes
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
192.168.30.0/32 is subnetted, 1 subnets
B 192.168.30.1 [20/0] via 1.1.1.2, 00:01:44
( router 1 is also installing 192.168.30.1 network from router 1 because of lower AD of eBGP)
We need to fix this with help of the BGP backdoor command.
ARP (Address
Resolution Protocol) it’s a communication protocol. Networking devices used for
discovering MAC (media access control) addresses, associate with an IPv4 address (internet
layer address), and map the MAC addresses to IPv4 addresses this mapping is done
dynamically and stored in the ARP cache. ARP works between layer 2 and layer 3 of
the OSI because the MAC address exists on the data link layer and the IP address exists
on the network layer.
How does ARP
work?
Whenever a
fresh PC (computer) connects to LAN, it will assign an IP address statically or
dynamically to use for identity and for communication. When an incoming packet destined
for a host machine on a particular LAN arrives at a gateway, the gateway is
going to ask ARP for a MAC address that matches the IP address. There is a table
called ARP cache in this table ARP mapping record. Whenever a host asks for a MAC address in order
to send a packet to another host in the LAN, ARP looks it the cache to see if their IP
to MAC mapping translation is already stored. If it’s already stored then no need
for ARP broadcast but if there is no translation stored then ARP sends a request
for the network address (does anybody knows this IP address)
ARP sends
broadcast a request packet to all the hosts on the LAN network and asks is
there any host using this particular IP address please let me know. When a host
recognizes oh it’s my IP address it will immediately send a unicast reply so
ARP can update and store it in the cache table and now communication can proceed.
What happens
if the host (machine) doesn’t know its own IP address?
In this situation, RARP (Reverse ARP) protocol is used for discovery. next chapter we are going to see proxy ARP and RARP.
What is ARP
cache?
ARP cache is
a table where mapping or translation is stored. The size of the ARP cache is
limited and from time to time cleansed its entire entries to free its space. Mappings
are stored for a few minutes. ARP frequently updates when a host changes their
requested IP address.
ARP Commands
we used arp -a command to display the ARP table. It shows all the entries of the ARP cache or table.
arp -g: This
command works the same as the arp -a command.
we use arp -d command when we want to delete an entry from the ARP table for a
particular interface.