Lecture 6+7 DT
Lecture 6+7 DT
Data Transmission
• Piotr Gajowniczek
• Andrzej Bąk
IP routing
RIP protocol
Routing Information Protocol (RIP)
net1 net1
Inicjalizacja
D(net1)=0 1 1
RT: net1, 1, direct
RT: net1, 0+1, direct a a
D(net1)=1
D(net1)=1
1 3
1
RT: net1, 2, via a b c RT: net1, 4, via a
5 4 2
1
d e
Distance vector protocols
net1
Inicjalizacja
1
RT: net1, 1, direct
a
1 3
1 D(net1)=4
RT: net1, 2, via a b c RT: net1, 4, via a
D(net1)=2
D(net1)=2 D(net1)=4
5 4 2
D(net1)=2
RT: net1, 7, via b 1 RT: net1, 6, via c
d e
Distance vector protocols
net1
Inicjalizacja
1
RT: net1, 1, direct
a
1 3
1 D(net1)=3
RT: net1, 2, via a b c RT: net1, 3, via b,
D(net1)=3
5 4 2
net1
Inicjalizacja
1
RT: net1, 1, direct
a
1 3
1
RT: net1, 2, via a b c RT: net1, 3, via b,
5 4 2
Received
No route r Yes
known ?
Metric Router B =
No reachable Yes current next No
(<16)? Yes hop
Ignore route r
Metric
No Metric
r=current?
r>current?
Yes Smaller
Greater
Equal
(1) Add new entry for (1) Change metric (1) Reset timeout (1) Change metric
route r of route r for route r of route r
(2) Reset timeout (2) Reset timeout (2) Change next hop
(3) Set Change flag (3) Set Change flag for route r Ignore route r
(3) Reset timeout
(4) Set Change flag
Periodic updates
Full Full
Routing information Routing information
A B C
Handling network topology changes
• (6) Router a sends update to rutera b with cost 3 (5) net1, 3, via b
(4)
(7)
• (7) Router b sets cost of net1 to 4 etc. (6)
net1, 4, via a
• ……… net1, 5, via b
• (8) The loop is resolved when the metric for net1 net1, 6, via a
hits infinity
• The „counting to infinity” results from the fact
that router b advertises route net1 to router a net1, 15, via b
which was the source of the original route to (8)
net1, 16, -
net1 net1, 16, -
1 1 1
net1 x a b c
Link down RT: net1, 3, via a
RT: net1, 2 via x Update for net1 Split horizon:
1) Router a losses path to net1 from a send update
c <> next hop
it stops sending update for this route
Split horizon:
don’t send update Timeout for net1
2) Router b will not see an update for net1 a = next hop
Update for net1
from c
3) Router b deletes route to net1 after RT: net1, 4, via c
timeout RT: net1, 5, via b
Split horizon: Split horizon:
send update don’t send update
4) Router b will finally learn new route to a <> next hop c = next hop
net1 from router c
Split horizon with poison reverse
• The split horizon with poison reverse is used to reduce the chance
of forming routing loops.
• A router sends information about a route in the direction from
which the original information came with cost of infinity
• This mechanism breaks the loop between adjacent routers
immediately
Split horizon
apply
b b
Router X
fails
Split horizon Loop is formed
net1 x do not apply
net1 x (counting to infinity
occurs)
b
Split horizon a a
apply Split horizon with
poison reverse
net1 x immediately breaks
the loop
Router X
fails
a
Split horizon with poison reverse + route poisoning
• With split horizon and route poisoning the invalid routes can be
reinstalled without waiting for timeout
2
1 1 1
net1 x a b c
RT: net1, 3, via a
1) Router a losses path to net1 RT: net1, 2 via x Update for net1
it sends update for this route with cost 16 from a
(route poisoning)
Split horizon w. Split horizon w.
poison reverse: posion reverse
2) Router b deletes route to net1 send update send update
net 1 cost=16 net1 cost=3
a=next hop c <> next hop
3) Router b will finally learn new route to
net1 from router c and further send it to a net1 cost=16 Update for net1
from c
OSPF protocol
Open Shortest Path First
LSA SPF
source: Alcatel-Lucent
OSPF scalability
area
border boundary router (ASBR)
routers backbone router
(ABR)
backbone
area 3
internal
area 1 routers
area 2
LS age: 321
Router ID = 1.1.1.1 Router ID = 2.2.2.2
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1 R1 R2
Advertising Router: 1.1.1.1 192.168.2.1 192.168.2.2
LS Seq Number: 8000000B
Checksum: 0x966C Network
Length: 48
192.168.2.0/24
Area Border Router
Number of Links: 2
Router LSA
Link connected to: another Router (point-to-point) (Link State ID: 1.1.1.1)
(Link ID) Neighboring Router ID: 2.2.2.2
(Link Data) Router Interface address: 192.168.2.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
R4
Link connected to: a Stub Network
(Link ID) Network/subnet number: 192.168.2.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64
LS age: 321
Router ID = 1.1.1.1 Router ID = 2.2.2.2
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1 R1 R2
Advertising Router: 1.1.1.1
LS Seq Number: 8000000B
Checksum: 0x966C
Unnumbered p-p link
Length: 36
Area Border Router
Number of Links: 1
Router LSA
Link connected to: another Router (point-to-point) (Link State ID: 1.1.1.1)
(Link ID) Neighboring Router ID: 2.2.2.2
(Link Data) Router Interface address: 0.0.0.10
Number of TOS metrics: 0
TOS 0 Metrics: 64
R4
MIB-II ifIndex of P-P link
Network LSA (type 2)
R4
Summary LSA (type 3)
Area 0 Area 1
LSA 3 LSA 3
with net2 with net1
ABR
net1 LSA 1/2 LSA 1/2 net2
with net1 with net2
Summary LSA type 3 example
LS age: 608
Options: (No TOS-capability, DC, Upward) Network LSA (transit network)
LS Type: Summary Links(Network) Router LSA (stub network)
Link State ID: 172.16.12.0 (summary Network Number)
Advertising Router: 1.1.1.1
LS Seq Number: 80000007
Checksum: 0xC567 Router ID = 1.1.1.1
Length: 28 Area ID 0
Network Mask: /24 R1/ABR Area ID 1
Metric: 64
LS age: 710
Options: (No TOS-capability, DC, Upward) Summary LSA 3
LS Type: Summary Links(Network) (Link State ID: 172.16.12.0)
Link State ID: 172.16.13.0 (summary Network Number) Summary LSA 3
Advertising Router: 1.1.1.1
LS Seq Number: 80000007
(Link State ID: 172.16.13.0)
Checksum: 0xA234
Length: 28
Network Mask: /24
Metric: 64 R4
….
Summary LSA (type 4)
Area 0 Area 1
LSA 4 LSA 4
with ASBR2 with ASBR1
ABR
ASBR1 LSA 1 LSA 1 ASBR2
from ASBR1 from ASBR2
Summary LSA type 4 example
LS age: 608
Options: (No TOS-capability, DC, Upward) Router LSA
LS Type: Summary Links(AS Boundary Router) (Link State ID: 5.5.5.5, ASBR)
Link State ID: 5.5.5.5 (AS Boundary Router)
Advertising Router: 1.1.1.1
LS Seq Number: 80000007
Checksum: 0xC567 Router ID = 1.1.1.1
Length: 28 Area ID 0
Network Mask: /0 R1/ABR Area ID 1
Metric: 10
Summary LSA 4
(Link State ID: 5.5.5.5)
R4
External LSA (5)
LS age: 1434
Options: (No TOS-capability, DC, Upward) External LSA
LS Type: AS External Link (Link State ID: 172.80.1.0)
Link State ID: 172.80.1.0 (External Network Number)
Advertising Router: 5.5.5.5
LS Seq Number: 80000002
Checksum: 0x980 Router ID = 1.1.1.1
Length: 36 Area ID 0
Network Mask: /24 R1/ABR Area ID 1
Metric Type: 2 (Larger than any link state path)
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
External LSA
(Link State ID: 172.80.1.0)
R4
LSDB – building network topology graph
LSA (100)
R2 R4
LSA (100) ignore
LSA (100)
R1 LSA (100)
LSA (100) update
LSA (100) R3 R5
LSA (100)
LSA flooding (standard areas)
172.16.5.1/24 172.16.5.2/24
exchange state
Exchange Protocol
Timeout expires
Slave retransmits Duplicate is ignored
message with y+1 I=0, M=1, MS=0 SN=y+1
Content = LSA Headers (Master expects
packet with y+2)
Master retransmits
I=0, M=1, MS=0 SN=y+2 packet with y+2
Content = LSA Headers
Exchange Protocol
• LSU packets are flooded to all routers in the OSPF area each time
there is a topology change on one of the links directly connected
to the router
• If there are no topology changes, the router will flood its LSAs
every 30 minutes.
❑ every LSA has a maximum age of 60 minutes.
❑ an OSPF router will age all LSAs in its link state database and will purge any
LSAs for which it has not received a refresh in the last 60 minutes.
• LSU packets are sent to
❑ multicast address 224.0.0.5 on point-to-point links
❑ multicast address 224.0.0.6 on broadcast networks when sending to
DR/DBR routers
❑ multicast address 224.0.0.5 on broadcast networks when sending by DR to
non-DR routers
• After router receives LSU it re-computes its routing table
OSPF metric