Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
I did this:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0 /sbin/ifconfig eth0:1 xx.xx.xx.11 netmask 255.255.255.0 /sbin/ifconfig eth0:2 xx.xx.xx.30 netmask 255.255.255.0 /sbin/ifconfig eth0:3 xx.xx.xx.31 netmask 255.255.255.0 /sbin/ifconfig eth0:4 xx.xx.xx.13 netmask 255.255.255.0 /sbin/ifconfig eth0:5 xx.xx.xx.15 netmask 255.255.255.0 /sbin/ifconfig eth0:6 xx.xx.xx.20 netmask 255.255.255.0 /sbin/ifconfig eth0:7 xx.xx.xx.21 netmask 255.255.255.0 /sbin/ifconfig eth0:8 xx.xx.xx.22 netmask 255.255.255.0
but on looking at the output of /sbin/ifconfig, I see this:
[root@sunspot ray]# /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:64.135.16.15 Bcast:64.135.16.255 Mask:255.255.255.0 inet6 addr: fe80::200:c5ff:fec2:1b01/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5491775 errors:0 dropped:0 overruns:0 frame:0 TX packets:962501 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:436018277 (415.8 MiB) TX bytes:156248463 (149.0 MiB) Interrupt:12 Base address:0xcf00
eth0:0 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.10 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:1 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.11 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:2 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.30 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:3 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.31 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:4 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.13 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:5 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.15 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:6 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.20 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:7 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.21 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:8 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.22 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:5744 errors:0 dropped:0 overruns:0 frame:0 TX packets:5744 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:591811 (577.9 KiB) TX bytes:591811 (577.9 KiB)
And this, in /var/log/messages [root@sunspot ray]# tail /var/log/messages Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.15 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.21 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.21 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.21 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.22 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.22 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.22 on eth0.
How can I get my NIC to accept traffic for these IPs?
Thanks In Advance, ~Ray
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
I did this:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0
you might want to investigate /sbin/ip - its been around for a few years now, no reason why people should not be using that these days :)
Karanbir Singh wrote:
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
I did this:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0
you might want to investigate /sbin/ip - its been around for a few years now, no reason why people should not be using that these days :)
Thanks, I shall. But as this is a production server, is there something that /sbin/ip will do for me that /sbin/ifconfig was unable to?
~R
Ray Leventhal wrote:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0
you might want to investigate /sbin/ip - its been around for a few years now, no reason why people should not be using that these days :)
Thanks, I shall. But as this is a production server, is there something that /sbin/ip will do for me that /sbin/ifconfig was unable to?
Make life a lot easier and a lot more functional ?
Karanbir Singh wrote:
Ray Leventhal wrote:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0
you might want to investigate /sbin/ip - its been around for a few years now, no reason why people should not be using that these days :)
Thanks, I shall. But as this is a production server, is there something that /sbin/ip will do for me that /sbin/ifconfig was unable to?
Make life a lot easier and a lot more functional ?
I concur, with the caveat that AFAIK, the RHEL standard networking scripts still do things the old way with ifconfig.
Dear Ray,
If you analyze, both the commands:
ifconfig is a way to configure your IP address as the name shows, it is valid /sbin/ip didnot see such situation ???? may in future.
Regards,
Umair Shakil Askai Bank Limited Pakistan
On 9/7/07, Ray Leventhal centos@swhi.net wrote:
Karanbir Singh wrote:
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
I did this:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0
you might want to investigate /sbin/ip - its been around for a few years now, no reason why people should not be using that these days :)
Thanks, I shall. But as this is a production server, is there something that /sbin/ip will do for me that /sbin/ifconfig was unable to?
~R _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
umair shakil wrote:
Dear Ray,
If you analyze, both the commands:
ifconfig is a way to configure your IP address as the name shows, it is valid /sbin/ip didnot see such situation ???? may in future.
Regards,
Umair Shakil Askai Bank Limited Pakistan
Thanks for that, I will do my research once this server is responding.
~R
umair shakil wrote:
Dear Ray,
If you analyze, both the commands:
ifconfig is a way to configure your IP address as the name shows, it is valid /sbin/ip didnot see such situation ???? may in future.
Umair, you might want to go read 'man ip', iproute2 is completely different toolset than legacy stuff like ifconfig.
Dear Ray,
Please assure me that:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0
Is this the valid netmask "255.255.255.0" for static IP address for this machine you mentioned????
it will be "ifconfig eth0:0 xxxxx netmask 255.255.255.255"
Regards,
Umair Shakil ETD
On 9/7/07, Ray Leventhal centos@swhi.net wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
I did this:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0 /sbin/ifconfig eth0:1 xx.xx.xx.11 netmask 255.255.255.0 /sbin/ifconfig eth0:2 xx.xx.xx.30 netmask 255.255.255.0 /sbin/ifconfig eth0:3 xx.xx.xx.31 netmask 255.255.255.0 /sbin/ifconfig eth0:4 xx.xx.xx.13 netmask 255.255.255.0 /sbin/ifconfig eth0:5 xx.xx.xx.15 netmask 255.255.255.0 /sbin/ifconfig eth0:6 xx.xx.xx.20 netmask 255.255.255.0 /sbin/ifconfig eth0:7 xx.xx.xx.21 netmask 255.255.255.0 /sbin/ifconfig eth0:8 xx.xx.xx.22 netmask 255.255.255.0
but on looking at the output of /sbin/ifconfig, I see this:
[root@sunspot ray]# /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:64.135.16.15 Bcast:64.135.16.255 Mask:255.255.255.0 inet6 addr: fe80::200:c5ff:fec2:1b01/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5491775 errors:0 dropped:0 overruns:0 frame:0 TX packets:962501 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:436018277 (415.8 MiB) TX bytes:156248463 (149.0 MiB) Interrupt:12 Base address:0xcf00
eth0:0 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.10 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:1 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.11 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:2 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.30 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:3 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.31 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:4 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.13 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:5 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.15 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:6 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.20 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:7 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.21 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:8 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.22 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:5744 errors:0 dropped:0 overruns:0 frame:0 TX packets:5744 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:591811 (577.9 KiB) TX bytes:591811 (577.9 KiB)
And this, in /var/log/messages [root@sunspot ray]# tail /var/log/messages Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.15 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.21 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.21 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.21 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.22 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.22 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.22 on eth0.
How can I get my NIC to accept traffic for these IPs?
Thanks In Advance, ~Ray _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Dear Ray,
Please assure me that:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0 http://255.255.255.0/
Is this the valid netmask " 255.255.255.0 http://255.255.255.0" for static IP address for this machine you mentioned????
it will be "ifconfig eth0:0 xxxxx netmask 255.255.255.255 http://255.255.255.255 "
Regards,
Umair Shakil ETD
<snip>
Absolutely, that is the correct netmask. It is a /24
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Ray Leventhal
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
I did this:
/sbin/ifconfig eth0:0 xx.xx.xx.10 netmask 255.255.255.0 /sbin/ifconfig eth0:1 xx.xx.xx.11 netmask 255.255.255.0 /sbin/ifconfig eth0:2 xx.xx.xx.30 netmask 255.255.255.0 /sbin/ifconfig eth0:3 xx.xx.xx.31 netmask 255.255.255.0 /sbin/ifconfig eth0:4 xx.xx.xx.13 netmask 255.255.255.0 /sbin/ifconfig eth0:5 xx.xx.xx.15 netmask 255.255.255.0 /sbin/ifconfig eth0:6 xx.xx.xx.20 netmask 255.255.255.0 /sbin/ifconfig eth0:7 xx.xx.xx.21 netmask 255.255.255.0 /sbin/ifconfig eth0:8 xx.xx.xx.22 netmask 255.255.255.0
but on looking at the output of /sbin/ifconfig, I see this:
[root@sunspot ray]# /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:64.135.16.15 Bcast:64.135.16.255 Mask:255.255.255.0 inet6 addr: fe80::200:c5ff:fec2:1b01/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5491775 errors:0 dropped:0 overruns:0 frame:0 TX packets:962501 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:436018277 (415.8 MiB) TX bytes:156248463 (149.0 MiB) Interrupt:12 Base address:0xcf00
eth0:0 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.10 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:1 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.11 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:2 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.30 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:3 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.31 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:4 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.13 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:5 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.15 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:6 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.20 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:7 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.21 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
eth0:8 Link encap:Ethernet HWaddr 00:00:C5:C2:1B:01 inet addr:xx.xx.xx.22 Bcast:xx.xx.xx.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:12 Base address:0xcf00
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:5744 errors:0 dropped:0 overruns:0 frame:0 TX packets:5744 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:591811 (577.9 KiB) TX bytes:591811 (577.9 KiB)
And this, in /var/log/messages [root@sunspot ray]# tail /var/log/messages Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.15 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.20 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.21 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.21 on eth0. Sep 7 06:50:31 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.21 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.22 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Withdrawing address record for xx.xx.xx.22 on eth0. Sep 7 06:50:33 sunspot avahi-daemon[2203]: Registering new address record for xx.xx.xx.22 on eth0.
How can I get my NIC to accept traffic for these IPs?
If the secondaries are on a different subnet then the primary then you will need to add routing entries for those subnets pointing out eth0.
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
for f in 10 11 30 31 13 15 20 21 22 ; do ip addr add dev eth0 xx.xx.xx.${f}/24 ; done; ip addr ls; ip route ls;
check firewall to make sure traffic is allowed in/out for those IP's
Karanbir Singh wrote:
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
for f in 10 11 30 31 13 15 20 21 22 ; do ip addr add dev eth0 xx.xx.xx.${f}/24 ; done; ip addr ls; ip route ls;
check firewall to make sure traffic is allowed in/out for those IP's
Thank you very much, but please forgive my ignorance...and allow me to explain the entire situation.
The server I'm adding IPs to is in one /24, the ips I'm adding are in another /24 (which is why I specified the netmask in the /sbin/ifconfig statement, or it'd have auto-chosen 255.255.0.0) I'm not sure where/when/how to execute what you've suggested. Again, forgive my ignorance, but if you'd explain, I'd be grateful.
Thanks, ~Ray
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Ray Leventhal
Karanbir Singh wrote:
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a
given machine
will answer.
for f in 10 11 30 31 13 15 20 21 22 ; do ip addr add dev eth0 xx.xx.xx.${f}/24 ; done; ip addr ls; ip route ls;
check firewall to make sure traffic is allowed in/out for those IP's
Thank you very much, but please forgive my ignorance...and allow me to explain the entire situation.
The server I'm adding IPs to is in one /24, the ips I'm adding are in another /24 (which is why I specified the netmask in the /sbin/ifconfig statement, or it'd have auto-chosen 255.255.0.0) I'm not sure where/when/how to execute what you've suggested. Again, forgive my ignorance, but if you'd explain, I'd be grateful.
You will need to add the routes for the other subnet in your routing table as such.
route add -net XX.XX.XX.0 netmask 255.255.255.0 eth0
I believe there is a place to add static routes in one of the startup scripts (besides rc.local), but forget where it is, I think if you configure ifcfg-eth0:X sub-interfaces scripts ifup will create these routes.
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
<snip>
if you'd explain, I'd be grateful.
You will need to add the routes for the other subnet in your routing table as such.
route add -net XX.XX.XX.0 netmask 255.255.255.0 eth0
I believe there is a place to add static routes in one of the startup scripts (besides rc.local), but forget where it is, I think if you configure ifcfg-eth0:X sub-interfaces scripts ifup will create these routes.
-Ross
Hi Ross et al,
I'm getting an error on adding the route. The machine's base IP is in the xx.xx.16.x /24. The additional IPs are in another /24. Base is physical, the others are virtual hosts.
The error on adding routes is: route: netmask doesn't match route address Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for specified AF. route {-V|--version} Display version/author and exit.
-v, --verbose be verbose -n, --numeric don't resolve names -e, --extend display other/more information -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25)
I know i'm probably being thick here, and I do appreciate the assistance. What am I missing?
Thanks again so very much, ~Ray
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Ray Leventhal
<snip> >> if you'd explain, I'd be grateful. >> > > You will need to add the routes for the other subnet in your routing > table as such. > > route add -net XX.XX.XX.0 netmask 255.255.255.0 eth0 > > I believe there is a place to add static routes in one of the startup > scripts (besides rc.local), but forget where it is, I think if you > configure ifcfg-eth0:X sub-interfaces scripts ifup will create these > routes. > > -Ross > > > Hi Ross et al,
I'm getting an error on adding the route. The machine's base IP is in the xx.xx.16.x /24. The additional IPs are in another /24. Base is physical, the others are virtual hosts.
The error on adding routes is: route: netmask doesn't match route address Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for
specified AF. route {-V|--version} Display version/author and exit.
-v, --verbose be verbose -n, --numeric don't resolve names -e, --extend display other/more information -F, --fib display Forwarding Information Base
(default) -C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25)
I know i'm probably being thick here, and I do appreciate the assistance. What am I missing?
Thanks again so very much, ~Ray
Hmmm, tested it here and it worked for me.
Are all networks defined on that interface /24?
Here is what I did here:
eth0 already configured for 10.1.1.225/24
[root@mfg-nyc-iscsi2 snmp]# ifconfig eth0:0 192.168.1.134 netmask 255.255.255.0 [root@mfg-nyc-iscsi2 snmp]# route add -net 192.168.1.0 netmask 255.255.255.0 eth0 [root@mfg-nyc-iscsi2 snmp]# netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 10.1.1.0 * 255.255.255.0 U 0 0 0 eth0 172.16.24.0 * 255.255.255.0 U 0 0 0 bond0 172.16.25.0 * 255.255.255.0 U 0 0 0 bond1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 default rt1.nyc.mfg.prv 0.0.0.0 UG 0 0 0 eth0 [root@mfg-nyc-iscsi2 snmp]#
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.
Ray Leventhal wrote:
I'm getting an error on adding the route. The machine's base IP is in the xx.xx.16.x /24. The additional IPs are in another /24. Base is physical, the others are virtual hosts.
What Ross said, will work fine if your network bits match and your gateway is shared. If you are trying to get source based routing or multiple default gateways, the process is a bit more complex.
Karanbir Singh wrote:
Ray Leventhal wrote:
I'm getting an error on adding the route. The machine's base IP is in the xx.xx.16.x /24. The additional IPs are in another /24. Base is physical, the others are virtual hosts.
What Ross said, will work fine if your network bits match and your gateway is shared. If you are trying to get source based routing or multiple default gateways, the process is a bit more complex.
Sounds like the issue is at hand. xx.xx.16.xx is the inital /24, base for the unit and default address on eth0
The additional, alias addresses are in the xx.xx.106.xx /24. They gateway on 16.1 and 106.1 respectively.
Ray Leventhal wrote:
Sounds like the issue is at hand. xx.xx.16.xx is the inital /24, base for the unit and default address on eth0
The additional, alias addresses are in the xx.xx.106.xx /24. They gateway on 16.1 and 106.1 respectively.
Since you are using legacy tools, I'll let someone else who actually still uses them work through the issue with you, rather than introduce tables and policy rules and iproute2 to you.
Karanbir Singh wrote:
Ray Leventhal wrote:
Sounds like the issue is at hand. xx.xx.16.xx is the inital /24, base for the unit and default address on eth0
The additional, alias addresses are in the xx.xx.106.xx /24. They gateway on 16.1 and 106.1 respectively.
Since you are using legacy tools, I'll let someone else who actually still uses them work through the issue with you, rather than introduce tables and policy rules and iproute2 to you.
Once again, with the help of the kind members of this list, it appears all is well.
The addition of a route for the 2nd /24 seems to have done the trick. Thank you again, all.
~Ray
Dear Ray,
I think u should need to explain whole scenario what u actually want??? i suppose Karanbir is not getting what u want.... Please clear ur confusions....
secondly by adding the IPs with this cammand just only changes the ip of running interface..... what when u reboot the system???? try modifying this:
vi /etc/sysconfig/network-scripts/ifcfg-eth0 and so on
Regards,
Umair Shakil ETD Pakistan
On 9/7/07, Ray Leventhal centos@swhi.net wrote:
Karanbir Singh wrote:
Ray Leventhal wrote:
Hi all,
I need to (quickly!grrr) update IP addresses for which a given machine will answer.
for f in 10 11 30 31 13 15 20 21 22 ; do ip addr add dev eth0 xx.xx.xx.${f}/24 ; done; ip addr ls; ip route ls;
check firewall to make sure traffic is allowed in/out for those IP's
Thank you very much, but please forgive my ignorance...and allow me to explain the entire situation.
The server I'm adding IPs to is in one /24, the ips I'm adding are in another /24 (which is why I specified the netmask in the /sbin/ifconfig statement, or it'd have auto-chosen 255.255.0.0) I'm not sure where/when/how to execute what you've suggested. Again, forgive my ignorance, but if you'd explain, I'd be grateful.
Thanks, ~Ray _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos