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

Network Layer

1. The document discusses routing and forwarding in computer networks. Routing determines the path between routers, while forwarding moves packets through routers based on routing tables. 2. It then covers software-defined networking (SDN), where a centralized controller computes routing tables and installs them on switches, which simply perform forwarding. Traditional routing is decentralized with each router computing routes individually. 3. The document outlines the key components of an SDN architecture including the controller, which maintains network state and programs switches, and network applications that interface with the controller. OpenFlow is presented as an SDN protocol.

Uploaded by

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

Network Layer

1. The document discusses routing and forwarding in computer networks. Routing determines the path between routers, while forwarding moves packets through routers based on routing tables. 2. It then covers software-defined networking (SDN), where a centralized controller computes routing tables and installs them on switches, which simply perform forwarding. Traditional routing is decentralized with each router computing routes individually. 3. The document outlines the key components of an SDN architecture including the controller, which maintains network state and programs switches, and network applications that interface with the controller. OpenFlow is presented as an SDN protocol.

Uploaded by

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

Network layer:

1. Routing: process to find the shortest path from a router to all other routers. "create and fill the table"
2. Forwarding: move packets from router’s input to appropriate router output. "read the table"
To structuring the network:
1- Data plan: local, per-router function. Determines how datagram arriving on router input port is forwarded to
router output port "Forwarding function"

2- Control plan: network-wide logic. Determines how datagram is routed among routers along end-end path
from source to destination. "Routing function"
Control-plane approaches:
a. Per-router/Traditional routing algorithms: implemented in routers (both forwarding & routing algo's)
Each router 1. Do The control plan (routing)table individualy. & 2. Do The forwarding.
b. Logically centralized / Software-defined networking (SDN): implemented in servers/Controller
SDN/Controller: Do The control plan (routing) and send the table to the router.
Routers just do the data plan.
Destination-based forwarding: forward based only on destination IP address (traditional)
Generalized forwarding: simple packet-handling rules, forward based on any set of header field values/Traffic enging
Pattern: match values in packet header fields, if not matched -> pkt_in to controller. Counters: #bytes and #packets
Actions: drop, forward, modify, matched packet or send matched packet to controller Priority

Destination-based forwarding: special case for SDN forwarding: depend on IP dest like traditional
Firewall: do not forward (block) all datagrams \arrive to TCP port# \ sent by host#
Destination-based layer 2 (switch) forwarding: Mac

Data plane switches (routers):


Fast, Simple, Protocol for communicating with controller, Table computed, installed by controller
API for table-based switch control: defines what is controllable and what is not
SDN controller (network OS):
 Maintain network state information
 Interacts with network control applications “above” via northbound API
 Interacts with network switches “below” via southbound API
 Implemented as distributed system for performance, scalability, fault-tolerance, robustness
Network-control apps:
“brains” of control: implement control functions using lower-level services, API provided by SND controller
unbundled: can be provided by 3rd party: distinct from routing vendor, or SDN controller
CONTROLLERS EXAMPLES: 1. OpenDaylight (ODL) 2. ONOS
SDN CONTROLLER LAYERS:
 Interface layer: to network control apps
 Network-wide state management layer: state of networks links, switches, services: a distributed database
 Communication layer: communicate between SDN controller and controlled switches

OpenFlow: open TCP connection two sided (bidirictional)


Controller-to-switch messages:
 Features: controller ask for switch features, switch replies
 Configure: controller queries/sets switch configuration parameters
 Modify-state: add, delete, modify flow entries in the OpenFlow tables
 Packet-out: controller can send this packet out of specific switch port (send the pkt to …)
Switch-to-controller messages:
 Packet-in: transfer packet to controller. (I don’t know where to put the pkt)
 Flow-removed: flow table entry deleted at switch
 Port status: inform controller of a change on a port. router down

Router architecture:
1. Routing processor:
Control plan “routing:
2. Input ports:
a. Line termination: convert bits and bytes to frame.
b. Link layer protocol: convert frame to packet (datagram).
c. Lookup forwarding ”queue”: queuing if forwarding rate into switching fabric < datagrams arrival rate.
Find which output port, using header field values & forwarding table in input port memory.
3. Switching fabric: transfer packet from the input buffer to appropriate output buffer.
links many input ports with many output ports. Consists of small switches, provide straight /cross connections
Switching rate: rate at which packets can be transferred from inputs to outputs - measured as multiples of
input/output line rate.
Types:
a. Memory:
I. Traditional computers with switching under direct control of CPU
II. Pkt copied to system’s memory
III. Speed limited by memory bandwidth (2 bus crossings per datagram)
b. Bus:
I. Datagram from input port memory to output port memry via shared bus (1inst. at a time  delay).
II. Speed limited by bus bandwidth
c. Crossbar/interconnection: fastest
I. No bus bandwidth limitations.
II. Multiple connections. NxN --> N connections ; each port receives 1 data only.
III. Example uses crossbar: Banyan networks
IV. Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in the
queue from moving forward
4. Output ports:
a. Lookup forwarding ”queue”: queuing if datagrams arrive from fabric > Terminal line (transmission rate)
b. Link layer protocol: convert packet to frame.
c. Line termination: convert frame to bits and bytes.

Scheduling mechanisms
Scheduling: choose next packet to send on the link.
1. FIFO scheduling: send in order of arrival to queue
Discard policy: if a packet arrives to full queue: who to discard?
- tail drop: drop arriving packet
- priority: drop on priority basis. | Top priority: "sensitive to delay" 1-Audio 2-Multimedia 3-Text
-random: drop randomly
2. Priority scheduling:
send highest priority queued packet (multiple classes, with different priorities)
3. Round Robin (RR) scheduling:
For multiple classes, More fairness than P.S.
It handles all processes without priority, and it is starvation-free.
Scan class queues, sending one complete packet from each class (if available).
4. Weighted Fair Queuing (WFQ):
generalized Round Robin
each class gets a weighted amount of service in each cycle.
More priority and more data will be served form highest priority queue.
IP: Internet Protocol
Fragmentation: if MTU link is smaller than the arrived pkt.
MTU: max transfer size: largest possible link-level frame. different link types, different MTUs
1. large IP datagram divided (“fragmented”) within net.
2. One datagram becomes several datagrams
3. Reassembled only at the final destination using IP header bits.
Offset field to arrange the fragment in correct order.
Frag flag 1 for all small pkts, but last pkt flag=0.

IPv4:
IP Address = 32 bits = 4 bytes. High order for subnet address, Low order for host number.
Interface: a connection between host/router and physical link. Each interface has a unique IP address.
Routers have multiple interfaces | Host typically has one or two interfaces

Subnet: device interfaces with same #subnet of IP add can communicate each other without intervening router.
Subnetting: Allow using single IP address in multiple interfaces using the subnet mask.
Subnet mask /a: a 1’s in high order to mask the #host in IP address to find subnet number. To simplify the job
of a router and shortening its routing table. a: #bits in subnet number of IP address.
Supernetting merge two or more IP add from the same class to get single IP add. The reverse of subnitting.
Prerequisites for subnetting:
1. Consecutive network addresses
2. Must be static addressing • First IP dividable on #of networks • Fall on the correct boundaries
IP Classes ….
CIDR: Classless InterDomain Routing
subnet portion of address of arbitrary length. Address format: a.b.c.d/x, where x is # bits in subnet portion of address

To Solve limitation of IP addresses in IPv4:


1. DHCP: Dynamic Host Configuration Protocol
Allow host to dynamically obtain its IP address from network server when it joins network.
Client server method
Can renew its lease on address in use
Allows reuse of addresses (only hold address while connected/“on”)
Support for mobile users who want to join network (more shortly)
DHCP overview:
1. host broadcasts “DHCP discover” msg
2. DHCP server responds with “DHCP offer” msg ( IP add , DNS server , name ..)
3. host requests IP address: “DHCP request” msg
4. DHCP server sends address: “DHCP ack” msg
2. NAT: Network address translation: secured, for users, but server should be known and have static real IP add.
Local network uses just one IP address as far as outside world is concerned:
range of addresses not needed from ISP: just one IP address for all devices
can change addresses of devices in local network without notifying outside world
can change ISP without changing addresses of devices in local network
devices inside local net not explicitly addressable, visible by outside world (a security plus)
NAT router must: #Port: 16-bit field ,
Outgoing datagrams: replace (source IP address, port#) of every outgoing datagram to (NAT IP add., new port#)
NAT translation table: every (source IP address, port #) to (NAT IP address, new port #) translation pair
Incoming datagrams: replace (NAT IP address, new port#) in dest fields with (source IP address, port #) in table.
NAT is controversial:
routers should only process up to layer 3 port#
Address shortage should be solved by IPv6
Violates the end-to-end argument: NAT possibility must be taken into account by app designers.
3. IPv6

ICANN: Internet Corporation for Assigned Names and Numbers


allocates addresses | manages DNS | assigns domain names, resolves disputes

Broadcast: Send pkt to all nodes | Multicast: Sand pkt to a small group of nods | Unicast: Send pkt to specific node.

Routing Protocols: Find shortest paths, from sender to receiver, through a network of routers.
Shortest: least “cost”, “fastest”, “least congested”.
Path: sequence of routers, packets will traverse from given source to given destination.

Static: routes change slowly over time. router doesn't have a decision, just do forward.
Global Algo. : All routers have complete topology, link cost info.
“link state” algorithms: Exchanging neighbor's information with all nodes.
Broadcast update to all nodes / all nodes have same info
Many small msg include direct nodes info.
#iterations = #Nodes ; more complexity
Ex: OSPF (open shortest path first)
Dijkstra’s algorithm: O(n^2); each iteration: need to check all nodes
D(v): current value of cost of path from source to dest. V = min( D(v), D(w) + c(w,v) )

Dynamic: routes change more quickly. Need periodic update & in response to link cost changes.
Decentralized Algo. : router knows physically- connected/Direct neighbors, link costs to neighbors.
“Distance vector” algorithms: #nodes slots big messages to direct neighbors only. Iterative, asynchronous
Send update to direct nodes only
Few big msg include all nodes info.
#iterations < #Nodes < #iterations in link state ; less complexity Ex: RIP
Bellman-Ford equation:
dx(y): cost of least-cost path from x to y = min.v {c(x,v) + dv(y) }
Dx(y) = estimate of least cost from x to y = min.v {c(x,v) + Dv(y) }
Step1: see Direct neighbors only. Step2: see up to 2 hops away
..… stop when reach two steps with same table.

Robustness: what happens if the router malfunctions?


LS: • node can advertise incorrect link cost • each node computes only its own table
DV: • DV node can advertise incorrect path cost • each node’s table used by others • error propagate thru network
Virtual circuit:
Pkts sent as flow and received in order, reservation " little waste time", fast-forwarding (read source IP & send pkt).
Datagram routing: individual pkts, no reservation, slow forwarding ( routing, read table where to send ... )
Internet approach to scalable routing: cut down the network into smaller pieces of network then work on
them in different levels
Autonomous systems = domains = network: domain contains a subset of routers.
Forwarding table configured by both intra- and inter-AS routing algorithm
intra-AS routing: interior gateway protocols (IGP) ‫توجيه داخل الدومين‬
 determine entries for destinations within AS
 routing among hosts, routers in same AS (“network”)
 all routers in AS must run same intra-domain protocol
 routers in different AS can run a different intra-domain routing protocol
 Gateway router: at edge of its own AS, has links to routers in other AS’es.
Common protocols: All routers in same AS use the same routing algorithms.
1. RIP: Routing Information Protocol
2. IGRP: Interior Gateway Routing Protocol (Cisco proprietary for decades, until 2016)
3. OSPF: Open Shortest Path First (IS-IS protocol essentially same as OSPF
a. Adv:
i. Security - Multiple same-cost paths allowed (only one path in RIP)
ii. Link provide different cost for different TOS - Integrated uni- and multicast support
iii. Hierarchical OSPF in large domains.
Hierarchical OSPF: Area border routers summarize information in the area to reach other routers.
Backbone routers run OSPF routing limited to backbone.
Boundary routers (root) connect to other AS’es.

inter-AS routing: connect different domains


 determine entries for external destinations
 routing among AS’es
 gateways perform inter-domain routing (as well as intra-domain routing)
 used by all nodes because they need it to know which correct gateway to contact with other AS.
Job of inter-AS1 routing:
1. learn which destinations are reachable through AS2, which through AS3
2. Tell all routers in AS1 this info.
Common protocol:
BGP: Border Gateway Protocol, holds the Internet together
External BGP: obtain subnet reachability information from neighboring ASes
Internal BGP: propagate reachability information to all AS- internal routers.
Gateway routers run both eBGP and iBGP protools
Prefix + attributes = “route”, Important attributes:
AS-PATH: list of ASes through which prefix advertisement has passed
NEXT-HOP: indicates specific internal-AS router to next- hop AS

More than one path to destination AS, selects path based on:
1. local preference value attribute: policy decision 2. shortest AS-PATH
3. closest NEXT-HOP router: hot potato routing 4. additional criteria

BGP messages exchanged between peers over TCP connection


KEEPALIVE: keeps connection alive in absence of UPDATES. OPEN: opens TCP connection.
NOTIFICATION: reports errors in previous msg, to close connection. UPDATE: advertises new path.

You might also like