35
IP Networks and Routing Oakton Community College CIS 238

IP Networks and Routing

  • Upload
    deliz

  • View
    35

  • Download
    1

Embed Size (px)

DESCRIPTION

IP Networks and Routing. Oakton Community College CIS 238. LINUX Network Setup. Commands: - ip - ifconfig - ethtool, sysctl (see sysctl.conf) , see ndd on non-LINUX systems - service network start/stop Datasets: - /etc/sysctl.conf, sysctl.d - PowerPoint PPT Presentation

Citation preview

Page 1: IP Networks and Routing

IP Networks and Routing

Oakton Community CollegeCIS 238

Page 2: IP Networks and Routing

LINUX Network Setup• Commands: - ip

- ifconfig - ethtool, sysctl (see sysctl.conf) , see ndd on non-LINUX systems - service network start/stop

Datasets: - /etc/sysctl.conf, sysctl.d - /etc/sysconfig/network-scripts

Page 3: IP Networks and Routing

IP Addressing Requirements

• Network address• NetMask• Gateway address• Static or DHCP

Page 4: IP Networks and Routing

IP V4 addressing

• IP addresses– Consist of 32 bits normally expressed either as

four binary octets separated by periods or as four sets of decimal numbers separated by periods

– Contain a network ID and a host ID defined by the subnet mask

– If more than local addressing must also supply a Gateway address to the rest of the world.

Page 5: IP Networks and Routing

IPv4 Address Classes

Five different classes of IP addresses First three reserve a certain portion of the 32 bits

available for the network ID and the host ID Last two are used in special situations only

Page 6: IP Networks and Routing

Subnet Masks

• 32-bit numbers used to determine the portion of an IP address that represents the network ID and the host ID

• Place a 1 in bit positions that correspond to network ID bits and a zero in bits that represent host ID bits

• The host can perform a logical AND function to determine if a destination IP address is on a local network or a remote network

Page 7: IP Networks and Routing

IP Subnetting

• Process of borrowing host bits to increase the number of network bits

• Allows administrators to better utilize IP networks that are either assigned to them from the Internet Assigned Numbers Authority (IANA) public IP addresses or from the private address space defined by RFC 1918: 10.0.0.0/8, 172.16.0.0/12. 192.168.0.0/16, 169.254.0.0/16

Page 8: IP Networks and Routing

Network Routing

• Routing– Process of moving information along a path from

a source to a destination on a network or between networks

• On an IP network:– Source and destinations are called hosts– Information is fragmented into packets that are

transferred between these hosts

Page 9: IP Networks and Routing

Direct (Local) Routing• Direct Routing (ARP only). Local delivery is via

MAC Address contained in ARP table.

Page 10: IP Networks and Routing

Indirect Routing• Source and destination hosts are not on the same network segment

• Packets must pass through a router, a physical link between two or more networks

Page 11: IP Networks and Routing

Indirect Routing• IP determines location of routers in one of two ways:

– Consults a locally maintained routing table, a list of networks the system knows about and the IP addresses of routers that packets must pass through to get to those networks

– Uses a default gateway (if network is not found on the static routing table)

• Either way, the designated router for the address is on the local network and is ARP’ed for like any local host.

• A route consists of:a) network address b) subnet maskc) next hop gateway address.

Page 12: IP Networks and Routing

Routers

• Routers– A physical device used to connect a number of

network segments

– Can be dedicated pieces of hardware, or can be computers with more than one network adapter card, each connected to a different network segment

Page 13: IP Networks and Routing

Static and Dynamic Routers• Static routers– Router to which routes must be added manually. – Provide an entry in the routing table for every

network on the internetwork– Configure each router with a default gateway– Note: every host on a IP network is a static router, if

only for itself.

• Dynamic routers– Routers that automatically share their routing

information with other routers on the network using a routing protocols such as RIP, OSPF, EIGRP or BGP

Page 14: IP Networks and Routing

Routing Protocols• Standard language that lets dynamic routers exchange

routing information

• Basic types: - Distance (RIP, BGP) - Link State(OSPF) Both (EIGRP)

- Interior: RIP, OSPF, IGRP - Exterior: EGP, BGP, EIGRP

• Link state protocols separate networks into areas with common network information

• Autonomous system– One set of networks and routers all under the same

administration or group

Page 15: IP Networks and Routing

IPv4 Header

Page 16: IP Networks and Routing

Route Debugging

• arp (-a)• ping / pathping• ipconfig /all, ifconfig -a• tracert, traceroute• netstat –rn• route

Page 17: IP Networks and Routing

IPv4 Protocols• Internet Control Message Protocol (ICMP)– Handles communication error messages

• Internet Group Management Protocol (IGMP)– Provides functionality for multicasting

• Internet Protocol (IP)– Connectionless, layer three protocol– Determines proper routing within multiple networks

• Address Resolution Protocol (ARP)– Maps a known IP address to a Media Access Control (MAC)

layer address

Page 18: IP Networks and Routing

IPv4 protocols (2)

• Multicast Routing Protocols– Maintaining Multicast Routing Table– E.g. DVMRP, MOSPF, CBT, PIM

• Exterior Routing Protocols (Inter-AS)– E.g. BGP (Border Gateway Protocol)

• Quality-of-Service Frameworks– Integrated Service (ISA, IntServ)– Differentiated Service (DiffServ)

Page 19: IP Networks and Routing

IPv4 to IPv6Changed Removed

Page 20: IP Networks and Routing

Network Layer in v4 & v6

Page 21: IP Networks and Routing

IPv6 Addressing Model

• Addresses are assigned to interfaces, not hosts• Interface expected to have multiple addresses• Addresses have scope– Link-Local– Site-Local Unique Local– Global

Page 22: IP Networks and Routing

Text Representation of Address

• Colon-Hex

– 3ffe:3600:2000:0800:0248:54ff:fe5c:8868

• Compressed Format:

– 3ffe:0b00:0c18:0001:0000:0000:0000:0010

– becomes 3ffe:b00:c18:1::10

Page 23: IP Networks and Routing

Address Type Prefixes

Page 24: IP Networks and Routing

Global Unicast Address

• Global routing prefix– A (typically hierarchically-structured) value

assigned to a site (a cluster of subnets/links)

• Subnet ID– An identifier of a subnet within the site

• Interface ID– Constructed in Modified EUI-64 format

Page 25: IP Networks and Routing

MAC to IPv6 mapping

Page 26: IP Networks and Routing

Site-Local Address

• Meaningful only in a single site zone, and may be re-used in other sites

• Equivalent to the IPv4 private address space

• Address are not automatically configured and must be assigned

• Prefix= FEC0::/48

Page 27: IP Networks and Routing

Link-Local Address

• Meaningful only in a single link zone, and may be re-used on other links

• Link-local addresses for use during auto-configuration and when no routers are present

• Required for Neighbor Discovery process, always automatically configuration

• An IPv6 router never forwards link-local traffic beyond the link

• Prefix= FE80::/64

Page 28: IP Networks and Routing

Special IPv6 Address• Loopback address (0:0:0:0:0:0:0:1 or ::1)

– Identify a loopback interface

• IPv4-compatible address (0:0:0:0:0:0:w.c.x.z or ::w.c.x.z)– Used by dual-stack nodes– IPv6 traffic is automatically encapsulated with an IPv4

header and send to the destination using the IPv4 infrastructure

• IPv4 mapped address (0:0:0:0:0:FFFF:w.c.x.z or ::FFFF:w.c.x.z)– Represent an IPv4-only node to an IPv6 node– Only use a single listening socket to handle connections

from client via both IPv6 and IPv4 protocols.– Never used as a source or destination address of IPv6

packet– Rarely implemented

Page 29: IP Networks and Routing

IPv6 Header Format

Page 30: IP Networks and Routing

Address Autoconfiguration (1)

• Allow plug and play• BOOTP and DHCP are used in IPv4 • DHCPng will be used with IPv6 • Two Methods: Stateless and Stateful• Stateless:

– A system uses link-local address as source and multicasts to "All routers on this link" (Router discovery protocol)

– Router replies and provides all the needed prefix info

– All prefixes have a associated lifetime – System can use link-local address permanently if

no router

Page 31: IP Networks and Routing

Address Autoconfiguration (2)

• Stateful: – Problem w/ stateless: Anyone can connect – Routers ask the new system to go DHCP server

(by setting managed configuration bit)

– System multicasts to "All DHCP servers" – DHCP server assigns an address

Page 32: IP Networks and Routing

Neighbor Discovery (ND)

• Node (Hosts and Routers) use ND to determinate the link-layer addresses for neighbors known to reside on attached links and quick purge cached valued that become invalid

• Hosts also use ND to find neighboring router that willing to forward packets on their behalf

• Nodes use the protocol to actively keep track of which neighbors are reachable and which are not, and to detect changed link-layer addresses

• Replace ARP, ICMP Router Discovery, and ICMP Redirect used in IPv4

Page 33: IP Networks and Routing

IPv6 ND Mechanisms (1)

• Router discovery– Equivalent to ICMPv4 Router Discovery

• Prefix discovery– Equivalent to ICMPv4 Address Mask Request/Reply

• Parameter discovery– Discovery additional parameter (ex. link MTU,

default hop limit for outgoing packet)

• Address auto-configuration– Configure IP address for interfaces

• Address resolution: Equivalent to ARP in IPv4

Page 34: IP Networks and Routing

IPv6 ND Mechanisms (2)

• Next-hop determination– Destination address, or – Address of an on-link default router

• Neighbor unreachable detection (NUD)• Duplicate address detection (DAD)

– Determine that an address considered for use is not already in use by a neighboring node

• First-hop Redirect function– Inform a host of a better first-hop IPv6 address to

reach a destination, – Equivalent to ICMPv4 Redirect

Page 35: IP Networks and Routing

IPv6 References

• RFC 2460: IPv6

• RFC 2461: Neighbor Discovery

• RFC 2462: Stateless Address Autoconfiguration

• RFC 3513: Addressing Architecture

• RFC 3679: Flow Label Specification

• RFC 4443: ICMPv6

• RFC 3810: Multicast Listener Discovery (MLDv2)