networking revision
networking revision
9am Tuesday
Calculator
Question 1
OSI model vs. TCP (10 Marks)
https://www.guru99.com/difference-tcp-ip-vs-osi-model.html
https://www.guru99.com/difference-tcp-ip-vs-osi-model.html
https://ztrkouzhan.medium.com/tcp-ip-model-13ad80e44171
OSI model layers
The difference between Straight Through and Cross Over Cable
https://www.guru99.com/difference-between-straight-through-crossover-cables.html#:
~:text=Straight%2Dthrough%20cables%20are%20mainly,Router%20and%20Computer
%20to%20Computer.
Straight-through cable Pin connection is Pin 1 is crossed with Pin 3, and Pin 2 is
one-to-one crossed with Pin 6
are mainly used for connecting crossover cables are mostly used for
non-similar devices connecting similar devices
Unicast
global unicast unique local link local
used on public They are used in private These addresses are used for
networks. networks and aren’t sending packets over the local
routable on the Internet. subnet.
similar to IPv4 public Communication over a single link,
addresses have a similar function as Scope is local link
IPv4 private addresses. Only within a network segment to
they are routable on the which a host is connected
internet Used on the intranet,
cannot access public Routers do not forward packets with
designed for use on any networks this addresses to other subnets.
network IPv6 requires a link-local address to
They are not allocated by be assigned to every network
an address registry and interface on which the IPv6 protocol
are not meant to be is enabled.
routed outside their
domain. Not routable
They are mostly used for
Routable on LAN auto-address configuration and
neighbour discovery
These addresses are
reserved for local use in
home and enterprise These addresses are used on a
environments and are not single link or a non-routed common
public address space. access network, such as an Ethernet
LAN. They do not need to be unique
These addresses might outside of that link. Link-local
not be unique, and there addresses may appear as the source
is no formal address or destination of an IPv6 packet.
registration. Routers must not forward IPv6
packets if the source or destination
contains a linklocal address.
Packets with these Link-local addresses may appear as
addresses in the source the source or destination of an IPv6
or destination fields are packet. Routers must not forward
not intended to be routed IPv6 packets if the source or
on the public Internet but destination contains a linklocal
are intended to be routed address.
within the enterprise or
organisation. these addresses only work on the local
link, we never route these addresses.
These addresses are used to send and
receive IPv6 packets on a single
subnet.
They have a prefix of These addresses have a These addresses have a prefix of
2000::/3, (all the prefix of FD00::/8. FE80::/10.
addresses that begin
with binary 001).
These addresses are Link-local addresses are A host can automatically derive its
assigned by the IANA automatically configured own link-local IP address, or the
on all interfaces. address can be manually configured.
fdf8:f53b:82e4::53 fe80::200:5aee:feaa:20a2
::/128 ::1/128
0:0:0:0:0:0:0:0 0:0:0:0:0:0:0:1.
https://www.whatsmydns.net/ipv6-shorten?q=0066%3A0006%3A0007%3A6777%3A88
09%3A9090%3A0000%3A0000
IPv6 = FE82:1234:0:1235:1416:1A12:1B12:1C1F
After compression,
IPv6 = FE82:1234::1235:1416:1A12:1B12:1C1F
After compression,
IPv6 = FE82::1A12:1234:1A12
Rule-3: When zeros are present in discontinuous places then at only one
junction, 0s (zeros) are replaced by ::.
IPv6 = 2001:1234:0:0:1A12:0:0:1A13
After compression,
IPv6 = 2001:1234::1A12:0:0:1A13
or
= 2001:1234:0:0:1A12::1A13
Loop Back Address: When in hexadecimal notation of IPv6 all fields are 0
except the last field and last field value is 1. It is denoted by ::1.
::1 = 0:0:0:0:0:0:0:1
66:6:7:6777:8809:9090::
https://www.facebook.com/watch/?v=1143610049047463
https://community.infosecinstitute.com/discussion/64513/any-good-ipv6-subnetting-h
owtos
https://learn.microsoft.com/en-us/previous-versions//bb726997(v=technet.10)?redirect
edfrom=MSDN#ECAA
i = 2^16-(f+s)
The net subnet prefix of course if the existing prefix (51) plus the number of
bits required to add 4 new subnets which was 2 OR
51 + 2 = 53
1. Work out the number of bits used for subnetting by subtracting the current prefix
length from the desired prefix length. So, 64-48 = 16 subnetting bits.
2. Work out the number of subnets possible given the subnetting bits by taking 2 to the
power of the subnetting bits. So, 2^16 = 65,535 possible subnets.
3. Work out the number of hexits (hex digits) represented by the subnetting bits by
dividing the number of subnetting bits by 4 and rounding up to the next integer. The
resulting number denotes where we increment the subnets. So, 16/4 = 4 hexits.
Therefore, we increment the subnets in the 4th hexit following the D in the example
prefix above.
4. Work out how to increment the subnets by finding the binary equivalent of the
subnetting bits and subtracting it in decimal form from 16 (I don't know why it's 16). So,
the binary equivalent of 16 bits is 11111111 11111111. We then take the first 4 bits (or
nibble) which is 1111 or 15 in decimal. 16-15 = 1, meaning the subnets will increase by
1 in the 4th hexit following the D.
5. Increment the subnets in the correct hexit.
2001:DB8:ACAD::/64
2001:DB8:ACAD:0000::
2001:DB8:ACAD:0001::
2001:DB8:ACAD:0002::
...
2001:DB8:ACAD:FFFF::
https://blogs.infoblox.com/ipv6-coe/fun-with-ipv6-subnetting/
The allocation we’ve received is 2001:db8:3eff::/48
Let’s assume we’re going to need 16 subnets for each building. This
first group of prefixes will not require our method as we simply
adhere to the 4 bits of the first nibble boundary.
This gives us 16 prefixes enumerated by the first character of our fourth block:
2001:db8:3eff::/52
2001:db8:3eff:1000::/52
2001:db8:3eff:2000::/52
2001:db8:3eff:3000::/52
.
.
.
2001:db8:3eff:F000::/52
Now let’s say for the sake of illustration that our typical campus
building uses 20 VLANs.
Since the least number of bits that produces an integer value greater than 20 is 5
(2^5 = 32) we’ll use 5 bits to subnet our /52 prefix.
First, by:
a = 52 – 48 = 4
a=4
So we have 4 bits that are fixed (which we already knew but the value is
used in later formulae).
Next, by:
s = 2 ^ 5 = 32
s = 32
As we outlined above, we’ll create 32 subnets using 5 bits.
Next, by:
i = 2 ^ 16 – (4 + 5) = 2 ^ 16 – 9 = 2 ^ 7 = 128
i = 128
Converted to hexadecimal:
i = 0x80
Finally, by:
p_1 = 48 + 4 + 5 = 57
So now that we know the increment and prefix length value we can
enumerate the new subnets:
2001:db8:3eff::/57
2001:db8:3eff:80::/57
2001:db8:3eff:100::/57
2001:db8:3eff:180::/57
.
.
.
2001:db8:3eff:F80::/57
how many /64 interface subnets would each of these /57s provide?
By:
https://learn.microsoft.com/en-us/previous-versions//bb726997(v=technet.1
0)?redirectedfrom=MSDN#ECAA
Your plan is to start with Subnet-Zero as your first subnet, and to have as few
networking bits as possible per subnet so you can maximize your quantity of
hosts-per-subnet.
Either way, for 100 networks, you need to borrow additional 7 bits, extending the
prefix length from /48 to /48+7 = /55. This will actually create 128 new subnets
SSSS SSSH HHHH HHHH
0000 0000 0000 0000 = 0x0000 => 2001:1111:2222:0000::/55 (1st)
0000 0010 0000 0000 = 0x0200 => 2001:1111:2222:0200::/55 (2nd)
0000 0100 0000 0000 = 0x0400 => 2001:1111:2222:0400::/55 (3rd)
0000 0110 0000 0000 = 0x0600 => 2001:1111:2222:0600::/55 (4th)
0000 1000 0000 0000 = 0x0800 => 2001:1111:2222:0800::/55 (5th)
... and so on.
Since all zeros is the first subnet, the 28th subnet is 27x2 =
54 = 0x36, so 2001:1111:2222:3600::/55.
extend the prefix length from /48 to /64, yielding 65536 possible subnets,
2001:1111:2222:0000::/64 for the 1st subnet
2001:1111:2222:0001::/64 for the 2nd subnet
2001:1111:2222:0002::/64 for the 3rd subnet
...
2001:1111:2222:001b::/64 for the 28th subnet (0x1b = 27 since we're numbering from 0)
1. **Algorithm Type**:
- **Link-State**: Link-state routing protocols, like OSPF and IS-IS, use the Dijkstra
algorithm to calculate the shortest path to each destination based on a complete view of the
network topology. Each router maintains a database of link-state advertisements (LSAs)
describing its directly connected links, and floods these LSAs to other routers in the network.
Routers then use the collected LSAs to build a complete map of the network and calculate
the shortest path to each destination.
- **Distance-Vector**: Distance-vector routing protocols, like RIP and EIGRP, use the
Bellman-Ford algorithm to iteratively exchange routing information with neighboring routers.
Each router maintains a routing table listing known destinations and the distance (cost) to
reach them. Routers periodically broadcast their entire routing table to neighboring routers,
which then update their own tables based on received updates. This process continues until
convergence is achieved.
3. **Convergence**:
- **Link-State**: Link-state routing protocols converge relatively quickly because routers
have a complete view of the network topology and can independently calculate the shortest
path to each destination.
- **Distance-Vector**: Distance-vector routing protocols may experience slower
convergence, especially in larger networks, due to the iterative nature of routing table
updates and the potential for routing loops. Techniques like split horizon and poison reverse
are used to mitigate routing loops, but they can still occur, causing longer convergence
times.
4. **Scalability**:
- **Link-State**: Link-state routing protocols tend to scale well in large networks because
they provide a more accurate view of the network topology and allow for hierarchical design
with multiple areas.
- **Distance-Vector**: Distance-vector routing protocols may suffer from scalability issues
in larger networks due to frequent updates and the potential for routing loops. Techniques
like route summarization and route filtering can help alleviate these issues, but they may not
be as effective in very large networks.
In summary, link-state routing protocols provide a more accurate view of the network
topology and converge quickly, making them suitable for larger and more complex networks.
Distance-vector routing protocols are simpler and easier to implement but may suffer from
slower convergence and scalability issues in larger networks. The choice between them
depends on factors like network size, complexity, and performance requirements.