Chapter 7 Flashcards
What does the network layer do?
It routers packets from source node to destination node.
What is the primary example of a network layer protocol?
IP (Internet Protocol)
What are layer 3 packets known as?
Datagrams
How does a IP routing algorithm work?
1: check if A and B is on the same network. If yes deliver directly
2: Consult routing table. If entry exists, forward to next hop
3: If there isnt an entry in routing table, Send to A’s default gateway
4: If there is no default gateway, discard
Is IP reliable or unreliable?
Unreliable
What does TTL refer to on layer 3 with IP?
Max amount of hops a packet may still take before being discarded.
What makes IP unreliable?
Easily discard packets, Checksum only covers header ( wont detect changes in data)
When is a packet discarded with IP?
When TTL becomes 0
What does a IPv4 header have?
Version, TTL, Protocol, Header checksum, Source address, Destination address, Total Length, Fragment Offset
How many bits is in a IPv4 address?
32 bits
What are the different classes and their leading bits in IPv4?
A = 0 is the initial BIT. Initial BYTE identifies the network. Remaining 3 BYTES identifies the host
B = 10 is the initial bits. 2 initial Bytes identify the network, remaining 2 identifies the host
C = 110 is the initial bits. 3 bytes identifies the network, and one the host.
D = 1110 is the initial bits, used for multicast addressing.
E = 1111 unused
How do you identify a network?
Make all of the host portion of the network 0’s
10.0.0.0
How do you get the broadcast address?
Make the host portion all 1’s
10.255.255.255
How many hosts can you have on a single network?
2^n - 2 ( -2 because of network identifier + broadcast address)
n = bit in network field
How do you work out how many networks there can be in a single class?
2^(n-i)
n = number of network bits
i = number of initial bits (since we are going by class)
What does a netmask indicate?
Which bits in an address form the network and which part forms the host
What does a netmask consist of?
All 1’s in the network portion
What does the netmask look like for each class?
A = 255.0.0.0
B = 255.255.0.0
C = 255.255.255.0
What does CIDR do and what is it know as?
Classless Inter-domain Routing
Notes the number of bits that form the network portion
10.0.0.0/8 = leftmost 8 bits is the network portion. remaining 24 = host portion
What is subnetting?
Divide the network into subnetworks.
Example of sub netting?
10.1.0.0 is used for sales. 10.2.0.0 is used for production
Does the split between host portions and network portions occur only on byte boundaries?
No.
Make a class C address netmask but use 4 bits to identify the host and 4 to identify the subnet
11111111.11111111.11111111(all of this is for class C so far).1111(4 bits for subnet) 1111(4 bits for host)
netmask = 11111111.11111111.11111111.11110000
How do you get the network address on which a host is located?
Do a logical AND of the address and the netmask