Verifying connectivity
ifconfig
or
ip address # ip a for short
Manually Connecting
Listing Network interfaces
ip link
# or
ls /sys/class/net
Enable the interface
ip link set <interface> up
Add an ip address to an interface
ip address add <address>/<CIDR> broadcast + dev <interface>
- The
+
after broadcast makes ip automatically deduce the broadcast from the CIDR
Delete an ip address from an interface
ip address delete <address>/<CIDR> dev <interface>
Delete all ip addresses on an interface
ip address flush dev <interface>
Routing
Show all routes
ip route show # short hand is just `ip r`
Add a route
ip route add <netmask> via <adderss> dev <interface>
# e.g.
ip r add 192.168.100.0/24 via 192.168.50.9 dev eno1
or
ip r add default via 192.168.50.9 dev eno1
Delete a route
ip route del <netmask> via <adderss> dev <interface>