我有一个设置,其中 eth0 为两个地址:
# ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether b8:27:eb:73:e6:8b brd ff:ff:ff:ff:ff:ff
inet 192.168.1.42/24 brd 192.168.1.255 scope global dynamic eth0
valid_lft 6422sec preferred_lft 6422sec
inet 192.168.123.252/32 scope global eth0:1
valid_lft forever preferred_lft forever
在主机上,当查找我自己的主机名时,返回的内容如下:
Name: ispcu-7
Address 1: fe80::ba27:ebff:fe73:e68b%eth0 ispcu-7
Address 2: 192.168.1.42 ispcu-7
Address 3: 192.168.123.252 ispcu-7
到目前为止一切顺利。我怎样才能排除地址 3 以显示在上面的输出中?