Professional Documents
Culture Documents
IPv4 Routing
ITP4111
Open Standards Networking
10.1.0.0/24 10.5.0.0/24
PC Server
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
Backbone Routers
ASBR
ABR
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
Area 0
Type 1 LSAs
Type 2 LSAs
DR
DR
DR DR
DR
Area 0
Type 3 LSAs
ABR
ABR
Area 0
ASBR
Type 1 LSA
Type 4 LSAs
ABR
ABR
Type 4 LSAs
Type 4 LSAs
Area 0
ASBR
Eth0/1 Eth0/0
20.0.0.2/24 30.0.0.2/24
[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
Eth1/0
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
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/-
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
RTA RTE
EBGP EBGP
AS200
IBGP
RTB RTD
RTC
© VTC 2013 ILO 4 37
Two Types of BGP -
IBGP and EBGP
AS200
18.0.0.1/8
OSPF
RTB
# Router RTB
bgp 200
import ospf
AS200
18.0.0.1/8
OSPF
RTB
# 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
[SwitchB] ospf 1
[SwitchB] import-route bgp allow-ibgp
[SwitchB] import-route bgp route-policy bgp2ospf
AS2000
AS1000
AS3000
AS1000
AS2000
AS1000
IGP
BGP
AS2000
AS1000
IGP
BGP
R1 R2
192.168.1. 33 /28 EBGP 192.168.1. 34 /28
Lo0 172.17.1.1 Lo0 172.16.1.1
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
RTF
AS200 AS300
RTD 30.0.0.1 20.0.0.1 RTE
D , local-pref1 100
RTA
>D , local-pref2 200
>D,metric1 10
D,metric2 20
RTA
30.0.0.1 20.0.0.1
D,metric1 10 D,metric2 20
30.0.0.2 20.0.0.2
RTB RTC
IBGP
D(18.0.0.0/8)
AS200
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.
• 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 ]
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
[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
–BGP confederation
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.
ebgp
RTD
RTB AS65060
ibgp
AS65050 ibgp
RTC RTF
RTE
AS100
© VTC 2013 ILO 4 91
BGP Dampening ( 衰減 )
[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
Fail
Fail
Success
/None
Username +
password
Acknowledgement /
Authenticate-NAK
User List
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.
Authenticator Authenticatee
RTA RTB
interface serial1/0
ppp authentication-mode pap
RTA RTB
RTA RTB
interface serial1/0
ppp authentication-mode chap
Bundle interface
ppp
ppp
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
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
Serial2/1 Serial2/1
RTA PPP MP RTB
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
.......
EIA/TIA-232 、
1 Physical Layer EIA/TIA-449 、
V.24 、 V.35 、 X.21 等
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
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
Keepalive Keepalive
Keepalive Keepalive
ITU-T Q.933
(CCITT) Annex A
Frame Relay
Encapsulation FR header DLCI 50 DIP10.10.10.1
Inverse ARP
RTB advertises IP 172.16.11.2 out
DCLI 48
Inverse ARP
RTA advertises IP 172.16.11.3
out DLCI 66
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
• Create an FR subinterface
[Router-Serial1/0] interface serial interface-
number.subnumber [ p2p | p2mp ]
• [Router]
Displaydisplay
LMI configuration and statistics
fr lmi-info [ interface interface-type
interface-number ]
Displaying & Maintaining Frame Relay ( con’t )
• [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
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
• 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.