CentOS7.4でIPコマンドをメモする

2017年9月21日

1.環境の確認
# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

2.IPコマンド

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 9c:a3:ba:01:e1:a5 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.xxx.55/23 brd xxx.xxx.xxx.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 9c:a3:ba:03:68:45 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 9c:a3:ba:04:ee:e5 brd ff:ff:ff:ff:ff:ff

 

3.特定デバイスの状態確認
ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xxx.xxx.xxx.55 netmask 255.255.254.0 broadcast xxx.xxx.xxx.255
ether 9c:a3:ba:01:e1:a5 txqueuelen 1000 (Ethernet)
RX packets 14156471 bytes 920928982 (878.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3618059 bytes 4088711994 (3.8 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

4.デバイスごとのパケット処理数
# netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 14159495 0 0 0 3618824 0 0 0 BMRU
eth1 1500 0 0 0 0 0 0 0 0 BMRU
eth2 1500 0 0 0 0 0 0 0 0 BMRU
lo 65536 1583651 0 0 0 1583651 0 0 0 LRU

Linux

Posted by arkgame