2014-05-02 34 views
1

我在備用專用服務器上用SmartOS試驗了一下。 我在服務器上有2個IP地址。對於前1.1.1.1和2.2.2.2(它們不在相同的範圍內)爲 。SmartOS配置區域網絡問題 - 無連接

全局區域已配置我的全局區域中使用的IP 1.1.1.1

這裏是我的全局區域的

[[email protected] ~]# dladm show-link 
LINK  CLASS  MTU STATE BRIDGE  OVER 
igb0  phys  1500 up  --   -- 
igb1  phys  1500 up  --   -- 
net0  vnic  1500 ?  --   igb0 
[[email protected] ~]# dladm show-phys 
LINK   MEDIA    STATE  SPEED DUPLEX DEVICE 
igb0   Ethernet    up   1000 full  igb0 
igb1   Ethernet    up   1000 full  igb1 
[[email protected] ~]# ifconfig 
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 
     inet 127.0.0.1 netmask ff000000 
igb0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2 
     inet 1.1.1.1 netmask ffffff00 broadcast 1.1.1.255 
     ether c:c4:7a:2:xx:xx 
igb1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 
     inet 0.0.0.0 netmask 0 
     ether c:c4:7a:2:xx:xx 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 
     inet6 ::1/128 

我配置了我區通過以下方式配置

[[email protected] ~]# vmadm get 84c201d4-806c-4677-97f9-bc6da7ad9375 | json nics 
[ 
    { 
    "interface": "net0", 
    "mac": "02:00:00:78:xx:xx", 
    "nic_tag": "admin", 
    "gateway": "2.2.2.254", 
    "ip": "2.2.2.2", 
    "netmask": "255.255.255.0", 
    "primary": true 
    } 
] 
[[email protected] ~]# ifconfig 
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 
     inet 127.0.0.1 netmask ff000000 
net0: flags=40001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,L3PROTECT> mtu 1500 index 2 
     inet 2.2.2.2 netmask ffffff00 broadcast 2.2.2.255 
     ether 2:0:0:78:xx:xx 
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 
     inet6 ::1/128 
[[email protected] ~]# dladm show-link 
LINK  CLASS  MTU STATE BRIDGE  OVER 
net0  vnic  1500 up  --   ? 
[[email protected] ~]# netstat -rn 

Routing Table: IPv4 
Destination   Gateway   Flags Ref  Use  Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default    87.98.252.254  UG  2   47 net0 
87.98.252.0   87.98.252.162  U   4   23 net0 
127.0.0.1   127.0.0.1   UH  2   0 lo0 

但是我沒有連接到我的區域的互聯網。 是否有任何配置錯誤?

回答

0

我建議你想繞過你的第二個真正的IP到訪客區。 根據wiki,您應該爲第二個NIC(igb1)配置標籤並將其用於您的訪客區域。