04-02-2009
vi /etc/hostname.eri0
10.xxx.xxx.xxx netmask + broadcast + up
or
10.xxx.xxx.xxx netmask 255.255.255.0 broadcast + up
10 More Discussions You Might Find Interesting
1. IP Networking
What is the significance of the broadcast address? (1 Reply)
Discussion started by: 98_1LE
1 Replies
2. UNIX for Dummies Questions & Answers
say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on?
And could you explain how to get the answer?
thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies
3. Solaris
I have a bge1 card and a bge0 card, i want the broadcast addresses to match, ifconfig shows this
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
... (1 Reply)
Discussion started by: csaunders
1 Replies
4. Shell Programming and Scripting
Hi Friends.
I have a file called install.data which has fields like :
XXXXX
ACVCGFFTFY UAHIUH OI
CONNECTION=tape/11/
LOCATAION=08-90-89
SIZE=90
I had to change the values of some of these variables. So i did :
grep "SIZE" instal.data | sed 's/*/00/' ...this is working fine on command... (4 Replies)
Discussion started by: vijaya2006
4 Replies
5. UNIX for Dummies Questions & Answers
Hi mates, I want to make an alias permanent for a KShell, does someone knows how to do that?
Thanks! (4 Replies)
Discussion started by: agasamapetilon
4 Replies
6. Shell Programming and Scripting
Hi
Suppose
You have two computers. One named kenny which has an IP address of 192.168.0.7. kenny lives
on a subnet with a subnet mask of 255.255.255.240. The second computer is called zathras, which
has an IP address of 192.168.0.17, zathras lives on a network with the same subnet mask.
i)... (4 Replies)
Discussion started by: scofiled83
4 Replies
7. Shell Programming and Scripting
Hi,
I am having two variables
IP="10.150.12.1"
netmask="255.255.255.0"
To get network number, I know that a bitwise & will help.
networkno=IP & netmask
My code is
#!/usr/bin/ksh
ip="10.150.12.1"
netmask="255.255.255.0"
networkno="$ip" & "$netmask"
echo $networkno
I am... (7 Replies)
Discussion started by: chaitanyapn
7 Replies
8. Solaris
Hi
If suppose there is a MAC address of NIC port. I have change the MAC address through following command
# ifconfig hme0 ether a:0:30:f0.ad:51
The change MAC address will be there till reboot.
Now I would like to know how to make the change MAC address permanent. I believe that... (1 Reply)
Discussion started by: amity
1 Replies
9. Shell Programming and Scripting
Hello,
I am running a post script in autoyast where I am trying to set the broadcast and network address.
I have the ip address and netmask already (reading from a file)..
I saw the post from fpmurphy but it is using ksh which isn't an option in autoyast.
Thanks in advance! (3 Replies)
Discussion started by: bloodclot
3 Replies
10. Solaris
Greetings,
I am using solaris10 x86 OS. I configured IP address using the command.
>ifconfig e1000g0 plumb
>ifconfig e1000g0 200.200.0.1 up
How to make this configured IP as permanent.. to solaris os. (2 Replies)
Discussion started by: bhargav90
2 Replies
LEARN ABOUT NETBSD
getifaddrs
GETIFADDRS(3) BSD Library Functions Manual GETIFADDRS(3)
NAME
getifaddrs -- get interface addresses
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <ifaddrs.h>
int
getifaddrs(struct ifaddrs **ifap);
void
freeifaddrs(struct ifaddrs *ifp);
DESCRIPTION
The getifaddrs() function stores a reference to a linked list of the network interfaces on the local machine in the memory referenced by
ifap. The list consists of ifaddrs structures, as defined in the include file <ifaddrs.h>. The ifaddrs structure contains at least the fol-
lowing entries:
struct ifaddrs *ifa_next; /* Pointer to next struct */
char *ifa_name; /* Interface name */
u_int ifa_flags; /* Interface flags */
struct sockaddr *ifa_addr; /* Interface address */
struct sockaddr *ifa_netmask; /* Interface netmask */
struct sockaddr *ifa_broadaddr; /* Interface broadcast address */
struct sockaddr *ifa_dstaddr; /* P2P interface destination */
void *ifa_data; /* Address specific data */
The ifa_next field contains a pointer to the next structure on the list. This field is NULL in last structure on the list.
The ifa_name field contains the interface name.
The ifa_flags field contains the interface flags, as set by ifconfig(8) utility.
The ifa_addr field references either the address of the interface or the link level address of the interface, if one exists, otherwise it is
NULL. (The sa_family field of the ifa_addr field should be consulted to determine the format of the ifa_addr address.)
The ifa_netmask field references the netmask associated with ifa_addr, if one is set, otherwise it is NULL.
The ifa_broadaddr field, which should only be referenced for non-P2P interfaces, references the broadcast address associated with ifa_addr,
if one exists, otherwise it is NULL.
The ifa_dstaddr field references the destination address on a P2P interface, if one exists, otherwise it is NULL.
The ifa_data field references address family specific data. For AF_LINK addresses it contains a pointer to the struct if_data (as defined in
include file <net/if.h>) which contains various interface attributes and statistics. For all other address families, it is NULL.
The data returned by getifaddrs() is dynamically allocated and should be freed using freeifaddrs() when no longer needed.
RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
The getifaddrs() may fail and set errno for any of the errors specified for the library routines ioctl(2), socket(2), malloc(3) or sysctl(3).
SEE ALSO
ioctl(2), socket(2), sysctl(3), networking(4), ifconfig(8)
HISTORY
The getifaddrs implementation first appeared in BSD/OS.
BUGS
If both <net/if.h> and <ifaddrs.h> are being included, <net/if.h> must be included before <ifaddrs.h>.
BSD
April 21, 2009 BSD