• [ARCH] Configure wired network

    [ARCH] Configure wired network

    Wired

    Follow this procedure if you need to set up a wired connection via a static IP address.
    First, disable the dhcpcd service which was started automatically at boot:
    # systemctl stop dhcpcd.service
    
    Identify the name of your Ethernet interface.
    # ip link
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
        link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff
    3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
        link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff
    In this example, the Ethernet interface is enp2s0f0. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use iwconfig and see which interfaces are not wireless:
    # iwconfig
    enp2s0f0  no wireless extensions.
    wlp3s0    IEEE 802.11bgn  ESSID:"NETGEAR97"
              Mode:Managed  Frequency:2.427 GHz  Access Point: 2C:B0:5D:9C:72:BF
              Bit Rate=65 Mb/s   Tx-Power=16 dBm
              Retry  long limit:7   RTS thr:off   Fragment thr:off
              Power Management:on
              Link Quality=61/70  Signal level=-49 dBm
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:0  Invalid misc:430   Missed beacon:0
    lo        no wireless extensions.
    In this example, neither enp2s0f0 nor the loopback device have wireless extensions, meaning enp2s0f0 is our Ethernet interface.
    You also need to know these settings:
    • Static IP address.
    • Subnet mask.
    • Gateway's IP address.
    • Name servers' (DNS) IP addresses.
    • Domain name (unless you are on a local LAN, in which case you can make it up).
    Activate the connected Ethernet interface (e.g. enp2s0f0):
    # ip link set enp2s0f0 up
    
    Add the address:
    # ip addr add ip_address/subnetmask dev interface_name
    
    For example:
    # ip addr add 192.168.1.2/24 dev enp2s0f0
    
    For more options, run man ip.
    Add your gateway like this, substituting your own gateway's IP address:
    # ip route add default via ip_address
    
    For example:
    # ip route add default via 192.168.1.1
    
    Edit resolv.conf, substituting your name servers' IP addresses and your local domain name:
    # nano /etc/resolv.conf
    nameserver 61.23.173.5
    nameserver 61.95.849.8
    search example.com
    Note: Currently, you may include a maximum of three nameserver lines.
    You should now have a working network connection. If you do not, check the detailed Network Configuration page.

  • 0 komentar:

    Post a Comment

    BACA ARTIKEL

    Silahkan baca artikel seputar UniX Class baik itu artikel ataupun kegiatan yang bersangkutan dengan seputar UniX Class.

    Popular Posts

    ALAMAT

    Jln. Kecapi X No.233, Jatimulya, Bekasi

    EMAIL

    aditya-dharma@live.com
    adityadharmayunias08@gmail.com

    TELEPHONE

    MOBILE