LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Configure IP for net1 (https://www.linuxquestions.org/questions/solaris-opensolaris-20/configure-ip-for-net1-4175465212/)

Huamin 06-08-2013 04:18 AM

Configure IP for net1
 
Hi,
In Oracle Solaris 11, I set up one static IP for net0 like

root@SOL11I:/home/huamin# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/acme static ok 192.168.168.20/24
lo0/v6 static ok ::1/128
root@SOL11I:/home/huamin#

can you please share the details to allocate the Dynamic IP which is from my ISP, to net1?

Many Thanks & Best Regards,
HuaMin

LiNuXkOlOnIe 06-08-2013 04:48 AM

Dont get me wrong but i don't understand clearly what you mean.

Are you connected to your ISP with a router or what is your connection ?

If it is, you get the ip vs DHCP from the router if it is enabled on the router.

If you set up a static ip you have to do it in the router too i think. So the router knows this static ip
belongs to your oracle box.

Huamin 06-09-2013 09:13 AM

Within the same machine, when running Redhat, I am able to have 2 IPs like:
eth0 is static which is 192.168.168.20;
eth1 is having the allocated IP from ISP.

I do want to achieve the same like the above, within Solaris 11. How?

jlliagre 06-09-2013 06:18 PM

On the Linux box, can you post the output of these commands:
Code:

ifconfig -a
dmesg | grep eth

?

Huamin 06-09-2013 08:38 PM

Thanks.
But what I need now, is to have one dynamic IP that is allocated from my ISP, for net1.

jlliagre 06-10-2013 12:57 AM

Please post the output of the commands I asked for as what you are asking for is unclear.

Huamin 06-10-2013 01:35 AM

Please note what I need is in Solaris.

Here are what you have requested.

Code:

root@SOL11I:/home/huamin# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.168.20 netmask ffffff00 broadcast 192.168.168.255
        ether 8:0:27:4:7c:5e
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128
net0: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 2
        inet6 ::/0
        ether 8:0:27:4:7c:5e
root@SOL11I:/home/huamin# dmesg | grep eth
root@SOL11I:/home/huamin#
root@SOL11I:/home/huamin#


jlliagre 06-10-2013 02:40 AM

I understand you are looking for a Solaris answer but as you fail to clearly explain what exactly your want and why, please post these commands output when run on the Red Hat machine you use as a reference.
Please also use code tags around the CLI part of your postings to ease readability.

Huamin 06-10-2013 03:17 AM

Thanks. Here are what I've got from Redhat.

Code:

[root@localhost ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:4D:74:68
          inet addr:192.168.168.21  Bcast:192.168.168.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe4d:7468/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:6553 (6.3 KiB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:C4:03:D0
          inet addr:?.?.242.31  Bcast:?.?.255.255  Mask:255.255.240.0
          inet6 addr: fe80::a00:27ff:fec4:3d0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:155 errors:0 dropped:0 overruns:0 frame:0
          TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15400 (15.0 KiB)  TX bytes:10318 (10.0 KiB)

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:1477 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1477 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3713980 (3.5 MiB)  TX bytes:3713980 (3.5 MiB)

[root@localhost ~]# dmesg | grep eth
e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000: eth1: e1000_probe: Intel(R) PRO/1000 Network Connection
e1000: eth0: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
e1000: eth1: e1000_watchdog_task: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
ADDRCONF(NETDEV_UP): eth1: link is not ready
ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
eth0: no IPv6 routers present
eth1: no IPv6 routers present
[root@localhost ~]#


jlliagre 06-11-2013 12:42 AM

Ok, so you have two NICs.

Assuming "netadm list" shows
Code:

ncp        DefaultFixed  enabled
You shouldbe able to set the net1 interface like this:

Code:

ipadm create-addr -T dhcp net1/dhaddr


All times are GMT -5. The time now is 12:36 PM.