The Network Layer - PowerPoint PPT Presentation

1 / 70
About This Presentation
Title:

The Network Layer

Description:

Lecture note 5 by Jay Yoo. 3. Network Layer Design Issues ... Lecture note 5 by Jay Yoo. 14. Broadcast Routing. send a distinct packet to each destination ... – PowerPoint PPT presentation

Number of Views:256
Avg rating:3.0/5.0
Slides: 71
Provided by: jayy
Category:
Tags: jay | layer | network

less

Transcript and Presenter's Notes

Title: The Network Layer


1
Lecture 5
  • The Network Layer

2
Introduction
  • The Network Layer is concerned with getting
    packets from the source to the destination
  • It is the lowest layer that deals with end-to-end
    transmission
  • It must know the topology of the communication
    subnet (the set of all routers)
  • choose appropriate paths through the subnet
  • When the source and the destination are in
    different networks, the network layer has to deal
    with the differences and solve the problems
    resulting from them

3
Network Layer Design Issues
  • Services Provided to the Transport Layer
  • The network layer provides services to the
    transport layer at the network layer/transport
    layer interface
  • This is the interface between the carrier and the
    customer - the boundary of the subnet
  • The carrier often has control of the protocols
    and interfaces up to and including the network
    layer
  • The carrier deliver packets from the customers
  • Two schools of thought
  • Connectionless service (The Internet)
  • the internet community and equipment vendors
  • control, complexity, and intelligence in the
    hosts and the transport layer
  • each packet with full destination address and
    independently routed
  • usually argue for a speedy delivery
  • argue that its cheaper and safer to put
    complexity in hosts
  • Connection-oriented service (ATM)
  • the carrier (service) providers
  • control, complexity, and intelligence in the
    subnet and the network layer
  • usually argue for an accurate delivery
  • (TCP/)IP over ATM

4
  • Internal Organization of the Network Layer
  • virtual circuit (as contrast to fixed or
    permanent circuit)
  • each packet traveling along a virtual circuit
    must contain the VC id
  • VC entries are in the table of each router
  • VC can be simplex or duplex (call setup can be
    from both directions)
  • if two VCs (actually identical paths) share the
    same id then there can be a confusion
  • datagrams
  • each datagram must have the full destination
    address
  • this address can be quite long
  • Comparison of Virtual Circuit and Datagram
    Subnets
  • datagrams
  • if packets are short then the full destination
    address in datagrams is a big overhead
  • where to route the datagram can be complicated
  • congestion avoidance is more difficult
  • virtual circuit
  • the table space in routers is an overhead
  • call setup time overhead especially credit card
    validation
  • once setup routing is easy, just follow the vc

5
Routing Algorithms
  • Session routing routing decisions are made only
    when a new vc is being setup and thus a route
    remains for an entire user session
  • Nonadaptive algorithm routing decisions are
    made in advance, off-line, and not based on the
    current traffic and topology also called static
    routing
  • Adaptive algorithms changes the routing
    decisions to reflect changes in the topology and
    traffic
  • The Optimality Principle
  • if the node J is on the optimal path from router
    I to router K, then the optimal path from J to K
    also falls along the same route
  • sink tree
  • no circuit since it is a tree
  • the distance matrix is the number of hops

6
  • Shortest Path Routing
  • shortest in terms of
  • the number or hops or
  • the distance or
  • queueing and transmission delay (in this case
    shortest means thefastest)
  • Dijkstras algorithm
  • from A to D
  • label the nodes that are adjacent to A with the
    distance B(2,A) B(distance 2, from A)
  • label the nodes that are not adjacent to A with
    infinity
  • choose the one with the smallest label B in this
    case
  • move to B and examine all adjacent nodes
  • the nodes C(9,B) and E(4,B) are relabeled since
    9,4 lt infinity
  • E(4,B) is chosen
  • G(5,E) and F(6,E) are relabeled
  • G(5,E) is chosen
  • H(9,G) is relabled
  • among C,F,H, F(6,E) is chosen
  • H(8,F) is relabeled
  • Floyds shortest path algorothm

7
  • Flooding
  • every incoming packet is sent out on every
    outgoing line except the one it arrived on
  • creates vast numbers of duplicate packets
  • can have a hop counter in the header of each
    packet
  • set to a specific max number
  • gets decremented at each hop
  • with packet ids a node can keep the packet list
    that have been visited
  • remove if visiting the second time
  • selective flooding (heuristics)
  • if flooding is from NYC to LA then at Chicago it
    is not sent to Boston direction lines
  • very wasteful but robust
  • military application
  • distributed database to update all DBs in the
    network
  • useful as a benchmarking tool for other routing
    algorithms
  • flooding always chooses the shortest path (at
    least one of it will find it)

8
  • Flow-Based Routing (static)
  • given the following information routing can be
    precalculated
  • the subnet topology
  • the traffic matrix
  • the line capacity
  • a routing algorithm
  • arrival for AB line is 14 packets/sec
  • AB line capacity is 20kbps or 25 packets/sec
    (20,000 / 800 bit packet length)
  • the packet service time is 1/800 1.25 msec
    (20,000 x 0.00125 25 packets/sec)
  • AB transmission time is 1/(25-14) 0.091 sec
  • the weight is the fraction of the total traffic
    using the line
  • (integer) linear programming is often used to
    calculate the rightmost table

9
  • Distance Vector Routing (dynamic)
  • used in original ARPANET, in the Internet as RIP
    (Routing Information Protocol), DECnet, Novells
    IPX AppleTalk and CISCO routers use improved
    version of this
  • J sends test packets to A, I, H, and K and
    measures the delay as 8, 10, 12, and 6
  • A, I, H, K send their routing tables to J
  • J recalculates each entry of its routing table
    with received/measured information
  • the cheapest was from J to G is via H
  • via H is 18 12 6
  • via I is 41 10 31
  • via K is 37 6 31
  • The Count-Infinity Problem (b)
  • (a) good news travels fast
  • A coming up from down state
  • (b) bad news travels slow
  • A just went down
  • B knows something went wrong with A
  • but C says it can get there in 2 hops
  • use the info B updates its table
  • C relying on Bs table updates its table
  • it propagates to D and E and B

10
  • Distance Vector Routing (dynamic) - continues
  • The Split Horizon Hack
  • The Count to Infinity problem comes from the fact
    that B relies on Cs information to A where, in
    fact, Cs information was from B
  • The solution is for C to tell B that to A is
    infinity Im relying on your input as far as A
    is concerned.
  • D tells E that it can reach A in 3 hops but tells
    C that it is infinity, Im relying on your input
    to A.
  • works except the case on the right
  • A and B are the same distance away from D
  • D goes down C reports to A and B
  • A thinks it can still get to D via B by 3 steps
  • B thinks it can still get to D via A by 3 steps
  • A,B will update it to 4 steps
  • it will be the same as the count to infinity
    problem

11
  • Link State Routing
  • after 1979, the Distance Vector Routing has been
    replaced by the Link State Routing for ARPANET
  • DVR didnt take the bandwidth into account
  • all lines were 56K but later to 230 kbps and
    1.544 Mbps
  • DVR took long to converge with the split horizon
    hack problem
  • Learning about the Neighbors
  • upon booting each router learns from the
    neighbors as to who they are via HELLO packet
  • Measuring Line Cost
  • by sending ECHO packet the delay to its neighbor
    is measured
  • Building Link State Packets
  • either periodically or after changes with the
    neighbors (up or down) LSPs are built
  • see figure (a) with the delay on each link (b)
    LSPackets A has connections to B and E
  • flooding is used to send these packets
  • Sequence number is the id of the packet
  • Age is the number of seconds to live
  • Distributing the Link State Packets
  • different versions of routing tables can coexist
    in the network due to different arrival time
  • seq and age are used
  • the packet buffer indicates actions to take

12
  • Computing the New Routes
  • once a full set of link state packets are
    received each router can construct the entire
    subnet graph
  • usually Djikstras shortest path algorithm is run
    for each pair of nodes
  • Hierarchical Routing
  • for a big network, the routers are divided into
    regions
  • decrease in the table entries
  • can increase the path length
  • best route for 1A to 5C is via region 2 (5 hops)
    but
  • all traffic to to region 5 is via region 3 (6
    hops)

13
  • Routing for Mobile Hosts
  • foreign agents (where the user is registering to
    use a service) and home agents (where the user is
    registered)
  • deregistration is usually done by hanging up by
    user
  • scenario of sending a packet to a mobile user
    registered with a foreign agent
  • sender in Seattle sends a packet to the
    recipient's home agent (Seattle to NYC)
  • the home agent looks up the temporary location
    and the foreign agents address the user is in
    LA now
  • the home agent encapsulate the original packets
    data into another packet and sends the new packet
    to the foreign agent (Tunneling) (NYC to LA)
  • the home agent sends the foreign agents info to
    the sender in Seattle
  • the foreign agent takes out the original data and
    sends it to the mobile user
  • a tunnel is established between the sender in
    Seattle and the user in LA for further
    communication

14
  • Broadcast Routing
  • send a distinct packet to each destination
  • wasteful bandwidth
  • need to know all the addresses
  • flooding
  • too many packets, too many bandwidth
  • multidestination routing
  • destination includes all the nodes to be
    delivered to
  • routing node creates multiple packets with only
    those relevant addresses (like partition)
  • after some hops the destination field will have
    only one address
  • use sink tree (spanning tree)
  • the information is available with link state
    routing but
  • not available with distance vector routing
  • reverse path forwarding (heuristic for spanning
    tree)
  • each node pair has a preferred line for
    communication
  • if a broadcast packet arrives it establishes a
    link of a tree
  • a sink tree can be built
  • reasonably efficient and easy to implement
  • no need to keep the spanning tree information

15
  • Multicast Routing
  • the network, when huge, can be partitioned (not
    necessarily disjoint) into groups so that the
    communication can be directed to a certain group
    (multicast).
  • A multiple smaller spanning trees can be built on
    a network.
  • Storing many pruned spanning trees for different
    groups can be a problem. - core base tree
  • a single spanning tree per group (instead of m
    possible spanning trees) is stored
  • the root (the core) is usually in the middle of
    the group
  • a multicast message is sent to the core
  • may not be optimal for all sources but
  • reduces the overhead of keeping m spanning trees

16
Congestion Control Algorithms
  • Causes for congestion
  • a sudden increase of input stream
  • few slow processors in the network
  • Congestion tends to get worse
  • Congestion control is a global issue to the
    subnet involving all hosts and routers
  • Flow control relates to point-to-point traffic
    between the sender and a given receiver
  • Even if there is no congestion problem flow
    control may still be needed
  • to give other hosts a chance to send

17
  • General Principles of Congestion Control
  • Open Loop solution
  • to solve the problem by good design
  • no midcourse correction
  • act at source design
  • act at destination design
  • Closed Loop solution
  • feedback loop like Neural Net
  • explicit feedback
  • implicit feedback
  • Increase capacity
  • certain services can temporarily request more
    bandwidth
  • use backup bandwidth for emergency
  • Decrease Traffic
  • deny service to users
  • degrading service to some or all users
  • What if you cant increase capacity and cant
    decrease traffic?
  • Service Outage.
  • Stock price dives

18
  • Congestion Prevention Policies
  • the issues in the Transport layer are similar to
    those in the Data Link layer but
  • the Transport layer handles the traffic across
    the whole network whereas
  • the Data link layer handles between two routers
    over a wire

19
  • Traffic Shaping
  • widely used in ATM networks
  • the main cause of congestion is that traffic is
    often burst
  • Traffic Shaping is to force the hosts to transmit
    packets at a more predictable rate
  • Carriers and customers agree in advance on the
    traffic pattern (shape)
  • this agreement may not be so important for file
    transfers but very important for real time
    traffics like audio and video
  • monitoring a traffic is called traffic policing
  • monitoring traffic is easier on VC than datagrams
  • The Leaky Bucket Algorithm
  • leaky bucket discharges water at a constant rate
  • any amount more than the bucket can take will
    overflow
  • consider the leaky bucket as a finite internal
    queue
  • once queue is full any additional
    traffic/arrivals will get discarded
  • a single server queueing system with constant
    service time
  • for a fixed packet size like ATM cells, a packet
    can be sent out at a constant rate
  • for a variable length packets, a fixed number of
    byes can be sent out
  • The Token Bucket Algorithm
  • tokens are added to the bucket at every delta T
    time
  • the same number of packets as the number of
    tokens can be sent out (or bytes)

20
  • Flow Specification
  • Traffic shaping or congestion control in general
    requires the agreement among the sender,
    receiver, and the subnet
  • Such an agreement is called a flow specification
  • Max packet size
  • Token bucket rate (bytes/sec) rate of arrival
    into the bucket
  • Token bucket size (bytes) the capacity of the
    bucket
  • Maximum transmission rate (bytes/sec) shortest
    interval in which the token bucket could be
    emptied
  • Loss sensitivity (bytes) / Loss Interval (micro
    sec) max acceptable loss rate
  • Burst loss sensitivity (packets) how many
    consecutive lost packets can be tolerated
  • Minimum delay noticed (micro sec) how long a
    packet can be delayed w/o the application
    noticing
  • Maximum delay variation (micro sec) some
    applications are more sensitive to jitter (the
    amount of variation in the end-to-end packet
    transit time) than the delay synchronization
    issue
  • Quality of guarantee states Are above
    specification just goals/wish list or absolute
    requirement? Some applications do not know what
    they want or what they mean. These
    specifications are negotiated between the Subnet
    and the users

21
  • Congestion Control in Virtual Circuit Subnets
  • What to do when congestion occurs?
  • admission control (open loop at source) dont
    let any new request into the network
  • detour the congested area see figure
  • reservation after negotiation subnet set aside
    enough capacity to meet the flow specification

22
  • Choke Packets (for both VC and datagram)
  • by monitoring the utilization of a line a choke
    packet can be sent to the sender to reduce the
    transmission by certain
  • after some period after the choke packet the
    sender can come back to the previous rate
  • Weighted Fair Queueing
  • if n hosts are sharing an output line then n
    internal queues can be maintained as a round
    robin fashion
  • some ATM switches use this method
  • byte by byte or packet by packet round robin
  • file servers can be given a higher priority
  • give more bytes per tick
  • Hop-by-Hop Choke Packets
  • for a long distance the choke packet takes some
    time to get to the source
  • for a high speed this period can generate a lot
    of traffic
  • (a) regular choke packet
  • (b) Hop-by-Hop choke packet

23
  • Load Shedding
  • when none of the above works then router will
    drop packets
  • but which one?
  • For a file transfer
  • dropping 6 out of 12 may require retransmitting 6
    to 12
  • dropping 10 may require retransmitting only 10 to
    12
  • some packets are more important than the others
    depending on the application
  • a line of pixels in images is less important than
    a line of text
  • packet types can be priotized
  • ATM has 1 bit in header allocated for priority
  • Jitter Control
  • audio and video applications delay is less
    important than the variation of the delay
  • as long as frames arriving in reasonable delay
    variations its acceptable
  • jitter can be controlled at the router by trying
    to keep the space between the packets constant
  • Congestion Control for Multicasting (Resource
    reSerVation Protocol)
  • multicast spanning tree is built for each senders
  • using these spanning trees each receiver makes
    bandwidth reservation request up to the sender

24
InterNetworking
  • In reality, we dont have a single homogeneous
    network
  • we have something looks like this
  • For Internetworking we need at each layer
  • repeaters that just copy bits between cable
    segments (layer 1)
  • bridges store and forward data link frames
    between LANs (layer 2)
  • multiprotocol routers forward packets between
    dissimilar networks (layer 3)
  • transport gateways connect byte streams in the
    transport layer
  • application gateways allow interworking (above
    layer 4)
  • (b) gateway between LAN and WAN
  • (c ) half gateways

25
  • How Networks Differ
  • the table explains all

26
  • Concatenated Virtual Circuits
  • a sequence of virtual circuits is set up from the
    source through one or more gateways to the
    destination
  • each gateway relays incoming packets by
    converting between packet formats and virtual
    circuit numbers, etc.
  • each gateway has a table indicating incoming and
    outgoing VC number mapping
  • it can be full or half gateways
  • ex) OSI -gt TCP -gt OSI
  • the concatenation can change the nature of
    service
  • if source network provides reliable delivery of
    network layer packets
  • but if the via network doesnt
  • then it is no longer an option

27
  • Connectionless Internetworking
  • if each network has its own network layer
    protocol, it is not possible for a packet from
    one network to transit to another
  • unless one format is very close to another, the
    conversion is difficult and rarely attempted
  • addressing is difficult
  • IP address is 32 bit
  • mapping one protocols address into another is
    not simple
  • to be fully compatible each host must have
  • OSI address
  • IP address
  • xyz address
  • Guess how many hosts in the world!
  • How can you assign them?
  • How can Multiprotocol remember/record these in
    order to translate?

28
  • Tunneling
  • internetworking is tolerable if the source and
    destination networks are of the same type
  • Tunneling can be used in between
  • ethernet LAN to PTSNs point to point WAN to
    ethernet LAN
  • this job is manageable by Multiprotocol router

29
  • Internetwork Routing
  • An internetwork with multiprotocol gateways can
    be made into a graph and then
  • a two level routing algorithm can be used
  • an exterior gateway protocol between the networks
  • a packet is sent to the local multiprotocol
    router
  • the network layer sw decides which multiprotocl
    router to forward this packet to using its own
    multiprotocol router routing table
  • it may have to be tunneled if via network is
    different
  • an interior gateway protocol within each network
  • each network is called an Autonomous System since
    they are independent to each other
  • it may well be (more often than not) over
    international boundary line - more trouble
  • each country has her own rules and regulations
  • Billing is a big issue since each network has
    different charge plan

30
  • Fragmentation
  • reasons to have some maximum size on the packets
  • HW (the width of a TDM transmission slot)
  • Operating System (buffer size of OS is 512 bytes)
  • Protocols (the number of bits in the packet
    length field)
  • (inter)national standards
  • attempt to reduce error induced retransmissions
    to some level
  • attempt to prevent one packet from occupying the
    channel too long
  • different packet sizes for different networks
    introduce packet fragmentation
  • (a) transparent packet fragmentation
  • suit yourself to the size of the via network
  • the next network doesnt even know fragmentation
    happened in the previous network
  • (b) nontransparent fragmentation

31
  • Fragmentation - continues
  • (a) transparent packet fragmentation
  • the exit gateway must know when and whether it
    received all the pieces
  • all packets fragments must exit via the same
    gateway
  • (b) nontransparent fragmentation
  • the destination host does the reassemble
  • it requires all the hosts to be able to assemble
  • fragmentation overhead remains for the whole trip
    to destination
  • tree structure can be used in constructing
    fragmentation id
  • packet 0 can be fragmented into 0.1, 0.2, and 0.3
    and
  • further fragmentation can be 0.0.0, 0.0.1, 0.0.2,
    etc.
  • reassemble problem
  • if 0.0 gets lost and the original packet is
    retransmitted
  • if the original packet goes through smaller
    packet sized network and it becomes 0.0, 0.1,
    etc. but twice as many fragmentation
  • the same 0.0 is arrived but half the size
  • its tough for the assembling gateway
  • original packet number and the fragmentation
    number
  • can be used
  • (a) original packet w/ 10 bytes

32
  • Firewalls
  • to protect from hackers, viruses, industry
    espionage, corporations surround their networks
    with firewalls
  • all communication go through some kind of filter
    (guess why internet access is slow?)
  • packet filtering router
  • packet by packet inspection is done
  • port abling and disabling
  • port 23 for telnet, port 79 for finger, etc.
  • sometimes ports are assigned dynamically, tough
  • application gateway
  • look at the mail header, etc.
  • hard to filter wireless and radio communications

33
The Network Layer in the Internet
  • The Internet is an interconnected collection of
    many networks
  • The Internet is supported by its network layer
    protocol called IP (Internet Protocol)
  • designed from beginning with internetworking in
    mind
  • for better explanation of IP please see Douglas
    E. Comer, Internetworking with TCP/IP, vol 1, PH

34
  • The IP Protocol
  • The IP header
  • 20 byte fixed part (first 5 rows)
  • variable length optional part
  • transmitted in big endian order from left to
    right, high order bit to low order bit
  • Version IP version number
  • HLEN or IHL header length in 32 bit words
    (remember the variable optional part)
  • minimum is 5 with no options
  • maximum is 15 (24-1) or 15 4 60 bytes for
    header(40 byte or 10 rows max for option part)
  • Type of Service 8 bit (Precedence(3),D,T,R bits,
    unused(2))
  • Precedence priority (0..7network control
    packet)
  • D low delay preferred
  • T high Throughput preferred
  • R high Reliability preferred
  • it may not be possible for the Internet to
    guarantee the type of transport requested
  • consider it as a hint to the routing algorithm
    rather than a demand
  • Total Length includes data (216 65,535 bytes)
  • header is upto and include options
  • data follows immediately after options

35
  • The IP header - continues
  • Identification packet ID useful when reassemble
    fragments
  • Flags
  • DF Dont Fragment sender knows it may have to
    avoid smaller packet size networks
  • for certain control packets where only the whole
    length is useful
  • if a router cant avoid fragmenting, this packet
    will be discarded and an error msg is sent back
  • MF More Fragments will come the last fragment
    doesnt have this bit set
  • Fragment Offset offset of this fragment in the
    original datagram/packet
  • all fragments are multiple of 8 bytes except the
    last one
  • first fragment will have this value as 0
  • Once the datagram with MF bit turned off
  • the router or destination node whoever does the
    reassembly can tell whether all the fragments
    have been received
  • by looking at Total Length and Fragment offset
    fields of each fragment datagrams received
  • Time to Live to limit how long, in seconds, the
    datagram is allowed to remain in the internet
    system
  • since its hard to measure the transit time for
    physical networks, it is decremented at each hop
  • plus a router records the arrival time and
    decrements the duration the datagram remained in
    the router when leaving
  • when 0, this datagram is discarded and an error
    message is sent to the sender
  • Protocol high-level protocol that was used to
    create the message being carried in the data area
    of datagram (TCP or UDP for example)

36
  • The IP header - continues
  • Header Checksum ensures the integrity of header
    values
  • Source address 32 bit
  • Destination address 32 bit
  • Options
  • to allow information that are not part of header
    for later versions of protocols
  • some information is rarely used and not worth
    being part of regular header
  • padded to make a multiple of 4 bytes
  • not all options are supported by all routers
  • Option Octet copy (1 bit), option class (2
    bits), option number (5 bits)
  • copy 1 the option should be copied into all
    fragments
  • option class
  • 0 datagram or network control
  • 1 reserved for future use
  • 2 debugging and measurement
  • 3 reserved for future use
  • option number class, number, length
  • 0,0,- end of option list
  • 0,1,- no op

37
  • The IP header - continues
  • Security option for mulitary do not route this
    packet through Cuba
  • if its really secret, dont use internet use
    James
  • Record Route option format
  • option octet, length octet (total length of the
    option including the first 3 octets), pointer
    (offset of the next available slot), only 3
    octets no padding to make it 4
  • first IP address
  • second IP address
  • they provide a way to monitor or control how
    routers route datagrams
  • enough space must be allocated in the option by
    the original source to hold all entries that will
    be needed
  • if full (the pointer gt the length) then no more
    address is inserted
  • Strict Source Routing (the same format as Record
    Route option)
  • source node dictates the route
  • useful when routing tables are corrupted or for
    timing measurements
  • an error occurs if the exact path can not be
    followed
  • Loose Source Routing
  • source node dictate only few important routes
  • allows other routes in between specified
    routes/routers
  • for both Source Routing methods, if the list is
    exhausted before reaching the destination, the
    remaining segments is routed normally as if no
    source routing

38
  • IP Addresses
  • unique 32 bit address for every host in the
    Internet - the Internet is running out of address
    space (the number of hosts doubles each year) -gt
    IPv6 with bigger address space, 128 bit
  • each address is a pair (netid, hostid)
  • class A bigger networks (1,7,24 bits) of
    hosts gt 216
  • 9.0.0.0 IBM 12.0.0.0 ATT
  • class B intermediate networks (2,14,16 bits) 28
    lt of hosts lt 216
  • class C smaller networks (3,21,8 bits) of
    hosts lt 28
  • network ids are assigned by the INTERNIC
    (Internet Network Information Center)
  • multi-homed hosts hosts that are connected to
    more than 1 network requires multiple IP addr
  • IP addresses encode both a network and a host,
    they do not specify an individual computer, but
    rather a connection to a network
  • if a host moves from one network to another, its
    IP address must change
  • multicast address the address refers to a
    multicast group
  • Loopback address 127 is for the class A range
  • to test TCP/IP and for inter-process
    communication on the local machine

39
  • Subnets
  • different from Subnet in network (WAN)
  • How can one minimize the number of assigned
    network addresses, especially class B, without
    destroying the original addressing scheme?
  • Allow a network to be split into several parts
    for internal use but still act like a single
    network to the outside world These parts are
    called subnets
  • outside the network, this subnetting is not
    visible
  • Once a packet arrives, the Subnet mask is ANDed
    with the address to find the subnet number
  • Each Subnets router needs to remember only the
    hosts on the subnet reducing the routing table
    entries

40
  • Internet Control Protocols
  • Internet Control Message Protocols (ICMP)
  • routers closely monitor the Internet and
    unexpected events are reported to ICMP to test
    the Internet
  • It is an error reporting mechanism
  • when a datagram causes an error, ICMP can only
    report the error condition back to the original
    source
  • the source of the datagram must relate the error
    to an individual application program or take
    other action to correct the problem (like
    reporting an alarm to the administrator)
  • why to the source only?
  • Datagram finds its way (route) at each step of
    the way has source and destination address
    only
  • cant tell if a router in the middle has a
    routing table problem
  • must rely on the host administrator and the
    network administrators to locate and repair the
    problem
  • It provides communication among routers and
    hosts
  • It is an integral and required part of IP

41
  • The Address Resolution Protocols (ARP)
  • each host has an assigned IP address and a
    physical address (board address)
  • Es are ethernet addresses
  • Fs are FDDI addresses
  • the Data Link layer doesnt understand IP
    addresses
  • IP addresses need to get mapped onto data link
    layer addresses such as Ethernet (48 bit board
    address)
  • The problem of mapping high-level addresses to
    physical addresses is known as the address
    resolution problem
  • resolution through direct mapping put IP and
    Ethernet addresses in system configuration file
  • hard to maintain and error will be introduced by
    the wrong/old information
  • resolution through dynamic binding ARP
  • send broadcast message asking who has this IP
    address?
  • The owner will respond with the ethernet address
  • IP packet is encapsulated (source and destination
    IP addresses) into the ethernet packet (source
    and destination ethernet addresses) and sent
  • both source and destination hosts can keep this
    information in cache for immediate future use
  • ARP is a low-level protocol that hides the
    underlying network physical addressing,
    permitting one to assign an arbitrary IP address
    to every machine. Think of ARP as part of
    physical network system, and not as part of the
    internet protocols
  • a router can deliver ARP messages to other LANs
    called proxy ARP

42
  • The Reverse Address Resolution Protocols (RARP)
  • reverse problem to ARP
  • Given an ethernet address, what is the IP
    address?
  • For a diskless system like some SUN workstations,
    their IP address information is kept on a remote
    server
  • Upon booting up, hosts sends a broadcast message
    asking (This is my ethernet address. Who has my
    IP address?) using RARP
  • Since RARP is using all 1s to reach the RARP
    server, RARP server must be on each LAN
  • limited to its own LAN
  • BOOTP (BOOTstrap Protocol) a more recent
    version
  • RARP uses low level address determination
  • BOOTP and DHCP (Dynamic Host Configuration
    Protocol) build on higher level protocols like IP
    and UDP to go over routers

43
  • The Interior Gateway Routing Protocols (IGP)
    OSPF,RIP,HELLO
  • IGP Interior Group Protocols
  • AS (Autonomous System) the Internet is made of
    a large number of As (various sized networks)
  • routing protocols used within AS are called IGP
  • RIP Routing Information Protocol the Vector
    Distance Routing
  • HELLO protocol now obsolete the Vector
    Distance Routing but uses network delay iso hop
    counts
  • OSPF Open Shortest Path First
  • OSPF
  • RIP was the original Internet interior gateway
    protocol which didnt work well with larger ASs
  • remember the count to infinity problem?
  • OSPF is the successor that became a standard in
    1990
  • Open, supports various physical distance and
    delay, etc., dynamic algorithm, supports type of
    service, load balancing by splitting the load
    over multiple lines, supports hierarchical
    systems (the Internet getting too big, no router
    is expected to know the entire topology),
    security, provisioning to deal with routers
    connected to the Internet via a tunnel
  • AS can be represented as a weighted graph

44
  • The Interior Gateway Routing Protocols (IGP)
    OSPF - continues
  • ASs can be divided into areas
  • within an area, each router has the same link
    state database and runs the same shortest path
    algorithm
  • intraarea routing
  • interarea routing
  • interAS routing
  • internal routers within one area
  • area border routers between two or more areas
  • backbone routers on the backbone
  • AS boundary routers to talk to other ASs
  • these 4 routers can overlap
  • type of service is handles by creating separate
    graphs using the delay, throughput, and
    reliability
  • the table shows the types of OSPF messages

45
  • The Exterior Gateway Routing Protocol (EGP) BGP
  • BGP (Border Gateway Protocol) is used between
    ASs
  • BGP must consider politics
  • no transit through Cuba for Pentagon packets
  • no transit outside Canada for Canadian packets
  • no transit through MS for IBM packets
  • Politics are manually configured into each BGP
    routers and not part of the protocol itself
  • networks (ASs) are classified
  • stub networks like a leaf of a tree cant be
    used as a transit network
  • multiconnected networks non stub networks but
    they refuse to be used as a transit network
  • transit network willing to be used as a transit
    but with some restrictions
  • fundamentally a Distance Vector Protocol but
    different from others like RIP
  • maintains more than just the cost to each
    destination
  • keeps track of the exact path used
  • each node periodically sends its neighbors the
    exact path it is using
  • the receiving node recalculates the best route to
    a destination
  • A .. J routers representing networks (ASs)
  • (a) a set of BGP routers
  • (b) information sent to F router

46
  • Internet Multicasting
  • IP supports multicasting using type D addresses
  • each class D identifies a group of hosts
  • permanent group address
  • 224.0.0.1 all systems on a LAN
  • 224.0.0.2 all routers on a LAN
  • 224.0.0.5 all OSPF routers on a LAN
  • 224.0.0.6 all designated OSPF routers on a LAN
  • temporary group address
  • a best effort is used and some members of a group
    may not get the packet
  • IGMP (Internet Group Management Protocol) is
    used
  • close to ICMP
  • only query and response packets
  • Multicast routing is done using spanning trees

47
  • Mobile IP
  • traveling IP user
  • see Routing for Mobile Users
  • this user has a home agent in NYC and has a fixed
    IP address
  • this is not usable in LA
  • the mobile user registers to LAs foreign agent
    and start using its guest IP address
  • 0 LAs foreign agent sends this guest IP address
    to the home agent in NYC
  • 1 a sender sends data to the mobile users NYC
    home IP address
  • 2 NYC home agent sends this data with the
    senders IP address to LAs foreign agent
  • 3 NYC home agent sends the mobile users guest
    IP address to the sender in Seattle so that the
    future communication can be done right without
    bothering NYCs home agent
  • 4 the sender establishes tunneling to the mobile
    users guest IP address in LA

48
  • CIDR - Classless InterDomain Routing
  • IP address space is running out quickly Running
    Out of Address Space (ROADS) problem
  • class A millions of hosts (class ID1,net
    ID7,host ID24)
  • class B thousands of hosts (2,14,16)
  • class C upto 254 (3,21,8)
  • three bears problem
  • most organizations think class A network is too
    much
  • most organizations think class C network is too
    small
  • most organizations think class B network is just
    right popular demand
  • in reality
  • there are many class B networks but
  • class B holding organizations have fewer than 50
    hosts
  • it might have been better if class C used 10 bits
    instead of 8 bit host Ids
  • to conserve class B addresses, many class C
    addresses were given out instead
  • created problem with routers
  • routers have to store much more information
  • a technique known as Classless Inter-Domain
    Routing (CIDR) solves the problem temporarily
  • CIDR
  • a block of contiguous class C addresses are
    collapsed into a single entry represented by a
    pair

49
  • CIDR - Classless InterDomain Routing - continues
  • suppose an organization was assigned a block of
    2048 contiguous addresses starting at address
    234.170.168.0 (class D for multicast routing is
    used!)
  • lowest 234.170.168.0 11101010 10101010 10101000
    00000000
  • highest 234.170.175.255 11101010 10101010
    10101111 11111111
  • CIDR requires 2 values to specify the range of
    values the lowest address and 32 bit mask
  • 11111111 11111111 11111000 00000000
  • see 11 0s to give 211 2048 when masked
  • with the base (lowest) address and the mask, the
    address to this organization can be figured out
  • routing software does not interpret the
    destination address class
  • instead, each entry in the routing table contains
    an address and a mask
  • called Supernet Addressing or Supernetting as
    opposed to subnet addressing
  • since it allows the use of many IP network
    addresses for a single organization
  • current IPv4 uses 32 bit addressing where the
    next IPv6 uses 128 bit addressing
  • IPv5 in use for an experimental real-time stream
    protocol

50
  • IPv6
  • address space was/is running out
  • IPv4 needed to be made more flexible with many
    service introductions
  • Deering and Francis proposals in 1993 were
    selected and called SIPP (Simple Internet
    Protocol Plus) later given IPv6
  • not fully compatible with IPv4 but reasonably
    well with others TCP,UDP,ICMP,IGMP,OSPF,BGP, and
    DNS
  • longer address space, 128 bit
  • simplification of the header 7 fields vs 13 in
    IPv4 packets are routed faster
  • better support for options many previously
    required fields are now made optional
  • much better security Authentication and
    Security are key features in IPv6
  • type of service is made better (8 bit field) but
    may not be enough
  • the transition will take take a decade
  • The Main IPv6 Header
  • version field is always 6
  • routers will have to examine this field to tell
    which packet they have
  • wasteful
  • many will create a field in the data link header
    to distinguish v4 and v6
  • and have 2 network layer handlers
  • violation of layered approach forcing the data
    link layer to know the network layer packet
    types

51
  • The Main IPv6 Header
  • The IPv6 fixed header (required)
  • priority field to distinguish flow controllable
    sources from non flow controllable sources
  • 0..7 in terms of slowing down capability during
    congestion
  • 8..15 for real time traffic with constant flow
    audio and video dont like jitters (delay
    variations)
  • allows routers to handle different types of
    packets better during congestion
  • Flow Label
  • to allow a source and destination to set up a
    pseudoconnection with particular properties and
    requirements
  • like delay requirement and thus may need to
    reserve bandwidth
  • flow can be setup in advance and an ID can be
    given
  • routers look up the table to see what kind of
    special treatment this ID requires
  • like a combination of the flexibility of a
    datagram subnet and the guarantees of a virtual
    circuit subnet
  • flow numbers are to be randomly generated for
    easy hashing
  • Payload length
  • how many bytes follow the 40-byte header
  • different from Total Length in IPv4 since it
    doesnt include the header length
  • Next Header
  • there are 6 extension headers
  • this field tells which of the 6 types follow this
    header if any
  • if this header is the last IP header, this field
    tells which transport protocol handler (TCP,UDP)
    to pass the packet to
  • Hop limit
  • the same as the Time to Live field in IPv4 (in
    seconds)
  • Source and Destination address
  • 16 bytes or 128 bits

52
  • The Main IPv6 Header - continues
  • address starts with different prefixes (128 bit
    16 bytes)
  • Ipv4 addresses prefixed by 80 zeros (10 byte
    zeros)
  • next 16 bytes determines two variants
  • these variants tell how IPv6 packets will be
    tunneled over the IPv4 infrastructure
  • Provider based (010 prefix) ATT, MCI, Sprint,
    BT, etc.
  • next 5 bits indicate one of the North America,
Write a Comment
User Comments (0)
About PowerShow.com