- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to remove an IP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2010 11:08 PM
тАО10-06-2010 11:08 PM
I have executed ip addr show command and found that it has 3 IP assigned for eth0, the first IP is there in ifcfg-eth0 file, but I dont know what is the other two IPs.
The other two IPs are actually assigned to some other hosts. So I want to remove the other two IPs from this system
Please find the ip addr show command output.
Kindly help me to remove the the following two IPs from this system,10.58.121.250 & 10.58.121.251.
# ip addr show
1: lo:
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:
link/ether 00:21:5e:2e:55:da brd ff:ff:ff:ff:ff:ff
inet 10.58.121.193/25 brd 10.58.121.255 scope global eth0
inet 10.58.121.250/32 scope global eth0
inet 10.58.121.251/32 scope global eth0
inet6 fe80::221:5eff:fe2e:55da/64 scope link
valid_lft forever preferred_lft forever
3: eth1:
link/ether 00:21:5e:2e:55:dc brd ff:ff:ff:ff:ff:ff
4: sit0:
link/sit 0.0.0.0 brd 0.0.0.0
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.58.121.193
NETMASK=255.255.255.128
HWADDR=00:21:5E:2E:55:DA
GATEWAY=10.58.121.129
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2010 11:56 PM
тАО10-06-2010 11:56 PM
Re: How to remove an IP
check if there exist some files :
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0:1
....
/etc/sysconfig/network-scripts/ifcfg-eth0:2
if yes just remove the files and if the system start again only the eth0 config will be applied.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2010 11:57 PM
тАО10-06-2010 11:57 PM
Re: How to remove an IP
and of course also :
/etc/sysconfig/network-scripts/ifcfg-eth1
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2010 12:08 AM
тАО10-07-2010 12:08 AM
Re: How to remove an IP
/etc/sysconfig/network-scripts folder
___________________________________________
[root@nizamabad ~]# cd /etc/sysconfig/network-scripts/
[root@nizamabad network-scripts]# ls
ifcfg-eth0 ifdown-ippp ifdown-ppp ifup ifup-ipsec ifup-plusb ifup-sl network-functions
ifcfg-lo ifdown-ipsec ifdown-routes ifup-aliases ifup-ipv6 ifup-post ifup-tunnel network-functions-ipv6
ifdown ifdown-ipv6 ifdown-sit ifup-bnep ifup-ipx ifup-ppp ifup-wireless
ifdown-bnep ifdown-isdn ifdown-sl ifup-eth ifup-isdn ifup-routes init.ipv6-global
ifdown-eth ifdown-post ifdown-tunnel ifup-ippp ifup-plip ifup-sit net.hotplug
___________________________________________
[root@nizamabad network-scripts]# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.58.121.193
NETMASK=255.255.255.128
HWADDR=00:21:5E:2E:55:DA
GATEWAY=10.58.121.129
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2010 12:10 AM
тАО10-07-2010 12:10 AM
Re: How to remove an IP
try with this:
ip addr del 10.58.121.250 dev eth0
ip addr del 10.58.121.251 dev eth0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2010 12:15 AM
тАО10-07-2010 12:15 AM
Re: How to remove an IP
Thanks for the reply
If we remove using the following command will it remove permanently,
ip addr del 10.58.121.250 dev eth0
ip addr del 10.58.121.251 dev eth0
Or if we restart the machine again will these IPs exist?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2010 05:48 AM
тАО10-07-2010 05:48 AM
SolutionWhoever has configured these addresses has apparently not used the standard method, if /etc/sysconfig/network-scripts/ifcfg-eth0:* files don't exist.
Is some sort of cluster software running on this system? It might add some extra IPs for clustered services (= "packages" if you're familiar with HP Serviceguard clustering).
You might want to look into /etc/rc.d/rc.local: if the previous sysadmin was not aware of the standard method of configuring extra IPs, s/he may have added them there.
If that does not help, you may have to try and find the configuration by brute force:
grep -r '10.58.121.250' /etc/*
This will find *all* the files in /etc where that IP address appears.
MK