FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-18-2011, 08:23 AM
Fajar Priyanto
 
Default ip command

Hi all,
I have this network:
10.1.20.0 - 10.1.23.0 /22
Broadcast 10.1.23.255

Say I have a machine with IP: 192.168.1.1
Now, I want to create virtual IP on it with ip command:

1. Is this ok?
ip addr add 10.1.22.100/22 dev eth0:1

2. Should I define the broadcast too in the above command?
If I don't define it, will the above command means the broadcast would
be 10.1.25.255?

Thank you.
Fajar.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-18-2011, 01:28 PM
"Mike Burger"
 
Default ip command

> Hi all,
> I have this network:
> 10.1.20.0 - 10.1.23.0 /22
> Broadcast 10.1.23.255
>
> Say I have a machine with IP: 192.168.1.1
> Now, I want to create virtual IP on it with ip command:
>
> 1. Is this ok?
> ip addr add 10.1.22.100/22 dev eth0:1
>
> 2. Should I define the broadcast too in the above command?
> If I don't define it, will the above command means the broadcast would
> be 10.1.25.255?

By specifying /22 as the subnet mask, you're implicitly specifying the
broadcast address. You don't need to specify it, manually.

However, based on a CIDR notation of /22 (which is a subnet mask of
255.255.252.0), the broadcast will actually be 10.1.23.255.

--
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@bubbanfriends.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-18-2011, 04:29 PM
Ljubomir Ljubojevic
 
Default ip command

Vreme: 11/18/2011 03:28 PM, Mike Burger piše:
>
>> Hi all,
>> I have this network:
>> 10.1.20.0 - 10.1.23.0 /22
>> Broadcast 10.1.23.255
>>
>> Say I have a machine with IP: 192.168.1.1
>> Now, I want to create virtual IP on it with ip command:
>>
>> 1. Is this ok?
>> ip addr add 10.1.22.100/22 dev eth0:1

This is only a temporary solution, until network system is reset. If you
want permanent IP you must create Virtual IP via either network file or
NetworkManager GUI.

--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-18-2011, 05:38 PM
 
Default ip command

Fajar Priyanto writes:

> Hi all,
> I have this network:
> 10.1.20.0 - 10.1.23.0 /22
> Broadcast 10.1.23.255
>
> Say I have a machine with IP: 192.168.1.1
> Now, I want to create virtual IP on it with ip command:
>
> 1. Is this ok?
> ip addr add 10.1.22.100/22 dev eth0:1

ip a a 10.1.22.100/22 dev eth0

that will do

>
> 2. Should I define the broadcast too in the above command?
> If I don't define it, will the above command means the broadcast would
> be 10.1.25.255?

you can skip the broadcast if you want

--
Nux!
www.nux.ro

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org