0% found this document useful (0 votes)
2 views2 pages

Configuring Networking

Uploaded by

emirjukovic22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Configuring Networking

Uploaded by

emirjukovic22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Interface Management
Old Command (Legacy – net-tools) New Modern Command (iproute2)
ifconfig ip addr show / ip a
ifconfig -a ip link show
ifconfig <interface> up ip link set <interface> up
ifconfig <interface> down ip link set <interface> down
ifconfig <interface> <IP> netmask ip addr add <IP>/<PREFIX> dev
<NETMASK> <interface>
ifconfig <interface> mtu 9000 ip link set <interface> mtu 9000

2. Routing & Gateway


Old Command New Modern Command
route -n ip route show
route add -net <NETWORK> netmask ip route add <NETWORK>/<PREFIX>
<MASK> gw <GATEWAY> via <GATEWAY>
route add default gw <GATEWAY> ip route add default via <GATEWAY>
route del default ip route del default

3. ARP Table
Old Command New Modern Command
arp -a ip neigh show
arp -d <IP> ip neigh del <IP> dev <interface>

4. VLAN, Bonding, Bridges


Old Command New Modern Command
vconfig add <interface> <VLAN_ID> ip link add link <interface> name
<interface>.<VLAN_ID> type vlan id
<VLAN_ID>
brctl show ip link show type bridge
brctl addbr <bridge> ip link add name <bridge> type
bridge
brctl addif <bridge> <interface> ip link set <interface> master
<bridge>
ifenslave <bond> <interface1> Ip link set <interface1> master
<interface2> <bond> and ip link set <interface2>
master <bond>

5. Network Statistics (netstat → ss / ip)


Old Command New Modern Command
netstat -tulpn ss -tulpn
netstat -an ss -an
netstat -rn ip route
netstat -i ip -s link
netstat -s ss -s
6. DNS / Name Resolution
Old Command New Modern Command
nslookup <domain> dig <domain> or resolvectl query
<domain>
host <domain> dig <domain>
(No old command) resolvectl status (show DNS servers,
search domains, DNSSEC)

7. NetworkManager (RHEL 7/8/9)


Old Command New Modern Command
Bring connection up nmcli connection up <connection>
Bring connection down nmcli connection down <connection>
Show connections nmcli connection show
Show devices nmcli device
Show device details nmcli device show <interface>
Reload connection profiles nmcli connection reload

8. Firewall (iptables → firewalld)


Old Command New Modern Command
iptables -L -n firewall-cmd --list-all
iptables -A INPUT -p tcp --dport 80 -j firewall-cmd --add-service=http
ACCEPT
iptables-save firewall-cmd --runtime-to-permanent

9. DHCP (NetworkManager)
Old Command New Modern Command
dhclient -r <interface> nmcli device reapply <interface>
dhclient <interface> nmcli device connect <interface>

Most Important Summary (4 commands to remember)


Old Command New Modern Command
ifconfig ip addr
netstat ss
route ip route
arp ip neigh

You might also like