Network+layer Data
Network+layer Data
Network Layer:
The Data Plane
Acknowledgments:
The contents in this file are based on the slides accompanying the
book Computer Networking: A Top Down Approach, 7th edition.
Computer
Networking: A Top
Down Approach
7th Edition, Global Edition
Jim Kurose, Keith Ross
Pearson
April 2016
Network Layer: Data Plane 4-1
Chapter 4: outline
4.1 Overview of Network 4.4 Generalized Forward and
layer SDN
• data plane • match
• control plane • action
4.2 What’s inside a router • OpenFlow examples
4.3 IP: Internet Protocol of match-plus-action in
• datagram format action
• fragmentation
• IPv4 addressing
• DHCP and network
address translation
• ICMP
• IPv6
Network Layer: Data Plane 4-2
Chapter 4: network layer
chapter goals:
§ understand principles behind network layer
services, focusing on data plane:
• network layer service models
• forwarding versus routing
• how a router works
• generalized forwarding
§ instantiation, implementation in the Internet
H
Net53
Net
Net51
Net G
G
G
G
Net55
Net
H G G
Net52
Net Net54
Net
H
Best-effort
IP (ICMP, ARP)
connectionless
packet transfer
IP Header contains
source and destination TCP
header HTTP Request
IP addresses;
transport protocol type
Ethernet IP TCP
HTTP Request FCS
header header header
Network Layer: Data Plane 4-9
Network layer
application
§ transport segment from transport
network
layer physical
application
network transport
Routing
Algorithm
Routing algorithm control
Control plane plane
Data plane
Values in arriving
values in arriving
packet’s header
1
packet header 1101
2
3
0111 1
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
values in arriving
packet header
0111 1
2
3
routing, management
routing control plane (software)
processor operates in millisecond
time frame
forwarding data plane
(hardware) operates
in nanosecond
timeframe
high-seed
switching
fabric
physical layer:
bit-level reception
data link layer: decentralized switching:
e.g., Ethernet § using header field values, lookup output
see chapter 5 port using forwarding table in input port
memory (“match plus action”)
§ goal: complete input port processing at
‘line speed’
§ queuing: if datagrams arrive faster than
forwarding rate into switch fabric
Network Layer: Data Plane 4-19
Input port functions
lookup,
link forwarding
line layer switch
termination protocol fabric
(receive)
queueing
physical layer:
bit-level reception
decentralized switching:
data link layer: § using header field values, lookup output
e.g., Ethernet port using forwarding table in input port
see chapter 5 memory (“match plus action”)
§ destination-based forwarding: forward based
only on destination IP address (traditional)
§ generalized forwarding: forward based on
any set of header field values
Network Layer: Data Plane 4-20
Destination-based forwarding
forwarding table
otherwise 3
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 which interface?
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data Plane 4-22
Longest prefix matching
§ we’ll see why longest prefix matching is used
shortly, when we study addressing
§ longest prefix matching: often performed using
ternary content addressable memories (TCAMs)
• content addressable: present address to TCAM: retrieve
address in one clock cycle, regardless of table size
• Cisco Catalyst: can hold upwards ~1M routing table
entries in TCAM
memory
input output
port memory port
(e.g., (e.g.,
Ethernet) Ethernet)
system bus
switch switch
fabric fabric
datagram
switch buffer link
fabric layer line
protocol termination
queueing (send)
switch
switch
fabric
fabric
packet packet
arrivals queue link departures
(waiting area) (server)
departures
1 3 2 4 5
2
1 3 4 5
arrivals
packet
in 1 3 2 4 5
service
departures
1 3 2 4 5
physical layer
…
in: one large datagram
• different link types, out: 3 smaller datagrams
different MTUs
§ large IP datagram divided
(“fragmented”) within net reassembly
• one datagram becomes
several datagrams
• “reassembled” only at …
final destination
• IP header bits used to
identify, order related
fragments
Network Layer: Data Plane 4-41
IP fragmentation, reassembly
length ID fragflag offset
example: =4000 =x =0 =0
v 4000 byte datagram
one large datagram becomes
v MTU = 1500 bytes several smaller datagrams
Note: the slides on IPv4 Addressing are from CCNA Introduction to Networks v7.0
(ITN), Module 11
11.1 IPv4 Address Structure
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 46
IPv4 Address Structure
Network and Host Portions
• An IPv4 address is a 32-bit hierarchical address that is made up of a network portion and a
host portion.
• When determining the network portion versus the host portion, you must look at the 32-bit
stream.
• A subnet mask is used to determine the network and host portions.
IPv4 Address Structure
The Subnet Mask
• To identify the network and host portions of an IPv4 address, the subnet mask is compared
to the IPv4 address bit for bit, from left to right.
Prefix
Subnet Mask 32-bit Address
• The prefix length is the number of Length
bits set to 1 in the subnet mask. 255.0.0.0 11111111.00000000.00000000.00000000 /8
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 51
IPv4 Unicast, Broadcast, and Multicast
Unicast
• Unicast transmission is sending a packet to one destination IP address.
• For example, the PC at 172.16.4.1 sends a unicast packet to the printer at 172.16.4.253.
IPv4 Unicast, Broadcast, and Multicast
Broadcast
• Broadcast transmission is sending a packet to all other destination IP addresses.
• For example, the PC at 172.16.4.1 sends a broadcast packet to all IPv4 hosts.
IPv4 Unicast, Broadcast, and Multicast
Multicast
• Multicast transmission is sending a packet to a multicast address group.
• For example, the PC at 172.16.4.1 sends a multicast packet to the multicast group address
224.10.10.5.
11.3 Types of IPv4 Addresses
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 55
Types of IPv4 Addresses
Public and Private IPv4 Addresses
• As defined in in RFC 1918, public IPv4 addresses are globally routed between internet service
provider (ISP) routers.
Link-Local addresses
• 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
• Commonly known as the Automatic Private IP Addressing (APIPA) addresses or self-assigned
addresses.
• Used by Windows DHCP clients to self-configure when no DHCP servers are available.
Types of IPv4 Addresses
Legacy Classful Addressing
RFC 790 (1981) allocated IPv4 addresses in
classes
• Class A (0.0.0.0/8 to 127.0.0.0/8)
• Class B (128.0.0.0 /16 – 191.255.0.0 /16)
• Class C (192.0.0.0 /24 – 223.255.255.0 /24)
• Class D (224.0.0.0 to 239.0.0.0)
• Class E (240.0.0.0 – 255.0.0.0)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 61
Network Segmentation
Broadcast Domains and Segmentation
• Many protocols use broadcasts or multicasts (e.g., ARP use broadcasts to locate other
devices, hosts send DHCP discover broadcasts to locate a DHCP server.)
• Switches propagate broadcasts out all interfaces except the interface on which it was
received.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 65
Subnet an IPv4 Network
Subnet on an Octet Boundary
• Networks are most easily subnetted at the octet boundary of /8, /16, and /24.
• Notice that using longer prefix lengths decreases the number of hosts per subnet.
Prefix Length Subnet Mask Subnet Mask in Binary (n = network, h = host) # of hosts
nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
/8 255.0.0.0 11111111.00000000.00000000.00000000
16,777,214
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
/16 255.255.0.0 65,534
11111111.11111111.00000000.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 254
11111111.11111111.11111111.00000000
Subnet an IPv4 Network
Subnet on an Octet Boundary (Cont.)
• In the first table 10.0.0.0/8 is subnetted using /16 and in the second table, a /24 mask.
Subnet Address Host Range Subnet Address
Host Range
(256 Possible (65,534 possible hosts per Broadcast (65,536 Possible Broadcast
(254 possible hosts per subnet)
Subnets) subnet) Subnets)
10.0.0.0/16 10.0.0.1 - 10.0.255.254 10.0.255.255 10.0.0.0/24 10.0.0.1 - 10.0.0.254 10.0.0.255
10.0.1.0/24 10.0.1.1 - 10.0.1.254 10.0.1.255
10.1.0.0/16 10.1.0.1 - 10.1.255.254 10.1.255.255
10.0.2.0/24 10.0.2.1 - 10.0.2.254 10.0.2.255
10.2.0.0/16 10.2.0.1 - 10.2.255.254 10.2.255.255
… … …
10.3.0.0/16 10.3.0.1 - 10.3.255.254 10.3.255.255
10.0.255.0/24 10.0.255.1 - 10.0.255.254 10.0.255.255
10.4.0.0/16 10.4.0.1 - 10.4.255.254 10.4.255.255 10.1.0.0/24 10.1.0.1 - 10.1.0.254 10.1.0.255
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 69
Subnet a Slash 16 and a Slash 8 Prefix
Create Subnets with a Slash 16 prefix
Prefix Length Subnet Mask Network Address (n = network, h = host) # of subnets # of hosts
nnnnnnnn.nnnnnnnn.nhhhhhhh.hhhhhhhh
• The table highlights all the /17 255.255.128.0 11111111.11111111.10000000.00000000 2 32766
nnnnnnnn.nnnnnnnn.nnhhhhhh.hhhhhhhh
possible scenarios for /18 255.255.192.0 11111111.11111111.11000000.00000000 4 16382
nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
/20 255.255.240.0 11111111.11111111.11110000.00000000 16 4094
nnnnnnnn.nnnnnnnn.nnnnnhhh.hhhhhhhh
/21 255.255.248.0 11111111.11111111.11111000.00000000 32 2046
nnnnnnnn.nnnnnnnn.nnnnnnhh.hhhhhhhh
/22 255.255.252.0 11111111.11111111.11111100.00000000 64 1022
nnnnnnnn.nnnnnnnn.nnnnnnnh.hhhhhhhh
/23 255.255.254.0 11111111.11111111.11111110.00000000 128 510
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
/24 255.255.255.0 256 254
11111111.11111111.11111111.00000000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
/25 255.255.255.128 11111111.11111111.11111111.10000000 512 126
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
/26 255.255.255.192 11111111.11111111.11111111.11000000 1024 62
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
/27 255.255.255.224 11111111.11111111.11111111.11100000 2048 30
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
/28 255.255.255.240 11111111.11111111.11111111.11110000 4096 14
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
/29 255.255.255.248 8192 6
11111111.11111111.11111111.11111000
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
/30 255.255.255.252 11111111.11111111.11111111.11111100 16384 2
Subnet a Slash 16 and a Slash 8 Prefix
Create 100 Subnets with a Slash 16 prefix
Consider a large enterprise that requires at least 100 subnets
and has chosen the private address 172.16.0.0/16 as its internal
network address.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 73
Subnet to Meet Requirements
Subnet Private versus Public IPv4 Address Space
Enterprise networks will have an:
• Intranet - A company’s internal network typically
using private IPv4 addresses.
• DMZ – A company’s internet facing servers. Devices
in the DMZ use public IPv4 addresses.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 77
VLSM
IPv4 Address Conservation
Given the topology, 7 subnets are required (i.e, four LANs and three WAN links) and the largest
number of host is in Building D with 28 hosts.
• A /27 mask would provide 8 subnets of 30 host IP addresses and therefore support this
topology.
• Applying a traditional subnetting scheme to this scenario is not very efficient and is wasteful.
Organization 0
200.23.16.0/23
Organization 1
“Send me anything
200.23.18.0/23 with addresses
Organization 2 beginning
200.23.20.0/23 . Fly-By-Night-ISP 200.23.16.0/20”
..
. Internet
Organization 7
..
200.23.30.0/23
“Send me anything
ISPs-R-Us
with addresses
beginning
199.31.0.0/16”
Organization 0
200.23.16.0/23
“Send me anything
with addresses
Organization 2 beginning
200.23.20.0/23 . Fly-By-Night-ISP 200.23.16.0/20”
..
.. Internet
Organization 7 .
200.23.30.0/23
“Send me anything
ISPs-R-Us
with addresses
Organization 1 beginning 199.31.0.0/16
or 200.23.18.0/23”
200.23.18.0/23
DHCP
223.1.1.0/24
server
223.1.1.1 223.1.2.1
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server! Here’s an IP
yiaddrr: 223.1.2.4
address youID:can
transaction 654 use
lifetime: 3600 secs
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
Broadcast: OK. I’ll take
yiaddrr: 223.1.2.4
that IP address!
transaction ID: 655
lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255, 68
Broadcast: OK. You’ve
yiaddrr: 223.1.2.4
got that IPID:
transaction address!
655
lifetime: 3600 secs
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
Unused
Data
data
32 bits
Network Layer: Data Plane 4-
107
Extension Headers
Daisy chains of extension headers
Basic header
Next header = TCP segment
TCP
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 110
IPv6 Address Representation
IPv6 Addressing Formats
• IPv6 addresses are 128 bits in length and written in hexadecimal.
• IPv6 addresses are not case-sensitive and can be written in either lowercase or
uppercase.
• The preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x, with each “x”
consisting of four hexadecimal values.
• In IPv6, a hextet is the unofficial term used to refer to a segment of 16 bits, or four
hexadecimal values.
• Examples of IPv6 addresses in the preferred format:
2001:0db8:0000:1111:0000:0000:0000:0200
2001:0db8:0000:00a3:abcd:0000:0000:1234
IPv6 Address Representation
Rule 1 – Omit Leading Zero
The first rule to help reduce the notation of IPv6 addresses is to omit any leading 0s (zeros).
Examples:
• 01ab can be represented as 1ab
• 09f0 can be represented as 9f0
• 0a00 can be represented as a00
• 00ab can be represented as ab
Note: This rule only applies to leading 0s, NOT to trailing 0s, otherwise the address would
be ambiguous.
Type Format
Preferred 2001 : 0db8 : 0000 : 1111 : 0000 : 0000 : 0000 : 0200
No leading zeros 2001 : db8 : 0 : 1111 : 0 : 0 : 0 : 200
IPv6 Address Representation
Rule 2 – Double Colon
A double colon (::) can replace any single, contiguous string of one or more 16-bit
hextets consisting of all zeros.
Example:
• 2001:db8:cafe:1:0:0:0:1 (leading 0s omitted) could be represented as 2001:db8:cafe:1::1
Note: The double colon (::) can only be used once within an address, otherwise there would be more
than one possible resulting address.
Type Format
Preferred 2001 : 0db8 : 0000 : 1111 : 0000 : 0000 : 0000 : 0200
Compressed 2001:db8:0:1111::200
12.3 IPv6 Address Types
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 114
IPv6 Address Types
Unicast, Multicast, Anycast
Note: Unlike IPv4, IPv6 does not have a broadcast address. However, there is an IPv6 all-nodes
multicast address that essentially gives the same result.
IPv6 Address Types
IPv6 Prefix Length
Prefix length is represented in slash notation and is used to indicate the network portion of an
IPv6 address.
The IPv6 prefix length can range from 0 to 128. The recommended IPv6 prefix length for LANs
and most other types of networks is /64.
Note: It is strongly recommended to use a 64-bit Interface ID for most networks. This is because
stateless address autoconfiguration (SLAAC) uses 64 bits for the Interface ID. It also makes
subnetting easier to create and manage.
IPv6 Address Types
Types of IPv6 Unicast Addresses
Note: Many sites use the private nature of RFC 1918 addresses to attempt to
secure or hide their network from potential security risks. This was never the
intended use of ULAs.
IPv6 Address Types
IPv6 GUA
IPv6 global unicast addresses (GUAs) are globally unique and routable on the IPv6 internet.
• Currently, only GUAs with the first three bits of 001 or 2000::/3 are being assigned.
• Currently available GUAs begins with a hexadecimal 2 or a 3 (This is only 1/8th of the total available
IPv6 address space).
IPv6 Address Types
IPv6 GUA Structure
Global Routing Prefix:
• The global routing prefix is the prefix, or network, portion of the address that is
assigned by the provider, such as an ISP, to a customer or site. The global routing
prefix will vary depending on ISP policies.
Subnet ID:
• The Subnet ID field is the area between the Global Routing Prefix and the Interface
ID. The Subnet ID is used by an organization to identify subnets within its site.
Interface ID:
• The IPv6 interface ID is equivalent to the host portion of an IPv4 address. It is
strongly recommended that in most cases /64 subnets should be used, which creates
a 64-bit interface ID.
Note: IPv6 allows the all-0s and all-1s host addresses can be assigned to a device. The all-0s address is
reserved as a Subnet-Router anycast address, and should be assigned only to routers.
IPv6 Address Types
IPv6 LLA
An IPv6 link-local address (LLA) enables a device to communicate with other IPv6-enabled
devices on the same link and only on that link (subnet).
• Packets with a source or destination LLA cannot be routed.
• If an LLA is not configured manually on an interface, the device will automatically create one.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 122
Dynamic Addressing for IPv6 GUAs
RS and RA Messages
Devices obtain GUA addresses dynamically through Internet Control Message Protocol version
6 (ICMPv6) messages.
• Router Solicitation (RS) messages are sent by host devices to discover IPv6 routers
• Router Advertisement (RA) messages are sent by routers to inform hosts on how to
obtain an IPv6 GUA and provide useful network information such as:
• Network prefix and prefix length
• Default gateway address
• DNS addresses and domain name
• The RA can provide three methods for configuring an IPv6 GUA :
• SLAAC (StateLess Address Auto Configuration)
• SLAAC with stateless DHCPv6 server
• Stateful DHCPv6 (no SLAAC)
Dynamic Addressing for IPv6 GUAs
Method 1: SLAAC
• Devices obtain the necessary information to configure a GUA from the ICMPv6 RA messages
of the local router.
• The prefix is provided by the RA and the device uses either the EUI-64 or random generation
method to create an interface ID.
Dynamic Addressing for IPv6 GUAs
Method 2: SLAAC and Stateless DHCP
• The router LLA, which is the RA source IPv6 address, as the default gateway address
• A stateless DHCPv6 server to obtain other information such as a DNS server address and a
domain name
Dynamic Addressing for IPv6 GUAs
Method 3: Stateful DHCPv6
An RA can instruct a device to use stateful DHCPv6 only.
Stateful DHCPv6 is similar to DHCP for IPv4. A device can automatically receive a GUA, prefix
length, and the addresses of DNS servers from a stateful DHCPv6 server.
The RA message suggests devices use the following:
• The router LLA, which is the RA source IPv6 address, for the default gateway address.
• A stateful DHCPv6 server to obtain a GUA, DNS server address, domain name and other
necessary information.
Dynamic Addressing for IPv6 GUAs
EUI-64 Process vs. Randomly Generated
The IEEE defined the Extended Unique Identifier (EUI) or modified EUI-64 process which
performs the following:
• A 16 bit value of fffe (in hexadecimal) is inserted into the middle of the 48-bit Ethernet
MAC address of the client.
• The 7th bit of the client MAC address is reversed from binary 0 to 1.
• Example:
Note: To ensure the uniqueness of any IPv6 unicast address, the client may use a
process known as Duplicate Address Detection (DAD). This is similar to an ARP
request for its own address. If there is no reply, then the address is unique.
12.6 Dynamic Addressing for IPv6
LLAs
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 130
Dynamic Addressing for IPv6 LLAs
Dynamic LLAs
Cisco routers automatically create an IPv6 LLA whenever a GUA is assigned to the interface.
By default, Cisco IOS routers use EUI-64 to generate the interface ID for all LLAs on IPv6
interfaces.
Here is an example of a LLA dynamically configured on the G0/0/0 interface of R1:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 134
IPv6 Multicast Addresses
Assigned IPv6 Multicast Addresses
IPv6 multicast addresses have the prefix ff00::/8. There are two types of IPv6 multicast
addresses:
• Well-Known multicast addresses
• Solicited node multicast addresses
Note: Multicast addresses can only be destination addresses and not source addresses.
IPv6 Multicast Addresses
Well-Known IPv6 Multicast Addresses
Well-known IPv6 multicast addresses are assigned and are reserved for predefined groups of
devices.
There are two common IPv6 Assigned multicast groups:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 138
Subnet an IPv6 Network
Subnet Using the Subnet ID
The example topology requires five subnets, one for each LAN as well as for the serial link
between R1 and R2.
The five IPv6 subnets were allocated, with the subnet ID field 0001 through 0005. Each /64 subnet
will provide more addresses than will ever be needed.
IPv4 and IPv6 Coexistence
Both IPv4 and IPv6 will coexist in the near future and the transition will take several years.
The IETF has created various protocols and tools to help network administrators migrate
their networks to IPv6. These migration techniques can be divided into three categories:
• Dual stack -The devices run both IPv4 and IPv6 protocol
stacks simultaneously.
• Tunneling – A method of transporting an IPv6 packet over
an IPv4 network. The IPv6 packet is encapsulated inside an
IPv4 packet.
• Translation - Network Address Translation 64 (NAT64)
allows IPv6-enabled devices to communicate with IPv4-
enabled devices using a translation technique similar to
NAT for IPv4.
Note: Tunneling and translation are for transitioning to native IPv6 and should only be used where
needed. The goal should be native IPv6 communications from source to destination.
Tunneling
§ IPv6 datagram carried as payload in IPv4 datagram
among IPv4 routers
IPv6 datagram
IPv4 datagram
A B C D E F
physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
A B C D E F
physical view:
IPv6 IPv6 IPv4 IPv4 IPv6 IPv6
data data
A-to-B: E-to-F:
IPv6 B-to-C: B-to-C: IPv6
IPv6 inside IPv6 inside
IPv4 IPv4 Network Layer: Data Plane 4-
145
Chapter 4: outline
4.1 Overview of Network 4.4 Generalized Forward and
layer SDN
• data plane • match
• control plane • action
4.2 What’s inside a router • OpenFlow examples
4.3 IP: Internet Protocol of match-plus-action in
• datagram format action
• fragmentation
• IPv4 addressing
• DHCP and network
address translation
• ICMP
• IPv6
Network Layer: Data Plane 4-
146
Generalized Forwarding and SDN
Each router contains a flow table that is computed and
distributed by a logically centralized routing controller
control plane
data plane
local flow table
headers counters actions
1
0100 1101
3 2
values in arriving
packet’s header
Network Layer: Data Plane 4-
147
OpenFlow data plane abstraction
§ flow: defined by header fields
§ generalized forwarding: simple packet-handling rules
• Pattern: match values in packet header fields
• Actions: for matched packet: drop, forward, modify, matched
packet or send matched packet to controller
• Priority: disambiguate overlapping patterns
• Counters: #bytes and #packets
* : wildcard
1. src=1.2.*.*, dest=3.4.5.* à drop
2. src = *.*.*.*, dest=3.4.*.* à forward(2)
3. src=10.1.2.3, dest=*.*.*.* à send to controller
OpenFlow: Flow Table Entries
3 4
Host h5
10.3.0.5
1 s1 1 s2
2 Host h4
4 2 4 10.2.0.4
Host h1 3 3
10.1.0.1
Host h2
10.1.0.2 match action
match action Host h3 ingress port = 2
10.2.0.3 forward(3)
ingress port = 1 IP Dst = 10.2.0.3
IP Src = 10.3.*.* forward(4) ingress port = 2
forward(4)
IP Dst = 10.2.*.* IP Dst = 10.2.0.4
Chapter 4: done!
4.1 Overview of Network 4.4 Generalized Forward and
layer: data plane and SDN
control plane • match plus action
4.2 What’s inside a router • OpenFlow example
4.3 IP: Internet Protocol
• datagram format
• fragmentation Question: how do forwarding tables
• IPv4 addressing (destination-based forwarding) or
• DHCP and NAT flow tables (generalized
• ICMP forwarding) computed?
• IPv6 Answer: by the control plane
(EE3315)