Ethernet: Difference between revisions

From Alpine Linux
(replace /etc/init.d with rc-service)
(cleaned up the page with headings and spacing)
Line 1: Line 1:
''From [https://en.wikipedia.org/wiki/Ethernet Wikipedia]:''
Ethernet is a relatively generic term that mostly means "wired internet". WiFi is wireless, ethernet involves some sort of wire (usually an RJ45 style jack with copper cables inside).


Ethernet is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in 1983 as IEEE 802.3. Ethernet has since been refined to support higher bit rates, a greater number of nodes, and longer link distances, but retains much backward compatibility.  
When [[Installation|installing]] Alpine linux, the <code>setup-alpine</code> script should have given you the option to setup ethernet/networking. If you need to setup ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]] script.


<br>
== setup-interfaces ==


== Setup ==
Start the script by running this command: {{Cmd|# setup-interfaces}}
 
When installing [[Alpine setup scripts|setup-alpine]] should give you the option to easily setup Ethernet or if you need to setup Ethernet after installation you can use [[Alpine setup scripts#setup-interfaces|setup-interfaces]].
 
==== setup-interfaces ====
 
start by running this command:
 
{{Cmd|# setup-interfaces}}
 
<br>


  Available interfaces are: eth0 wlan0.
  Available interfaces are: eth0 wlan0.
Line 22: Line 12:


choose <code>eth0</code> (or your Ethernet device, Ethernet devices usually start with <code>e</code> )
choose <code>eth0</code> (or your Ethernet device, Ethernet devices usually start with <code>e</code> )
<br>


if asked:
if asked:


<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code>
<code>Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]</code>


choose '''dhcp'''
choose '''dhcp'''
<br>


Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code>
Now it will ask <code>Do you to do any manual network configuration? (y/n) [n]</code>
Line 37: Line 23:
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the <code>/etc/network/interfaces</code> file.
unless you need to do manual network configuration choose '''n''', if you need to do manual network configuration choose '''y''' and it will open the <code>/etc/network/interfaces</code> file.


<br>
== Configuration ==
 
if  <code>setup-interfaces</code> doesnt do this automatically, then you need to '''start''' (or '''restart''') the networking service:
 
{{Cmd|# rc-service networking --quiet start &}}
 
<br>


and add it to start on boot:
The above script generally configures Networking service by adding the networking service to boot run level and starts the service.


{{Cmd|# rc-update add networking boot}}
If for some reason, this needs to be done manually, here are the steps:
To '''start''' (or '''restart''') the networking service: {{Cmd|# rc-service networking --quiet start &}}
To add networking service so that it starts on boot: {{Cmd|# rc-update add networking boot}}


==Tips / Troubleshooting==
== Troubleshooting ==
Sometimes an ethernet interface will not be detected by the installation media. In this case, you may have to use an alternate interface for installation (e.g. a usb to ethernet adapter) upon which after install / reboot the interface will display. You may also try installing any missing packages that contain the drivers.
Sometimes an ethernet interface will not be detected by the installation media. In this case, you may have to use an alternate interface for installation (e.g. a usb to ethernet adapter) upon which after install / reboot the interface will display. You may also try installing any missing packages that contain the drivers.




[[Category:Networking]]
[[Category:Networking]]

Revision as of 04:56, 10 January 2025

Ethernet is a relatively generic term that mostly means "wired internet". WiFi is wireless, ethernet involves some sort of wire (usually an RJ45 style jack with copper cables inside).

When installing Alpine linux, the setup-alpine script should have given you the option to setup ethernet/networking. If you need to setup ethernet after installation you can use setup-interfaces script.

setup-interfaces

Start the script by running this command:

# setup-interfaces

Available interfaces are: eth0 wlan0.
Enter '?' for help on bridges, bonding and vlans.
Which one do you want to initialize? (or '?' or 'done') [eth0]

choose eth0 (or your Ethernet device, Ethernet devices usually start with e )

if asked:

Ip address for eth0? (or 'dhcp', 'none', '?') [dhcp]

choose dhcp

Now it will ask Do you to do any manual network configuration? (y/n) [n]

unless you need to do manual network configuration choose n, if you need to do manual network configuration choose y and it will open the /etc/network/interfaces file.

Configuration

The above script generally configures Networking service by adding the networking service to boot run level and starts the service.

If for some reason, this needs to be done manually, here are the steps:

To start (or restart) the networking service:

# rc-service networking --quiet start &

To add networking service so that it starts on boot:

# rc-update add networking boot

Troubleshooting

Sometimes an ethernet interface will not be detected by the installation media. In this case, you may have to use an alternate interface for installation (e.g. a usb to ethernet adapter) upon which after install / reboot the interface will display. You may also try installing any missing packages that contain the drivers.