IP Networks and Routing Oakton Community College CIS

  • Slides: 35
Download presentation
IP Networks and Routing Oakton Community College CIS 238

IP Networks and Routing Oakton Community College CIS 238

LINUX Network Setup • Commands: - ip - ifconfig - ethtool, sysctl (see sysctl.

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

IP Addressing Requirements • • Network address Net. Mask Gateway address Static or DHCP

IP Addressing Requirements • • Network address Net. Mask Gateway address Static or DHCP

IP V 4 addressing • IP addresses – Consist of 32 bits normally expressed

IP V 4 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.

IPv 4 Address Classes w Five different classes of IP addresses n n First

IPv 4 Address Classes w Five different classes of IP addresses n n 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

Subnet Masks • 32 -bit numbers used to determine the portion of an IP

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

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

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/8, 172. 16. 0. 0/12. 192. 168. 0. 0/16, 169. 254. 0. 0/16

Network Routing • Routing – Process of moving information along a path from a

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

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

Direct (Local) Routing • Direct Routing (ARP only). Local delivery is via MAC Address contained in ARP table.

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

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

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

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 mask c) next hop gateway address.

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

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

Static and Dynamic Routers • Static routers – Router to which routes must be

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

Routing Protocols • Standard language that lets dynamic routers exchange routing information • Basic

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

IPv 4 Header

IPv 4 Header

Route Debugging • • • arp (-a) ping / pathping ipconfig /all, ifconfig -a

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

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

IPv 4 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

IPv 4 protocols (2) • Multicast Routing Protocols – Maintaining Multicast Routing Table –

IPv 4 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, Int. Serv) – Differentiated Service (Diff. Serv)

IPv 4 to IPv 6 Changed Removed

IPv 4 to IPv 6 Changed Removed

Network Layer in v 4 & v 6

Network Layer in v 4 & v 6

IPv 6 Addressing Model • Addresses are assigned to interfaces, not hosts • Interface

IPv 6 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

Text Representation of Address • Colon-Hex – 3 ffe: 3600: 2000: 0800: 0248: 54

Text Representation of Address • Colon-Hex – 3 ffe: 3600: 2000: 0800: 0248: 54 ff: fe 5 c: 8868 • Compressed Format: – 3 ffe: 0 b 00: 0 c 18: 0001: 0000: 0010 – becomes 3 ffe: b 00: c 18: 1: : 10

Address Type Prefixes

Address Type Prefixes

Global Unicast Address • Global routing prefix – A (typically hierarchically-structured) value assigned to

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

MAC to IPv 6 mapping

MAC to IPv 6 mapping

Site-Local Address • Meaningful only in a single site zone, and may be re-used

Site-Local Address • Meaningful only in a single site zone, and may be re-used in other sites • Equivalent to the IPv 4 private address space • Address are not automatically configured and must be assigned • Prefix= FEC 0: : /48

Link-Local Address • Meaningful only in a single link zone, and may be re-used

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 IPv 6 router never forwards link-local traffic beyond the link • Prefix= FE 80: : /64

Special IPv 6 Address • Loopback address (0: 0: 1 or : : 1)

Special IPv 6 Address • Loopback address (0: 0: 1 or : : 1) – Identify a loopback interface • IPv 4 -compatible address (0: 0: 0: w. c. x. z or : : w. c. x. z) – Used by dual-stack nodes – IPv 6 traffic is automatically encapsulated with an IPv 4 header and send to the destination using the IPv 4 infrastructure • IPv 4 mapped address (0: 0: 0: FFFF: w. c. x. z or : : FFFF: w. c. x. z) – Represent an IPv 4 -only node to an IPv 6 node – Only use a single listening socket to handle connections from client via both IPv 6 and IPv 4 protocols. – Never used as a source or destination address of IPv 6 packet – Rarely implemented

IPv 6 Header Format

IPv 6 Header Format

Address Autoconfiguration (1) • • • Allow plug and play BOOTP and DHCP are

Address Autoconfiguration (1) • • • Allow plug and play BOOTP and DHCP are used in IPv 4 DHCPng will be used with IPv 6 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

Address Autoconfiguration (2) • Stateful: – Problem w/ stateless: Anyone can connect – Routers

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

Neighbor Discovery (ND) • Node (Hosts and Routers) use ND to determinate the link

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 IPv 4

IPv 6 ND Mechanisms (1) • Router discovery – Equivalent to ICMPv 4 Router

IPv 6 ND Mechanisms (1) • Router discovery – Equivalent to ICMPv 4 Router Discovery • Prefix discovery – Equivalent to ICMPv 4 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 IPv 4

IPv 6 ND Mechanisms (2) • Next-hop determination – Destination address, or – Address

IPv 6 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 IPv 6 address to reach a destination, – Equivalent to ICMPv 4 Redirect

IPv 6 References • RFC 2460: IPv 6 • RFC 2461: Neighbor Discovery •

IPv 6 References • RFC 2460: IPv 6 • RFC 2461: Neighbor Discovery • RFC 2462: Stateless Address Autoconfiguration • RFC 3513: Addressing Architecture • RFC 3679: Flow Label Specification • RFC 4443: ICMPv 6 • RFC 3810: Multicast Listener Discovery (MLDv 2)