Chapter 4: The Network Layer I Flashcards

1
Q

What is the difference between routing and forwarding?

A

Forwarding is a data plane action, where a router sends a packet out the correct port.
Routing is a control plane action, where routers determine the best possible paths through.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the parts of a router?

A

Input ports: they terminate an incoming physical link at a router and perform a lookup

Switch fabric: The connection of input ports to the output ports.

Output ports: they transmit packets on the outgoing link.

Routing processor: Performs control-plane functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the types of input port forwarding?

A

destination-based forwarding and generalised forwarding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are routing tables copied from the router processor to the line cards?

A

A separate bus, such as a PCI bus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the longest prefix matching rule?

A

In a forwarding table, the entry with the most digits from the start that match the lookup value is consulted for the forwarding port.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the options for switching inside a router?

A
  • Switching via memory: the input packet is copied to the processor memory. The processor analyses the header and consults its forwarding table. It copies the packets into the output port’s buffers. [As there is one read/write bus, only one packet can be forwarded at a time.]
  • Switching via a bus: An input packet is transferred straight to the output port through a bus. The input port prepends a label to the packet with the required output port, and all ports receive it.
    [As there is only one bus, only one packet can be forwarded at a time.]
  • Switching via an interconnected network: A crossbar of 2N buses is controlled by the switch fabric itself, with intersections being closed to allow the signal to travel along the correct path.
    [Non-blocking when the packets have different output ports.]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the amount of buffering that should be used in a router?

A

B = RTT * Link_Capacity/sqrt(N) where N is the number of independent flows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is bufferbloat?

A

Long delays caused by persistent buffering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What types of queuing exist?

A

FIFO.
Priority: Two queues - low and high priority are set up. High priority is always taken first.
Round-robin: packets are grouped into classes, and one from each is sent in turn.
Weighted fair queuing: a round robin queue where each class has a weighting. The bandwidth allocated to a class is the fraction of the total weighting of that class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the fields in an IPv4 header?

A

4 bits: Version number
4 bits: Header length (typically 20 bytes)
8 bits: Type of service (configured by admins)
16 bits: Datagram length (header + data) in bytes.
16 bits: Identifier
3 bits: Flags
13 bits: Fragmentation offset
8 bits: Time to live
8 bits: Upper-layer protocol
16 bits: Header checksum
32 bits: Source IP address
32 bits: Destination IP address
Options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many IPv4 addresses are there?

A

2^32 (roughly 4 billion).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a subnet?

A

Device interfaces that can physically reach each other without passing through an intervening router.

To identify them, erase all routers from a diagram and the remaining link systems are subnets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is CIDR?

A

A number that indicates how many bytes are allocated to the subnet part of the IP address (address is split into subnet then host).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the classes of subnet?

A

A: subnet mask of 255.0.0.0
B: subnet mask of 255.255.0.0
C: subnet mask of 255.255.255.0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does an organisation get an address block?

A

ICANN allocates addresses to regional Internet registries. These then allocated subblocks to their ISPs, and so on. The local ISP then allocates a block to the organisation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can a host get an individual IP address, assuming that the organization has a block of addresses preallocated?

A

DHCP (Dynamic Host Configuration Protocol) allocates this automatically.

Each subnet has a DHCP server, or a relay to a DHCP server.

[This is also used for finding first-hop routers and DNS servers]

17
Q

What is the DHCP protocol?

A
  1. Client broadcasts a DHCP discover message to UDP port 67s.
    [Uses the broadcast address as a destination and ‘this host’ address as a source].
  2. A DHCP server receiving it broadcasts a DHCP offer message. Each message has the transaction ID of the received discover message, the proposed IP address for the client, the network mask, and an IP address lease time.
  3. The client chooses from the server offers and responds with a DHCP request message - which includes the same parameters
  4. The DHCP server sends a DHCP ACK message, confirming the requested parameters.
18
Q

How does NAT work?

A

To an outside observer, the home router appears just like a normal host with 1 IP address.
In the home network, each device gets a private IP in 10.0.0.0/8.

When a host request a Web object, it sends a datagram from a certain port, say p1. The NAT router then chooses a random port, say p2, and edits the datagram to have its IP and p2 as the destination socket.
It adds the exchange of ports to a NAT translation table, so that when the reply is received, the router knows where to forward it to.

19
Q

Give advantages and disadvantages of NAT.

A

+ 1 IP address needed by provider ISP for all devices
+ addresses of host in local network can be done without notifying outside world
+ ISP can be changed without devices in local network needing new addresses.
+ Security built in as local network not visible by outside world.

  • Difficult to employ a P2P protocol with NAT, as they need fixed port numbers to act as servers.
  • Routers should be layer 3 devices and not modify IP addresses or ports, strictly speaking.
20
Q

What differences exist between IPv4 and IPv6?

A

IPv6 uses 128 bits in the IP address rather than 32 bits.
IPv6 allows for anycast addresses.
IPv6 has a fixed 40-byte header for faster processing.
IPv6 can treat connections as flows.

21
Q

What is the format of a IPv6 packet?

A

4 bits: Version number
8 bits: Traffic class (priority)
20 bits: Flow label.
16 bits: Payload length
8 bits: Next header (e.g. TCP/UDP)
8 bits: Hop limit
128 bits: Source IP address
128 bits: Destination IP address

22
Q

How can we coexist IPv4 and IPv6?

A

Tunnelling: an IPv6 datagram is placed in the IPv4 datagram and sent to another IPv6 router, which can then use IPv6.