|
|
Reported by tocker,
Mar 25, 2009
Start with a machine with very few IP addresses:
[root@localhost examples]# /sbin/ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 08:00:27:b7:fe:82 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.102/24 brd 192.168.1.255 scope global eth0
inet6 fe80::a00:27ff:feb7:fe82/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
For example, this only listens on 192.168.1.102.
Add an IP address (works):
[root@localhost examples]# /usr/local/mmm/bin/check_ip 192.168.1.99 eth0
OK: IP has been address added
Try to add it again (exists):
[root@localhost examples]# /usr/local/mmm/bin/check_ip 192.168.1.99 eth0
OK: IP address presence check result is '1'
Add something that matches the pattern of what you added (broken):
[root@localhost examples]# /usr/local/mmm/bin/check_ip 192.168.1.9 eth0
OK: IP address presence check result is '1'
And try again to be safe (broken):
[root@localhost examples]# /usr/local/mmm/bin/check_ip 192.168.1.10 eth0
OK: IP address presence check result is '1'
Then unused pattern (works):
[root@localhost examples]# /usr/local/mmm/bin/check_ip 192.168.1.8 eth0
OK: IP has been address added
|