You are on page 1of 134

Chapter 4:

IPv4 Routing
ITP4111
Open Standards Networking

© VTC 2013 ILO 4


Basic Routing

© VTC 2013 ILO 4


Static Route Configuration
[Router]ip route-static dest-address { mask | mask-length }
{gateway-address | interface-type interface-name } [ preference
preference-value ]
[RTA]ip route-static 0.0.0.0 0.0.0.0 10.2.0.2

[RTD]ip route-static 0.0.0.0 0.0.0.0


10.4.0.1

RTA RTB RTC RTD


10.2.0.0/24 10.3.0.0/24 10.4.0.0/24
.1 .2 .1 .2 .1 .2

10.1.0.0/24 10.5.0.0/24

PC Server

[RTB]ip route-static 10.1.0.0 255.255.255.0 10.2.0.1


[RTB]ip route-static 0.0.0.0 0.0.0.0 10.3.0.2
© VTC 2013 ILO 4 3
Static Route to Implement Route Backup and Load
Balancing
ISP A ISP B

S0/0 S0/1
Route Backup : RTA
Preference ↓=> Priority↑
 Different next hops and priorities to the same destination address
 High priority route is the primary , low priority route is the backup

Load Balancing :
 Different next hops to the same destination address , but the priorities are
the same
 Traffic is equally shared among different routes
© VTC 2013 ILO 4 4
RIP Configuration

On RTA: On RTB:
[RTA]rip [RTB]rip
[RTA-rip-1] network 192.168.0.0 [RTB-rip-1] network 192.168.1.0
[RTA-rip-1] network 192.168.1.0 [RTB-rip-1] network 192.168.2.0

© VTC 2013 ILO 4 5


Default preferences of routing protocols
for H3C routers

Type Default preference


Direct route 0
OSPF internal route 10
Static route 60
RIP route 100
OSPF external route 150
BGP route 256

© VTC 2013 ILO 4 6


Administrative Distance for
Cisco Routers
Default Distance
Route Source Values
Connected interface 0
Static route 1
EIGRP summary route 5
External BGP 20
Internal EIGRP 90
OSPF 110
RIP 120
Internal BGP 200

© VTC 2013 ILO 4 7


Single area OSPF
interworking in a
multivendor environment

© VTC 2013 ILO 4


OSPF

• Open Shortest Path First (OSPF) is a link-state


routing protocol for Internet Protocol (IP)
networks developed by IETF.
• OSPF version 2 is defined in RFC 2328.

© VTC 2013 ILO 4 9


OSPF Area Partition
Area 0 Internal Routers

Backbone Routers
ASBR

ABR

Area 1 Area 10.0.0.1


Internal Routers

© VTC 2013 ILO 4 10


OSPF Area Partition

• OSPF splits an AS into multiple areas. A router only


establishes adjacencies with neighbors in the same area
and they use the same LSDB.
• A large LSDB is divided into several small LSDBs used in
different areas, which reduces the consumption of router
memory and CPU resources.
• Each area is identified by a 32-bit area ID. An area ID can be
represented in decimal format or dotted decimal format
e.g. area ID 0 or 0.0.0.0

© VTC 2013 ILO 4 11


OSPF Area Partition

• Each AS has a backbone area, which is


responsible for distributing routing information
between non-backbone areas. Communications
between areas must pass through backbone. The
area ID of the backbone area is 0 (or 0.0.0.0).
• All non-backbone areas must be connected to
the backbone area.

© VTC 2013 ILO 4 12


Reasons for Multiple Areas

• Each area maintains a separate link state


database whose information may be
summarized towards the rest of the network
by the connecting router.
• The topology of an area is unknown outside
of the area. This reduces the amount of
routing traffic between parts of an
autonomous system.
© VTC 2013 ILO 4 13
Types of Routers

• Internal Router – It has all its interfaces attached to one OSPF


area. It is responsible for communication within the area and
may act as an ASBR at the same time.
• Backbone Router - A router with at least one interface
attached to the backbone area is called a backbone router.
• Area Border Router (ABR) - A router connecting one or more
area to the backbone area. Generally, an ABR serves as the
gateway for inter-area communication.
• Autonomous System Boundary Router (ASBR) - A router
exchanging routing information with another AS.

© VTC 2013 ILO 4 14


Link-state Advertisement (LSA)
Area 0

Advertise routes of
the AS to the other
ASs Advertises summary routes
20.1.0.0/16 area 10.0.0.1
LSAs in area 1
Advertises LSAs to
area 0 and area 1
Advertise LSAs in area 0
and area 10.0.0.1
20.1.0.1/24
20.1.2.1/24
20.1.0.2/24
20.1.2.2/24 20.1.1.2/24

20.1.1.1/24
Area 1 Area 10.0.0.1

© VTC 2013 ILO 4 15


LSA Type

• There are five types of LSA described in


RFC2328.
LS Type Description
1 Router-LSAs
2 Network-LSAs
3 Summary-LSAs (IP network)
4 Summary-LSAs (ASBR)
5 AS-external-LSAs

© VTC 2013 ILO 4 16


Type 1 LSA
• LSAs contains directly connected network prefixes.
• Type 1 LSAs are flooded within the area only.
• All routers generate type 1 LSAs.

Area 0

Type 1 LSAs

Area 1 Area 10.0.0.1


© VTC 2013 ILO 4 17
Type 2 LSA
• LSA identifies the routers in the multiaccess link.
• Only a Designated Router generates a type 2 LSA.
• LSA is flooded within the multiaccess network and does not
go beyond an ABR.
Area 0
DR

Type 2 LSAs
DR
DR

DR DR
DR

Area 1 Area 10.0.0.1


© VTC 2013 ILO 4 18
Type 3 LSA
• Type 3 LSA contains a network address learned by type 1
LSAs. They are not summarized by default.
• ABRs flood type 3 LSAs to other areas.

Area 0

Type 3 LSAs
ABR
ABR

Area 1 Area 10.0.0.1


© VTC 2013 ILO 4 19
Type 4 LSA
• Type 4 LSA is used to advertise an ASBR to other areas.
• ABRs generate type 4 LSAs.

Area 0
ASBR

Type 1 LSA
Type 4 LSAs
ABR
ABR
Type 4 LSAs
Type 4 LSAs

Area 1 Area 10.0.0.1


© VTC 2013 ILO 4 20
Type 5 LSA
• Type 5 LSA is used to advertise external network addresses.
• An ASBR generates a type 5 LSA and are regenerated by
ABRs.

Area 0
ASBR

Type 5 LSAs Type 5 LSAs


ABR
ABR
Type 5 LSAs
Type 5 LSAs

Area 1 Area 10.0.0.1


© VTC 2013 ILO 4 21
OSPF Single Area Configuration Example I

RTA Area 0 RTB


Router ID 1.1.1.1 Eth0/0 Router ID 2.2.2.2
10.0.0.2/24
Eth0/0
Eth0/1 10.0.0.1/24 Eth0/1
20.0.0.1/24 30.0.0.1/24

Eth0/1 Eth0/0
20.0.0.2/24 30.0.0.2/24

RTC Router ID 3.3.3.3

[RTA]interface loopback 0
[RTA-loopback-0]ip address 1.1.1.1 255.255.255.255
[RTA-loopback-0]quit
[RTA] router id 1.1.1.1
[RTA] ospf 1
[RTA-ospf-1] area 0
[RTA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[RTA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.0] network 20.0.0.0 0.0.0.255
© VTC 2013 ILO 4 22
OSPF Single Area Configuration Example I (Cont ..)
RTB [RTB]interface loopback 0
RTA Area 0 Router ID 2.2.2.2 [RTB-loopback-0]ip address 2.2.2.2 255.255.255.255
[RTB-loopback-0]quit
Router ID 1.1.1.1 Eth0/0 [RTB]route id 2.2.2.2
10.0.0.2/24 [RTB]ospf 1
[RTB-ospf-1]area 0
Eth0/0 [RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
Eth0/1 10.0.0.1/24 Eth0/1
[RTB-ospf-1-area-0.0.0.0]network 10.0.0.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]network 30.0.0.0 0.0.0.255
20.0.0.1/24 30.0.0.1/24

Eth0/1 Eth0/0
20.0.0.2/24 30.0.0.2/24 • Eth0/0 on RTA and Eth0/0 on RTB
RTC Router ID 3.3.3.3
are neighbors.
• Eth0/1 on RTA and Eth0/1 on RTC
are neighbors.
[RTC]interface loopback 0
[RTC-loopback-0]ip address 3.3.3.3 255.255.255.255
• Eth0/1 on RTB and Eth0/0 on RTC
[RTC-loopback-0]quit are neighbors.
[RTC]router id 3.3.3.3
[RTC]ospf 1 • RTA, RTB and RTC have shortest
[RTC-ospf-1]area 0 paths to reach each other.
[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[RTC-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
[RTC-ospf-1-area-0.0.0.0]network 30.0.0.0 0.0.0.255

© VTC 2013 ILO 4 23


OSPF Single Area Configuration Example II
Area 0

default-route-advertise command is used to


advertise default route to other OSPF
routers.

Eth1/0

[RTC] ip route-static 0.0.0.0 0 E1/0


[RTC]ospf 1
[RTC-ospf-1]area 0
[RTC-ospf-1-area-0.0.0.0]import-route static
[RTC-ospf-1-area-0.0.0.0]default-route-advertise

© VTC 2013 ILO 4 24


OSPF Multi-Area Configuration Example
• The configuration on RTA and RTC are the same as those in the OSPF single area
configuration example.
• RTB needs to be added to two areas. RTA and RTC are reachable to each other.
Area 0 Area 192.168.10.1

RTA Router ID 1.1.1.1 Eth0/0 Eth0/1 RTC Router ID 3.3.3.3


10.0.0.2/24 20.0.0.2/24
Eth0/0 Eth0/0
10.0.0.1/24 20.0.0.1/24
RTB Router ID 10.0.1.1

[RTB] interface loopback 0


[RTB-loopback-0] ip address 10.0.1.1 255.255.255.255
[RTB-loopback-0] quit
[RTB] route id 10.0.1.1
[RTB] ospf 100
[RTB-ospf-100] area 0
[RTB-ospf-100-area-0.0.0.0] network 10.0.1.1 0.0.0.0
[RTB-ospf-100-area-0.0.0.0] network 10.0.0.0 0.0.0.255
[RTB-ospf-100-area-0.0.0.0] quit
[RTB-ospf-100] area 192.168.10.1
[RTB-ospf-100-area-192.168.10.1] network 20.0.0.0 0.0.0.255
© VTC 2013 ILO 4 25
Compute Summary Route

First 23 bits match

10.0.1.1 00001010.00000000.00000001.00000001

10.0.0.0 00001010.00000000.00000000.00000000
Copy all match bits All Zeros

10.0.0.0 00001010.00000000.00000000.00000000
/23

© VTC 2013 ILO 4 26


OSPF Multi-Area Summarize Example
• Networks 10.0.1.1/32 and 10.0.0.0/24 are summarized with 10.0.0.0/23
• The summarized route is advertised to area 192.168.10.1 with type 3 LSA.
Area 0 Area 192.168.10.1

RTA Router ID 1.1.1.1 Eth0/0 Eth0/1 RTC Router ID 3.3.3.3


10.0.0.2/24 20.0.0.2/24
Eth0/0 Eth0/0
10.0.0.1/24 20.0.0.1/24
RTB Router ID 10.0.1.1

[RTB] interface loopback 0


[RTB-loopback-0] ip address 10.0.1.1 255.255.255.255
[RTB-loopback-0] quit
[RTB] route id 10.0.1.1
[RTB] ospf 100
[RTB-ospf-100] area 0
[RTB-ospf-100-area-0.0.0.0] network 10.0.1.1 0.0.0.0
[RTB-ospf-100-area-0.0.0.0] network 10.0.0.0 0.0.0.255
[RTB-ospf-100-area-0.0.0.0] abr-summary 10.0.0.0 255.255.254.0
[RTB-ospf-100-area-0.0.0.0] quit
[RTB-ospf-100] area 192.168.10.1
© VTC 2013 [RTB-ospf-100-area-192.168.10.1]
ILO 4 network 20.0.0.0 0.0.0.255 27
Displaying Information about OSPF Neighbors
Router ID of local router

[H3C]display ospf peer

OSPF Process 1 with Router ID 1.1.1.1


Neighbor Brief Information

Area: 0.0.0.0
Router ID Address Pri Dead-Time Interface State
3.3.3.3 50.50.50.3 100 35 Eth0/0 Full/BDR
4.4.4.4 50.50.50.4 10 34 Eth0/0 Full/DR
2.2.2.2 50.50.50.1 100 38 Eth0/0 2-way/-

Interfaces connecting neighbors


Neighbor Router ID
3.3.3.3 is the BDR of network 50.50.50.0/24
Router priority
4.4.4.4 is the DR of network 50.50.50.0/24
Neighbor address 2.2.2.2 is not a DR/BDR; its state is 2-way

© VTC 2013 ILO 4 28


Displaying LSDB Information
Area ID

<H3C>display ospf lsdb

OSPF Process 1 with Router ID 1.1.1.1


Link State Database

Area:0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 1564 48 800000C7 0
Router 1.1.1.1 1.1.1.1 804 48 800000F2 0
Router 4.4.4.4 4.4.4.4 1520 48 800000C9 0
Router 2.2.2.2 2.2.2.2 1276 48 800000C8 0
Network 50.50.50.4 4.4.4.4 1520 40 800000C8 0

The link state of the


Sequence numbers of LSA
network can be
advertised only by the packets
DR Link state advertising router

© VTC 2013 ILO 4 29


Displaying OSPF Routing Information

<H3C>display ospf routing

OSPF Process 1 with Router ID 1.1.1.1


Routing Tables

Routing for Network


Destination Cost Type NextHop AdvRouter Area
50.50.50.0/24 1 Transit 50.50.50.1 4.4.4.4 0.0.0.0

4.4.4.4/32 2 Stub 50.50.50.4 4.4.4.4 0.0.0.0


3.3.3.3/32 2 Stub 50.50.50.3 3.3.3.3 0.0.0.0
2.2.2.2/32 2 Stub 50.50.50.2 2.2.2.2 0.0.0.0
1.1.1.1/32 0 Stub 1.1.1.1 1.1.1.1 0.0.0.0

Destination network Cost Next hop address


Advertising router
Route type
Stub => stub network OSPF Area ID
Transit=>transit nework
© VTC 2013 ILO 4 30
Displaying Other OSPF Information
[Router] display ospf brief
• Display OSPF brief information
[Router] display ospf interface
• Display OSPF interface information

[Router] display ospf error


• Display OSPF error information
[Router] display ospf INTEGER<1-16635>
• Display OSPF process information

© VTC 2013 ILO 4 31


Debugging OSPF
<Router> debugging ospf event
• Enable OSPF event debugging
<Router> debugging ospf lsa
• Enable OSPF LSA debugging
<Router> debugging ospf packet
• Enable OSPF packet debugging
<Router> debugging ospf spf
• Enable OSPF SPF debugging
<Router> debugging ospf INTEGER<1-65535>
• Enable OSPF process debugging

© VTC 2013 ILO 4 32


Basic BGP concepts and
configuration

© VTC 2013 ILO 4


Border Gateway Protocol (BGP)

• BGPv4 is codified in RFC4271. It is used to make routing decisions in


the core of Internet.
• It exchanges network reachability information with other BGP systems
and performs routing between multiple autonomous systems.
• It is a path vector protocol which maintains the path information that
gets updated dynamically. The path information can be used to avoid
routing loops.
• It supports classless routing and CIDR.
• BGP does not involve traditional Interior Gateway Protocol (IGP)
metrics, routing decisions are made based on path and network
policies.

© VTC 2013 ILO 4 34


Autonomous System (AS)
• An Autonomous System (AS) is a collection of connected
Internet Protocol (IP) routing prefixes under the control of
one or more network operators.
• If an AS connects to the public Internet using an exterior
gateway protocol such as BGP, then it must be assigned a
unique AS number which is managed by the Internet
Assigned Numbers Authority (IANA).

© VTC 2013 ILO 4 35


AS Numbers

• AS numbers can be between 1 to 65,535.


– RIRs manage the AS numbers between 1 and 64,512.
– The 64,512 - 65,535 numbers are reserved for private use
(similar to IP Private addresses).
– The IANA is enforcing a policy whereby organizations that
connect to a single provider use an AS number from the
private pool.
• Note:
– RFC 4893 and RFC 5398 describe BGP extensions to increase the AS
number from the two-octet (16-bit) field to a four-octet (32-bits) field,
increasing the pool size from 65,536 to 4,294,967,296 values.

© VTC 2013 ILO 4 36


BGP Neighbors
• Any two routers that exchange BGP routing information are
called BGP peers or BGP neighbors.
• Each router running BGP is called a BGP speaker.
AS100 AS300

RTA RTE

EBGP EBGP
AS200
IBGP

RTB RTD

RTC
© VTC 2013 ILO 4 37
Two Types of BGP -
IBGP and EBGP

• When BGP is used between autonomous


systems (AS), the protocol is referred to as
External BGP (EBGP).
• If a service provider is using BGP to exchange
routes within an AS, then the protocol is
referred to as Interior BGP (IBGP).

© VTC 2013 ILO 4 38


#Router A: #Router B:
bgp 100 bgp 101
peer 220.1.1.2 as-number 101 peer 220.1.1.1 as-number 100
One Way to Become the BGP Route :
Full Dynamic Import

AS200
18.0.0.1/8
OSPF
RTB

RTB detects the routes 18.0.0.0/8 via OSPF and then


redistributes it into BGP.
© VTC 2013 ILO 4 40
 Importing OSPF to BGP with default
settings

# Router RTB
bgp 200
import ospf

© VTC 2013 ILO 4 41


The Second Way to Become the BGP
Route : Semi-Dynamic Import

AS200

18.0.0.1/8
OSPF
RTB

RTB detects the routes 18.0.0.0/8 via OSPF but this


route will not be put into BGP table unless a
network command is used to advertise 18.0.0.0/8
© VTC 2013 ILO 4 42
•  BGP process goes through the used active
routes in the routing table and if it finds
exactly the specified subnet, it places it to the
BGP database and advertises.

# Router RTB
bgp 200
network 18.0.0.0 8
© VTC 2013 ILO 4 43
The Third Way to Become the BGP
Route : Static Import

AS200

18.0.0.1/8

RTB

Manually configure the static route 18.0.0.0/8 and


import the static route into the BGP table of RTB by
using network command.
© VTC 2013 ILO 4 44
# Router RTB
ip static-route 18.0.0.0 255.0.0.0.0 1.2.3.4
bgp 200
network 18.0.0.0 8

© VTC 2013 ILO 4 45


Inject BGP routes into IGP route

[SwitchB] ospf 1
[SwitchB] import-route bgp allow-ibgp
[SwitchB] import-route bgp route-policy bgp2ospf

[SwitchB] acl number 2002


[SwitchB-acl-basic-2002] rule permit source 172.17.2.0 0.0.0.255
[SwitchB-acl-basic-2002] quit
[SwitchB] route-policy bgp2ospf permit node 10
[SwitchB-route-policy] if-match acl 2002
[SwitchB-route-policy] apply tag 20
[SwitchB-route-policy] quit

© VTC 2013 ILO 4 46


Router ID

• The Router ID is chosen as the highest IP on


active loopbacks, if no loopbacks then the
highest on active interfaces.
• The best way is to configure it manually
before the first session is configured
(otherwise session restart is needed for the
router-ID to take effect).

© VTC 2013 ILO 4 47


BGP Routing Policies
1. BGP Speaker only puts the best route learned from BGP to its routing table.
2. BGP Speaker only sends its using routes to its peers.
3. BGP Speaker sends routes learned through EBGP to all BGP peers. ( Both EBGP
and IBGP )
4. To avoid routing loops within an AS, routes learned through IBGP are never
propagated to other IBGP peers.
5. BGP synchronization rule
1. If synchronization is enabled, a router learning a route via IBGP waits until the IGP has
propagated the route within the autonomous system and then advertises it to EBGP peers.
2. If synchronization is disabled, BGP can use and advertise to EBGP neighbors routes learned
from an IBGP neighbor that are not present in the local routing table.
6. When BGP neighbors first establish a connection, they exchange all candidate BGP
routes.
7. After this initial exchange, incremental updates are sent as network information
changes.

© VTC 2013 ILO 4 48


Policy 3

AS2000

AS1000

AS3000

© VTC 2013 ILO 4 49


Policy 4

AS1000

© VTC 2013 ILO 4 50


Policy 5.2 (Default) –
Synchronization Disable

AS2000

AS1000

IGP
BGP

© VTC 2013 ILO 4 51


Policy 5.1 –
Synchronization Enable

AS2000

AS1000

IGP
BGP

© VTC 2013 ILO 4 52


IBGP Routing Rules

• AS path attribute is not updated within a


single AS anatomy and so there is no way to
detect loops and other possible problems.
• It is the iBGP split horizon rule that prevents
an ibgp peer to forward learned route from
an ibgp peer to another ibgp peer.
• Therefore,  a full mesh topology is required
for connecting iBGP peers.
© VTC 2013 ILO 4 53
IBGP Source IP Address Problem

• When multiple paths exist between IBGP neighbors,


the BGP source address can cause problems:
– Router D uses the neighbor 10.3.3.1 remote-as
65102 command to establish a relationship with A.
– However, router A is sending BGP packets to D via B therefore
the source IP address of the packets is 10.1.1.1.
– The IBGP session between A and D cannot be established
© VTC 2013
because D does not recognize
ILO 4
10.1.1.1 as a BGP neighbor. 54
IBGP Source IP Address Solution
• Establish the IBGP session using a loopback interface.
Router(config-router)#
neighbor {ip-address | peer-group-name} update-source
loopback interface-number

• Informs the router to use a loopback interface address


for all BGP packets.
• Overrides the default source IP address for BGP
packets.
• Typically only used with IBGP sessions.
• As an added bonus, physical interfaces can go down
for any number of reasons but loopbacks never fail.
IBGP Source IP Address Example
AS 65101
AS 65102
AS 65100 10.1.1.0/24
.1 .2
172.16.1.1 192.168.1.1
EIGRP
R1 R2 R3 R4
.1 .2
10.2.2.0/24

Lo0 192.168.2.2 Lo0 192.168.3.3

R2(config)# router bgp 65101


R2(config-router)# neighbor 172.16.1.1 remote-as 65100
R2(config-router)# neighbor 192.168.3.3 remote-as 65101
R2(config-router)# neighbor 192.168.3.3 update-source loopback0
R2(config-router)# exit
R2(config)# router eigrp 1
R2(config-router)# network 10.0.0.0
R2(config-router)# network 192.168.2.0
R2(config-router)#

R3(config)# router bgp 65101


R3(config-router)# neighbor 192.168.1.1 remote-as 65102
R3(config-router)# neighbor 192.168.2.2 remote-as 65101
R3(config-router)# neighbor 192.168.2.2 update-source loopback0
R3(config-router)# exit
R3(config)# router eigrp 1
R3(config-router)# network 10.0.0.0
R3(config-router)# network 192.168.3.0
R3(config-router)#
© VTC 2013 ILO 4 56
EBGP Dual-Homed Problem

• R1 in AS 65102 is dual-homed with R2 in AS 65101.


• A problem can occur if R1 only uses a single neighbor statement
pointing to 192.168.1.18 on R2 .
– If that link fails, the BGP session between these AS is lost, and no packets
pass from one autonomous system to the next, even though another link
exists.
• A solution is configuring two neighbor statements on R1 pointing
to 192.168.1.18 and 192.168.1.34.
– However, this doubles the BGP updates from R1 to R2.

© VTC 2013 ILO 4 57


EBGP Dual-Homed Solution

• The ideal solution is to:


– Use loopback addresses.
– Configure static routes to reach the loopback
address of the other router.
– Configure the neighbor ebgp-multihop
command to inform the BGP process that this
neighbor is more than one hop away.
© VTC 2013 ILO 4 58
Enable Multihop EBGP
• Increase the time-to-live (TTL) for EBGP connections.
Router(config-router)#
neighbor {ip-address | peer-group-name} ebgp-multihop
[ttl]

• This command is of value when redundant paths exist


between EBGP neighbors.
• The default ttl is 1, therefore BGP peers must be directly
connected.
– The range is from 1 to 255 hops.
• Increasing the ttl enables BGP to establish EBGP
connections beyond one hop and also enables BGP to
perform load balancing.
Multihop EBGP Example
AS 65102 EBGP AS 65101
192.168.1.17 /28 192.168.1.18 /28

R1 R2
192.168.1. 33 /28 EBGP 192.168.1. 34 /28
Lo0 172.17.1.1 Lo0 172.16.1.1

R1(config)# router bgp 65102


R1(config-router)# neighbor 172.16.1.1 remote-as 65101
R1(config-router)# neighbor 172.16.1.1 update-source loopback0
R1(config-router)# neighbor 172.16.1.1 ebgp-multihop 2
R1(config-router)# exit
R1(config)# ip route 172.16.1.1 255.255.255.255 192.168.1.18
R1(config)# ip route 172.16.1.1 255.255.255.255 192.168.1.34
R1(config)#

R2(config)# router bgp 65101


R2(config-router)# neighbor 172.17.1.1 remote-as 65102
R2(config-router)# neighbor 172.17.1.1 update-source loopback0
R2(config-router)# neighbor 172.17.1.1 ebgp-multihop 2
R2(config-router)# exit
R2(config)# ip route 172.17.1.1 255.255.255.255 192.168.1.17
R2(config)# ip route 172.17.1.1 255.255.255.255 192.168.1.33
R2(config)#

© VTC 2013 ILO 4 60


Advertising EBGP Routes to IBGP Peers

• When an EBGP router receives an update from an EBGP


neighbor and forwards the update to its IBGP peers, the
source IP address will still be that of the EBGP router.
– IBGP neighbors will have to be configured to reach that
external IP address.
• Another solution is to override a router’s default
behavior and force it to advertise itself as the next-hop
address for routes sent to a neighbor.
– To do so, use the neighbor next-hop-self router
configuration command

© VTC 2013 ILO 4 61


neighbor next-hop-self
• Configure the router as the next hop for a BGP-speaking peer.
Router(config-router)#
neighbor {ip-address | peer-group-name} next-hop-self

• The command forces BGP to advertise itself as the source of the


routes.
• The ip-address identifies the peer router to which advertisements
will be sent, with this router identified as the next hop.
• This command is useful in unmeshed networks (such as Frame Relay)
where BGP neighbors may not have direct access to all other
neighbors on the same IP subnet.
Next Hop Self Example
AS 65101
AS 65102
AS 65100 10.1.1.0/24
.1 .2
172.16.1.1 192.168.1.1
EIGRP
R1 R2 R3 R4
.1 .2
10.2.2.0/24

Lo0 192.168.2.2 Lo0 192.168.3.3

R2(config)# router bgp 65101


R2(config-router)# neighbor 172.16.1.1 remote-as 65100
R2(config-router)# neighbor 192.168.3.3 remote-as 65101
R2(config-router)# neighbor 192.168.3.3 update-source loopback0
R2(config-router)# neighbor 192.168.3.3 next-hop-self
R2(config-router)# exit
R2(config)# router eigrp 1
R2(config-router)# network 10.0.0.0
R2(config-router)# network 192.168.2.0
R2(config-router)#

© VTC 2013 ILO 4 63


[RouterB] bgp 65009
[RouterB-bgp] router-id 2.2.2.2
[RouterB-bgp] peer 3.3.3.3 as-number 65009
[RouterB-bgp] peer 3.3.3.3 connect-interface loopback 0
[RouterB-bgp] quit
[RouterB] ospf 1
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 9.1.1.1 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
© VTC 2013 ILO 4 64
[RouterC] bgp 65009
[RouterC-bgp] router-id 3.3.3.3
[RouterC-bgp] peer 2.2.2.2 as-number 65009
[RouterC-bgp] peer 2.2.2.2 connect-interface loopback 0
[RouterC-bgp] quit
[RouterC] ospf 1
[RouterC-ospf-1] area 0
[RouterC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit

© VTC 2013 ILO 4 65


[RouterA] bgp 65008
[RouterA-bgp] router-id 1.1.1.1
[RouterA-bgp] peer 3.1.1.1 as-number 65009
[RouterA-bgp] network 8.1.1.1 24
[RouterA-bgp] quit
[RouterB] bgp 65009
[RouterB-bgp] peer 3.1.1.2 as-number 65008
[RouterB-bgp] quit
[RouterB] bgp 65009
[RouterB-bgp] import-route direct

© VTC 2013 ILO 4 66


Cisco H3C
neighbor x.x.x.x remote-as y peer x.x.x.x as-number y
update-source connect-interface
next-hop-self next-hop-local
ebgp-multihop ebgp-max-hop

© VTC 2013 ILO 4 67


BGP Path Attributes

• BGP path attribute is a set of parameters contained


in a BGP update message. It describes the specific
route so as to enable BGP to filter and select
routes. BGP also uses the path attributes to
determine the best path to the networks.

© VTC 2013 ILO 4 68


Types of BGP Attributes

• Well-known - These attributes must be recognized by all BGP


implementations. All well-known attributes are propagated to
other neighbors.
– Mandatory – They must be present in all update messages.
– Discretionary - They may or may not be present in update messages.
• Optional – They are recognized only by some
implementations.
– Transitional – These attributes can be transmitted to other ASs and
continue to work.
– Non-transitional – They only acts locally. Outside the AS, the value
are restored to the default values.

© VTC 2013 ILO 4 69


Common BGP Route Attributes
9 、 Originator-ID
1 、 Origin 10 、 Cluster-List
2 、 AS-Path 11 、 Destination Pref (MCI)
3 、 Next hop 12 、 Advertiser (Baynet)
4 、 MED 13 、 Rcid-Path (Baynet)
5 、 Local-Preference 14 、 MP_Reach_NLRI
6 、 Community 15 、 MP_Unreach_NLRI
7 、 Atomic-Aggregate 16 、 Extended_Communities
8 、 Aggregator
• Mandatory
• Non-Transitional

© VTC 2013 ILO 4 70


Origin ( 起點 ) Attribute

• It is used to define the origin of the routing information,


indicating how a route becomes the BGP routes.
– If a route is injected into the BGP with the “network”
command or route summarization, the origin attribute is IGP
– If a route is obtained via EGP, the origin attribute is GP
– Otherwise, e.g. a route is imported from OSPG, Origin
attribute is set to Incomplete

© VTC 2013 ILO 4 71


AS-Path Attribute

• It is the sequence of numbers of all the ASs


passed by a route to a certain destination.
• The BGP will add its own AS number to the
AS-path attribute when advertising a route
to the EBGP peer.
• If other factors are the same, the route with
shorter AS path will be selected.

© VTC 2013 ILO 4 72


AS-Path Attribute
D(18.0.0.0/8)
AS300
AS200
RTA
AS400 30.0.0.1

D,dl 400 300 200


30.0.0.2
RTB
AS100
AS500

D,d2 500 200

D,d1 400 300 200


>D,d2 500 200
© VTC 2013 ILO 4 73
Next Hop ( 下一跳 ) Attribute
RTA
Reach 18.0.0.0/8 via the next hop 10.0.0.2 RTC
Reach 20.0.0.0/8 via the next hop 10.0.0.3 Reach 19.0.0.0/8 via the next hop 10.0.0.1
Reach 19.0.0.0/8 via the next hop 21.0.0.1 Reach 20.0.0.0/8 via the next hop 10.0.0.3
AS200
RTC
RTA 10.0.0.1
18.0.0.0/8
AS100 21.0.0.2 10.0.0.2 IBGP
EBGP
IBGP
20.0.0.0/8
21.0.0.1 10.0.0.3
RTD
19.0.0.0/8

RTB
RTB
Reach 18.0.0.0/8 via the next hop 10.0.0.2 This can be modified by using
Reach 20.0.0.0/8 via the next hop 10.0.0.3 next-hop-self
© VTC 2013 ILO 4 74
Next Hop (Multiaccess Networks)
RTA
Reach 18.0.0.0/8 via the next hop 10.0.0.2 RTC
Reach 20.0.0.0/8 via the next hop 10.0.0.3 Reach 19.0.0.0/8 via the next hop 10.0.0.1
Reach 19.0.0.0/8 via the next hop 21.0.0.1 Reach 20.0.0.0/8 via the next hop 10.0.0.3
AS200
RTC
RTA 10.0.0.1
18.0.0.0/8
AS100 21.0.0.2 10.0.0.2 IBGP
EBGP
IBGP
20.0.0.0/8
21.0.0.1 10.0.0.3
RTD
19.0.0.0/8
Multiaccess
RTB

•When RTC advertises the route 20.0.0.0/8 to RTA, it uses 10.0.0.3 as the next
hop, instead of 10.0.0.2.
© VTC 2013 ILO 4 75
Local Preference ( 優先 ) Attribute

• This attribute is only used inside the AS


between IBGP peers and not notified to EBGP
peers, i.e. it only affects the traffic that leaves
this AS, but not the traffic that enters this AS.
• It is used to help the router inside the AS
select the optimal egress for it to go out the
AS. The route with a higher precedence level
is selected. The default value is 100.
© VTC 2013 ILO 4 76
Local Preference Attribute
AS400
D (18.0.0.0/8)

RTF

AS200 AS300
RTD 30.0.0.1 20.0.0.1 RTE

30.0.0.2 AS100 20.0.0.2


RTB RTC
D , local-pref1 100 D , local-pref2 200

D , local-pref1 100
RTA
>D , local-pref2 200

The route with local-pref2 will be selected


© VTC 2013 ILO 4 77
in RTA.
Multi-Exit-DISC (MED) Attribute

• It is used to indicate the preferable path for


the external neighbor router to enter some
AS that has multiple entries.
• The entry path with a smaller MED value will
be selected.

© VTC 2013 ILO 4 78


Multi-Exit-DISC (MED) Attribute
AS100

>D,metric1 10
D,metric2 20
RTA

30.0.0.1 20.0.0.1

RTA will select the lower metric

D,metric1 10 D,metric2 20
30.0.0.2 20.0.0.2
RTB RTC
IBGP
D(18.0.0.0/8)
AS200

© VTC 2013 ILO 4 79


BGP Route Selection Procedure

1. If the next hop of this route is unreachable, then neglect this route.
2. Select the route with a higher local preference.
3. Select the originated route by the local router (same local
precedence).
4. Select the route whose AS path is shortest.
5. Select the route whose origin type is IGP, EGP, and
Incomplete in turn.
6. Select the route whose MED is smallest.
7. Select the route whose Router ID is smallest.

© VTC 2013 ILO 4 80


Basic Configuration of BGP

• Enable BGP
– bgp as-number
• Configure a BGP Peer Group
– group group-name { [ internal ] | external }
• Add a peer into a peer group
– peer peer-address group group-name
• Import route to BGP
– network ip-address [ address-mask ]
– import-route protocol [ med med-value ]

© VTC 2013 ILO 4 81


Cisco Peer Group

A peer-group is a set of BGP neighbors that shares the same


outbound policy, where the inbound policies might be different.
- Create a BGP peer-group:
neighbor ibgp-pgroup peer-group

- Assign BGP neighbor into a peer group:


neighbor 1.1.2.2 peer-group ibgp-pgroup
neighbor 1.1.3.2 peer-group ibgp-pgroup
neighbor 1.1.4.2 peer-group ibgp-pgroup
neighbor 1.1.5.2 peer-group ibgp-pgroup

- Configure needed commands for the peer-group


neighbor ibgp-pgroup remote-as 55555
neighbor ibgp-pgroup route-reflector-client
neighbor ibgp-pgroup next-hop-self

© VTC 2013 ILO 4 82


Examples of Basic BGP
Configuration
E0/0:10.1.1.1/24

AS100 RTA AS300

S1/0:1.1.1.1/24 S1/0:4.1.1.2/24 RTF

EBGP EBGP
S1/0:1.1.1.2/24
IBGP S1/1:4.1.1.1/24
RTB
S1/1:2.1.1.2/24 S1/0:3.1.1.1/24
RTE
RTC
RTD
AS200

© VTC 2013 ILO 4 83


[RTA]bgp 100
[RTA-bgp]group as200 external
[RTA-bgp]peer 1.1.1.2 group as200 as-number 200
[RTA-bgp]import direct

[RTB]ospf
[RTB-ospf-1]area 0.0.0.0
[RTB-ospf-1-area 0.0.0.0]network 1.1.1.2 0.0.0.255
[RTB-ospf-1-area 0.0.0.0]network 2.1.1.2 0.0.0.255
[RTB]bgp 200
[RTB-bgp]group as100 external
[RTB-bgp]group as200
[RTB-bgp]peer 1.1.1.1 group as100 as-number 100
[RTB-bgp]peer 3.1.1.1 group as200
[RTB-bgp]import ospf
© VTC 2013 ILO 4 84
[RTE]ospf
[RTE-ospf-1]area 0.0.0.0
[RTE-ospf-1-area 0.0.0.0]network 3.1.1.2 0.0.0.255
[RTE]bgp 200
[RTE-bgp]group as300 external
[RTE-bgp]group as200
[RTE-bgp]peer 4.1.1.2 group as300 as-number 300
[RTE-bgp]peer 2.1.1.2 group as200
[RTE-bgp]import ospf

[RTF]bgp 300
[RTF-bgp]group as200 external
[RTF-bgp]peer 4.1.1.1 group as200 as-number 200
[RTF-bgp]import direct

© VTC 2013 ILO 4 85


Problems of BGP
in Large-scale Networks

•The size of BGP routing table is very large


–BGP aggregation

•There are too many IBGP neighbors


–BGP reflection

–BGP confederation

•Routes change too frequently


–BGP dampening

© VTC 2013 ILO 4 86


BGP Aggregation ( 聚合 )—
Advertise Aggregated Route Only

• Routes are summarized into one CIDR block


to reduce the number of routes.
AS100 AS200

172.16.0.0/24 RTA 172.16.0.0/20 RTB


172.16.1.0/24
172.16.2.0/24
......
172.16.15.0/24 EBGP
172.16.0.0/20
[RTA-bgp] aggregate 172.16.0.0 20 detail-suppressed

© VTC 2013 ILO 4 87


BGP Aggregation —
Advertise Aggregated Routes and Concrete Routes

• This approach advertises the aggregate route as well as


specific routes.

172.16.0.0/20
AS100 172.16.13.0/24 AS200
RTA
172.16.0.0/24 172.16.13.0/24
172.16.1.0/24
172.16.2.0/24
...... EBGP
172.16.15.0/24
172.16.1.0/24

RTB 172.16.0.0/20
172.16.0.0/20
172.16.1.0/24
[RTA-bgp] aggregate 172.16.0.0 20
[RTA-bgp] network 172.16.13.0 24
© VTC 2013 ILO 4 88
Large IBGP Networks

• To ensure the
connectivity between AS100
the IBGP peers, the fully
meshed network needs IBGP
to be established
between them.
• For large networks, it EBGP
costs a lot to establish a
fully meshed network.

© VTC 2013 ILO 4 89


BGP Reflection

• BGP reflector can be used in


large networks to avoid Route reflector
AS100
RTA
using full mesh.
• Reflector receives path from IBGP Non-client
Client
clients and non-clients RTE
RTB
– Selects best path
– If best path is from client, Client
RTC
Non-client
RTD
reflect to other clients and
EBGP cluster
non-clients
– If best path is from non-
client, reflect to clients only

© VTC 2013 ILO 4 90


BGP Confederation ( 聯盟 )

• Confederation is an alternative solution to large ibgp


networks. In this approach, one AS is divided into multiple
sub-ASs. In each sub-ASs, ibgp fully meshed network is
used. But, ebgp is used between sub-ASs.
AS200
RTA
RTG

ebgp
RTD
RTB AS65060
ibgp
AS65050 ibgp
RTC RTF
RTE
AS100
© VTC 2013 ILO 4 91
BGP Dampening ( 衰減 )

• A route may disappear and reappears


intermittently, which is called route flapping.
• In BGP, when a route flapping occurs, the route
update and withdraw messages are broadcast on
the network again and again, which will waste
extremely large amount of bandwidth and
processing time of routers.
• So, flapping must be avoided. The technology
used to control the route instability is dampening.
© VTC 2013 ILO 4 92
BGP Dampening

• Whenever a route flaps,


penalty will be given to it.
When the penalty reaches Penalty
value Restrain threshold
the restrain threshold, the
route will be suppressed
Reuse
(not to be advertised). threshold
• When the value descends
to the reuse threshold, the
route suppression will be Time
released and advertised BGP Route Flapping procedure
again.

© VTC 2013 ILO 4 93


IP Addressing

© VTC 2013 ILO 4


Configure DHCP Server

[RTA] dhcp enable


[RTA] dhcp server forbidden-ip 172.16.1.1
[RTA] dhcp server ip-pool pool1
[RTA-dhcp-pool-pool1] network 172.16.1.0 mask 255.255.255.0
[RTA-dhcp-pool-pool1] gateway-list 172.16.1.1

© VTC 2013 ILO 4 95


Configure VLANs and IP Addresses on
SWA

[SWA] VLAN 2
[SWA-Vlan2] quit
[SWA] interface e1/0/2
[SWA-Ethernet1/0/2] port access vlan 2
[SWA] interface vlan-interface 1
[SWA-Vlan-interface1] ip address 172.16.1.1 24
[SWA] interface vlan-interface 2
[SWA-Vlan-interface2] ip address 172.16.0.1 24

© VTC 2013 ILO 4 96


Configure DHCP Relay

[SWA] dhcp enable


[SWA] dhcp relay server-group 1 ip 172.16.0.2
[SWA] interface vlan-interface 1
[SWA-Vlan-interface1] dhcp select relay
[SWA-Vlan-interface1] dhcp relay server-select 1

© VTC 2013 ILO 4 97


WAN Connections

© VTC 2013 ILO 4


Establishment of a PPP Session
PPP link
PSTN/ISDN

Link establishment phase

Authentication phase (optional)


PAP or CHAP

Negotiating the network layer protocol

© VTC 2013 ILO 4 99


PPP Link Phases

Interface LCP Opened


Dead Phase up Establish Phase Authenticate Phase

Fail
Fail

Success
/None

Terminate Phase Network Phase


Down Closing

© VTC 2013 ILO 4 100


被验证方 PAP Authentication
主验证方
Authenticatee Authenticator

Username +
password

Acknowledgement /
Authenticate-NAK
User List

• Authenticatee initiates an authentication


• It is a two-way handshake authentication protocol.
• The username and password are transmitted in plain text.

© VTC 2013 ILO 4 101


CHAP
Authenticatee
Authentication
Authenticator

username + random no.

username + Digest

ACK/NACK

User List
• Authenticator initiates an authentication
• It is a three-way handshake authentication protocol.
• It uses MD5 to generate a digest for the packet ID, the password,
and the random number.

© VTC 2013 ILO 4 102


PAP Authentication Configuration Example

Authenticator Authenticatee

Serial 1/0 Serial 1/0

RTA RTB

local-user routera interface serial1/0


password simple hello ppp pap local-user routera password
service-type ppp simple hello

interface serial1/0
ppp authentication-mode pap

© VTC 2013 ILO 4 103


CHAP Authentication Configuration Example 1
Authenticator Authenticatee

Serial 1/0 Serial 1/0

RTA RTB

local-user routera local-user routerb


password simple hello password simple hello
service-type ppp service-type ppp

interface serial1/0 interface serial1/0


ppp authentication-mode chap ppp chap user routera
ppp chap user routerb

 Authenticatee uses the local username


and password for authentication
© VTC 2013 ILO 4 104
CHAP Authentication Configuration Example 2

• Authenticatee uses the default CHAP password for


authentication
Authenticator Authenticatee

Serial 1/0 Serial 1/0

RTA RTB

local-user routera interface serial1/0


password simple hello ppp chap user routera
service-type ppp ppp chap password simple hello

interface serial1/0
ppp authentication-mode chap

© VTC 2013 ILO 4 105


Introduction to PPP MP
(MLPPP)
• MP ( Multilink PPP ) bundles several PPP links
together as one link
• MP can be used to increase bandwidth, load
sharing, link backup and to decrease transmission
delay ppp
ppp

Bundle interface
ppp

ppp

© VTC 2013 ILO 4 106


MP by MP-Group Interface

• Create MP-Group interface and assign


properties of the interface such as ip address
[Router] interface mp-group mp-number
• Add physical interface into MP-Group
[Router-interface] ppp mp mp-group mp-number

© VTC 2013 ILO 4 107


PPP MP Configuration Example 3
• MP-Group Configuration
Serial2/0 Serial2/0

Serial2/1 Serial2/1
PPP MP
RTA RTB
[RTA] interface mp-group 1
[RTA-Mp-group1] ip address 1.1.1.1 24
[RTA-Mp-group1] interface Serial2/0
[RTA-Serial2/0] ppp mp mp-group 1
[RTA-Mp-group1] interface Serial2/1
[RTA-Serial2/1] ppp mp mp-group 1

[RTB] interface mp-group 1


[RTB-Mp-group1] ip address 1.1.1.2 24
[RTB-Mp-group1] interface Serial2/0
[RTB-Serial2/0] ppp mp mp-group 1
[RTB-Mp-group1] interface Serial2/1
[RTB-Serial2/1] ppp mp mp-group 1
© VTC 2013 ILO 4 108
PPP MP Implementation Method

• Virtual template (VT) interface


– VT interfaces can involve an authentication
process. The device locates specified VT
interface by the username provided by the peer.
– Multiple bundles can be created on the same VT
interface, each being an MP link.
• MP-group interface
– Only one bundle is allowed, and links cannot be
bundled according to the peer’s descriptor

© VTC 2013 ILO 4 109


MP by VT interface
• Create a VT interface
[Router] interface virtual-template number
[Router-Serial1/0] ppp mp virtual-template number

• Associate a physical interface and a


username with the VT interface
[Router-Serial1/0] ppp mp user username bind
virtual-template number
[Router-Virtual-Template1] ppp mp binding
authentication
© VTC 2013 ILO 4 110
PPP MP Configuration Example 1
Serial2/0 Serial2/0

Serial2/1 Serial2/1
RTA PPP MP RTB
• Associate physical interfaces with a VT interface
[RTA] interface virtual-template 1
[RTA-Virtual-Template1] ip address 1.1.1.1 24
[RTA] interface serial 2/0
[RTA-Serial2/0] ppp mp virtual-template 1
[RTA] interface serial 2/1
[RTA-Serial2/0] ppp mp virtual-template 1

[RTB] interface virtual-template 1


[RTB-Virtual-Template1] ip address 1.1.1.2 24
[RTB] interface serial 2/0
[RTB-Serial2/0] ppp mp virtual-template 1
[RTB] interface serial 2/1
[RTB-Serial2/0] ppp mp virtual-template 1

© VTC 2013 ILO 4 111


PPP MP Configuration Example 2
Serial2/0 Serial2/0

Serial2/1 Serial2/1
RTA PPP MP RTB

• Associate a username with a VT interface


[RTA] local-user rtb
[RTA-luser-rtb] password simple rtb
[RTA-luser-rtb] service-type ppp
[RTA] ppp mp user rtb bind virtual-template 1
[RTA] interface virtual-template 1
[RTA-Virtual-Template1] ip address 1.1.1.1 24
[RTA-Virtual-Template1] ppp mp binding authentication
[RTA] interface serial 2/0
[RTA-Serial2/0] link-protocol ppp
[RTA-Serial2/0] ppp authentication-mode pap
[RTA-Serial2/0] ppp pap local-user rta password simple rta
[RTA-Serial2/0] ppp mp
[RTA] interface serial 2/1
......similar as interface serial 2/0

© VTC 2013 ILO 4 112


PPP MP Configuration Example
2 ( Con’t )
Serial2/0 Serial2/0

Serial2/1 Serial2/1
RTA PPP MP RTB
• Associate a username with a VT interface
[RTB] local-user rta
[RTB -luser-rta] password simple rta
[RTB-luser-rta] service-type ppp
[RTB] ppp mp user rta bind virtual-template 1
[RTB] interface virtual-template 1
[RTB-Virtual-Template1] ip address 1.1.1.2 24
[RTB-Virtual-Template1] ppp mp binding authentication
[RTB] interface serial 2/0
[RTB-Serial2/0] link-protocol ppp
[RTB-Serial2/0] ppp authentication-mode pap
[RTB-Serial2/0] ppp pap local-user rtb password simple rtb
[RTB-Serial2/0] ppp mp
[RTB] interface serial 2/1
.......

© VTC 2013 ILO 4 113


Protocol Stack of Frame Relay
OSI Ref. Model

3 Network Layer IP 、 IPX

2 Data Link Layer Frame Relay

EIA/TIA-232 、
1 Physical Layer EIA/TIA-449 、
V.24 、 V.35 、 X.21 等

© VTC 2013 ILO 4 114


Fundamental Concepts
Access
Line ( 256Kb
ps )
PVC
DLCI 40
DLCI 30
RTA RTB
LM
I
DTE DLCI 20

DCE
PVC
NNI
NNI LM
I
Access Line DCE
Frame Relay
( 64Kbps ) DLCI 30
network DTE
RTC
Access Line
( 128Kbps

© VTC 2013 ILO 4 115
Frame Relay Virtual Circuits
DLCI=20
Virtual Physical
Circuit DLCI=30 Line

 Multiple virtual circuits are multiplexed onto one


physical link.

© VTC 2013 ILO 4 116


Frame Relay Network Topology

Frame Relay Frame Relay


Network Network

Fully connected mesh Star topology

Frame Relay
Network

© VTC 2013
Partially connected mesh
ILO 4 117
Data Link Connection Identifier (DLCI)
RTB
RTA DLCI=40
DLCI=30
DLCI=20
DLCI=20
Frame Relay
Network
DLCI=30

DLCI=50
RTC

 A DLCI identifies a particular virtual circuit on a physical


link.
 The DLCI has only local significance to that physical link.

© VTC 2013 ILO 4 118


LMI (Local Management Interface) Protocol
RTB Frame Relay RTA
DLCI 48
Network DLCI 66

DTE 172.16.11.2 DCE DCE 172.16.11.3


DTE

Status Inquiry Status Inquiry

Status : DLCI 48 Active Status : DLCI 66 Active

Keepalive Keepalive

Keepalive Keepalive

© VTC 2013 ILO 4 119


LMI Standards
ANSI T1.617
Annex D

ITU-T Q.933
(CCITT) Annex A

Cisco Gang of Four


compatible

 Three LMI standards are supported


 DTE and DCE must adopt the same LMI standard

© VTC 2013 ILO 4 120


Frame Relay Address Mapping
DLCI=40
DLCI=30
DLCI=20
DLCI=20
10.10.10.1
Frame Relay
Network
FR header DLCI 20 DIP10.10.10.2
DLCI=30
Frame Relay
DLCI=50
Encapsulation
10.10.10.2

Frame Relay
Encapsulation FR header DLCI 50 DIP10.10.10.1

• Frame relay addressing mapping associates the protocol address


of a peer device with the DLCI (frame relay address) locally
assigned to the device.
• Mappings can be created manually or through inverse ARP.
© VTC 2013 ILO 4 121
Inverse ARP
RTB Frame Relay RTA
DLCI 48
Network DLCI 66

DTE 172.16.11.2 DCE DCE 172.16.11.3


DTE

Inverse ARP
RTB advertises IP 172.16.11.2 out
DCLI 48
Inverse ARP
RTA advertises IP 172.16.11.3
out DLCI 66

• Inverse ARP help simplifies frame relay configuration


by automatically detecting the protocol (network)
address of the peer interface.

© VTC 2013 ILO 4 122


Frame Relay Subinterfaces
• Two types of subinterfaces can be created on a frame
relay physical interface: point to point (P2P) and point
to multipoint (P2MP).
1.1.1.2/30
RTB
point-to-point

2.2.2.2/29 1.1.1.1/30
S0/0.1
RTC RTA
S0/0.2
2.2.2.1/29

point-to-multipoint
2.2.2.3/29
RTD Frame Relay
network
© VTC 2013 ILO 4 123
Basic Frame Relay Configuration Commands

• Enable frame relay on an interface


[Router-Serial1/0] link-protocol fr [ ietf | nonstandard ]

• Manually create a static address mapping


[Router-Serial1/0] fr map ip { ip-address [ mask ] |
default } dlci-number [ broadcast | [ nonstandard | ietf ]

• Specify the LMI standard to use


[Router-Serial1/0] fr lmi type { ansi | nonstandard | q933a }

© VTC 2013 ILO 4 124


Basic Frame Relay Configuration Commands
( con’t )

• Set the operating mode of an FR interface


[Router-Serial1/0] fr interface-type { dce | dte | nni }

• Create a PVC on an FR interface


[Router-Serial1/0] fr dlci dlci-number

• Create an FR subinterface
[Router-Serial1/0] interface serial interface-
number.subnumber [ p2p | p2mp ]

© VTC 2013 ILO 4 125


Configuring Frame Relay Switching

• Enable frame relay switching


[Router] fr switching

• Set the operating mode of an FR interface


[Router-Serial1/0] fr interface-type { dce | dte | nni }
• Create a frame relay route
[Router-Serial1/0] fr switch name interfaceinterface-type
interface-numberdlci dlci1 interface interface-type interface-
number dlci dlci2

© VTC 2013 ILO 4 126


Frame Relay Configuration
Frame Relay Example
RTB
S1/0
network
RTA 1.1.1.2/24
DLCI=50 DLCI=70
S1/0
1.1.1.1/24 RTC
DLCI=60 DLCI=80
S1/0
1.1.1.3/24

[RTA]interface serial 1/0


[RTA-Serial1/0]link-protocol fr
[RTA-Serial1/0]ip address 1.1.1.1 255.255.255.0
[RTA-Serial1/0]fr map ip 1.1.1.2 dlci 50
[RTA-Serial1/0]fr map ip 1.1.1.3 dlci 60

[RTC]interface serial 1/0


[RTC-Serial1/0]link-protocol fr
[RTC-Serial1/0]ip address 1.1.1.3 255.255.255.0
[RTC-Serial1/0]fr map ip 1.1.1.1 dlci 80

[RTB]interface serial 1/0


[RTB-Serial1/0]link-protocol fr
[RTB-Serial1/0]ip address 1.1.1.2 255.255.255.0
[RTB-Serial1/0]fr map ip 1.1.1.1 dlci 70

© VTC 2013 ILO 4 127


Displaying & Maintaining Frame Relay
• Display information about FR interfaces
[Router] display fr interface [ interface-type interface-
number ]

• Display frame relay address mappings


[Router] display fr map-info [ interface interface-type
interface-number ]

• [Router]
Displaydisplay
LMI configuration and statistics
fr lmi-info [ interface interface-type
interface-number ]
Displaying & Maintaining Frame Relay ( con’t )

• Display frame statistics for FR interfaces


[Router] display fr statistics {interface interface-
type interface-number}

• Display status of PVCs and frame statistics


[Router] display fr pvc-info {{interface interface-type
interface-number}{dlci-number}}

• [Router]
Displaydisplay
routesfrindlci-switch
the PVC switching table
{interface interface-
type interface-number}
© VTC 2013 ILO 4 129
Configuring RIP Neighbors [for p2mp]
1.1.1.2/24
Frame Relay
RTB
network
RIP
Uni
c as t
1.1.1.3/24
1.1.1.1/24
RIP Unicast
RTC S0/0 RTA

t
RTD
I P un i ca s
R
1.1.1.4/24
[RTA]rip
[RTA-rip-1]network 1.0.0.0
[RTA-rip-1]peer 1.1.1.2
[RTA-rip-1]peer 1.1.1.3
[RTD]rip [RTA-rip-1]peer 1.1.1.4
[RTD-rip-1]network 1.0.0.0
[RTD-rip-1]peer 1.1.1.1

• A frame relay network does not support broadcasts, e.g. RIP update broadcasts
• To unicast RIP updates across a frame relay network, you must configure the IP
addresses of RIP neighbors on your router.
© VTC 2013 ILO 4 130
Problem Causes by Split Horizon
Frame Relay
RTB
network
10.1
.1.0
/2 4

RTC S0/0

RTA

.1. 0/24
10.1
10.1.1.0/24 RTD

 The use of split horizon disables RTA from advertising routes


from RTD to RTB or RTC.

© VTC 2013 ILO 4 131


Resolving the Problem Causes by Split Horizon

RTB Frame Relay


network
10.1
. 1 .0 /
24

10.1.1.0/24 S0/0.1
RTC S0/0.2
S0/0.3
RTA

24
. 1 . 1.0/
10
10.1.1.0/24 RTD

• Disabling split horizon introduces the loop risk.


• As a solution, you can assign each virtual circuit a
subinterface.

© VTC 2013 ILO 4 132


NBMA Topology Modes of Operation
NBMA Modes Description

• One IP subnet.
non-broadcast • Neighbors must be manually configured.
• DR and BDR are elected.
(RFC-compliant) • DR and BDR need to have full connectivity with all other routers.
• Typically used in a full- or partial-mesh topology.

• One IP subnet.
point-to-multipoint • Uses a multicast OSPF hello packet to automatically discover the neighbors.
(RFC-compliant) • DR and BDR are not required. The router sends additional LSAs with more information about
neighboring routers.
• Typically used in a partial-mesh or star topology.

• If multicast and broadcast are not enabled on the VCs, the RFC-compliant point-to-multipoint mode
point-to-multipoint cannot be used, because the router cannot dynamically discover its neighboring routers using the
nonbroadcast hello multicast packets; this Cisco mode should be used instead.
(Cisco proprietary) • Neighbors must be manually configured.
• DR and BDR election is not required.

• Makes the WAN interface appear to be a LAN.


broadcast • One IP subnet.
(Cisco proprietary) • Uses a multicast OSPF hello packet to automatically discover the neighbors.
• DR and BDR are elected.
• Full- or partial-mesh topology.

• Different IP subnet on each subinterface.


point-to-point • No DR or BDR election.
(Cisco proprietary) • Used when only two routers need to form an adjacency on a pair of interfaces.
• Interfaces can be either LAN or WAN.
© VTC 2013 ILO 4 133
Reference

• Reference Textbook for the module


• http://networkgeekstuff.com/networking/hp
-a-series-h3c-bgp-configuration-basics/

© VTC 2013 ILO 4 134

You might also like