0% found this document useful (0 votes)
2 views

Week13 Lec3-SwitchedEthernet

Uploaded by

Harshit Kapadia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Week13 Lec3-SwitchedEthernet

Uploaded by

Harshit Kapadia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

IT305

Computer Networks
Week 13_Lec3
Switched Ethernet

Data Link Layer 5-1


Ethernet
“dominant” wired LAN technology:
 first widely used LAN technology
 simpler, cheaper than token LANs and ATM
 kept up with speed race: 10 Mbps – 10 Gbps

Metcalfe’s Ethernet sketch


Link Layer 5-2
Ethernet frame structure
sending adapter encapsulates IP datagram (or other
network layer protocol packet) in Ethernet frame
• preamble:
• 7 bytes with pattern 10101010 followed by one byte with pattern
10101011
• used to synchronize receiver, sender
• addresses:
• 6 byte source, destination MAC addresses
• type: indicates higher layer protocol – IPv4 or v6
CRC: cyclic redundancy check at receiver
 error detected: frame is dropped
type

dest. source data (payload) CRC


preamble address address

Link Layer 5-3


802.3 Ethernet standards: link & physical
layers
 many different Ethernet standards
 common MAC protocol and frame format
 different speeds: 2 Mbps, 10 Mbps, 100
Mbps, 1Gbps, 10G bps
 different physical layer media: fiber, cable

MAC protocol
application and frame format
transport
network 100BASE-TX 100BASE-T2 100BASE-FX
link 100BASE-T4 100BASE-SX 100BASE-BX
physical

copper (twister fiber physical layer


pair) physical layer
Link Layer 5-4
Ethernet Segments
• Ethernet segment cable size 500 • Multiple segments joined
m through repeaters
• Hosts connect to segment by • Max 4 segments = 2000m
tapping which has a transceiver • Max 1024 hosts
(Tx, Rx) • Repeaters:
• Network adapter in the device • forward digital signals
(NIC) connects to the transceiver
• Multiport repeater is a Hub
• Mulitple NICs can be connect
across the 500 m cable with tap
points being 2.5 apart
(Standards)
• Ethernet protocol implemented
in the NIC

Data Link Layer 5-5


Classic Ethernet
• Stations on single shared bus
• Collisions if no proper protocol
• Ethernet –CSMA
• Carrier Sense Multiple Access –CD
• Exponential back-off
• Collisions reduced
Architectural change
• Switched ethernet
Ethernet switch
• link-layer device: takes an active role
• store, forward Ethernet frames
• examine incoming frame’s MAC address,
selectively forward frame to one-or-more
outgoing links when frame is to be forwarded on
segment, uses CSMA/CD to access segment
• transparent
• hosts are unaware of presence of switches
• plug-and-play, self-learning
• switches do not need to be configured

Link Layer 5-8


Switch: multiple simultaneous
transmissions
• hosts have dedicated, direct A
connection to switch
C’ B
• switches buffer packets
• Ethernet protocol used on each 6 1 2
incoming link, but no collisions;
full duplex 5 4 3
• each link is its own collision B’ C
domain
• switching: A-to-A’ and B-to-B’
A’
can transmit simultaneously,
without collisions switch with six interfaces
(1,2,3,4,5,6)

Link Layer 5-9


Switch: frame
filtering/forwarding
when frame received at switch:

1. record incoming link, MAC address of sending host


2. index switch table using MAC destination address
3. if entry found for destination
then {
if destination on segment from which frame arrived
then drop frame –BROADCASTED ALREADY
else forward frame on interface indicated by entry
}
else flood /* forward on all interfaces except arriving
interface */
But how des the switch get this forwarding interface information? i.e,
how does it know which device is conenected to which interface?

Link Layer 5-10


Switch forwarding table

Q: how does switch know A’ A


reachable via interface 4, B’ B
C’
reachable via interface 5?
 A: each switch has a 1 2
6
switch table, each
4
entry: 5 3

 (MAC address of host, B’ C


interface to reach host,
time stamp) A’
Q:how
looksare
likeentries
a routing table!
created, switch with six interfaces
maintained in switch (1,2,3,4,5,6)
table?
 something like a routing
protocol? Link Layer 5-11
Switch: self-learning Source: A
Dest: A’

A A A’
• switch learns which hosts
can be reached through B
C’
which interfaces
• when frame received, 6 1 2
switch “learns” location
of sender: incoming LAN 5 4 3
segment
B’ C
• records sender/location
pair in switch table
A’

MAC addr interface TTL


A 1 60 Switch table
(initially empty)

Link Layer 5-12


Self-learning, forwarding: Source: A
example Dest: A’

A A A’
• frame destination, A’,
B
locaton unknown: flood C’

1
 destination A 6 2

locationselectively
known: A A’
5 4 3
send
B’ C
on just one link
A’ A

A’

MAC addr interface TTL


A 1 60 switch table
A’ 4 60 (initially empty)

Link Layer 5-13


Interconnecting switches
switches can be connected together
S4

S1
S3
A S2
F
D I
B C
G H
E

Q: sending from A to G - how does S1 know


to forward frame destined to F via S4 and
S 3?
 A: self learning! (works exactly the same
as in single-switchLinkcase!)
Layer 5-14
Self-learning multi-switch
example
Suppose C sends frame to I, I responds to C

S4

S1
S3
A S2
F
D I
B C
G H
E

 Q: show switch tables and packet forwarding in


S1 , S 2 , S 3 , S 4

Link Layer 5-15


Synthesis: a day in the life of a web request
 our journey down the protocol stack is now complete!
• application, transport, network, link
 putting-it-all-together: synthesis!
• goal: identify, review, understand protocols (at all layers) involved in
seemingly simple scenario: requesting www page
• scenario: student attaches laptop to campus network, requests/receives
www.google.com

Link Layer: 6-16


A day in the life: scenario
scenario:
browser DNS server  arriving mobile
Comcast network client attaches
68.80.0.0/13 to network …
 requests web
school network page:
68.80.2.0/24
www.google.com
web page

Sounds
web server Google’s network
simple!
64.233.169.105 64.233.160.0/19

Link Layer: 6-17


A day in the life: connecting to the
Internet
DHCP
DHCP
DHCP
UDP
 connecting laptop needs to get its own IP
DHCP IP address, addr of first-hop router, addr of
arriving mobile:
DHCP Eth
Phy DHCP client DNS server: use DHCP
DHCP

 DHCP request encapsulated in UDP,


DHCP DHCP encapsulated in IP, encapsulated in 802.3
DHCP
DHCP
UDP
IP
Ethernet
DHCP Eth
Phy
router has
 Ethernet frame broadcast (dest:
DHCP server FFFFFFFFFFFF) on LAN, received at router
running DHCP server
 Ethernet de-muxed to IP de-muxed, UDP
de-muxed to DHCP
Link Layer: 6-18
A day in the life: connecting to the
Internet
DHCP
DHCP UDP  DHCP server formulates DHCP ACK
DHCP IP
Eth arriving mobile: containing client’s IP address, IP address
of first-hop router for client, name & IP
DHCP

DHCP Phy DHCP client


address of DNS server
DHCP
DHCP
 encapsulation at DHCP server, frame
forwarded (switch learning) through LAN,
DHCP
UDP
DHCP
IP
DHCP
Eth demultiplexing at client
DHCP Phy
router has
DHCP server  DHCP client receives DHCP ACK reply

Client now has IP address, knows name & addr of DNS


server, IP address of its first-hop router
Link Layer: 6-19
A day in the life… ARP (before DNS, before HTTP)
DNS DNS  before sending HTTP request, need IP address
UDP
of www.google.com: DNS
DNS

ARP IP
DNS
ARP query Eth arriving mobile:
Phy ARP client  DNS query created, encapsulated in UDP,
encapsulated in IP, encapsulated in Eth. To
send frame to router, need MAC address of
router interface: ARP
ARP  ARP query broadcast, received by router, which
Eth
replies with ARP reply giving MAC address of
ARP reply

Phy
router has router interface
ARP server
 client now knows MAC address of first hop
router, so can now send frame containing
DNS query

Link Layer: 6-20


A day in the life… using DNS
DNS
DNS
DNS
DNS UDP
DNS DNS  de-muxed to DNS
UDP
DNS IP DNS
DNS IP
 DNS replies to client
Eth DNS
DNS Phy
DNS Eth
server
with IP address of
Phy
DNS
www.google.com

Comcast network
68.80.0.0/13

 IP datagram
 IP datagram forwarded from campus
containing DNS query
network into Comcast network,
forwarded via LAN
routed (tables created by RIP, OSPF,
switch from client to
IS-IS and/or BGP routing protocols)
1st hop router
to DNS server
Link Layer: 6-21
A day in the life…TCP connection carrying HTTP
HTTP
HTTP  to send HTTP request,
SYNACK
SYN TCP
SYNACK
SYN IP client first opens TCP
SYNACK
SYN Eth
Phy Comcast network
socket to web server
68.80.0.0/13
 TCP SYN segment (step 1 in TCP
3-way handshake) inter-domain
routed to web server
 web server responds with
SYNACK
SYN
SYNACK
SYN
TCP
IP
TCP SYNACK (step 2 in TCP 3-
SYNACK
SYN Eth way handshake)
Phy
 TCP connection established!
Google web server
64.233.169.105

Link Layer: 6-22


A day in the life… HTTP request/reply
HTTP
HTTP HTTP  HTTP request sent into
HTTP
HTTP TCP
HTTP
HTTP IP
 web page finally (!!!) TCP socket
HTTP
HTTP Eth displayed
Phy Comcast network  IP datagram containing
68.80.0.0/13
HTTP request routed to
www.google.com
 web server responds with
HTTP
HTTP
HTTP
TCP
HTTP reply (containing web
HTTP
IP page)
HTTP Eth
Phy  IP datagram containing
Google web server HTTP reply routed back to
64.233.169.105
client
Link Layer: 6-23

You might also like