Don Montgomery, CSE 4344, School of Engineering, Southern Methodist UniversityChapter 4, slide 1...
-
Upload
linette-craig -
Category
Documents
-
view
214 -
download
2
Transcript of Don Montgomery, CSE 4344, School of Engineering, Southern Methodist UniversityChapter 4, slide 1...
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 1
routing at the network layer, related topics
1. IP addressing, masking, and IP packet format
2. DNS, ARP, RARP, DHCP, and ICMP
3. support for VPNs & tunnels
4. routing over internets
- intradomain (e.g., DV, OSPF)
- interdomain (e.g., BGP)
Chapter 4: internetworking
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 2
summary: packet switching review efficient
can send from any input that is ready
general multiple types of applications
accommodates bursty traffic addition of queues
store and forward packets are self contained units can use alternate paths – reordering
contention (i.e., no isolation) congestion delay
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 3
internetwork (Internet)
• network of networks
• network: “physical” network
• “logical” network: interconnected physical networks
• “router”: boundary node
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 4
a simple internetwork
R2
R1
H4
H5
H3H2H1
Network 2 (Ethernet)
Network 1 (Ethernet)
H6
Network 4(point-to-point)
H7 R3 H8
Network 3 (FDDI)
R1 R2 R3
H1 H8
ETH FDDI
IP
ETH
TCP
FDDI PPP PPP ETH
IP
ETH
TCP
IP IP IP
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 5
Internet Protocol (IP)
• example system– best known– largest (scale)– still, only an example (versions, “alt-IP”)
• service model (host-to-host)– global address scheme– “best effort” delivery (“unreliable”)
• loss, disorder, redundancy
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 6
IP packet format
basic header: 20B
Version HLen TOS Length
Ident Flags Offset
TTL Protocol Checksum
SourceAddr
DestinationAddr
Options (variable) Pad(variable)
0 4 8 16 19 31
Data
32b “words”frag/defragword
demuxfor header
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 7
IP packet header fields version number (4 bits)
indicates the version of the ip protocol necessary to know what other fields to expect typically “4” (for IPv4), and sometimes “6” (for IPv6)
header length (4 bits) number of 32-bit words in the header typically “5” (for a 20-byte IPv4 header) can be more when “IP options” are used
type-of-service (8 bits) allow packets to be treated differently based on needs e.g., low delay for audio, high bandwidth for bulk transfer
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 8
IP Packet header fields (continued) total length (16 bits)
number of bytes in the packet maximum size is 63,535 bytes (216 -1) … though underlying links may impose harder limits
fragmentation information (32 bits) packet identifier, flags, and fragment offset supports dividing a large IP packet into fragments … in case a link cannot handle a large IP packet
Time-To-Live (TTL) (8 bits) used to identify packets stuck in forwarding loops … and eventually discard them from the network
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 9
fragmentation & reassembly of IP packets
H1 R1 R2 R3 H8
ETH FDDI
PPP IP (376)
PPP IP (512)
PPP IP (512) (512)
ETH IP
ETH IP
(512)ETH IP
(376)
IP (1400) IP (1400)
R1 R2 R3
max txn unit (MTU)each frag is also a datagramexample: PPP 532B max payload
*
* not reassembled here ...
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 10
IP header (a)
Ident = x
Start of header
Rest of header
1400 data bytes
Offset = 00
(b)
Ident = x
Start of header
Rest of header
512 data bytes
Offset = 01
Ident = x
Rest of header
512 data bytes
Offset = 641
Start of header
Ident = x
Start of header
Rest of header
376 data bytes
Offset = 1280
offset of data only count by 8B
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 11
time-to-live (TTL) field potential robustness problem
forwarding loops can cause packets to cycle forever confusing if the packet arrives much later
time-to-live field in packet header TTL field decremented by each router on the path packet is discarded when TTL field reaches 0… …and “time exceeded” message is sent to the source
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 12
application of TTL in traceroute
time-to-live field in IP packet header source sends a packet with a TTL of n each router along the path decrements the TTL “TTL exceeded” sent when TTL reaches 0
traceroute tool exploits this TTL behavior
sourcedestination
TTL=1
Time exceeded
TTL=2
Send packets with TTL=1, 2, … and record source of “time exceeded” message
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 13
IP packet header fields (continued) Protocol (8 bits)
identifies the higher-level protocol e.g., “6” for the Transmission Control Protocol (TCP) e.g., “17” for the User Datagram Protocol (UDP)
important for demultiplexing at receiving host indicates what kind of header to expect next can call proper protocol handler routine
IP header IP header
TCP header UDP header
protocol=6 protocol=17
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 14
IP packet header fields (continued) Checksum (16 bits)
sum of all 16-bit words in the IP packet header if any bits of the header are corrupted in transit … the checksum won’t match at receiving host receiving host discards corrupted packets
Sending host will retransmit the packet, if needed
134+ 212
= 346
134+ 216
= 350
Mismatch!
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 15
IP packet header (continued) two IP addresses
source IP address (32 bits) destination IP address (32 bits)
destination address unique identifier for the receiving host allows each node to make forwarding decisions
source address unique identifier for the sending host recipient can decide whether to accept packet enables recipient to send a reply back to source
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 16
what if the source lies? source address should be the sending host
but, who’s checking, anyway? you could send packets with any source you want
why would someone want to do this? launch a denial-of-service attack
send excessive packets to the destination … to overload the node, or the links leading to the node
evade detection by “spoofing” but, the victim could identify you by the source address so, you can put someone else’s source address in the packets
also, an attack against the spoofed host spoofed host is wrongly blamed spoofed host may receive return traffic from the receiver
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 17
Ethernet v/s IP addressing
recall Ethernet addresses:1. are 48 bit & globally unique
2. are flat (not hierarchical!)
3. belong to network adaptor (e.g., Ethernet card)
4. once assigned to a card, cannot be changed
IP addresses1. are 32 bit & globally unique (except when using NAT)
2. are hierarchical (network part, host part)
3. belong to a computer/node/station
4. once assigned to a node, may be changed
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 18
some relevant questions to ask
1. how many IP addresses does a host have?
2. how many IP addresses does a router have?
3. how is routing different from forwarding?
4. how do we map IP addresses to Ethernet addresses?
5. how do logical names resolve to IP addresses? ...
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 19
the DNS system hierarchy (from ch 9)
edu com
princeton■ ■ ■
mit
cs ee
ux01 ux04
physics
cisco yahoo nasa nsf arpa navy acm ieee
Gov mil org net uk fr
■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Princeton
name server
Cisco
name server
CS
name server
EE
name server...
Root
name server
... zones
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 20
IP address classes
note: If host field is all zeros, then address belongs to network, not host
2b
1b
b/2
b/4
b/4
27-2 (126) 224-2 (16m)
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 21
special IP addresses
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 22
creating subnets
Original host address space
subnet masks – used by routers for routing ... why?
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 23
router implementationrouters handle variable-size packets (unlike simple switches)but, switching fabrics handle fixed-size 'cells'
-- thus, ports must frag/defrag packets into fixed size cells(what is another term for port?)
packet forwarding has- centralized control (= single processing engine), or- distributed control (= multiple engines,
typically, one per line card)
recent development: network processing unit (NPU) - IP address lookup, CRC, checksum, frag/defrag,
forwarding, ...
next slides adapted from: J. Rexford, Princeton
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 24
inside a high-end router
SwitchingFabric
Processor
Line card
Line card
Line card
Line card
Line card
Line card
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 25
router physical layout
Juniper T series
Cisco 12000
Crossbar
Linecards
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 26
line cards (interface cards, adaptors)
interfacing physical link switching fabric
packet handling packet forwarding decrement time-to-live buffer management
link schedulingpacket filteringrate limitingpacket markingmeasurement
to/from link
to/from switch
lookup
Rec
eive
Transm
it
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 27
switching fabric deliver packet inside the router
from incoming interface to outgoing interface a small network in and of itself
must operate very quickly multiple packets going to same outgoing interface switch scheduling to match inputs to outputs
implementation techniques bus, crossbar, interconnection network, … running at a faster speed (e.g., 2x) than links dividing variable-length packets into cells
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 28
packet switching
R1Link 1
Link 2
Link 3
Link 4
Link 1, ingress Link 1, egress
Link 2, ingress Link 2, egress
Link 3, ingress Link 3, egress
Link 4, ingress Link 4, egress
ChooseEgress
ChooseEgress
ChooseEgress
ChooseEgress
“4”
“4”
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist University Chapter 4, slide 29
router processor so-called “loopback” interface
IP address of the CPU on the router
control-plane software implementation of the routing protocols creation of forwarding table for the line cards
interface to network administrators command-line interface for configuration transmission of measurement statistics
handling of special data packets packets with IP options enabled packets with expired time-to-live field