Sponsored Content
Full Discussion: New ip setting
Top Forums UNIX for Dummies Questions & Answers New ip setting Post 61131 by kuultak on Saturday 29th of January 2005 04:13:53 AM
Old 01-29-2005
New ip setting

I want to change the IPsetting and the broadcast setting.
With ipconfig I get this:
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet xx.17x.18x.xx netmask fffffff0 broadcast xx.17x.18x.xx
ether yy:0:yy:b6:yy:xx

What command(squence) do I use to change the inet and broadcast? Or where do I find that sequence?

Does changing this automatcally change the telnet IP as well?
 

10 More Discussions You Might Find Interesting

1. Debian

Setting Routes and such

Ok, I made changes to my routing tables..... which file do I modify to make the routes initialize correctly when the machine boots up? I work with all flavours of Unix/Linux... but this is an older box... Linux, Release 2.2.14-5.0. I did a grep for the default route in /etc, but didnt find... (2 Replies)
Discussion started by: djsal
2 Replies

2. Shell Programming and Scripting

Setting Ulimit

How do i set ulimit for user (4 Replies)
Discussion started by: Krrishv
4 Replies

3. UNIX for Dummies Questions & Answers

UMASK setting

How can we set the Sticky bit in the umask itself. Please help me :confused: I tried to set like umask 1000 but when I run umask, the value of umask is 00 (0 Replies)
Discussion started by: geniman2004
0 Replies

4. Shell Programming and Scripting

Setting the date.

I am modifying some script and need to have the script reflect the current date. I have the script below. In the section yy="2010",mm="07", dd="12" What would I need to change to have the script automatically input the current year month & date instead of manually updated the script daily? ... (2 Replies)
Discussion started by: libertyforall
2 Replies

5. UNIX for Dummies Questions & Answers

Need some help on setting up rsync

I need to "sync" a directory from a prod server to a test server. Rsync is working but it prompts for a password and I'd like to automate the process. The directory on the prod/source server is owned by root, and some subdirectories are only readable by root. On the test/destination servers, I can... (1 Reply)
Discussion started by: LAToro
1 Replies

6. Shell Programming and Scripting

alias setting

I want to set an alias to connect to sqlplus and also run a command while it it logs in. How can I do that? (4 Replies)
Discussion started by: som.nitk
4 Replies

7. Red Hat

Cronjob setting

Hi there There's a script I would like to run daily every 5 minutes and this job should restart every 12:03AM so it would append to a new file with the following day date format instead of running and updating continuously into one log. I am not sure of the syntaxing, what I did was to set it... (9 Replies)
Discussion started by: hedkandi
9 Replies

8. UNIX for Dummies Questions & Answers

Setting up Xlaunch

I have a Win7 laptop that I have installed Xming with Xlaunch so that I can remote a Solaris10 server. After the initial install on my Win7 machine what do I need to set and configure to be able to remote Solaris. This is my 3rd day working with Unix. (1 Reply)
Discussion started by: SIFT3R
1 Replies

9. UNIX for Dummies Questions & Answers

Setting PS1

I have set PSI for my prompt using the following command: PS1="${debian_chroot:+($debian_chroot)}\\u@\h:\\\w\a]\ "which produces chrisd@pguk:~]I want to include [ in the beginning but cannot understand the way to do this. Also I want to show only the current directory, not the whole... (4 Replies)
Discussion started by: kristinu
4 Replies

10. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies
Interface(3pm)						User Contributed Perl Documentation					    Interface(3pm)

NAME
IO::Interface - Perl extension for access to network card configuration information SYNOPSIS
# ====================== # the new, preferred API # ====================== use IO::Interface::Simple; my $if1 = IO::Interface::Simple->new('eth0'); my $if2 = IO::Interface::Simple->new_from_address('127.0.0.1'); my $if3 = IO::Interface::Simple->new_from_index(1); my @interfaces = IO::Interface::Simple->interfaces; for my $if (@interfaces) { print "interface = $if "; print "addr = ",$if->address," ", "broadcast = ",$if->broadcast," ", "netmask = ",$if->netmask," ", "dstaddr = ",$if->dstaddr," ", "hwaddr = ",$if->hwaddr," ", "mtu = ",$if->mtu," ", "metric = ",$if->metric," ", "index = ",$if->index," "; print "is running " if $if->is_running; print "is broadcast " if $if->is_broadcast; print "is p-to-p " if $if->is_pt2pt; print "is loopback " if $if->is_loopback; print "is promiscuous " if $if->is_promiscuous; print "is multicast " if $if->is_multicast; print "is notrailers " if $if->is_notrailers; print "is noarp " if $if->is_noarp; } # =========== # the old API # =========== use IO::Socket; use IO::Interface qw(:flags); my $s = IO::Socket::INET->new(Proto => 'udp'); my @interfaces = $s->if_list; for my $if (@interfaces) { print "interface = $if "; my $flags = $s->if_flags($if); print "addr = ",$s->if_addr($if)," ", "broadcast = ",$s->if_broadcast($if)," ", "netmask = ",$s->if_netmask($if)," ", "dstaddr = ",$s->if_dstaddr($if)," ", "hwaddr = ",$s->if_hwaddr($if)," "; print "is running " if $flags & IFF_RUNNING; print "is broadcast " if $flags & IFF_BROADCAST; print "is p-to-p " if $flags & IFF_POINTOPOINT; print "is loopback " if $flags & IFF_LOOPBACK; print "is promiscuous " if $flags & IFF_PROMISC; print "is multicast " if $flags & IFF_MULTICAST; print "is notrailers " if $flags & IFF_NOTRAILERS; print "is noarp " if $flags & IFF_NOARP; } my $interface = $s->addr_to_interface('127.0.0.1'); DESCRIPTION
IO::Interface adds methods to IO::Socket objects that allows them to be used to retrieve and change information about the network interfaces on your system. In addition to the object-oriented access methods, you can use a function-oriented style. THIS API IS DEPRECATED. Please see IO::Interface::Simple for the preferred way to get and set interface configuration information. Creating a Socket to Access Interface Information You must create a socket before you can access interface information. The socket does not have to be connected to a remote site, or even used for communication. The simplest procedure is to create a UDP protocol socket: my $s = IO::Socket::INET->new(Proto => 'udp'); The various IO::Interface functions will now be available as methods on this socket. Methods @iflist = $s->if_list The if_list() method will return a list of active interface names, for example "eth0" or "tu0". If no interfaces are configured and running, returns an empty list. $addr = $s->if_addr($ifname [,$newaddr]) if_addr() gets or sets the interface address. Call with the interface name to retrieve the address (in dotted decimal format). Call with a new address to set the interface. In the latter case, the routine will return a true value if the operation was successful. my $oldaddr = $s->if_addr('eth0'); $s->if_addr('eth0','192.168.8.10') || die "couldn't set address: $!"; Special case: the address of the pseudo-device "any" will return the IP address "0.0.0.0", which corresponds to the INADDR_ANY constant. $broadcast = $s->if_broadcast($ifname [,$newbroadcast] Get or set the interface broadcast address. If the interface does not have a broadcast address, returns undef. $mask = $s->if_netmask($ifname [,$newmask]) Get or set the interface netmask. $dstaddr = $s->if_dstaddr($ifname [,$newdest]) Get or set the destination address for point-to-point interfaces. $hwaddr = $s->if_hwaddr($ifname [,$newhwaddr]) Get or set the hardware address for the interface. Currently only ethernet addresses in the form "00:60:2D:2D:51:70" are accepted. $flags = $s->if_flags($ifname [,$newflags]) Get or set the flags for the interface. The flags are a bitmask formed from a series of constants. See "Exportable constants" below. $ifname = $s->addr_to_interface($ifaddr) Given an interface address in dotted form, returns the name of the interface associated with it. Special case: the INADDR_ANY address, 0.0.0.0 will return a pseudo-interface name of "any". EXPORT IO::Interface exports nothing by default. However, you can import the following symbol groups into your namespace: :functions Function-oriented interface (see below) :flags Flag constants (see below) :all All of the above Function-Oriented Interface By importing the ":functions" set, you can access IO::Interface in a function-oriented manner. This imports all the methods described above into your namespace. Example: use IO::Socket; use IO::Interface ':functions'; my $sock = IO::Socket::INET->new(Proto=>'udp'); my @interfaces = if_list($sock); print "address = ",if_addr($sock,$interfaces[0]); Exportable constants The ":flags" constant imports the following constants for use with the flags returned by if_flags(): IFF_ALLMULTI IFF_AUTOMEDIA IFF_BROADCAST IFF_DEBUG IFF_LOOPBACK IFF_MASTER IFF_MULTICAST IFF_NOARP IFF_NOTRAILERS IFF_POINTOPOINT IFF_PORTSEL IFF_PROMISC IFF_RUNNING IFF_SLAVE IFF_UP This example determines whether interface 'tu0' supports multicasting: use IO::Socket; use IO::Interface ':flags'; my $sock = IO::Socket::INET->new(Proto=>'udp'); print "can multicast! " if $sock->if_flags & IFF_MULTICAST. AUTHOR
Lincoln Stein <lstein@cshl.org> This module is distributed under the same license as Perl itself. SEE ALSO
perl(1), IO::Socket(3), IO::Multicast(3), IO::Interface::Simple perl v5.14.2 2011-07-21 Interface(3pm)
All times are GMT -4. The time now is 07:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy