Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to set server's ip address, router, network mask and set if it is an internal or external ip? Post 302471684 by zagaruika on Sunday 14th of November 2010 05:28:09 PM
Old 11-14-2010
How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful Smilie
I stopped at .. Smilie

#!/bin/sh
A=`hostname -i`
echo "server ip address is $A"

any ideas how to write further?
 

9 More Discussions You Might Find Interesting

1. IP Networking

set ip address

I'm new to Solaris. How do I set a server's IP address? Thanks in advance. (3 Replies)
Discussion started by: confused
3 Replies

2. IP Networking

set the source IP address to zero

Hi, does anybody know how to set the IP source address of an IP packet to be zero? The problem is that when you create a raw socket and set the IP_HDRINCL socket option, if you put the ip_src address to zero (INADDR_ANY) the kernel will automatically set the source address to the primary IP address... (2 Replies)
Discussion started by: developer
2 Replies

3. Solaris

network config problem - how to set the server for others to ssh without password

Hi, I want to ssh the linux server without inputting the password, how can I config this server? Thanks in advance! (1 Reply)
Discussion started by: GCTEII
1 Replies

4. Forum Support Area for Unregistered Users & Account Problems

Email Address set up too late

I set up the email address for my account too late for it to be activated prior to the transmission of the activate message from unix.com. Can you resend that message? (2 Replies)
Discussion started by: Retson Retap
2 Replies

5. HP-UX

Connecting To An External Network Using A logical (PACKAGE) IP Address

Hie everyone, I am currently facing a problem whereby I can not connect to an external network from a package ip address on a HP-UX cluster. Below is the illustration: Primary Server IP Address : n.n.n.202 Secondary Server IP Address : n.n.n.212 Package IP Address : n.n.n.211 ... (1 Reply)
Discussion started by: cchilenga
1 Replies

6. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

7. UNIX for Dummies Questions & Answers

Set internal hard drives unaccessible to imager

Looking for some clues on how to set my internal hard drives inaccessible/busy to clonezilla. Noprobe doesn't work in startup and the drive is still found. I know I can find all hard drives using the following: sudo fdisk -l | grep GB | awk '{print $2}' | grep -Po "^+(?=:?)" I tried... (9 Replies)
Discussion started by: traustic
9 Replies

8. Solaris

i want to set ip address to a virtual machine

hi all i want to set ip address to a vitrual machine i am using following command. but it is not ifconfig -a command output. what is wrong i dont know bash# ifconfig interfacename plumb bash# ifconfig interfacename auto-dhcp Please use code tags next time for your code and data. (4 Replies)
Discussion started by: nikhil kasar
4 Replies

9. Linux

Unable to set static ip address

Hi All, Am using centos 7 in my vmware workstatio with the bridged network. when run the ifconfig cmd its not at all showing the ip address and pls advise how to set static ip address in my linux box. (1 Reply)
Discussion started by: sarathkumar s
1 Replies
ip6config(8)						    BSD System Manager's Manual 					      ip6config(8)

NAME
ip6config -- Configure IPv6 and 6to4 IPv6 tunnelling SYNOPSIS
ip6config [-h] command interface DESCRIPTION
The ip6config script can be used to start up or shut down IPv6 on active interfaces. It can also be used to configure a 6to4 tunnel and start or stop router advertisement. When IPv6 is enabled on an interface the protocol is attached to the interface, at which point the default settings in the kernel allow it to acquire a link-local address and listen for router advertisements. 6to4 is a mechanism by which your IPv6 address(es) are derived from an assigned IPv4 address, and which involves automatic tunnelling to one or more remove 6to4 hubs, which will then forward your v6 packets on the 6bone etc. Replies are routed back to you over IPv4 via (possibly) other 6to4 capable remote gateways. As such, IPv6-in-IPv4-encapsulated packets are accepted from all v4-hosts. From your (single) IPv4 address, you get a whole IPv6 /48 network, which allows you to split your network in 2^16 subnets, with 2^64 hosts each. You need to setup routing for your internal network properly, help is provided for setting up the border router here. This script takes the burden to calculate your IPv6 address from existing IPv4 address and runs the commands to setup (and tear down) auto- matic 6to4 IPv6 tunnelling. Finally, router advertisement for an internal network can be started and stopped. This uses sysctl to set net.inet6.ip6.forwarding and net.inet6.ip6.accept_rtadv to the proper values for routing. Possible options are: -h Show usage. Possible commands are: start-v6 Start IPv6 on given interface using default kernel settings. Attaches protocol to the interface. If interface is "all", all valid interfaces will be configured. stop-v6 Stop IPv6 on given interface. Detaches protocol from the interface. If interface is "all", all valid interfaces will be config- ured. start-stf Configure 6to4 IPv6. The stf(4) interface is configured, and a default route to a remote 6to4 gateway is established. In addi- tion, the internal network interface is assigned an address. stop-stf Stops 6to4 IPv6. All addresses are removed from the stf(4) device, and the default route is removed. start-rtadvd Starts router advertizement and IPv6 packet forwarding, turning the machine into a IPv6 router. rtadvd(8) is invoked with a custom config file created under /var/run. Clients just need to be told to accept router advertizements, i.e. the 'net.inet6.ip6.accept_rtadv' sysctl needs to be set to '1'. You can arrange that by setting ``ip6mode=autohost'' in /etc/rc.conf. stop-rtadvd Stops router advertizement and IPv6 packet forwarding. rtadvd(8) is stopped, and the rtadvd.conf(5) config file is removed from /var/run. REQUIREMENTS
Besides IPv4 connectivity, you need support for IPv6 and the stf(4) device in your kernel. This is provided beginning with Darwin Kernel Ver- sion 6.0. No special values are needed in /etc/rc.conf to run this script, but see comment on setting up IPv6-clients 'behind' your 6to4 router for the rtadvd-start command! CONFIGURATION
The default IPv6 configuration for an interface assigns a link-local address to it and sets the interface to receive router advertisements. No further configuration is necessary for basic functionality. However, various settings can be modified by using sysctl. The ip6config script reads its 6to4 configuration from a config file named 6to4.conf. The 6to4.conf file is in perl(1) syntax, and contains several variables that can be tuned to adjust your setup. in_if The inside interface. If non-empty, this interface is assigned the IPv6 address 2002:x:x:v6_innernet:hostbits6, see below. This is only useful on machines that have more than one network interface, e.g. with a modem and a local ethernet. v6_net The subnet address you want to use on the address of your outbound interface. Defaults to ``1''. v6_innernet The subnet address you want to use on the address of your inbound interface. Defaults to ``2''. hostbits6 The lower 64 bits of both the inbound and outbound interface's addresses. peer Name of the remote 6to4 server that'll take our IPv6-in-IPv4 encapsulated packets and route them on via IPv6. A special value of ``6to4-anycast'' can be used for the anycast service defined in RFC 3068. Other possible values are given in the example config file. SEE ALSO
stf(4), ``6to4 IPv6 Explained'' at http://www.feyrer.de/NetBSD/6to4.html, NetBSD IPv6 Documentation at http://www.netbsd.org/Documentation/network/ipv6/, RFC 3068. HISTORY
The ip6config 6to4 utility and manpage portions were written by Hubert Feyrer <hubert@feyrer.de> for NetBSD. BSD
May 21, 2002 BSD
All times are GMT -4. The time now is 04:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy