From 87cf4368fe0695cebd6d9b28c05f165780c6525c Mon Sep 17 00:00:00 2001 From: Jens Link Date: Sat, 8 Mar 2025 14:29:03 +0100 Subject: [PATCH 1/3] Some minor changes and added refference to RFC2732 --- 02. IPv6 Basic Technology/Addresses.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/02. IPv6 Basic Technology/Addresses.md b/02. IPv6 Basic Technology/Addresses.md index 14ca2df..dbeb0dd 100644 --- a/02. IPv6 Basic Technology/Addresses.md +++ b/02. IPv6 Basic Technology/Addresses.md @@ -52,6 +52,7 @@ In each chunk of 16 bits, leading zeros are dropped, so we write: ``` 2001:0db8:ef01:0045:6789:abcd:ef01:2345 + ``` There is often a run of zero bytes in an IPv6 address. One such run can @@ -70,7 +71,8 @@ be replaced by a double colon ('::') so that we write: The idea is that IPv6 addresses should be cut-and-pasted in almost all cases. If you ever do have to enter one manually, a great deal of care is needed. Note that not all implementations will strictly follow -RFC9592, and older documentation often uses uppercase hexadecimal. +RFC9592, and older documentation and some implementations often uses uppercase +hexadecimal. The choice of ':' as the separator is annoying in one particular aspect \- where a colon has another meaning and works as a separator between @@ -81,6 +83,8 @@ addresses in URLs are in square brackets like this: https://[2001:db8:4006:80b::200e]:443 ``` +This is defined in [RFC2732](https://www.rfc-editor.org/info/rfc2732) + ### Easy addresses The unspecified IPv6 address is simply zero, represented as `::`. @@ -296,9 +300,10 @@ that every IPv6 router must listen to. All the officially assigned multicast addresses may found at [IANA](https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml#link-local). -### Literal addresses in web browsers +### Literal addresses in URLs -Browsers can recognize a literal IPv6 address instead of a host name, +URLs (Uniform Resource Locator) as they used in Browsers and many other +tools can recognize a literal IPv6 address instead of a host name, but the address must be enclosed in square brackets, e.g.: ``` @@ -309,6 +314,8 @@ Of course, literal addresses should only be used for diagnostic or testing purposes, and will normally be cut-and-pasted rather than being typed in by hand. +This is defined in [RFC2732](https://www.rfc-editor.org/info/rfc2732) + ### Some addresses are special Special-purpose IPv6 addresses and their registry are described in From 61ac5e07dbbc23b7bf4746516d7bf5edf9cf94bd Mon Sep 17 00:00:00 2001 From: Jens Link Date: Sat, 8 Mar 2025 16:40:50 +0100 Subject: [PATCH 2/3] added chapter for basic linux commands --- .../Basic_Linux_Commands.md | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 06. Management and Operations/Basic_Linux_Commands.md diff --git a/06. Management and Operations/Basic_Linux_Commands.md b/06. Management and Operations/Basic_Linux_Commands.md new file mode 100644 index 0000000..f06f669 --- /dev/null +++ b/06. Management and Operations/Basic_Linux_Commands.md @@ -0,0 +1,95 @@ +## Basic Linux Commands + +In this chapter we'll take a look at some of the most common +Linux commands to operate and troubleshoot IPv6. + +Most tools use -4 or -6 as a parameter to select the protocol +version. There are some tools that are deprecated, but you still +find them in a lot of documentation, even current one. The most +common of these are *ifconfig* and *route* which are replaced +by *ip* and *netstat* which is replaced by *ss* (socket stat). + +All tools mentioned here should have a comprehensive manual page, +and it is highly recommended that you read those. + +Some configuration items are specific to the Linux-Distribution +you are using, so please check the documentation for your Linux +distribution as well. + +### ip + +The name *ip* might suggest that it is only used for *ip* related +configurations, but that is not the case. Let's start with +layer two related configuration and then go up. Note that *ip* has many +more features, and we will only cover the basics here. + +Note that you can abbreviate the options, e.g. instead of *ip* address +show you can use *ip a s* or even *ip a*. There are also some usefull +options to modify the output of *ip*: + +* -br - which gives you briefer output which is easier to parse in your own scripts +* -color - as the name implies you get a colored output +* -json - The output of the *ip* command will be JSON (JavaScript Object Notation) + +Just calling ip without any parameters will give you the following output. + +``` +Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } + ip [ -force ] -batch filename +where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp | + link | macsec | maddress | monitor | mptcp | mroute | mrule | + neighbor | neighbour | netconf | netns | nexthop | ntable | + ntbl | route | rule | sr | tap | tcpmetrics | + token | tunnel | tuntap | vrf | xfrm } + OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | + -h[uman-readable] | -iec | -j[son] | -p[retty] | + -f[amily] { inet | inet6 | mpls | bridge | link } | + -4 | -6 | -M | -B | -0 | + -l[oops] { maximum-addr-flush-attempts } | -br[ief] | + -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] | + -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] | + -c[olor]} +```` + +On a first, and maybe even the second or third glance this looks confusing, but +using *ip* is actually quite easy. There are options to modify the output, objects, +like link, neighbour, address and route which are followed by commands. The most +common commands are probably *show*, *add* and *delete*. The show command should work as +normal user, other commands, like add or delete require higher privileges. + +#### ip link + +Let's start with our interfaces or link. + +``` +$ ip link show +1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +2: enp1s0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 + link/ether 52:54:00:07:bd:d7 brd ff:ff:ff:ff:ff:ff +``` +We see that we have to interfaces, lo or loopback interface and enp1s0 which is an Ethernet interface. We see that both interfaces are UP some other inforation, inlcuding the MAC address of the interface. If we only want to see a specific interface, we can add that to the command line. + +``` +$ ip link show enp1s0 +2: enp1s0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 + link/ether 52:54:00:07:bd:d7 brd ff:ff:ff:ff:ff:ff +``` + +#### ip neigh + +With the neighbour (here shortened to neigh) we can see our neighbour table. + +``` +$ ip -6 neigh show +fe80::2418:65ff:fe3e:8c4a dev enp1s0 lladdr 26:18:65:3e:8c:4a router REACHABLE +``` + +#### ip address + + +#### ip route + + +### ss + From 1cc2e18e849376c2c71fa26333e8aa4e61bfdf57 Mon Sep 17 00:00:00 2001 From: Jens Link Date: Sat, 8 Mar 2025 20:46:18 +0100 Subject: [PATCH 3/3] Delete 06. Management and Operations/Basic_Linux_Commands.md Should be a separate PR. --- .../Basic_Linux_Commands.md | 95 ------------------- 1 file changed, 95 deletions(-) delete mode 100644 06. Management and Operations/Basic_Linux_Commands.md diff --git a/06. Management and Operations/Basic_Linux_Commands.md b/06. Management and Operations/Basic_Linux_Commands.md deleted file mode 100644 index f06f669..0000000 --- a/06. Management and Operations/Basic_Linux_Commands.md +++ /dev/null @@ -1,95 +0,0 @@ -## Basic Linux Commands - -In this chapter we'll take a look at some of the most common -Linux commands to operate and troubleshoot IPv6. - -Most tools use -4 or -6 as a parameter to select the protocol -version. There are some tools that are deprecated, but you still -find them in a lot of documentation, even current one. The most -common of these are *ifconfig* and *route* which are replaced -by *ip* and *netstat* which is replaced by *ss* (socket stat). - -All tools mentioned here should have a comprehensive manual page, -and it is highly recommended that you read those. - -Some configuration items are specific to the Linux-Distribution -you are using, so please check the documentation for your Linux -distribution as well. - -### ip - -The name *ip* might suggest that it is only used for *ip* related -configurations, but that is not the case. Let's start with -layer two related configuration and then go up. Note that *ip* has many -more features, and we will only cover the basics here. - -Note that you can abbreviate the options, e.g. instead of *ip* address -show you can use *ip a s* or even *ip a*. There are also some usefull -options to modify the output of *ip*: - -* -br - which gives you briefer output which is easier to parse in your own scripts -* -color - as the name implies you get a colored output -* -json - The output of the *ip* command will be JSON (JavaScript Object Notation) - -Just calling ip without any parameters will give you the following output. - -``` -Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } - ip [ -force ] -batch filename -where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp | - link | macsec | maddress | monitor | mptcp | mroute | mrule | - neighbor | neighbour | netconf | netns | nexthop | ntable | - ntbl | route | rule | sr | tap | tcpmetrics | - token | tunnel | tuntap | vrf | xfrm } - OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | - -h[uman-readable] | -iec | -j[son] | -p[retty] | - -f[amily] { inet | inet6 | mpls | bridge | link } | - -4 | -6 | -M | -B | -0 | - -l[oops] { maximum-addr-flush-attempts } | -br[ief] | - -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] | - -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] | - -c[olor]} -```` - -On a first, and maybe even the second or third glance this looks confusing, but -using *ip* is actually quite easy. There are options to modify the output, objects, -like link, neighbour, address and route which are followed by commands. The most -common commands are probably *show*, *add* and *delete*. The show command should work as -normal user, other commands, like add or delete require higher privileges. - -#### ip link - -Let's start with our interfaces or link. - -``` -$ ip link show -1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 - link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 -2: enp1s0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 - link/ether 52:54:00:07:bd:d7 brd ff:ff:ff:ff:ff:ff -``` -We see that we have to interfaces, lo or loopback interface and enp1s0 which is an Ethernet interface. We see that both interfaces are UP some other inforation, inlcuding the MAC address of the interface. If we only want to see a specific interface, we can add that to the command line. - -``` -$ ip link show enp1s0 -2: enp1s0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 - link/ether 52:54:00:07:bd:d7 brd ff:ff:ff:ff:ff:ff -``` - -#### ip neigh - -With the neighbour (here shortened to neigh) we can see our neighbour table. - -``` -$ ip -6 neigh show -fe80::2418:65ff:fe3e:8c4a dev enp1s0 lladdr 26:18:65:3e:8c:4a router REACHABLE -``` - -#### ip address - - -#### ip route - - -### ss -