dawnprince 发表于 2014-02-25 13:09

Solaris 11 network ip 设定请问

不好意思,昨天提问的时候放错分类:em06:

以下问题请问:
网卡状态无法判别,DNS无法连上,无法更改路线的位址。

(一)网卡状态无法判别!
root@solaris:~# dladm show-phys
LINK            MEDIA                STATE      SPEEDDUPLEX    DEVICE
net0            Ethernet             unknown    0      unknown   rge0


root@solaris:~# ipadm show-addr
ADDROBJ         TYPE   STATE      ADDR
lo0/v4            static   down         10.13.80.3/16
net0/acme         static   ok         10.13.80.3/24
net0/v4         static   ok         10.13.30.215/23
lo0/v6            static   ok         ::1/128
net0/v6         addrconf ok         fe80::219:21ff:fec2:807a/10

(二)DNS没设好?

root@solaris:~# netstat -r

Routing Table: IPv4
Destination         Gateway         FlagsRef   Use   Interface
-------------------- -------------------- ----- ----- ---------- ---------
default            10.13.80.255         UG      1          0 net0      
10.13.30.0         10.13.80.255         UGH       1          0 net0      
10.13.80.0         t1server             U         4      843 net0      

Routing Table: IPv6
Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- -----
solaris                     solaris                     UH      2       4 lo0   
fe80::/10                   solaris.local.            U       2       0 net0

(三)无法连到其他电脑...
root@solaris:~# ping 10.13.80.31
no answer from 10.13.80.31

root@solaris:~# ifconfig net0 plumb up
ifconfig: cannot plumb net0: Interface already exists

(四)连不了!
root@solaris:~# route -p add default 10.13.1.1 -ifp net0
add net default: gateway 10.13.1.1: Network is unreachable

请问是网卡坏掉吗?还是DNS没设好?该怎么做...这问题我卡很久了,恳请各位帮忙了!

bencyber 发表于 2014-02-25 14:27

回复 1# dawnprince


    由于11的网络设置方式完全变了,请参考这个文章检查你的配置有没有问题吧。

http://www.oracle.com/technetwork/articles/servers-storage-admin/s11-network-config-1632927.html

dawnprince 发表于 2014-02-26 16:22

回复 2# bencyber

请问下列例子中,红色字的部分依照自己需要更改,该如何确定这些位址是否无误?

root@solaris:~# netcfg
netcfg> create ncp acme.corp.ncp
netcfg:ncp:acme.corp.ncp> create ncu phys net0
Created ncu 'net0'.Walking properties ...
activation-mode (manual) >
link-mac-addr>
link-autopush>
link-mtu>
netcfg:ncp:acme.corp.ncp:ncu:net0> list
ncu:net0
    type               link
    class            phys
    parent             "acme.corp.ncp"
    activation-mode    manual
    enabled            true
netcfg:ncp:acme.corp.ncp:ncu:net0> end
Committed changes
netcfg:ncp:acme.corp.ncp> create ncu ip net0
Created ncu 'net0'.Walking properties ...
ip-version (ipv4,ipv6) > ipv4
ipv4-addrsrc (dhcp) > static
ipv4-addr> 10.163.198.20/24
ipv4-default-route> 10.163.198.1
netcfg:ncp:acme.corp.ncp:ncu:net0> list
ncu:net0
    type                interface
    class               ip
    parent            "acme.corp.ncp"
    enabled             true
    ip-version          ipv4
    ipv4-addrsrc      static
    ipv4-addr         "10.163.198.20/24"
   ipv4-default-route"10.163.198.1"
    ipv6-addrsrc      dhcp,autoconf
netcfg:ncp:acme.corp.ncp:ncu:net0> end
Committed changes
netcfg:ncp:acme.corp.ncp> end
netcfg> end

谢谢!

baixianglu 发表于 2014-02-26 17:50

1.从自动网络配置模式转换为手动配置模式
验证NCP

netadm list

netadm enable -p ncp DefaultFixed

2.确认DefaultFixed模式可用
netadm list
netadm: DefaultFixed NCP is enabled;
automatic network management is not available.
netadm list' is only supported when automatic network management is active.
3.确认要配置的接口

# dladm show-phys


4.配置net0

# ipadm create-ip net0
# ipadm create-addr -T static -a 192.168.56.200/24 net0/v4
# ipadm show-addr

5.配置网关


# route -p add default 12.34.56.1
6.配置DNS

root@solaris:~# svccfg -s dns/client
svc:/network/dns/client> setprop config/nameserver = (8.8.8.8 8.8.4.4)
svc:/network/dns/client> listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address 8.8.8.8 8.8.4.4
svc:/network/dns/client> exit
root@solaris:~#
root@solaris:~# svcadm refresh dns/client
root@solaris:~# svcadm restart dns/client
[
7.配置name-server

root@solaris:~# svccfg -s name-service/switch
svc:/system/name-service/switch> setprop config/host ="files dns"
svc:/system/name-service/switch> listprop config
config application
config/default astring files
config/value_authorization astring solaris.smf.value.name-service.switch
config/printer astring "user files"
config/host astring "files dns"
svc:/system/name-service/switch> exit


8.最关键一步验证

google.com is alive

root@solaris:~# ping google.com
google.com is alive

bencyber 发表于 2014-02-28 11:50

回复 4# baixianglu


   真不错!!

119beyond 发表于 2014-02-28 14:19

结果了怎么样?

dawnprince 发表于 2014-03-03 16:58

谢谢!
我设定好后重新启动却发生host name错误…
正在确认:emn16:
页: [1]
查看完整版本: Solaris 11 network ip 设定请问