AKAI TSUKI

System development or Technical something

Install iproute in docker container (centos7).

I did not use ip/ss commands in default centos7 container.
So, I install iproute package to container.

Command list

  • install iproute
# yum install iproute

Detail

[root@519dd98187dd /]# yum install iproute
Loaded plugins: fastestmirror, ovl
base                                                                                                               | 3.6 kB  00:00:00
epel/x86_64/metalink                                                                                               | 6.4 kB  00:00:00
epel                                                                                                               | 4.3 kB  00:00:00
extras                                                                                                             | 3.4 kB  00:00:00
ius                                                                                                                | 2.3 kB  00:00:00
updates                                                                                                            | 3.4 kB  00:00:00
(1/3): epel/x86_64/updateinfo                                                                                      | 734 kB  00:00:01
(2/3): ius/x86_64/primary_db                                                                                       | 195 kB  00:00:01
(3/3): epel/x86_64/primary_db                                                                                      | 4.5 MB  00:00:03
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.riken.jp
 * extras: www.ftp.ne.jp
 * ius: mirrors.kernel.org
 * updates: www.ftp.ne.jp
Resolving Dependencies
--> Running transaction check
---> Package iproute.x86_64 0:3.10.0-74.el7 will be installed
--> Processing Dependency: libmnl.so.0(LIBMNL_1.0)(64bit) for package: iproute-3.10.0-74.el7.x86_64
--> Processing Dependency: libxtables.so.10()(64bit) for package: iproute-3.10.0-74.el7.x86_64
--> Processing Dependency: libmnl.so.0()(64bit) for package: iproute-3.10.0-74.el7.x86_64
--> Running transaction check
---> Package iptables.x86_64 0:1.4.21-17.el7 will be installed
--> Processing Dependency: libnfnetlink.so.0()(64bit) for package: iptables-1.4.21-17.el7.x86_64
--> Processing Dependency: libnetfilter_conntrack.so.3()(64bit) for package: iptables-1.4.21-17.el7.x86_64
---> Package libmnl.x86_64 0:1.0.3-7.el7 will be installed
--> Running transaction check
---> Package libnetfilter_conntrack.x86_64 0:1.0.4-2.el7 will be installed
---> Package libnfnetlink.x86_64 0:1.0.1-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================
 Package                                    Arch                       Version                             Repository                Size
==========================================================================================================================================
Installing:
 iproute                                    x86_64                     3.10.0-74.el7                       base                     618 k
Installing for dependencies:
 iptables                                   x86_64                     1.4.21-17.el7                       base                     426 k
 libmnl                                     x86_64                     1.0.3-7.el7                         base                      23 k
 libnetfilter_conntrack                     x86_64                     1.0.4-2.el7                         base                      53 k
 libnfnetlink                               x86_64                     1.0.1-4.el7                         base                      26 k

Transaction Summary
==========================================================================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 1.1 M
Installed size: 3.1 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): libmnl-1.0.3-7.el7.x86_64.rpm                                                                               |  23 kB  00:00:00
(2/5): iptables-1.4.21-17.el7.x86_64.rpm                                                                           | 426 kB  00:00:00
(3/5): libnetfilter_conntrack-1.0.4-2.el7.x86_64.rpm                                                               |  53 kB  00:00:00
(4/5): libnfnetlink-1.0.1-4.el7.x86_64.rpm                                                                         |  26 kB  00:00:00
(5/5): iproute-3.10.0-74.el7.x86_64.rpm                                                                            | 618 kB  00:00:00
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     1.6 MB/s | 1.1 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libmnl-1.0.3-7.el7.x86_64                                                                                              1/5
  Installing : libnfnetlink-1.0.1-4.el7.x86_64                                                                                        2/5
  Installing : libnetfilter_conntrack-1.0.4-2.el7.x86_64                                                                              3/5
  Installing : iptables-1.4.21-17.el7.x86_64                                                                                          4/5
  Installing : iproute-3.10.0-74.el7.x86_64                                                                                           5/5
  Verifying  : libnetfilter_conntrack-1.0.4-2.el7.x86_64                                                                              1/5
  Verifying  : libnfnetlink-1.0.1-4.el7.x86_64                                                                                        2/5
  Verifying  : iptables-1.4.21-17.el7.x86_64                                                                                          3/5
  Verifying  : libmnl-1.0.3-7.el7.x86_64                                                                                              4/5
  Verifying  : iproute-3.10.0-74.el7.x86_64                                                                                           5/5

Installed:
  iproute.x86_64 0:3.10.0-74.el7

Dependency Installed:
  iptables.x86_64 0:1.4.21-17.el7             libmnl.x86_64 0:1.0.3-7.el7           libnetfilter_conntrack.x86_64 0:1.0.4-2.el7
  libnfnetlink.x86_64 0:1.0.1-4.el7

Complete!
[root@519dd98187dd /]#
[root@519dd98187dd /]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    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
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
14: eth0@if15: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.2/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:2/64 scope link
       valid_lft forever preferred_lft forever
[root@519dd98187dd /]# ss -t
State      Recv-Q Send-Q                      Local Address:Port                                       Peer Address:Port
[root@519dd98187dd /]# ss -ta
State      Recv-Q Send-Q                      Local Address:Port                                       Peer Address:Port
LISTEN     0      128                             127.0.0.1:ddi-tcp-1                                             *:*
LISTEN     0      128                                   ::1:ddi-tcp-1                                            :::*
[root@519dd98187dd /]# ss -tan
State      Recv-Q Send-Q                        Local Address:Port                                       Peer Address:Port
LISTEN     0      128                               127.0.0.1:8888                                                  *:*
LISTEN     0      128                                     ::1:8888                                                 :::*
[root@519dd98187dd /]#