MTCINE
MTCINE
2.What is BGP?
BGP stands for Border Gateway Protocol.It's designed to exchange routing and reachability
information among autonomous systems (AS) on the Internet.
Types of BGP
1. Interior BGP
2. Exterior BGP
Interior BGP
When BGP runs between two peers in the same autonomous system (AS), it is referred to as
Internal BGP (i-BGP)
Exterior BGP
When it runs between different autonomous systems, it is called External BGP (eBGP or
Exterior Border Gateway Protocol).
Version of BGP
Current version of BGP is 4
1.Highest weight (Prefer the path with the highest WEIGHT.A route without assigned WEIGHT
have a default value of 0.)
2.Highest Local Preference (Prefer the path with the highest LOCAL_PREF. It is used only
within an AS.A path without LOCAL_PREF attribute have a value of 100 by default.)
3.Shortest AS Path
4.Originate (source of the route)
5.Lowest Origin
6.Lowest MED (Prefer the path with the lowest multi-exit discriminator (MED).Paths without
explicit MED value are treated as with MED of 0)
7.eBGP Path over iBGP
8.Router ID (Prefer the route that comes from the BGP router with the lowest router ID.)
9. Shortest route refection cluster list
10. Lowest Neighbor IP address
Update message
BGP systems send update messages to exchange network reachability information.
keepalive message
BGP systems exchange keepalive messages to determine whether a link or host has failed or is
no longer available.
Notification message
BGP systems send notification messages when an error condition is detected.
Type of BGP
1.iBGP
2.eBGP
iBGP
iBGP stands for Internal BGP.IBGP is between same AS. iBGP connections are those within
your company.It's administrative distance of 200.
eBGP
eBGP stands for External BGP.EBGP is peering between two different AS.eBGP connections
are those between two companies or Autonomous Systems (AS).
EBGP routes have administrative distance of 20.
Stub network scenarios
A stub network has only one default path to non-local hosts.Stub networks are dead-end LANs
that know of only one network exit.
Stub networks may have multiple connections but use one path to single points of destination.
Private range AS numbers (64512 – 65535).Private AS numbers should not be used on the
Internet since they are not unique like public AS numbers.
Sometimes, private AS numbers are used for customer networks that are behind a single
ISP.The advantage of doing this is that we will save some public AS numbers.
the disadvantage is that if you ever plan to connect to another ISP, you should switch to a public
AS number and remove private AS number.
Cisco IOS routers support the "remove-private-as" command for remove private as.
Non-stub scenarios
Not-so-stubby area (NSSA) is useful when it is required to inject external routes, but injection
of type 5 LSA routes is not required.
Look at the image above. There are two areas (backbone and area1) and RIP connection to
area1. We need Area1 to be configured as stub area, but it is also required to inject external
routes from RIP protocol.
Area1 should be configured as NSSA in this case.
iBGP and eBGP multihop and loopback usage
Loopback interface
In MikroTik, loopback interfaces are typically used for IBGP peering sessions. This is because
loopback interfaces are always up and reachable, even if the physical interfaces that connect
the routers are down. This ensures that the BGP session between the routers will remain up,
even if there is a problem with the physical links.
Multihop
The multihop configuration setting is used to allow BGP to communicate with peers that
are not directly connected.
.Specifies whether the remote peer is more than one hop away. The multihop is used only for
external BGP and not for internal BGP.
you must ensure that the TTL field in the BGP packets is set to a value that is greater than the
number of hops between the two BGP peers.
Confederations
A BGP confederation divides our AS into sub-ASes to reduce the number of required IBGP
peerings.
Within a sub-AS we still require full-mesh IBGP but between these sub-ASes we use something
that looks
like EBGP but behaves like IBGP (called confederation BGP).confederations are typically used
to divide an extremely large AS in to manageable zones.
route reflector
A route reflector is BGP router that is allowed to break the iBGP loop avoidance rule.
Route reflectors can advertise updates received from an iBGP peer to another iBGP peer under
specific conditions.
By breaking the rules, route reflectors are used to eliminate the full mesh requirement and allow
for building iBGP networks that scale easily and cleanly.
What is MPLS?
https://wiki.mikrotik.com/wiki/Manual:Basic_MPLS_setup_example
MPLS stands for Multi-protocol label switching. MPLS is a way to insure reliable connections for
real-time applications, but it's expensive.MPLS or Multiprotocol Label Switching is used widely
for it's performance and traffic engineering possibilities.
Configuring LDP
/mpls ldp set enabled=yes transport-address=1.1.1.1 lsr-id=2.2.2.2
/mpls ldp interface add interface=ether3
Dynamic level
What is Penultimate-hop-popping
PHP is penultimate hop popping which means remove the label one hop before its
destination.packet is removed by a Label Switch Router (LSR) before the packet is passed to an
adjacent Label Edge Router(LER).
The process is important in a Layer 3 MPLS VPN environment as it reduces the load on the
LER. If this process didn’t happen, the LER would have to perform at least 2 label lookups:
The outer label, identifying that the packet was destined to have its label stripped on this router.
The inner label, to identify which Virtual Routing and Forwarding (VRF) instance to use for the
subsequent IP routing lookup.
So that, In a large network this can result in the CPU load on the LER reaching unacceptable
levels. To avoid this extra work on the very last (ultimate) LSR, MPLS uses a feature called
penultimate hop popping (PHP).
#Q-in-Q router - this router will receive standard 1500 byte Ethernet frame and will add two
VLAN tags to the packet. Then packet will be sent out via Ethernet network to the second router
# VPLS router - this router will remove outer VLAN tag and will bridge packet with the remaining
VLAN tag with VPLS tunnel. VPLS tunnel will take packet through the MPLS network to the third
router.
#MPLS Edge router - will remove VPLS and VLAN tags and bridge packet to the client Ethernet
network.
MPLS fragmentation
Fragmentation of the data stream gives ability to correct corruption errors only by resending
corrupted fragment, not the whole stream.
an LSR receives a labeled packet that is too big to be sent out on a data link, the packet should
be fragmented. This is similar to fragmenting an IP packet. If a labeled packet is received and
the LSR notices that the outgoing MTU is not big enough for this packet, the LSR strips off the
label stack, fragments the IP packet, puts the label stack (after the pop, swap, or push
operation) onto all fragments, and forwards the fragments. Only if the IP header has the Don't
Fragment (DF) bit set does the LSR not fragment the IP packet, but it drops the packet and
returns an ICMP error message "Fragmentation needed and do not fragment bit set" (ICMP type
3, code 4) to the originator of the IP packet. As with the ICMP message "time exceeded" (type
11, code 0), which is sent when the TTL expires of a labeled packet, the "Fragmentation needed
and do not fragment bit set" ICMP message is sent, using a label stack that is the outgoing label
stack for the packet that caused the ICMP message to be created. This means that the ICMP
message travels further down the LSP until it reaches the egress LSR of that LSP. Then it is
returned to the originator of the packet with the DF bit set.
In general, fragmentation causes a performance impact and should be avoided. A good method
to avoid fragmentation is using the Path MTU Discovery method
One method to avoid fragmentation is Path MTU Discovery, which most modern IP hosts
perform automatically. In that case, the IP packets sent out have the "Don't Fragment" (DF) bit
set. When a packet encounters a router that cannot forward the packet without fragmenting it,
the router notices that the DF bit is set, drops the packet, and sends an ICMP error message
"Fragmentation needed and do not fragment bit set" (ICMP type 3, code 4) to the originator of
the IP packet. The originator of the IP packet then lowers the size of the packet and retransmits
the packet. If a problem still exists, the host can lower the size of the packet again. This
continues until no ICMP message is received for the IP packet. The size of the last IP packet
successfully sent is then used as maximum packet size for all subsequent IP traffic between the
specific source and destination; hence, it is the MTU of the path.
Technically VRFs are based on policy routing. There is exactly one policy route table for each
active VRF.
https://wiki.mikrotik.com/wiki/Manual:Simple_TE
RSVP
RSVP- Resource Reservation Protocol of Traffic Engineering. It supports the reservation of
resources across an IP network. Applications running on IP end systems can use RSVP to
indicate to other nodes the nature (bandwidth, jitter, maximum burst, and so forth) of the packet
streams they want to receive. RSVP runs on both IPv4 and IPv6.
Setting Resource Reservation
set up TE resource for every interface on which we might want to run TE tunnel.
Configuration on all the routers are the same:
/mpls traffic-eng interface
add interface=ether1 bandwidth=10Mbps
add interface=ether2 bandwidth=10Mbps
Static path
Since our primary goal is to strictly forward traffic over specific path we will use static path
configuration as primary,
/mpls traffic-eng tunnel-path
add name=dyn use-cspf=yes
add name=tun-first-link use-cspf=no \
hops=192.168.33.2:strict,192.168.33.5:strict,192.168.33.6:strict
/interface traffic-eng
add bandwidth=5Mbps name=TE-to-R3 to-address=10.255.0.3 primary-path=tun-first-link \
secondary-paths=dyn record-route=yes from-address=10.255.0.1