CentOS/Fedora/RHEL

vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO=static
ONBOOT=yes
TYPE="Ethernet"
IPADDR=192.168.0.102
NAME="System eth0"
HWADDR=AB:CD:EF:12:34:56
GATEWAY=192.168.0.1

Debian/Ubuntu

vi /etc/network/interfaces

auto eth0
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
gateway 192.168.0.1

show ip address

ip addr show

temporary set ip address

ip addr add 192.168.0.102/24 dev eth0

remove ip address

ip addr del 192.168.0.102/24 dev eth0
ip link set eth0 up/down

route table show/set/remove/default gw

route
ip route show

route add default gw 192.168.0.1
ip route add 201.123.211.0/24 via 192.168.90.3 dev eth0

ip route del 201.123.211.0/24

ip route add default via 192.168.90.1
Posted by 쵸코케키

블로그 이미지
chocokeki
쵸코케키

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함