What is classful adressing?
used for IPv4 in the past
address space divided into different address classes
-> each of them containing subnets of certain size
What idfferent classful addressing classes were there? start address?
Class A; leading 0; 8 bit for network number (8-1 -> 2^7 networks); 32-8 -> 2^24 addresses per network
Cass B; leading 10; 16 bit for network number (16-2 -> 2^14 networks); 32-16 = 2^16 addresses per network
Class C; leading 110; 24 bit for network number (-> 24-3 = 2^21 networks); 2^8 addresses per network
Class D; leading 1110; 24 bit for network number (-> 24-4 = 2^20 networks) ; 2^8 addresses per network
Class E reserved, but again 24 bit for network number
Start address of each network calss
A 0.0.0.0
B 128.0.0.0
C 192.0.0.0
D 224.0.0.0
E 240.0.0.0
What is class D used for?
Multicast
How are the network classes partitioned?
A net.host.host.host
B net.net.host.host
C net.net.net.host
Why was classful addressing abandoned?
inflexibel and not scalable
exhaustion of address space
=> e.g. imagine ARP in class A network with ~ 16 million nodes…
What is CIDR?
classless interdomain routing
-> introduces subnet mask do allow to dynamically partition to required network size…
How can one calculate the network address in CIDR=
logical and of IP address and subnet mask
What is subnetting and supernetting?
subnetting -> break larger network down into smaller one
supernetting -> aggregate networks to larger one
What is prefix notation and why is it used in CIDR?
instead of noting subnet mask -> not handy
add number of leading 1 in the subnet mask with /x after IP address
-> 192.168.1.0/26
-> first 26 bit are network address
Are the first and last address per subnet used for addressing?
no!
first : network address
last: broadcast address
What nodes are reached via layer 2 broadcast?
ff:ff:ff:ff:ff:ff
-> all hosts in the subnet…
Flow of sending data to host in other network
compare IP addresses to see wether in same or different network (first x in /x networks…)
look up in routing table where to sent the data to -> find suitable next hop (e.g. default gateway)
assuming ARP cache is empty -> perform ARP request to resolve default gateway IP address to MAC address
Encapsulate IP packet (fixed sender and receiver) in ethernet frame with receiver being the router MAC from the ARP response
router receives frame and removes ethernet header
router determines next hop and repackt ip packet in new ethernet frame with new MAC src and dst
when router in Bs network receives it, it performs ARP to determine receivers MAC
sends to receiver B
Is membership in layer 3 network a neccesarry condiditon for broadcast?
NO!
-> consider hub connected computers with IP belonging to different networks
-> still in broadcast domain although in different subnets…
What constitutes a broadcast domain?
routers mark border of broadcast domain
all nodes reachable via ff:ff:ff:ff:ff:ff on layer 2
set of nodes reachable with IP broadcast address in same subnet (as at the same time MAC broadcast address is required…)
directed IP broadcast into other subnet usually not allowed -> security and violate broadcast domain
What breaks a collision and what a broadcast domain; when the same?
collsion domain -> broken by router and switches
broadcast -> broken by routers
=> is only hubs are used or single bus -> collision = broadcast domain
For what purpose have private IP address blocks been reserved?
in case e.g. hosts are not directly addressable via IP addresses (NAT)
-> no need for globally unique addresses…
What private IP address blocks exist?
0.0.0.0/8
10.0.0.0/8
127.0.0.0/8
172.16.0.0/12
192.169.0.0/16
169.254.9.9/16
What are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 used?
classical private IP address ranges
What is APIPA?
automatic private ip addressing
-> if host supporting APIPA comes online and has no valid IP address
-> try to contact DHCP
-> no DHCP server found on local network
-> randomly select address from APIPA range and try to ping it
-> if no answer received assume IP address is available for use and use it…
=> host configures itself with this address to allow for local communicatoin with other APIPA nodes
=> nowadays supported with most OSes
What do routers have to consider concerning the private ip address ranges?
must not forward such packets
-> private addresses not unique -> thus not valid identifiers for end-to-end communication across networks…
What is the loopback address?
127.0.0.0/8 address range (usually 127.0.0.1)
-> each host has loopback interface with this address
-> packets returned before reaching layer 1
-> but are seen as regular network interface thus require ip address…
Should packets with addresses in 127.0.0.0/8 ever be seen in a packet sent over a network=
no never!!
should never reach layer 1!!!
What is the 0.0.0.0/8 block used for?
more or less the default for things like routing tables…
-> 0.0.0.0 -> catch all addresses not found in the table so far….
Does IPv6 also have CIDR?
yes
Standard procedure of ISP to get and give subnets?
get /32 from regional internet registry (RIR) and give /64 to customers
length IPv6 address?
128 bit
-> 8 x 4 hex…
What are some special address ranges in IPv6?
::/128
unspecified address
::1/128
loopback address
fe80::/10
link-local address
fc00::/7
unique link local address
ff00::/8
multicast address
global unicast address
0:0:0:0:ffff::/96
IPv4 mapped addresses
2002::/4
NAT64
2001:db8::/32
documentation
what are unique local unicast addresses?
assign unicast addresses in local lan (similar to 10.0.0.0/8 in IPv4)
What are link local addresses used for?
to communicate with nodes on an attached link…
What are multicast addresses in IPv6?
send a message to group of network devices
-> e.g. targeting all nodes ff02::1; targeting all routers ff02::2
…
What can link local addresses be used for?
no route rpresent
neighbor discovery
automatic address configuration
What are format prefixes? Are they used in IPv6?
FP
not used in IPv6 -> proposed but obsoleted…
used fo rIPv4 classful routing (format prefix class A e.g. 0000; class B 1000…)
Steps for received packets
check wether dest address is local (am i the recipient?)
-> yes then layer 3 stripped and sent upwards to layer 4
-> if it is fragment, assemble before sending upwards
if not destined for this node -> check wether IP forwarding is enabled
-> if not, discard packet
if enabled -> determine next hop by longest prefix matching in routing table
-> if not succesful, ICMP type 3 (target unreachable) is sent
if determine next hop is succesful
reduce TTL by one
-> if zero, discard and ICMP type 11 code 0 (time exceeded) is returned to sender
encasulate in L2 frame specifying next hop MAC
IP remains unchanged
On which layer do routers make their forward decisions?
layer 3
What happens when routing loops occur?
TTL reaches 0
sender is informed with ICMP type 11 code 0 (time exceeded)
packet is discarded
What is more or less stored in routing tables?
best routes available to all destinations
Form what information sources are routing tables built?
information about directly attached networks
locally available information (link status)
information obtained by static entries (static routing)
information obtained by routing protocols (dynamic routing)
Does a router require the IP of the next hop?
yes -> required to determine its MAC address (neigbor discovery / ARP)
Does a routing table has multiple routes to a single destiation =
no, if same subnet -> only best route…
What is longest prefix matching?
consider situation -> router has best route to subnet in general
but more specific, best route to subset of individual of subnet
=> to find best route, an order on the lookup is required
-> from more specific (longer prefix) to less specific (smaller prefix)
Mathematical reason, why default gateway is 0.0.0.0/0?
when anding with subnet mask -> subnet mask is 0.0.0.0
-> returns 0.0.0.0 -> fits -> is chosen…
How are fitting entries in the routing table determined?
by anding with the subnet mask
and checkng, wether the result fits the specified network address…
Can IPv6 hosts request router advertisements? If yes with wat?
router solicitation
-> sent to fc02::2 (all router multicast)
How can router advertisements in response to solicitations be sent=
unicast to querying host
ff02::1 all hosts
How is routing done in IPv6?
same as IPv4 -> longest prefix matchign…
Can routers send advertisements themselves?
yes -> ff02::1
What ICMP messages can directly influence a nodes routing table?
ICMP type 5 (redirects)
What can set the default gateway at hosts routing table=
DHCP
Can DHCP distribute routes to routing tables of hosts in a network (aside from default gateway)?
no
How can one setup routes in each routing tabel of a subnet more or less automatically? (low effort)
tell default gateway that whished route is reachable via IP address xy
-> enable ICMP redirects
=> router send packet to default gateway
=> router returns ICMP redirect in response to the first packet to this destination
=> redirect message contains info, that network is reachable via IP adress xy
=> if host accepts redirect -> installs corresponding additional route in routing table and bypasses default gateway for further packets to that network
Why sending ICMP redirects and not configure the router to forward packets itself to the specified IP?
would be wasteful, as for each forward, the step over the router is actualy unneccesarry as the hosts themselves can directly reach it…
What is the cisco interwork operating system?
IOS
-> dedicated OS for network hardware
common among most of todays cisco routers and switches
Can the functionality of IOS differ?
yes depending on hardware (router/switches)
and on given feature set
=> differ in size, system requirement (e.g. RAM) and supportet router models
What have different IOS versions in common?
common syntax
What execution modes (exec modes) does IOS support?
user exec mode
privilege exec mode (sometimes called enable exec mode)
=> former (user) allows only very basic access to router and config
How to switch the exec mode?
Router>enable
Router#
=> sudo equivalent
How to list all physical interfaces, their IP addresses, their status (active or not) and if the protocol is up and running (cable plugged in)?
show ip interface brief
How to show the routers routing table?
show ip route
How to show information about configured routing protocols?
show ip protocols
How to show the routers current configuration?
show running-config
How to show the routers config saved in NVRAM? (persistent config…)
show startup-config
What are IOS configuration modes?
have to enter specific modes to make changes in the config…
How to enter global configuration mode?
configure terminal
=> indicated by (config) in terminal
e.g.
Router#configure terminal
Router (config)#
On what depends the availability of commands in IOS?
exec mode
current config mode
What does the golbal configuration mode allow?
already configuration of common things e.g. access control list, users, passwords
-> also : enter specific config mode
What are the discussed specific config modes?
interface [iface]
enter interface config mode
router [routing-protocol]
activates specific routing protocol and enters corresponding config mode
Difference routing forwarding?
routing -> algorithm to choose (best path) do forward the packet to
forwarding -> distribution (acual sending…) of packet
How is the default gateway indicated in IPv6?
otherwise (compared to 0.0.0.0/0 in IPv4)
What possibilities exist to assign an IP address to a host?
SLAAC
By hand
What is a broadcast domain?
everything you can reach via L2/L3 broadcast
When are collision and broadcast domain the same?
collision domain always subset of broadcast domain
if only hubs are used -> same…
Does a router require its next hop IP address?
yes, it is needed to resolve the MAC address via ARP/NDP
Can routing table scontain more than one route to a destination?
What is 100.64.0.0/10 used for?
carrier-grade NAT
Columns in routing table
destination
gateway
metric
interface
How does slaac work?
use link local address (fe80 + modified EUI-64
duplicate address detection with neighbour solicitation to solicited nodes (ff02::1 (all nodes…))
router solicitation to all nodes (ff02::2)
router advertisement incoming
managed address
ohter configs
prefix info
lifetime
autonomous flag
prefix
generate global IP
DAD (duplicate address detection…)
How does traceroute work?
sent ICMP echo requests with incraesing TTL
-> at each node in between src and dst is an ICMP Time exceeded sent…
-> if destination host is reached, ICMP echo reply arrives…
What address type is the destination of router advertisements?
IPv6-Multicast to all nodes on the link
-> or as answer to a request-> unicast…
Advantage muticast vs broadcast?
Multicast less communicatoin and computational overhead
-> only chose gorup you actually want to sent messages to while broadcast still possible…
Which data can be exchanged in router advertisements?
info about DNS config -> DNS resolver address
router lifetime -> lifetime as default router
advertise current hop limit -> what hop count to choose for outgoing packets
-M flag -> alow address configuration via DHCPv6
Scope of SLAAC addresses?
global
get SLAAC info (prefix) by router (solicitation upon configuration -> contained in advertisement)
When does a host do not SLAAC?
autonomous flag not set
provided prefix is link local address
preferred lifetime of router larger than valid one, if yes, prefix ignored
has it already a SLAAC addres with same prefix? -> if lifetime != 0 -> do not do SLAAC
Differences IPv6 vs IPv4 header?
minimum header length
IPv4 20 Byte
IPv6 40 bytes
IPv6 has no dont fragment flag as routers do not fragment Ipv6…
How can one DoS an IPv6 network ?
Node sets up interface, assigns link local and does DAD -> neighbor solicitation…
malicious node sends neigbor advertisement responding to it -> indicating that this address is already in use (to ff02::1)
victim node receives neigbor advertisement for each link local DAD, failing to assign itself a link local address -> will never have an IPv6 address…
Why should for neighbor solicitations be answered with ff02::1?
in case of SLAAC, the host does not yet have an IPv6 address
-> use multicast to all nodes to reach it anyway…
Difference link local vs unique local address?
link local not routed -> only works for addressing on attached link…
ULA is like private IP address to address others in local network (can be routed in local network…)
APIPA address range?
169.254.0.1 to 169.254.255.254
How is EUI-64 build?
divide MAC into first 24 bit and second 24 bit
add FF FF FF FE to the middle
=> EUI 64….
How to do DAD?
use solicited node multicast address
-> ff02::1:ff00:0 / 104
-> fill network part with IPv6 address to solicitate
Last changed2 years ago