IPV4 (LAN/MAN/WAN)
----------------------
Class A: 0.0.0.0 - 126.255.255.255
Class B: 128.0.0.0 - 191.255.255.255
Class C: 192.0.0.0 - 223.255.255.255
Private:
--------
A: 10.0.0.0 - 10.255.255.255
B: 172.16.0.0 - 172.31.255.255
C: 192.168.0.0 - 192.168.255.255
Linux Network Management
------------------------:
Windows NIC1: Local Area Connection
Windows NIC2: Local Area Connection 2
[root@desktopX ~]# ip link
[root@desktopX ~]# ip addr show ; CMD or GUI
[root@desktopX ~]# ifconfig ; (active)
[root@desktopX ~]# ifconfig -a ; all
[root@desktopX ~]# ifconfig eth0 ; sepecific LAN (br0, eth0, ens33, enp2s0)
Linux (RHEL/CentOS-7)
---------------------
Physical NIC : enp2s0 or ens33 (start with 'en')
Virtual Machine NIC: eth0
Virtual IP: enp2s0:1 or ens33:1 or eth0:1
loopback: lo
Bridge : br0
Wireless: wl
VMware NIC: eno16777736 - ethernet card information
[root@serverX ~]# ifconfig
[root@serverX ~]# ip addr
ether 8C:89:A5:E4:F3:64 => MAC
inet addr:172.25.11.X => IP Address
Bcast:172.25.11.255
Mask:255.255.255.0
inet6 addr: IPv6 Link Local address
Check Physical Connectivity:
----------------------------
[root@desktopX ~]# ip link
state "UP" or State "Down"
[root@desktopX ~]# mii-tool enp2s0 ;(physical Machine)
enp2s0 : negotiated 1000baseT-FD flow-control, link ok
enp2s0 : no link (not connected)
Host Name Configure (server)
---------------------------
[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]# hostnamectl set-hostname desktopX.example.com
[root@localhost ~]# bash
[root@desktopX ~]#
or
[root@desktopX ~]# vim /etc/hostname
deskotpX.example.com
[root@desktopX ~]# reboot
Enable and Disable:
-------------------
[root@desktopX ~]# ifdown eth0
[root@desktopX ~]# ifup eth0
[root@desktopX ~]# ifconfig
Or:
---
[root@desktopX ~]# ip link set eth0 up
[root@desktopX ~]# ip link set eth0 down
IP Configure:
-------------
[root@serverX ~]# ip link
[root@serverX ~]# ip addr
[root@serverX ~]# ifconfig eth1
IP Configure
--------------------------
=> Tempoary (IP remove after system reboot)
=> Parmanet
Temporary IP Address Configure:
-------------------------------
[root@serverX ~]# ifconfig eth1
[root@serverX ~]# ifconfig eth1 172.25.11.200+X
[root@serverX ~]# ifconfig eth1 172.25.11.200+X netmask 255.255.255.0
[root@serverX ~]# ifconfig
[root@serverX ~]# ifconfig
Gateway Testing
--------------------------
[root@serverX ~]# ping 172.25.11.1
64 bytes from 172.25.11.1 : icmp_seq=1 ttl=64 time=0.451 ms
64 bytes from 172.25.11.1 : icmp_seq=2 ttl=64 time=0.317 ms
C^
[root@serverX ~]# ping -c 4 172.25.11.1
Check Default Gateway:
---------------------
[root@serverX ~]# route -n
[root@serverX ~]# route add default gw 172.25.11.1
[root@serverX ~]# vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 4.2.2.2
[root@serverX ~]# cat /etc/resolv.conf
[root@serverX ~]# ping www.google.com
Delete:
-------
[root@serverX ~]# route del default gw 172.25.11.1
[root@serverX ~]# route -n
[root@serverX ~]# reboot
IP Client Configure
-------------------
=> Static
=> dhcp : autmatically ip configure
[root@serverX ~]# nmcli connection show
[root@serverX ~]# nmcli con del 'eth1'
[root@serverX ~]# systemctl restart NetworkManager.service
[root@serverX ~]# nmcli connection show
[root@serverX ~]# nmtui
=> select 'Interface'
=> edit connection
=> Manual
=> Add
=> 172.25.11.200+X/24
GW - 172.25.11.1
DNS - 8.8.8.8
[root@serverX ~]# nmtui
=> Activate Connection
or
[root@serverX ~]# nmcli connection up "NAME"
[root@serverX ~]# systemctl stop NetworkManager.service
[root@serverX ~]# systemctl disable NetworkManager.service
[root@serverX ~]# systemctl status NetworkManager.service
Static (parmanent) IP configure:
--------------------------------
[root@serverX ~]# ifconfig eth0 ; notedown eth0 ether(MAC) Address
[root@serverX ~]# cd /etc/sysconfig/network-scripts/
[root@serverX network-scripts]# ls
[root@serverX network-scripts]# vim ifcfg-eth0
DEVICE=eth0 ; no change
TYPE=Ethernet ; no change
HWADDR=AA:BB:CC:DD:EE:FF ; no change
BOOTPROTO=none ; none=static, dhcp for dynamic
IPADDR=X.X.X.X (172.25.11.200+X) ;X is your IP address
NETMASK=Y.Y.Y.Y (255.255.255.0)
GATEWAY=X.X.X.G (172.25.11.1)
DNS1=A.A.A.A (4.2.2.2)
DNS2=B.B.B.B (8.8.8.8)
ONBOOT=yes ; must yes
[root@serverX network-scripts]# systemctl restart network.service
[root@serverX network-scripts]# systemctl enable network.service
[root@serverX network-scrip]# ifconfig
[root@serverX network-scrip]# ifup eth0
[root@serverX network-scrip]# ifconfig
[root@serverX ~]# ping 172.25.11.254 or ping 172.25.11.1
Working with NetworkManager:
---------------------------
[root@serverX ~]# systemctl restart NetworkManager
[root@serverX ~]# systemctl enable NetworkManager
[root@serverX ~]# nmcli connection show
[root@serverX ~]# nmcli con del 'eth1'
[root@serverX ~]# systemctl restart NetworkManager
[root@serverX ~]# nmcli connection show
NAME UUID TYPE DEVICE
Wired connection 1 5fb06bd0-0bb0-7ffb 802-3-ethernet eth1
[root@serverX ~]# nmcli con modify 'NAME' ipv4.address 172.25.11.200+X/24 ipv4.gateway 172.25.11.1 ipv4.dns 8.8.8.8
[root@serverX ~]# nmcli con mod 'NAME' ipv4.method manual
[root@serverX ~]# nmcli con down 'NAME'
[root@serverX ~]# nmcli con up 'NAME'
NAME = 'Wired Connection 1'
[root@serverX ~]# ifconfig
==================== Thank you =======================
# nmtui
=> edit
=> ok
# systemctl restart network
# ip addr add 172.25.11.200+X/24 dev eth0
----------------------
Class A: 0.0.0.0 - 126.255.255.255
Class B: 128.0.0.0 - 191.255.255.255
Class C: 192.0.0.0 - 223.255.255.255
Private:
--------
A: 10.0.0.0 - 10.255.255.255
B: 172.16.0.0 - 172.31.255.255
C: 192.168.0.0 - 192.168.255.255
Linux Network Management
------------------------:
Windows NIC1: Local Area Connection
Windows NIC2: Local Area Connection 2
[root@desktopX ~]# ip link
[root@desktopX ~]# ip addr show ; CMD or GUI
[root@desktopX ~]# ifconfig ; (active)
[root@desktopX ~]# ifconfig -a ; all
[root@desktopX ~]# ifconfig eth0 ; sepecific LAN (br0, eth0, ens33, enp2s0)
Linux (RHEL/CentOS-7)
---------------------
Physical NIC : enp2s0 or ens33 (start with 'en')
Virtual Machine NIC: eth0
Virtual IP: enp2s0:1 or ens33:1 or eth0:1
loopback: lo
Bridge : br0
Wireless: wl
VMware NIC: eno16777736 - ethernet card information
[root@serverX ~]# ifconfig
[root@serverX ~]# ip addr
ether 8C:89:A5:E4:F3:64 => MAC
inet addr:172.25.11.X => IP Address
Bcast:172.25.11.255
Mask:255.255.255.0
inet6 addr: IPv6 Link Local address
Check Physical Connectivity:
----------------------------
[root@desktopX ~]# ip link
state "UP" or State "Down"
[root@desktopX ~]# mii-tool enp2s0 ;(physical Machine)
enp2s0 : negotiated 1000baseT-FD flow-control, link ok
enp2s0 : no link (not connected)
Host Name Configure (server)
---------------------------
[root@localhost ~]# hostname
localhost.localdomain
[root@localhost ~]# hostnamectl set-hostname desktopX.example.com
[root@localhost ~]# bash
[root@desktopX ~]#
or
[root@desktopX ~]# vim /etc/hostname
deskotpX.example.com
[root@desktopX ~]# reboot
Enable and Disable:
-------------------
[root@desktopX ~]# ifdown eth0
[root@desktopX ~]# ifup eth0
[root@desktopX ~]# ifconfig
Or:
---
[root@desktopX ~]# ip link set eth0 up
[root@desktopX ~]# ip link set eth0 down
IP Configure:
-------------
[root@serverX ~]# ip link
[root@serverX ~]# ip addr
[root@serverX ~]# ifconfig eth1
IP Configure
--------------------------
=> Tempoary (IP remove after system reboot)
=> Parmanet
Temporary IP Address Configure:
-------------------------------
[root@serverX ~]# ifconfig eth1
[root@serverX ~]# ifconfig eth1 172.25.11.200+X
[root@serverX ~]# ifconfig eth1 172.25.11.200+X netmask 255.255.255.0
[root@serverX ~]# ifconfig
[root@serverX ~]# ifconfig
Gateway Testing
--------------------------
[root@serverX ~]# ping 172.25.11.1
64 bytes from 172.25.11.1 : icmp_seq=1 ttl=64 time=0.451 ms
64 bytes from 172.25.11.1 : icmp_seq=2 ttl=64 time=0.317 ms
C^
[root@serverX ~]# ping -c 4 172.25.11.1
Check Default Gateway:
---------------------
[root@serverX ~]# route -n
[root@serverX ~]# route add default gw 172.25.11.1
[root@serverX ~]# vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 4.2.2.2
[root@serverX ~]# cat /etc/resolv.conf
[root@serverX ~]# ping www.google.com
Delete:
-------
[root@serverX ~]# route del default gw 172.25.11.1
[root@serverX ~]# route -n
[root@serverX ~]# reboot
IP Client Configure
-------------------
=> Static
=> dhcp : autmatically ip configure
[root@serverX ~]# nmcli connection show
[root@serverX ~]# nmcli con del 'eth1'
[root@serverX ~]# systemctl restart NetworkManager.service
[root@serverX ~]# nmcli connection show
[root@serverX ~]# nmtui
=> select 'Interface'
=> edit connection
=> Manual
=> Add
=> 172.25.11.200+X/24
GW - 172.25.11.1
DNS - 8.8.8.8
[root@serverX ~]# nmtui
=> Activate Connection
or
[root@serverX ~]# nmcli connection up "NAME"
[root@serverX ~]# systemctl stop NetworkManager.service
[root@serverX ~]# systemctl disable NetworkManager.service
[root@serverX ~]# systemctl status NetworkManager.service
Static (parmanent) IP configure:
--------------------------------
[root@serverX ~]# ifconfig eth0 ; notedown eth0 ether(MAC) Address
[root@serverX ~]# cd /etc/sysconfig/network-scripts/
[root@serverX network-scripts]# ls
[root@serverX network-scripts]# vim ifcfg-eth0
DEVICE=eth0 ; no change
TYPE=Ethernet ; no change
HWADDR=AA:BB:CC:DD:EE:FF ; no change
BOOTPROTO=none ; none=static, dhcp for dynamic
IPADDR=X.X.X.X (172.25.11.200+X) ;X is your IP address
NETMASK=Y.Y.Y.Y (255.255.255.0)
GATEWAY=X.X.X.G (172.25.11.1)
DNS1=A.A.A.A (4.2.2.2)
DNS2=B.B.B.B (8.8.8.8)
ONBOOT=yes ; must yes
[root@serverX network-scripts]# systemctl restart network.service
[root@serverX network-scripts]# systemctl enable network.service
[root@serverX network-scrip]# ifconfig
[root@serverX network-scrip]# ifup eth0
[root@serverX network-scrip]# ifconfig
[root@serverX ~]# ping 172.25.11.254 or ping 172.25.11.1
Working with NetworkManager:
---------------------------
[root@serverX ~]# systemctl restart NetworkManager
[root@serverX ~]# systemctl enable NetworkManager
[root@serverX ~]# nmcli connection show
[root@serverX ~]# nmcli con del 'eth1'
[root@serverX ~]# systemctl restart NetworkManager
[root@serverX ~]# nmcli connection show
NAME UUID TYPE DEVICE
Wired connection 1 5fb06bd0-0bb0-7ffb 802-3-ethernet eth1
[root@serverX ~]# nmcli con modify 'NAME' ipv4.address 172.25.11.200+X/24 ipv4.gateway 172.25.11.1 ipv4.dns 8.8.8.8
[root@serverX ~]# nmcli con mod 'NAME' ipv4.method manual
[root@serverX ~]# nmcli con down 'NAME'
[root@serverX ~]# nmcli con up 'NAME'
NAME = 'Wired Connection 1'
[root@serverX ~]# ifconfig
==================== Thank you =======================
# nmtui
=> edit
=> ok
# systemctl restart network
# ip addr add 172.25.11.200+X/24 dev eth0
Post a Comment