Skip to content

Commit

Permalink
kernel: labs: Move to IP range 192.168.1.0/32
Browse files Browse the repository at this point in the history
The current IP address range used for the labs is 192.168.0.0/32, which often
overlaps with some local networks. This is especially problematic when the IP
192.168.0.1 is assigned to the trainee's host PC.

Use the 192.168.1.0/32 range instead.

Signed-off-by: Romain Gantois <[email protected]>
  • Loading branch information
rgantois committed Jun 12, 2024
1 parent a7e8dd8 commit 284b7d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions labs/kernel-board-setup/kernel-board-setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ \section{Network configuration on the target}
\end{itemize}

\begin{verbatim}
setenv ipaddr 192.168.0.100
setenv serverip 192.168.0.1
setenv ipaddr 192.168.1.100
setenv serverip 192.168.1.1
\end{verbatim}

Of course, make sure that this address belongs to a separate network
Expand Down Expand Up @@ -204,7 +204,7 @@ \section{Network configuration on the PC host}
is actively executing a network-related command (such as \code{ping}
or \code{tftp}) that it brings up the USB network connection.

From the board, run \code{ping 192.168.0.1}, and while the \code{ping}
From the board, run \code{ping 192.168.1.1}, and while the \code{ping}
command is running, you should see on your workstation a new network
interface named \code{enx<macaddr>}. Given the value we gave to
\code{usbnet_hostaddr}, it will therefore be
Expand All @@ -217,7 +217,7 @@ \section{Network configuration on the PC host}
which is so much easier to use:

\begin{verbatim}
nmcli con add type ethernet ifname enxf8dc7a000001 ip4 192.168.0.1/24
nmcli con add type ethernet ifname enxf8dc7a000001 ip4 192.168.1.1/24
\end{verbatim}

\section{Setting up the TFTP server}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ \section{Setting up the NFS server}
Install the NFS server by installing the \code{nfs-kernel-server}
package. Once installed, edit the \code{/etc/exports} file as
\code{root} to add the following lines, assuming that the IP address
of your board will be \code{192.168.0.100}:
of your board will be \code{192.168.1.100}:
\scriptsize
\begin{verbatim}
/home/<user>/linux-kernel-labs/modules/nfsroot 192.168.0.100(rw,no_root_squash,no_subtree_check)
/home/<user>/linux-kernel-labs/modules/nfsroot 192.168.1.100(rw,no_root_squash,no_subtree_check)
\end{verbatim}
\normalsize
Expand Down Expand Up @@ -152,9 +152,9 @@ \section{Boot the system}
just one line):
\begin{verbatim}
setenv bootargs root=/dev/nfs rw ip=192.168.0.100:::::usb0 console=ttyS0,115200n8
setenv bootargs root=/dev/nfs rw ip=192.168.1.100:::::usb0 console=ttyS0,115200n8
g_ether.dev_addr=f8:dc:7a:00:00:02 g_ether.host_addr=f8:dc:7a:00:00:01
nfsroot=192.168.0.1:/home/<user>/linux-kernel-labs/modules/nfsroot,nfsvers=3,tcp
nfsroot=192.168.1.1:/home/<user>/linux-kernel-labs/modules/nfsroot,nfsvers=3,tcp
\end{verbatim}
Once again, replace \code{<user>} by your actual user name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ \subsubsection{Connect through SSH}
ordinary terminal:

\begin{verbatim}
ssh [email protected].0.100
ssh [email protected].1.100
\end{verbatim}

The password for the {\em root} user is \code{root}.
Expand Down

0 comments on commit 284b7d7

Please sign in to comment.