Docsity

Network Layer - Computer Networks and Protocols - Lecture Notes, Study notes of Computer Networks

Partial preview of the text

Download Network Layer - Computer Networks and Protocols - Lecture Notes and more Study notes Computer Networks in PDF only on Docsity!

Reading: Kurose chapter 4. every host has at least one assigned ip address.

naming has been handled in some fashion.

question: how do hosts talk to one another on the whole internet?

๏ƒ˜ Answer: routing****. So far: Network layer Wednesday, September 21, 2005 8:53 AM Docsity.com

Defines the concept of "IP datagram" (different from "User Datagram") Defines mechanisms for non-local communication between hosts ("layer 3 connectivity") Defines protocols for troubleshooting the Internet itself (ICMP) What is the network layer? What is the network layer? Thursday, February 09, 2012 5:10 PM Docsity.com

Internet/IP address: globally valid (in the enterprise (RFC1918), or on the internet (for public addresses))

Subnet: a group of hosts that can directly communicate with one another (logically "on one wire")

Routing concepts: Routing concepts Monday, February 06, 2012 2:43 PM Docsity.com

A: RFC1918: 192.168/16 is non-routable. 10/8 is non-routable. 192.168.1/24: subnetwork of 192.168/16. 10.3/16, 10.4/16, 10.5/16 subnetworks of 10/8. Q: what is difference between 10.* and 192.168.*? Wednesday, February 13, 2013 7:37 PM Docsity.com

Must have the same CIDR block for all hosts on the switch. Switches operate on one subnet. Must have different CIDR blocks on different router ports. Routers connect subnets. CIDR blocks must not overlap except by hierarchy (subdividing 130.64 into 130.64.23, โ€ฆ). CIDR blocks must appear exactly once on the whole routable internet. Internet assumptions Wednesday, February 13, 2013 7:45 PM Docsity.com

A local computer is connected to a subnet (e.g., 130.64.23/24) A subnet is interconnected via a switch (defined as a layer 2 device) Subnets are interconnected via routers (layer 3 devices) A slightly oversimplified view (logical) (Oversimplified) view of routing Thursday, February 09, 2012 5:02 PM Docsity.com

Has several network interfaces. Has IP addresses on each interface. Every interface connects to a different subnet. Forwards traffic to the appropriate subnet. "Every connection is to a different subnet." What is a router? What is a router? Thursday, February 09, 2012 5:05 PM Docsity.com

Each public subnet can occupy only one switch on the whole internet. Otherwise, chaos ensues. (Oversimplified) subnet rules: (Oversimplified) subnet rules Thursday, February 09, 2012 5:06 PM Docsity.com

Example: in Halligan Thursday, February 09, 2012 5:17 PM Docsity.com

๏ƒ˜ Given: a way to talk to any neighbor, ๏ƒ˜ And: a non-local host to talk to, maintain an idea of "which neighbor should forward the packet" to its final destination.

Basic idea of routing Basic network diagrams (better than the book!) Routing Wednesday, September 21, 2005 8:59 AM Docsity.com

" Next-hop ": determine what host to send the packet to, in order to get it "nearer" to its destination. " Source ": specify all hops to the destination. " Hot potato ": probabilistically choose a neighbor until you find one that knows what to do with the packet. " Onion ": untraceable routing for privacy reasons. (tor) Kinds of routing: This lecture: " next hop " routing. Kinds of routing Thursday, February 09, 2012 2:15 PM Docsity.com

every host maintains a routing table that lists the next hop to send to for a range of hosts.

default route: where to send a packet if no other matching table entry exists

๏ƒ˜ static route: entered by hand. dynamic route: maintained by a routing protocol

Routing tables Routing tables Wednesday, September 21, 2005 8:59 AM Docsity.com

netstat - rn # shows the routing table for a linux device. /sbin/ip addr # shows your IP address. traceroute host # shows you the hops. Spying on routing Wednesday, February 13, 2013 8:10 PM Docsity.com

Basic routing algorithm: if you get a packet, find the "best match" in the routing destination table, send to that host. โ–ก matches 130.64.0.0/ โ–ก does not match 130.64.23.0/ โ–ก matches 0.0.0.0/ โ–ก 130.64.0.0/16 "wins" ๏ƒ˜ Example: want to send to 130.64.45. Routing and matching ๏ƒ˜ IP addresses are 32-bit unsigned integers Input: range, subnet mask (1's followed by 0's), target

range "matches" target if target&mask== range&mask

๏ƒ˜ & = bitwise and. ๏ƒ˜ In ties, mask with the most 1's wins. The matching algorithm: Routing and matching Monday, February 06, 2012 2:46 PM Docsity.com