CS 352 Internet Technology The Internet Protocol - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

CS 352 Internet Technology The Internet Protocol

Description:

Client hardware address (16 bytes) Your IP address. Server IP address. Gateway IP address ... Mobile host uses its home IP address as source address ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 42
Provided by: tri591
Category:

less

Transcript and Presenter's Notes

Title: CS 352 Internet Technology The Internet Protocol


1
CS 352Internet TechnologyThe Internet Protocol
  • Fall 2003
  • Dept. of Computer Science
  • Rutgers University

2
BGP Border Gateway Protocol
  • BGP uses TCP as its transport protocol, on port
    179. On connection start, BGP peers exchange
    complete copies of their routing tables, which
    can be quite large. However, only changes
    (deltas) are then exchanged, which makes long
    running BGP sessions more efficient than shorter
    ones.
  • Four Basic messages
  • Open Establishes BGP session (uses TCP port
    179)
  • Notification Report unusual conditions
  • UpdateInform neighbor of new routes that become
    activeInform neighbor of old routes that become
    inactive
  • Keepalive Inform neighbor that connection is
    still viable

http//www.antc.uoregon.edu/route-views/
3
OPEN Message
  • During session establishment, two BGP speakers
    exchange their
  • AS numbers
  • BGP identifiers (usually one of the routers IP
    addresses)
  • A BGP speaker has option to refuse a session
  • Select the value of the hold timer
  • maximum time to wait to hear something from
    other end before assuming session is down.
  • authentication information (optional)

4
NOTIFICATION and KEEPALIVE Messages
  • NOTIFICATION
  • Indicates an error
  • terminates the TCP session
  • gives receiver an indication of why BGP session
    terminated
  • Examples header errors, hold timer expiry, bad
    peer AS, bad BGP identifier, malformed attribute
    list, missing required attribute, AS routing
    loop, etc.
  • KEEPALIVE
  • protocol requires some data to be sent
    periodically. If no UPDATE to send within the
    specified time period, then send KEEPALIVE
    message to assure partner that connection still
    alive

5
UPDATE Message
  • used to either advertise and/or withdraw prefixes
  • path attributes list of attributes that pertain
    to ALL the prefixes in the Reachability Info field

Withdrawn routes length (2 octets)
FORMAT
Withdrawn routes (variable length)
Total path attributes length (2 octets)
Path Attributes (variable length)
Reachability Information (variable length)
6
Advertising a prefix
  • When a router advertises a prefix to one of its
    BGP neighbors
  • information is valid until first router
    explicitly advertises that the information is no
    longer valid
  • BGP does not require routing information to be
    refreshed
  • if node A advertises a path for a prefix to node
    B, then node B can be sure node A is using that
    pathitself to reach the destination.

7
PATH ATTRIBUTES
  • ORIGIN(TYPE CODE1)
  • Who originated the announcement? Where was a
    prefix injected into BGP?
  • Manually configured, directly connected, by other
    intra-routing protocols
  • AS-PATH (TYPE CODE 2)
  • a list of ASs through which the announcement for
    a prefix has passed
  • each AS prepends its AS to the AS-PATH
    attribute when forwarding an announcement
  • useful to detect and prevent loops
  • AS length can be used to select among routes
    unless a LOCAL PREF attribute overrides

8
Attribute Local Preference (type code 5)
  • Used to indicate preference among multiple paths
    for the same prefix anywhere in the internet.
  • The higher the value the more it is preferred
  • Default value is 100
  • Local to the AS
  • Often used to select a specific exit point for a
    particular destination
  • Used when AS path lengths are same

BGP table at AS4
9
Use of local pref
Local-pref500?
12.0.0.0/8
12.0.0.0/8
OC3
T1
10
Attribute Multi-Exit Discriminator (MED) (code4)
  • when ASs interconnected via 2 or more links
  • AS path length are same
  • AS announcing prefix sets MED
  • enables AS2 to indicate its preference (lower MED
    is better)
  • AS receiving prefix uses MED to select link
  • a way to specify how close a prefix is to the
    link it is announced on

AS1
Link B
Link A
MED500
MED100
AS2
AS3
AS4
11
Use of MED
10.0.0.0/8 MED 50 172.16.0.0/12 MED 100
10.0.0.0/8 MED 100 172.16.0.0/12 MED 50
12
DHCP
  • DHCP Dynamic Host Configuration Protocol
  • DHCP features
  • Dynamic IP address allocation
  • IP addresses can be leased for a certain time
  • Useful where there are a limited number of IP
    addresses
  • Useful for temporary connections (testing,
    laptops, mobile networks)
  • Make administrating networks easier

13
Why DHCP
  • Bad old days Every host assigned an IP address
    manually
  • Do normal users want to deal with this task?
  • What if I move my computer to a new network?
  • DHCP allows hosts to receive IP addresses (and
    more) during boot
  • IP addresses dont have to be manually configured
    into hosts
  • Centralization of host to IP address mapping task
  • Hosts viewed as a uniform pool, not specific IP
    addresses

14
DHCP
  • DHCP has two components
  • A protocol for delivering bootstrap information
    from the server to the clients
  • An algorithm for dynamically assigning addresses
    to clients

15
Address Allocation Modes
  • DHCP supports three modes of allocation
  • Automatic allocation Server assigns a permanent
    address to a host
  • Dynamic allocation Server assigns a host an IP
    address with a finite lease
  • Manual allocation Server assigns host an IP
    address chosen by the network administrator

16
DHCP Packets (contd)
0 7 8
15 16
23 24 31
Request/Reply
Hardware type
Hardware address length in bytes
Hop count
Transaction ID
Number of seconds
Flags
Client IP address
Your IP address
Server IP address
Gateway IP address
Client hardware address (16 bytes)
Server hostname (64 bytes)
Boot filename (128 bytes)
Options (312 bytes)
17
DHCP Packet Fields
  • Flags One flag currently defined
  • Broadcast (bit 0) Clients can request that all
    DHCP server messages be broadcast to it
  • Options
  • All DHCP packets must use the DHCP message type
    option, which defines the type of DHCP message
    being sent
  • DHCPDISCOVER
  • DHCPOFFER
  • DHCPREQUEST
  • DHCPACK
  • DHCPNAK
  • etc.

18
DHCP Message types
  • DHCP message types
  • DHCP Discover Client broadcasts to locate a
    server
  • DHCP Offer Server responds with proposal of
    parameters
  • DHCP Request Client broadcasts its choice of
    server. All other servers are implicitly
    declined.
  • DHCP ACK Selected server responds to client with
    address
  • DHCP NAK Selected server rejects the clients
    request
  • DHCP Decline Client declines servers parameters
  • DHCP Release Client releases its assigned address

19
DHCP Protocol
Server 1
Server 2
Client
DHCPDISCOVER
DHCPDISCOVER
DHCPOFFER
DHCPOFFER
Collects replies Selects server 2
DHCPREQUEST
DHCPREQUEST
DHCPACK
20
DHCP Protocol
  • DHCP client broadcasts a DHCP Discover message
  • Client may specify preference of a lease and/or
    IP address
  • Many servers may respond with offers
  • Client chooses one server from them
  • Client broadcasts DHCP request with id of chosen
    server
  • Selected server sends DHCP ACK or NAK
  • Client begins using offered IP address once it
    receives ACK
  • If the client finds a problem, it sends a DHCP
    Decline message to the server and starts over
    again
  • Client may choose to release the address before
    lease expires by sending a DHCP Release message
    to the server

21
DHCP Relay Agents
  • Similar to BOOTP Relay Agents
  • DHCP relay agents allow DHCP servers to handle
    requests from other subnets

DHCP Relay Agent
Client
IP Gateway Router
IP Gateway Router
DHCP Server
22
NAT Network Address Translation
  • Every host needs an IP address
  • IPv4 address space is limited
  • It is expensive to get an IP address for every
    device that may be connected to the internet
  • May not want to allow outsiders access as all
  • E.g. security concerns
  • IETF has set aside private IP address for use
    within a network but can be translated into a
    fixed public address by a special router
  • NAT box

23
Private IP addreses
  • 10.0.0.0 - 10.255.255.255 (10/8 prefix)
  • 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
  • 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
  • These addresses can be assigned to any of the
    machines within a network but will be translated
    to a public address by the NAT router
  • Ports are used to distinguish among multiple
    addresses that need to be mapped from one public
    address to multiple private addresses

24
NAT
  • NAT idea map internal address space to single
    public address expanded port space
  • NAT router maintains mappings between a public
    address port and a private address and port
  • Keep a table of internal addresses/ports and
    external hosts/ports contacted from the internals

10.0.0.1/ 1000
128.6.8.4/8001
128.6.8.4/8002
10.0.0.2/ 1000
10.0.0.3/ 5001
128.6.8.4/8004
Private LAN side
Public WAN side
25
Disadvantages
  • It is a hack
  • Works only with TCP/UPD port connections
  • NAT has to understand all higher layer
    application protocols to correctly map the port
  • Every packet needs to be remapped
  • Must rewrite layer 3 and 4 headers for every
    packet
  • What happens if a service sends its IP address
    in the data of the packet? (E.g. FTP)

26
Mobile-IP
27
Mobile users
  • Explosion in usage of hand helds
  • Anytime, anywhere wireless services
  • Some connectivity everywhere
  • Many-time, many-where (Infostations)
  • Users can be connected when moving
  • Users can be connect and disconnect to different
    networks

28
Mobility vs connectivity
  • New research problems
  • Continuous connectivity for a mobile host
  • Seamless movement between networks
  • Mobile systems
  • Move from place to place while being wireless
  • Move from place to place by plugging-in at
    different attachment points
  • Why maintain connectivity?
  • Avoid restarting applications/networks

29
IP address problem
  • Internet hosts/interfaces are identified by IP
    address
  • Domain name service translates host name to IP
    address
  • IP address identifies host/interface and locates
    its network
  • Mixes naming and location
  • Moving to another network requires different
    network address
  • But this would change the hosts identity
  • How can we still reach that host?

30
Basic idea
Home Agent
Foreign Agent
MH Mobile Host
CH correspondent HOST
31
Basic idea
  • Mobile hosts attaches to foreign network and
    obtains guest address
  • Via DHCP
  • Via Foreign agent
  • Registration with local agent
  • LA has list of all foreign hosts visiting the
    network

32
Routing for mobile hosts
MH mobile host
Foreign network
Home network
CH correspondent host
How to direct packets to moving hosts
transparently?
Home network
Foreign network
33
Use ARP
  • A designated router proxy-ARPs for mobile host

I have MH1
H4
Who has MH1? Know? mh1_at_h4
MH1
34
Basic Mobile IP to mobile hosts
MH mobile host CH correspondent host HA
home agent FA foreign agent
(Well see later that FA is not necessary or even
desirable)
Foreign network
Home network
HA
FA
  • MH registers new care-of address (FA) with HA
  • HA tunnels packets to FA
  • FA decapsulates packets and delivers them to MH

35
IP-in-IP (Packet encapsulation)
Packet from CH to MH
Source address address of CH Destination
address home IP address of MH Payload
Home agent intercepts above packet and tunnels it
Source address address of HA Destination
address care-of address of MH Source address
address of CH Destination address home IP
address of MH Original payload
36
When mobile host moves again
Foreign network 1
Home network
FA 1
HA
Foreign network 2
FA 2
CH
  • MH registers new address (FA 2) with HA FA 1
  • HA tunnels packets to FA 2, which delivers them
    to MH
  • Packets in flight can be forwarded from FA 1 to
    FA 2

37
Basic Mobile IP - from mobile hosts
Mobile hosts also send packets
Foreign network
Home network
FA
HA
  • Mobile host uses its home IP address as source
    address
  • Lower latency as MH can send packets directly to
    CH
  • Still transparent to correspondent host
  • This is called a triangle route or a dog-leg
    route

38
Problems with Foreign Agents
  • Assumption of support from foreign networks
  • A foreign agent exists in all networks you visit
  • The foreign agent is robust and up and running
  • The foreign agent is trustworthy

39
Solution
  • Mobile host is responsible for itself
  • (With help from infrastructure in its home
    network)
  • Mobile host decapsulates packets
  • Mobile host sends its own packets
  • Co-located FA on MH

Foreign network
Home network
  • MH must acquire its own IP address in foreign
    network
  • This address is its new care-of address
  • Mobile IP spec allows for this option

40
Obtaining a foreign IP address
  • How to get a new IP address?
  • DHCP
  • Dynamic IP address binding like some dial-up
    services

41
Problems with ingress/egress filtering
Home network
Foreign network
  • Mobile host uses its home IP address as source
    address
  • Security-conscious boundary routers will drop
    this packet
  • An egress router will see a packet with source
    address that does not belonging to its network

42
Solution bi-directional tunnel
Home network
Foreign network
  • Provide choice of safe route through home agent
    both ways
  • Use encapsulation in both directions (MH? CH and
    CH ? MH)

43
Solution yet more flexibility
  • Use current care-of address and send packet
    directly
  • This is regular IP!
  • This is not mobility but portability

44
Do we need Mobile IP
  • When do we really need this
  • Mobile clients have short lived sessions
  • Reconnect on move
  • Most mobile users are in private net
  • Mobile servers?
Write a Comment
User Comments (0)
About PowerShow.com