Data Network L2-L3-Level 2
Data Network L2-L3-Level 2
By : Yogesh Nikam
Mohammed Yaseen Majid
Sunil Padwal
•1
Content
Types of bridges
Transparent bridge
Source route bridge
Translational bridge
Translational bridge
Used to convert one networking data
format to another.
• For example, from Token Ring to Ethernet
and vice versa.
Transparent Bridging
• Most LAN switches use transparent bridging to create address lookup tables
• Transparent bridging is a technology that allows a switch to learn everything
it needs to know about the location of nodes on the network within the
network administrator having to do anything. Has five parts:
Learning
Flooding
Filtering
Forwarding
Aging
Overall design goal: Complete transparency
• “Plug-and-play”
• Self-configuring without hardware or software changes
• Bridges should not impact operation of existing LANs
Port x
Is MAC address of
destination in forwarding Bridge 2
database for ports A, B, or C ? Port A Port C
Port B
Not
Found? found ?
Src=x,
Src=y, Dest=x
Dest=y
Port 1 Port 4
Src=x, Dest=y Src=x, Dest=y
x is at Port 3
y is at Port 4
Port 2 Port 5
Src=x, Dest=y
Src=x,
Src=y, Dest=x
Dest=y
Port 3 Port 6
Algorithm:
For each frame received, the source stores the source field in the forwarding
database together with the port where the frame was received.
All entries are deleted after some time (default is 15 seconds).
Src=y, Dest=x
Port 1 Port 4
x is at Port 3
y is at Port 4
Port 2 Port 5
Src=y, Dest=x
Port 3 Port 6
Bridge 2 Bridge 2
A B C D E F
kept in the blocking state until there is a break in the spanning tree
topology, at which time they are activated to provide a new path.
The STP interface states for every Layer 2 interface running STP are as
follows:
• Blocking—The interface does not forward frames.
• Listening—The first transitional state after the blocking state when the
spanning tree determines that the interface should participate in frame
forwarding.
Learning—The interface prepares to participate in frame forwarding.
• Forwarding—The interface forwards frames.
Learning—The interface prepares to participate in frame forwarding.
• Forwarding—The interface forwards frames.
Disabled—The interface is not participating in spanning tree because of a
shutdown port, no
link on the port, or no spanning-tree instance running on the port.
Set to 0 Set to 0
protocol identifier Set to 0
Destination
MAC address version
Source MAC message type lowest bit is "topology change bit (TC bit)
address
flags
ID of root Cost of the path from the
root ID
bridge sending this
Cost
Configuration message
Message bridge ID
port ID ID of bridge sending this message
message age
priority of configurable interface
maximum age (used for loop detection)
Time between hello time
Time between
BPDUs from the root forward delay time since root sent a
recalculations of the
(default: 1sec) message on
spanning tree
which this message is based
(default: 15 secs)
Each bridge is sending out BPDUs that contain the following information:
B 0 B
Each bridge looks at the BPDUs received on all its ports and its own transmitted
BPDUs.
Root bridge is the smallest received root ID that has been received so far
(Whenever a smaller ID arrives, the root is updated)
At this time: A bridge B has a belief of who the root is, say R.
Bridge B determines the Root Path Cost (Cost) as follows:
• If B = R : Cost = 0.
• If B ≠ R: Cost = {Smallest Cost in any of BPDUs that were
received from R} + 1
B’s root port is the port from which B received the lowest cost path to R (in
terms of relation “<<“).
Knowing R and Cost, B can generate its BPDU (but will not necessarily send it
out):
R Cost B
R Cost B
B will send this BPDU on one of its ports, say port x, only if its BPDU is lower
(via relation “<<“) than any BPDU that B received from port x.
In this case, B also assumes that it
is the designated bridge for the
LAN to which the port connects. Port x
Bridge B
Port A Port C
Port B
indicated.
Bridge LAN 5
R
Bridge
What is the spanning tree? D
LAN 1
R
D
Bridge
D
LAN 3 LAN 4
•29 •Confidential © Tech Mahindra 2012
•29
STP (Cont..)
1. Each switch calculates the path with the minimal cost to the root switch
and chooses a root port, which is a port from which the root switch may
be reached with the minimal cost.
2. For each LAN, the switches that attach to the LAN choose a single switch
that is the closes switch to the root switch. The closest switch is the switch
through which the root switch can be reached with the minimal cost. This
switch is called a designated switch and it is responsible for forwarding all
traffic to and from the LAN. The port on the designated switch that
connects to the LAN is called the designated port.
3. The switches decide which of their ports will be part of the spanning tree.
A port is included in the spanning tree if it is a root port or a designated
port.
4. he following ports must be set to forwarding mode:
- All ports of the root switch
- The root port
- The designated port
6. All other switch ports in the network, that connect to other switches and
bridges, must be placed in blocking mode. This does not apply to ports
connected to workstations or PCs; these ports remain in the forwarding
state.
When the spanning tree topology is completed, the network switches send
and receive data only on the ports that are part of the spanning tree. Data
received on ports that are not part of the spanning tree is blocked.
A summary of the steps required to configure STP on the Brocade 8000 CEE
switch follows:
1. Specify the root switch using the bridge-priority priority command.
2. Enable PortFast on switch ports using the spanning-tree portfast {bpdu-
filter bpdu-guard} command. PortFast only needs to be enabled on ports
that connect to workstations or PCs. Do not enable PortFast on ports that
connect to other switches.
Brocade-proprietary aggregation
Brocade-proprietary aggregation is similar to standards-based link
aggregation but differs in how the traffic is distributed. It also has additional
rules that member links must meet before they are aggregated:
The most important rule requires that there is not a significant difference in
the length of the fiber between the member links, and that all member
links are part of the same port-group. The ports that belong to port-group
1, port-group 2, and port-group 3 are te0/0 to te0/7, te0/8 to te0/15, and
te0/16 to te0/23, respectively.
A maximum of four Brocade LAGs can be created per port-group.
VLANs
- Before being aggregated, links cannot be members of a VLAN.
- A VLAN sees a LAG as a logical interface.
- All LAG member links are configured with the same VLAN ID.
QoS
In the Fabric OS version 6.1.2_cee release, QoS commands for a LAG need
to be specified on each LAG member link, instead of on the logical LAG
interface (port-group). Additionally, the QoS commands specified on each
LAG member link need to be the same on each link.
Brocade-proprietary LAGs only
All LAG member links need to be part of the same port-group.
Switch port Interfaces configured as “switch port” interfaces cannot be
aggregated into a LAG. However, a LAG can be configured as a switchport.
•Supposed to support a
variety of protocols. But
in practice only TCP/IP
uses it.
•Figure Response message
•10.1.0.0 •A •B
•(255.255.0.0) • 10.0.0.0
•C • (255.0.0.0)
•D
•E •F
•10.2.0.0
•(255.255.0.0)
Authentication
•RIPv1: No protection
IP header UDP header RIPv2 Message
•RIPv2: Simple authentication
scheme
Command Version Set to 00.00
Authetication
Password (Bytes 0 - 3)
Password (Bytes 4 - 7)
32 bits
•68 •Confidential © Tech Mahindra 2012
RIP Problems
•Z’s Link-state
•Q’s Link-state
•Z
•A •Q •2
•B •Z •13
•Q •Y
•C •X •13
•Topology
•X information is
•X’s Link-state stored in a DB
separate from the
routing table
•73 •Confidential © Tech Mahindra 2012
Link-State Routing
Neighbor discovery
Construct a Link State Packet (LSP)
Distribute the LSP
Link State Announcement – LSA
Route calculation
If a link fails
Flood new LSPs
All routers recalculate their routing tables
•FDDI
•X •R1
•LSA
•R2
•R3
•N4 •Cost = 10
•76 •Confidential © Tech Mahindra 2012
Fast Convergence
•R2
•Alternate Path
•N1
•R1
•X •R3
•N2
•Primary Path
•77 •Confidential © Tech Mahindra 2012
Fast Convergence
Multi-Access networks
All routers must accept packets sent to the AllSPFRouters
(224.0.0.5) address
All DR and BDR routers must accept packets sent to the
AllDRouters (224.0.0.6) address
Hello packets are sent to the AllSPFRouters address
(Unicast for point-to-point and virtual links)
Group of contiguous
nodes/networks
Per area topology DB
•Area 2 •Area 3
Invisible outside the area
Reduces routing traffic •Area 0
Backbone Area is contiguous
All others areas must connect to •Backbone Area
the backbone
Virtual Links
•Area 1
•Area 4
•IR
•Area 2 •Area 3
•ABR/BR
•Area 0
External Route
Routes imported into OSPF from
another protocol or Static routes
•1.B •R1
•1.C •R1
•83 •Confidential © Tech Mahindra 2012
External Routes
•RIP
•IGRP
•OSPF
•EIGRP
•Redistribute
•BGP
•etc.
•84 •Confidential © Tech Mahindra 2012
External Routes
•External Cost =
•Cost = 10
•R1
•To N1
•R2
•External Cost = 2
•Cost = 8
•R3
•Network•Type 1 •Next Hop
•R3
•Network•Type 2 •Next Hop
•Selected Route
•N1 •1 •R2
•N1 •2 •R3
•86 •Confidential © Tech Mahindra 2012
Topology/Links-State DB
Bringing up adjacencies
LSA Types
Area Classification
•Hello
•FDDI
Router Priority
Hello Interval •Hello
Router dead interval
Network mask •FDDI
•Assists in DB synchronization
•Backup
•Designated
•Designated
•Router
•Router
•Designated •Backup
•Router •Designated
•91
•Router•Confidential © Tech Mahindra 2012
Designated Router by Priority
•131.108.3.2 •131.108.3.3
•DR
•144.254.3.5
2-way
The router sees itself in other Hello packets
DR is selected from neighbors in state 2-way or greater
•2-way
•DR •BDR
Full
Routers are fully adjacent
DB is synchronized
Relationship to the DR and
BDR
•Full
•DR •BDR
•DR •BDR
•Backbone
•1.A •3.A
•Area #0
•1.B •3.B
•2.C
•Backbone
•Area #0
•1 •3
•2
•1.A
•2.A
•Backboen
•1.A •1.B
•2.B
•Area #0
•1.B •1.C
•2.C
•1.C •1.D
•3.A
•1.D •2.A
•3.B •3.B
•1.B •1.A •3.A
•3.A •2.B
•3.C Token Token
Token Ring Token
Ring
•2.B Ring
Ring
•3.B Token •2.C
•3.D Ring •3.D
•1.D Token •3.C
•1.C •3.C
Ring
•2.A
•3.D •2.C
•Backbone
•Area #0
•2,3 •1,2
•1,3
•1.B •1.A •3.B •3.A
Token
Ring Token
•2.B Token
Ring Ring
Token
Ring •3.D
Token
Ring •1.D •3.C
•1.C
•2.A
Token
Ring
•1,3
•3.D
•2.C
•107 •Confidential © Tech Mahindra 2012
Normal Stub Area
•1,3
•X.1 Token
•3.D
•1.C Token
Ring
•2.D •3.C
Ring
•2.C
•108 •Confidential © Tech Mahindra 2012
Totally Stubby Area
•1,3
•2.C
•109 •Confidential © Tech Mahindra 2012
Not-So-Stubby Area
•1,3
•Externa
Ring •2.B •2.A Ring
•X.2
Token
Ring
•X.1 •1.D
Token
Ring
l Token
•X.1, X.2
•1.C Ring •3.C •3.D
Token
Ring
•2.D
•X.1, X.2
•Network
s •2.C
•110 •Confidential © Tech Mahindra 2012
Addressing
•Area 0
•Network 192.117.49.0
•Range 255.255.255.0
•Try to •Range
assign255.255.240.0 •Range 255.255.240.0
contiguous subnet •Range 255.255.240.0
ranges to facilitate summarization
•Area
Backbone area
(0) must exist •Border
All other areas •Router
must have •Area 2 •Area 3
connection to
backbone •Area 0 •Ruteador
•Backbone
Backbone must Interno
be contiguous •Router
Do not partition •Area 4
area (0) •Area 1
•Autonomous
•Internet
•System (AS)
•114 •Confidential © Tech Mahindra 2012
•Border Router
OSPF Design
Figure out your addressing first – OSPF and addressing go
together
The objective is to maintain a small link-state DB
Create address hierarchy to match the network topology
Separate blocks for infrastructure, customer interfaces,
customers, etc.
Redundancy
Dual links out of each area – using metrics (cost) for traffic
engineering
Too much redundancy …
• Dual links to backbone in stub areas must be the same
– otherwise sub-optimal routing will result
• Too much redundancy in the backbone area without
good summarization will affect convergence in the
area0
•OC12c
•Customer Connections
Terminology
Protocol Basics
Messages
General Operation
Peering relationships (EBGP/IBGP)
Originating routes
Neighbor
Configured BGP peer
NLRI/Prefix
NLRI - network layer reachability information
Reachability information for a IP address & mask
Router-ID
Highest IP address configured on the router
Route/Path
NLRI advertised by a neighbor
•Peering
•A •C
•A •C
BGP speakers •E
are called peers
•AS 102
Peers in different AS’s
•220.220.32.0/24
are called External Peers
•eBGP TCP/IP
•A •C
•A •C
(NLRI)
•BGP Update
•– External
neighbor (eBGP) isremote-as
222.222.10.1 configured
101 when AS• numbers are different
neighbor 222.222.10.2 remote-as 100
•AS 100
•B
•A
•iBGP TCP/IP
•Peer Connection •C
•B
•A
•215.10.7.3
•iBGP TCP/IP
•Peer Connection •C
•B
•A
•215.10.7.3
•iBGP TCP/IP
• interface loopback 0
• •Peer
ip address 215.10.7.1 255.255.255.255
Connection •C
• network 220.220.1.0
•B
•A
•215.10.7.3
• network 220.220.5.0
•B
•A
•215.10.7.3
•iBGP TCP/IP
•Peer Connection •C
• interface loopback 0
•Network Path
•AS 500 •180.10.0.0/16 300 200 100
•AS 300
•AS 200 •192.10.1.0/30 •140.10.0.0/16
•150.10.0.0/16 •C •.1 •.2 •D
•E
•B
•.2
•Network Next-Hop Path
•BGP Update
•AS 300
•AS 200 •192.10.1.0/30 •140.10.0.0/16
•150.10.0.0/16 •C •.1 •.2 •D
•E
•B
•.2 •Network Next-Hop Path
•AS 300
•AS 200 •192.10.1.0/30 •140.10.0.0/16
•150.10.0.0/16 •C •.1 •.2 •D
•E
•B
•.2
•Network Next-Hop Path
•AS 100
•160.10.0.0/16
•BGP Update
•AS 321
•AS 123
•.1 •192.168.10.0/24 •.2
•BGP Update
•Message
•Withdraw Routes
•x
•192.192.25.0/24
•Connectivity lost •192.192.25.0/24
•BGP RIB
•Network Next-Hop Path
•*>i160.10.1.0/24 192.20.2.2 i
•*>i160.10.3.0/24 192.20.2.2 i
•D 160.10.3.0/24
•BGP ‘network’ commands are normally
•R 153.22.0.0/16 used to populate the BGP RIB with routes
•Route Table from the Route Table
•S 192.1.1.0/24
•BGP RIB
•Network Next-Hop Path
•*> 160.10.0.0/16 0.0.0.0 i
•* i 192.20.2.2 i
•D 160.10.1.0/24 • no auto-summary
•D 160.10.3.0/24
•BGP ‘aggregate-address’ commands
•R 153.22.0.0/16 may be used to install summary routes in
•Route Table the BGP RIB
•S 192.1.1.0/24
•BGP RIB
•Network Next-Hop Path
•*> 160.10.0.0/16 0.0.0.0 i
•* i 192.20.2.2 i
•D 10.1.2.0/24
• redistribute static route-map foo
• no auto-summary
•D 160.10.1.0/24
•D 160.10.3.0/24
•BGP ‘redistribute’
•access-list commands
1 permit 192.1.0.0 0.0.255.255 can
also be
•R 153.22.0.0/16 used to populate the BGP RIB with routes
•Route Table from the Route Table
•S 192.1.1.0/24
•route-map foo permit 10
match ip address 1
•*>i160.10.1.0/24 192.20.2.2 i
•Update •Update •> 173.21.0.0/16
•* 192.20.2.1 100
•*>i160.10.3.0/24 192.20.2.2 i
•• results
receivesofpath
BGPinformation fromplaced
path selection peers in the BGP table
• “best path” flagged (denoted by “>”)
•*>i160.10.1.0/24 192.20.2.2 i
•
•*> 173.21.0.0/16 192.20.2.1 100 •Update •Update
•*>i160.10.3.0/24 192.20.2.2 i
•173.21.0.0/16 192.20.2.2
•Next-Hop200 100
•• may
buildsmodify
update using based
info from
on RIB
changed
update config
• Sends update to peers
•BGP RIB
•Network Next-Hop Path
•*>i160.10.1.0/24 192.20.2.2 i
•*>i160.10.3.0/24 192.20.2.2 i
•D 10.1.2.0/24
• Best paths installed in routing table if:
•D 160.10.1.0/24 • prefix and prefix length are unique
•D
•B 160.10.3.0/24
173.21.0.0/16
• lowest “protocol distance”
•R 153.22.0.0/16
•Route Table
•S 192.1.1.0/24
OPEN
To negotiate and establish peering
UPDATE
To exchange routing information
KEEPALIVE
To maintain peering session
NOTIFICATION
To report errors (results in session reset)
•AS 100
•D
•A
•B
•E
•A
•B
•A •AS3561
•AS200
•F
•B •AS21
•C
•D
•AS101 •AS675
•E
Configuration commands
router bgp <AS-number>
neighbor <ip address> remote-as <as-number>
Show commands
show ip bgp summary
show ip bgp neighbors
network command
network 198.10.4.0 mask 255.255.254.0
ip route 198.10.0.0 255.255.254.0 serial 0
matching route must exist in the routing table before network is
announced!
Origin: IGP
Withdrawn routes
Path Attributes
Advertised routes
Origin
AS-path
Next-hop
Multi-Exit Discriminator (MED)
Local preference
BGP Community
Others...
•AS 400
•150.10.0.0/16
•AS 200
•150.10.0.0/16 •AS 300
•A •B
•150.10.0.0/16 150.10.1.1
•160.10.0.0/16 150.10.1.1
•AS 100
•160.10.0.0/16
Next hop router to reach a network
Advertising router/Third party in
EBGP
Unmodified in IBGP
•AS 200
•192.68.1.0/24 150.1.1.3
•C
•150.1.1.1
•peering
•150.1.1.2 •150.1.1.3
•A •B
•192.68.1.0/24
•AS 201
•AS 100
•160.10.0.0/16
•D •500 •800 •E
•A •B
• 160.10.0.0/16 500
•AS 400
•AS
200
•C
•preferred
•192.68.1.0/24 2000 •192.68.1.0/24 1000
•A •B
•192.68.1.0/24
•AS
201
Transitive, Non-mandatory
Represented as a numeric value (0-
0xffffffff)
Used to group destinations
Each destination could be member of
multiple communities
Flexibility to scope a set of prefixes within
or across AS for applying policy
•C •D
•Community:201:110 •Community:201:120
•A •B
•192.68.1.0/24
•Customer AS 201
•1880
•C
•A
•D •OSPF
•690 •35/8
C not running BGP (non-pervasive BGP) •209
•BIGP is in sync
A won’t advertise 35/8 to D until the
Turn synchronization off!
Run pervasive BGP
router bgp 1880
no sync
Locally sourced
Via redistribute or network statement
•AS 100
•AS
•AS 200
300
•D
Increase AS path attribute length
by at least 1
•A •B
•AS 400
AS 400’s Policy to reach AS100
AS 300 backup
•196 •Confidential © Tech Mahindra 2012
•Stub AS
•B
•AS 101
•Provider
•A
•AS 100
•Customer
•B •C
•AS 200
•customer
•B •C
•AS 300
•provider
•D •F
•E
•G
•AS 400
Why?
– To steer traffic through
preferred paths
– Inbound/Outbound prefix
filtering
– To enforce Customer-ISP
agreements
How ?
– AS based route filtering -
•203 •Confidential © Tech Mahindra 2012
Distribute list - using IP access
lists
access-list 1 deny 10.0.0.0
access-list 1 permit any
access-list 2 permit 20.0.0.0
… more access-lists as prefixes are added ...
• match community 1
•H
•eth
•H •H •eth
•C21 •H
•C22 • set local-preference 200
•ISP3
•!
•neighbor <x.x.x.x> route-map AS10
•!
•20.200.0.1
•Router A:
•router bgp 100
•neighbor 10.200.0.1 remote-as 200
•neighbor 10.300.0.1 remote-as 200
•maximum-paths 2
•A
•100 •200
•Provide
•Provider
r
•AS 200
•AS 300
•D •E
•A •B
•AS 400
•C
•Customer
•AS 100
160.10.0.0/16
•Provide
•Provider
r
•AS 200
•AS 300
•D •E
•A •B
•C chooses
shortest AS path
•AS 400
•C
•217 •Confidential © Tech Mahindra 2012
Full routes from all providers
More memory/CPU
Full granular routing
Usually transit ASes take full routes
Usually pervasive BGP
•D •E
•A •B
•C chooses
shortest AS path
•AS 400
•C
Static routes
You control directly
No route flaps
Shared routing protocol or leaking
You must filter your customers info
Route flaps
BGP for multi-homed customers
Use BGP4
Advertise only what you serve
Take back as little as you can
Take the shortest exit
Long distance connectivity is expensive
Connect to several providers at a single point